Hi,
How do i set a bitrate here? I'm doing
ffmpeg.exe -i in.wmv -acodec libvorbis -ac 2 -ab 64k -ar 48000 -s 480×270 out.webm
Is a variable bitrate possible with ffmpeg? How can I do multiple passes?
I don't know what most of these switches mean, i just copied this template from somewhere.
I'm using the latest build of the 0.6 branch (?)
FFmpeg version SVN-r25603, Copyright (c) 2000-2010 the FFmpeg developers
built on Oct 30 2010 04:06:46 with gcc 4.4.2
Thanks!
+ Reply to Thread
Results 1 to 9 of 9
-
-
Hi
Your basic command is like this:-
Code:ffmpeg.exe -i in.wmv -acodec libvorbis -vcodec libvpx out.webm
If you want to change the audio bitrate then add a 'quality' parameter like this:-
Code:ffmpeg.exe -i in.wmv -acodec libvorbis -aq 6 -vcodec libvpx out.webm
If you want to change the video bitrate then add a parameter like this:-
Code:ffmpeg.exe -i in.wmv -acodec libvorbis -aq 6 -vcodec libvpx -b 512k out.webm
With Linux I've used commands like this:-
Code:ffmpeg -i foo -pass 1 -vcodec libvpx -b 512k -f rawvideo -an /dev/null && ffmpeg -i foo -pass 2 -acodec libvorbis -aq 6 -vcodec libvpx -b 512k output.webm
The video isn't needed (dumped to /dev/null).
Then the second pass encodes the audio and encodes the video using information gathered in the first pass.
There's probably a similar command to use with Windows.
PS
The -s switch in your original command sets the picture size.
It's recommended not to use switches like this:- -ac 2 -ab 64k -ar 48000 for Vorbis. Just use the -aq switch instead.
Last edited by bat999; 30th Oct 2010 at 08:20.
-
you shouldnt use ffmpeg to convert to webm, ffmpeg oversizes the final output and its muxer cause playback problems on browsers
use Nic's ivfenc with avs support to create "proper" webm files:
the following example will create a video with 650k video bitrate, audio at 64K @44100
Code:ivfenc --target-bitrate=650 01.avs out.ivf -p 2 ffmpeg -i 01.avs -acodec pcm_s16le -vn out.wav oggenc2.exe --resample 44100 -b 64 out.wav mkvmerge --timecode-scale 1000000 --disable-lacing out.ivf out.ogg -o out.webm
http://forum.doom9.org/showthread.php?p=1442219#post1442219Last edited by ricardouk; 30th Oct 2010 at 14:30.
I love it when a plan comes together! -
@ricardouk
I don't know who your post is directed to.
I only hope you're not trying to tell me which software I should and shouldn't use. -
by not having english as my first language might cause "interpretation" issues, all i was doing was sharing info like i usually do since i joined videohelp.
I noticed you suggested ffmpeg and when i said "shouldn't" its more like an "i dont advise to use it"
quick experiment:
convert an sample video with ffmpeg, ivfenc (now called vpxenc i think) and makewebm, if you use the same audio/video bitrate with all of them they should produce a file with more or less the same size but ffmpeg oversizes the file, this has been discussed over at doom9 and you can check the results and findings over there (you wont see much difference on a 1 min video sample but try a 10min video and you'll notice it), the ffmpeg muxer has its issues as well and after reading your post i voiced my opinion taking in consideration what i read and learned.
in no way im saying you should not use ffmpeg altough i can understand why my comment wasnt understood as i wanted.
when i said "shouldn't" i meant "i dont advise", its one of the quirks of an international forum.Last edited by ricardouk; 30th Oct 2010 at 17:07.
I love it when a plan comes together! -
I can see how ffmpeg does something to the file size because when i go
Code:ffmpeg.exe -i in.wmv -acodec libvorbis -aq 1 -vcodec libvpx -s 480×270 -b 150k out.webm
Code:ffmpeg.exe -i in.wmv -acodec libvorbis -aq 1 -vcodec libvpx -s 480×270 -b 200k out.webm
the only problem I have with ricardouk's method is that my input file needs to be a AVS. How do I make an AVS? -
just a thought. I downloaded the latest ffmpeg build from here
http://ffmpeg.arrozcru.org/autobuilds/
would these latest builds have the latest libvpx (0.95)?
http://code.google.com/p/webm/downloads/list -
on first example you used 150 as video bitrate on the second one you used 200 thts why you have 2 differente sizes.
my example needs avs input but you can use Autowebm (its a gui for ivfenc and makewebm)
http://forum.doom9.org/showthread.php?p=1410895#post1410895I love it when a plan comes together!
Similar Threads
-
I'm trying to open .WebM in VirtualDub
By alinhoalisson in forum Video ConversionReplies: 25Last Post: 22nd Sep 2014, 05:20 -
VP8 vs x264
By Selur in forum Video ConversionReplies: 14Last Post: 14th Apr 2012, 07:48 -
VP8 adding frames, what did I do wrong?
By Selur in forum Newbie / General discussionsReplies: 8Last Post: 12th Apr 2012, 13:52 -
FFmpeg Webm Error
By carrau in forum Video ConversionReplies: 2Last Post: 28th Jan 2011, 03:34 -
Google to Open-Source VP8 for Html5
By Soopafresh in forum Latest Video NewsReplies: 4Last Post: 24th Jun 2010, 07:06