VideoHelp Forum




+ Reply to Thread
Results 1 to 8 of 8
  1. Member RogerTango's Avatar
    Join Date
    Nov 2007
    Location
    United States
    Search Comp PM
    Here is the line I am using:
    ffmpeg -i "input.avs" -vcodec libxvid -s 1280x720 -b 5500k -acodec libmp3lame -ab 128k -r 30 -ar 44100 -aspect 16:9 -g 20 -y -f avi "output.avi"

    The arguments work FINE, but is yielding VBR MP3.

    How can I modify my line to encode CBR MP3?

    Thanks for any help,
    Andrew
    Quote Quote  
  2. Member AlanHK's Avatar
    Join Date
    Apr 2006
    Location
    Hong Kong
    Search Comp PM
    See http://lame.cvs.sourceforge.net/*checkout*/lame/lame/doc/html/switchs.html

    * --cbr enforce use of constant bitrate
    This switch enforces the use of constant bitrate encoding.

    * --abr n average bitrate encoding
    Turns on encoding with a targeted average bitrate of n kbits, allowing to use frames of different sizes. The allowed range of n is 8-310, you can use any integer value within that range.

    * -b n bitrate

    * -B n maximum VBR/ABR bitrate
    So it looks like "-ab" is "average bitrate" (vbr).
    If --cbr doesn't work try setting -b and/or -B instead of -ab

    (Assuming these switches work the same in ffmpeg.)

    PS: Where did you get a build of ffmpeg that supports Avisynth?
    I see http://www.ffmpeg.org/faq.html#TOC28 says "If you have built FFmpeg with ./configure --enable-avisynth...."
    But I don't want to try to roll my own.
    Last edited by AlanHK; 16th May 2010 at 19:15.
    Quote Quote  
  3. Member RogerTango's Avatar
    Join Date
    Nov 2007
    Location
    United States
    Search Comp PM
    The LAME switches are not valid in FFMPEG, the -AB switch is different, this is AudioBitrate.

    The FFMPEG I have is the Win32 binary I download, I dont recall where, but it is r16596 Jan 14, 2009 build.

    I *may* have to just do the vid in FFMPEG, the audio in LAME and then mux into AVI, I just wanted a "one stop solution".

    Andrew
    Quote Quote  
  4. Member AlanHK's Avatar
    Join Date
    Apr 2006
    Location
    Hong Kong
    Search Comp PM
    Are you sure that it's VBR?
    According to this thread:
    http://lists.mplayerhq.hu/pipermail/ffmpeg-user/2008-November/017719.html
    it's really CBR, but flagged VBR in the header.

    I found the ffmpeg included in Avanti supports Avisynth.
    Last edited by AlanHK; 16th May 2010 at 19:20.
    Quote Quote  
  5. Member RogerTango's Avatar
    Join Date
    Nov 2007
    Location
    United States
    Search Comp PM
    According to VirtualDub, the read AVI is reported to have a VBR MP3, I dont know if it is the header, or the entire MP3 segment is VBR.

    I feel that a CBR should be marked as CBR, and VBR be marked as VBR. It almost seams to me to be illogical to generate a CBR audio and then header it as VBR.

    I know a lot about video and audio, but when it gets to the headers, how it's used, manipulating it, etc.. Im no expert. This information is beyond my scope of needs, so I dont dive that far into the technical aspects.

    UPDATE:
    I just looked at the resulting AVI with MediaInfo, this is reported:
    Bit rate mode : Constant
    Bit rate : 128 Kbps

    GSpot also reports it to be CBR.

    It appears it *IS* CBR, but for some reason VDub is reading VBR...

    This thread can be considered "closed", many thanks to Alan for your time and effort!

    Andrew
    Quote Quote  
  6. Member RogerTango's Avatar
    Join Date
    Nov 2007
    Location
    United States
    Search Comp PM
    I just had VirtualDubMod write a piece of the original AVI, using direct stream copy for both audio and video, and in the beginning when I loaded it it reported VBR, "Should I rewrite the header?", I told it no... Then used MediaInfo to look at the cropped AVI.. That *ALSO* shows CBR MP3 stream...

    It looks like its more of a "problem" with VirtualDub... I dont think any other software has given me any problems.

    Andrew
    Quote Quote  
  7. Member AlanHK's Avatar
    Join Date
    Apr 2006
    Location
    Hong Kong
    Search Comp PM
    Originally Posted by RogerTango View Post
    I just had VirtualDubMod write a piece of the original AVI, using direct stream copy for both audio and video, and in the beginning when I loaded it it reported VBR, "Should I rewrite the header?", I told it no... Then used MediaInfo to look at the cropped AVI.. That *ALSO* shows CBR MP3 stream...

    In posts in the thread I linked people say that letting VDub rewrite the header fixes the (apparent) problem.
    Quote Quote  
  8. I would rather suggest use WinFF gui for FFMpeg with additional command line options for CBR.
    Quote Quote  



Similar Threads

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