VideoHelp Forum




+ Reply to Thread
Results 1 to 10 of 10
  1. Hello,

    I'm looking for a cli avi bitrate calculator that I can include in my bat scripts.

    Please don't point me at GUI clients as they are no use for me at all..


    I would like to be able to include the size of a VBR MP3 to calculate the bitrate
    Quote Quote  
  2. Man of Steel freebird73717's Avatar
    Join Date
    Dec 2003
    Location
    Smallville, USA
    Search PM
    I've honestly never seen a cli bitrate calculator. It's an interesting concept. Give the exe some parameters like -h for hours , -m for minutes, -a for audio, and -s for size in MB. That would then output the videos bitrate to stdout. It's certainly possible.

    How would you plan to integrate something like this into a bat script? Post an example script if possible
    Donadagohvi (Cherokee for "Until we meet again")
    Quote Quote  
  3. Well I know for a fact that mencoder can encode to a given filesize using bitrate=-value


    bitrate=value would use the give number as bitrate
    bitrate=-value would try to encode to a given filesize


    I've already compiled the python script by Marc Rintsch and converted it to an exe file using py2exe

    http://bj.spline.de/bitrate-man.html





    Using mediainfo.exe (cli) I can parse some usefull information like framerate, amount of frames, duration, etc and use them in my bat:

    bitrate.exe -f %framerate% -o 0.19 -t %4 %timecode% "%demuxedaudiopath%" > %2\bitrate.log



    This script is actually not very accurate so i'm looking into a replacement..




    Too bad this guy's script is unfindeable:

    http://forum.doom9.org/archive/index.php/t-86634.html
    Quote Quote  
  4. Man of Steel freebird73717's Avatar
    Join Date
    Dec 2003
    Location
    Smallville, USA
    Search PM
    You could log into doom9 and send a pm to the guy to ask if he still has the code and see if he responds
    Donadagohvi (Cherokee for "Until we meet again")
    Quote Quote  
  5. Ofcourse I already did that hehe
    Quote Quote  
  6. Member
    Join Date
    Oct 2010
    Location
    England
    Search Comp PM
    Originally Posted by sardonis View Post
    Using mediainfo.exe (cli) I can parse some usefull information like framerate, amount of frames, duration, etc and use them in my bat
    mediainfo (cli) can return a huge number of values, including:
    - total bitrate
    - video bitrate
    - audio bitrate
    etc

    For example:
    mediainfo --Inform="General;%OverallBitRate%" inception_trailer.mp4
    returns:
    2879058
    the overall bitrate in bits per second.

    mediainfo --Info-Parameters
    returns a list of available options
    Quote Quote  
  7. Correct, but you don't understand my question.

    I want to convert MPG to AVI using the xvid codec.


    Given the fact that I want to encode to a specific filesize I need to calculate the bitrate.


    Right now i'm using mencoder to encode to a specific size like I said before.

    - First I demux my mp2 audio file from the mpeg using dgindex.
    - then convert the mp2 to mp3 using lame
    - parse the filesize of the mp3
    - VIDEO + AUDIO + OVERHEAD = AVI

    X + 45MB + (amount of frames of mpg * 25 bytes) = 358400kb

    But I want to switch to a ffmpeg build with Multithreading to encode faster. But unfortunately ffmpeg cannot encode to a given filesize. It only accepts a bitrate value..
    Quote Quote  
  8. Windows CLI built in calculator: http://labnol.blogspot.com/2006/05/set-dos-command-line-calculator.html
    Linux has bc: http://linux.about.com/od/commands/l/blcmdl1_bc.htm

    Though I don't know why anyone bothers with bitrate based encoding with Xvid anymore.
    Last edited by jagabo; 23rd Mar 2011 at 10:24.
    Quote Quote  
  9. Originally Posted by jagabo View Post
    Windows CLI built in calculator: http://labnol.blogspot.com/2006/05/set-dos-command-line-calculator.html
    Linux has bc: http://linux.about.com/od/commands/l/blcmdl1_bc.htm

    Though I don't know why anyone bothers with bitrate based encoding with Xvid anymore.

    I know how to calculate, that's not my problem dear jagabo.


    Please stick to my question.
    Quote Quote  
  10. Originally Posted by sardonis View Post
    Originally Posted by jagabo View Post
    Windows CLI built in calculator: http://labnol.blogspot.com/2006/05/set-dos-command-line-calculator.html
    Linux has bc: http://linux.about.com/od/commands/l/blcmdl1_bc.htm

    Though I don't know why anyone bothers with bitrate based encoding with Xvid anymore.

    I know how to calculate
    Then just download the source to any of the open source bitrate calculators and fine tune the equations to account for the idiosyncrasies of mencoder.
    Quote Quote  



Similar Threads

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