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
+ Reply to Thread
Results 1 to 10 of 10
-
-
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 possibleDonadagohvi (Cherokee for "Until we meet again") -
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 -
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") -
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 -
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.. -
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.
-
Similar Threads
-
CrossPlatform command line tool to multiplex avi files?
By Selur in forum Newbie / General discussionsReplies: 0Last Post: 23rd Mar 2012, 15:29 -
Windows 7 Command line converter MOV to AVI
By guy lemaire in forum Video ConversionReplies: 2Last Post: 18th Oct 2010, 19:24 -
Command-line command for fixing AVI?
By timur in forum ffmpegX general discussionReplies: 1Last Post: 23rd Sep 2009, 02:23 -
Command line tool to take AVI samples
By Dean C in forum EditingReplies: 6Last Post: 9th Sep 2008, 05:55 -
MPEG2 > RAW AVI via Command Line
By jwoodsfsp in forum Video ConversionReplies: 13Last Post: 30th Jul 2007, 20:36