Convert video format from FLV to Avi

Source: Internet
Author: User

Recently, due to the need to convert some videos from the FLV format to the AVI format, I wrote the following script to automate the conversion:

#! /Bin/bashffcmd = '/cygdrive/C/work-DIR/FFMPEG/ffmpeg.exe' # path to ffmpe tools # Check output directory existif! Test-d $2; then mkdir $ 2FI # Convert FLV to avifor F in $ (ls $1 /*. FLV); do if test-F $ F then ECHO-e "\ nconverting $ F" FILENAME =$ (basename $ f | cut-d '. '-F 1) # echo $ filename $ ffcmd-I $ F-R 25-B 750 k-y $ filename. avi 2> log.txt MV-F $ filename. avi $2 else echo-e "\ nskipping $ F-not a regular file "; fidone # usage # You can convert the all of FLV files in FLV-Folder/to AVI file located in out-Avi-Folder/by following command # $. /convert-flv-2-avi.sh FLV-Folder/out-Avi-Folder/

 

For video/audio conversion, usually use FFMPEG this tool, details can refer to: http://www.ffmpeg.org/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.