VideoHelp Forum




+ Reply to Thread
Results 1 to 6 of 6
  1. Hello, easy question coming your way.

    I'm trying this in the command line:

    Code:
    ffmpeg -i "movie.avi" -y "movie.flv"
    The following error is returned:

    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 ?)
    Other information seen before the error is:

    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
    Okay, I need to change the sample rate for the FLV file. Something like this is required:

    Code:
    ffmpeg -i "movie.avi" -sample_rate 44100 -y "movie.flv"
    (The command here above gives the same error message.)

    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!
    Quote Quote  
  2. There's not a chance that nobody here can answer this simple question.
    Quote Quote  
  3. Member
    Join Date
    Dec 2004
    Location
    Australia
    Search Comp PM
    From ffmpeg's help:
    -ar rate set audio sampling rate (in Hz)
    Quote Quote  
  4. 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
    This is what I got:

    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 ?)
    Same error as before. And it suggest I use 44100. (For the record, I've tried using the other two also, same error.)

    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
    It's still 16000! Why? Someone should know the answer, please help. =)
    Quote Quote  
  5. 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"
    Got it from here: http://hardyw3b.wordpress.com/ffmpeg-tutorial/

    Suspect it has to do with "-y", which makes FFMPEG overwrite output data.
    Quote Quote  
  6. 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).
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!