Hello, easy question coming your way.
I'm trying this in the command line:
The following error is returned:Code:ffmpeg -i "movie.avi" -y "movie.flv"
Other information seen before the error is:Code:[mp3 @ 00902E28]flv doesnt support that sample rate, choose from (44100, 22050, 11025) Could not write header for output file #0 (incorrect codec parameters ?)
Okay, I need to change the sample rate for the FLV file. Something like this is required:Code:FFmpeg version SVN-r5570, Copyright (c) 2000-2004 Fabrice Bellard configuration: --enable-theora --enable-mp3lame --enable-libogg --enable-vorb is --enable-faad --enable-faac --enable-xvid --enable-x264 --enable-mingw32 --en able-a52 --enable-dts --enable-pp --enable-gpl --enable-memalign-hack --enable-a mr_nb --enable-amr_wb --enable-pthreads --enable-dirac libavutil version: 49.0.0 libavcodec version: 51.9.0 libavformat version: 50.4.0 built on Jul 2 2006 16:55:46, gcc: 4.0.3 Input #0, avi, from 'imb.avi': Duration: 00:12:56.4, start: 0.000000, bitrate: 544 kb/s Stream #0.0: Video: mpeg4, yuv420p, 640x480, 29.98 fps(r) Stream #0.1: Audio: mp3, 16000 Hz, mono, 16 kb/s Output #0, flv, to 'imb3.flv': Stream #0.0: Video: flv, yuv420p, 640x480, q=2-31, 200 kb/s, 29.98 fps(c) Stream #0.1: Audio: mp3, 16000 Hz, mono, 64 kb/s Stream mapping: Stream #0.0 -> #0.0 Stream #0.1 -> #0.1
(The command here above gives the same error message.)Code:ffmpeg -i "movie.avi" -sample_rate 44100 -y "movie.flv"
Now for the big question: How do I set the sample rate of the output file (FLV)?
I have googled like crazy for the answer but found nothing useful. Thanks in advance!
+ Reply to Thread
Results 1 to 6 of 6
-
-
Thanks for your reply. But it didn't work. =/ Tried it before and thought it would work, but since it didn't I had to post here.
This is what I tried:
Code:ffmpeg -i "movie.avi" -y "movie.flv" -ar 44100
Code:FFmpeg version SVN-r5570, Copyright (c) 2000-2004 Fabrice Bellard configuration: --enable-theora --enable-mp3lame --enable-libogg --enable-vorb is --enable-faad --enable-faac --enable-xvid --enable-x264 --enable-mingw32 --en able-a52 --enable-dts --enable-pp --enable-gpl --enable-memalign-hack --enable-a mr_nb --enable-amr_wb --enable-pthreads --enable-dirac libavutil version: 49.0.0 libavcodec version: 51.9.0 libavformat version: 50.4.0 built on Jul 2 2006 16:55:46, gcc: 4.0.3 Input #0, avi, from 'movie.avi': Duration: 00:12:56.4, start: 0.000000, bitrate: 544 kb/s Stream #0.0: Video: mpeg4, yuv420p, 640x480, 29.98 fps(r) Stream #0.1: Audio: mp3, 16000 Hz, mono, 16 kb/s Output #0, flv, to 'movie.flv': Stream #0.0: Video: flv, yuv420p, 640x480, q=2-31, 200 kb/s, 29.98 fps(c) Stream #0.1: Audio: mp3, 16000 Hz, mono, 64 kb/s Stream mapping: Stream #0.0 -> #0.0 Stream #0.1 -> #0.1 [mp3 @ 00902E28]flv doesnt support that sample rate, choose from (44100, 22050, 11025) Could not write header for output file #0 (incorrect codec parameters ?)
The thing is "-ar 44100" doesn't seem to do anything. Notice this:
Code:Output #0, flv, to 'movie.flv': Stream #0.0: Video: flv, yuv420p, 640x480, q=2-31, 200 kb/s, 29.98 fps(c) Stream #0.1: Audio: mp3, 16000 Hz, mono, 64 kb/s
-
Hm, I got it to work with this:
Code:ffmpeg -i "movie.avi" -y -f flv -ar 44100 -ab 64 -ac 1 -acodec mp3 "movie.flv"
Suspect it has to do with "-y", which makes FFMPEG overwrite output data. -
It was probably the -ar 44100 that got it to work. I'm not sure whether this is an ffmpeg limitation or an FLV limitation, but only 44100-Hz, 22050-Hz, and 11025-Hz audio streams are supported for FLVs.
Your -y was only keeping ffmpeg from prompting you to overwrite movie.flv.
In your previous example which didn't work (ffmpeg -i "movie.avi" -y "movie.flv" -ar 44100), you placed the -ar 44100 after the output-file name, so ffmpeg didn't recognize it. The output-file name should be the last thing in the command line. Perhaps you could try the following to verify: ffmpeg -i movie.avi -ar 22050 movie.flv
Since the original sample rate, in this case, was 16000 Hertz, the -ar 44100 wouldn't give you any advantage over -ar 22050, and 22050 will generate a smaller output file (less bandwidth).
Similar Threads
-
Yet Another Sample-Rate-Conversion Tool
By El Heggunte in forum AudioReplies: 2Last Post: 11th Dec 2009, 19:57 -
[SOLVED!] Converting Variable Sample Rate to Constant Sample Rate
By Midzuki in forum AudioReplies: 17Last Post: 24th May 2009, 10:26 -
Sample Rate Differences?!
By GangstaRap in forum Video ConversionReplies: 1Last Post: 27th Dec 2007, 05:28 -
DVD Audio To .wav Sample Rate Question
By xtreme469 in forum AudioReplies: 3Last Post: 29th Sep 2007, 09:04 -
inconsistent audio sample rate error in FCE...
By ednarophati in forum MacReplies: 1Last Post: 23rd Aug 2007, 13:59