Converting video (AVI, MOV, MPG, MP4) to FLV using FFmpeg
Firstly you need to download FFmpeg from the FFmpeg website
To convert your file use the following command.
ffmpeg -i "C:\videos\videoname.mov" -ar 44100 -ab 96 -f flv "C:\videos\videoname.flv"
- ffmpeg - runs the program
- -i "filename.ext" - input file
- -ar 44100 - audio frequency
- -ab 96 - audio bitrate
- -f flv - force format followed by format
- "newfilename.ext" - output file
I used these settings to convert some 500MB+ Apple Quicktime (MOV) files down to ~20MB FLV which were perfect for uploading to YouTube.
Comments
Andy
Wed, 2012-03-21 23:20
Permalink
Convert MP4 to FLV
Thanks - your command worked fine with MP4 videos as well
Antani
Tue, 2012-05-08 12:15
Permalink
it works
Thanks!
PC Share
Sat, 2012-07-21 23:15
Permalink
Thanks the parameters worked...
I did a batch conversion using your parameters for MP4 to FLV. Used:
MP4_TO_FLV.BAT
---------------------------
IF EXIST "%1.flv" GOTO exit
ffmpeg -i %1 -ar 44100 -ab 96 -f flv %1.flv
:exit
BATCH_MP4_TO_FLV.BAT
---------------------------------------
for %%i IN (*.mp4) DO (mp4_to_flv.bat "%%i")
Only thing is the file name contains the old MP4 prior to FLV extension, ie myfile.mp4.flv. Manually removing ".mp4" from 90 files is not fun.
Tim
Thu, 2013-02-14 14:22
Permalink
There are some tricks that
There are some tricks that you can do in a FOR loop to manipulate the filenames. Try something like:
for %%d in (*.mp4) DO ffmpeg -i %%d -ar 44100 -ab 96 -f flv %%~nd.flv
(note that this will not check for the destination file first..).
The %~nD gets JUSt the filename from the variable. See For /? for some more info on that.
Jesse
Thu, 2013-01-31 16:39
Permalink
Works for Linux too
The example is for windows, but works perfectly well for linux too. Thanks!
Florian
Mon, 2013-03-04 17:02
Permalink
Works on MacOS as well :)
That's it, thank you!
LouieK
Mon, 2013-03-11 09:13
Permalink
I see this was posted some
I see this was posted some years ago but it worked flawlessly! I Had trouble getting .mov files to play in VLC due to the codec I think, I kept getting a blank screen with just audio. But this fixed all that, I can finally watch these video without having to mess around with quicktime. Thank you!