HEY!
This post is outdated, if you want the latest builds [with working vorbis encoder], try this site.
Since the vorbis encoder supplied in my builds is quite broken, it’s highly recommended to re-encode with one of the builds off the above site.
Google released WebM/VP8 as open source earlier, but I haven’t had a chance to really encode anything yet, mostly due to the lack of a proper unified encoder.
But, following this guide, you can build ffmpeg with webm for windows rather easily. But for those without a linux distro to play with, you can simply download them here:
Download:
[OUT DATED! See top of post]
ffmpeg+webm mingw32 build r3 [zip, 5/22/10]
ffmpeg+webm mingw32 build r3 [7z, 5/22/10]
ffmpeg+webm mingw32 build r2 [zip, 5/20/10]
ffmpeg+webm mingw32 build r2 [7z, 5/20/10]
Use:
ffmpeg -i [video file to encode] -b [bitrate]k -aq 60 -threads 4 output.webm
On a command line and wait. And wait. It’s slow. Very slow. You can speed it up a bit by using -level 300 if you want, though quality suffers a little bit. Two pass encoding is supported with -pass 1 followed by a second encode with -pass 2, as per usual.
Have fun!
Supported VP8/WebM Flags, all flags require a numeric value after them.
You can also use this nice spreadsheet.
-vb [target bitrate]
-level [Encoder speed/quality and cpu use[?]. 100 = best, 200 = average, 300 = ‘realtime’/fast]
-threads [number of threads to use for encoding, can't be 0 [auto] with VP8/this build]
-token_partitions [number of partitions to split the video into, useful for multi-core decoding]
-lag [number of frames to look ahead for when encoding]
-keyint_min [min distance between keyframes]
-g [max distance between keyframes]
-bt [bitrate tolerance in VBR/2pass mode]
-minrate [Minimal bitrate allowed in vbr/2pass mode]
-maxrate [Maxium bitrate allowed in vbr/2pass mode]
-qmin [min quantizer allowed]
-qmax [max quantizer allowed, set just this for fixed quantizer mode]
-bufsize ["ratecontrol buffer size (in bits)"]
-rc_init_occupancy ["number of bits which should be loaded into the rc buffer before decoding starts"]
-rc_opt_occupancy ["number of bits which should be kept in the rc buffer during decoding"]
-rc_buf_aggressivity ["currently useless", buffer use aggressiveness]
-spatial_rsmpl [spatial resampling]
-spatial_rsmpl_up ["Spatial resampling up watermark, percentage of target data buffer."]
-spatial_rsmpl_down ["Spatial resampling down watermark, percentage of target data buffer."]
-profile [Can't find much data on this, usually set to 0]
-nr [Noise reduction]
-sharpness [Has a value from 0 to 7, assuming it applies a sharpness filter after decoding]
-altref [Allow alternate reference frames, 1]
-ar_max_frames ["Max frames used in creating alt. ref. [0,25]“]
-ar_type ["Filter type used in creating alt. ref."]
-ar_strength ["Filter strength used in creating alt. ref. [0,6]“]
-skip_threshold [threshold to skip a frame instead of encoding it[?]]
-mb_static_threshold [static frame threshold[?]]
Hi thanks for the ffmpeg build
The webm video converted with this ffmpeg build doesnt play on MPC or WMP like the other samples i converted with the free Flix vp8 converter
http://www.wildform.com/products/flix/
i can only hear the audio, media info recognizes the file as mkv, the other samples it displays webm
@Ricardo – That’s odd… the samples I just encoded worked fine with media player classic and webm’s supplied dshow filters.
this is what i used converting a avi file
ffmpeg -i teste_480.avi -b 450k -aq 60 -threads 2 output.webm
i just tried an mp4 and mov file and it works, if i convert a avi (xvid) it wont play the webm video.
can you tell me how do i change the audio sample rate to 22050 for example or specify an exact audio bitrate value?
Thanks
just got it working, just in case someone is interested:
ffmpeg -i 123.mp4 -b 450k -ar 22050 -ab 48k -threads 2 output.webm
audio resampled -ar
audio bitrate -ab
Patched build FFMPEG Thanks to distribute!
And experiment with different encoding settings now.
r3 warnings disappeared when multithreaded encoding, the fix Thank you.
This article is written in language translation software. Sentence may be strange.
Thanks for the new build, ive been trying to convert some video samples to webm but the audio quality is really bad, tried all kind of bitrates but audio, i googled the problem and it seems the default vorbis encoder in ffmpeg is really bad and every reccomends using libvorbis in ffmpeg but it must be compiled with it, i tried using libvorbis but return a “unknown encoder” message
Can you share how to do a 2 pass webm conversion with ffmpeg?
Thanks
and i forgot to ask: can you compile and share a ffmpeg build with libvorbis?
Thanks
vorbis vs libvorbis in ffmpeg
http://www.linuxquestions.org/questions/linux-software-2/ffmpeg-vorbis-vs-libvorbis-782346/
@ Ricardo – I tried to do a build with libvorbis, it didn’t compile right.
You should use -aq instead of -ab for vorbis, -aq stands for audio quality and takes a param from 10 to 100, I usually use 60. Things sound fine through that.
To do two-pass, simply add -pass 1 to the command line, then run it again with -pass 2. I believe it’s a good idea to use -vb for bitrate instead of -b in that case, but don’t think it matters.
Also, make sure your -i input is at the start of the command line, because options before it are typically ignored for encoding.
Hi i was trying to get a specific bitrate for vorbis to test it againt aac
1st video: vorbis @48k sampling rate 22050
2nd video: vorbis @96k ith sampling rate 44100
on a 2 pass conversion do we need to specify a log file like on a avi to dvd conversion with ffmpeg?
Thanks
Just a question: why not a 64-bits version ?
http://mingw-w64.sourceforge.net/
libvorbis usage is mandatory if you want people to listen to your videos otherwise if you are just testing the built-in encoder should be ok. The quality is just awfull though.
Please read: http://xiphmont.livejournal.com/51160.html
Marco – Can try when I have the time
Leon – I know this. If I can get the lib to compile, I will get it in.
Hi Leon, at the webm blog you answered me that you replace the audio (remux).
Ive tried some examples but im unable to replace the audio track with ffmpeg, i managed but the audio only plays for 4 seconds.
Can you share what you have done?
Thanks
@Marco Ravich
There is currently a bug in FFmpeg with win64: https://roundup.ffmpeg.org/issue1889
I don’t think the link will work right now since the roundup interface is down though.
Besides that, I will provide Windows FFmpeg builds with libvpx on the autobuilds website ( http://ffmpeg.arrozcru.org/autobuilds ) as soon as it is integrated into FFmpeg SVN. Currently only decoding is integrated IIRC.
anyone having oversized problems with webm? I also noticed that if i select 450k as video bitrate mediainfo reports the videobitrate as 563k, i think thats why im getting oversized files compared with h264 with same bitrate.
i tried WMV, H264 (x264) and theora with same bitrate and they all have almost identical sizes, with webm they’re bigger, for example with wmv, x264 and theora i get 2,9MB with WebM i get 3,8MB
I wanted to test the format agains the others but im not sure if ffmpeg is pumping up the bitrate or is it mediainfo not reporting the bitrate properly, the bitrate of the mkv file before and after processing it with mkclean to get a webm file is the same.
to get 450k as video bitrate in (mediainfo) i had to setup ffmpeg with 225K (half of 450), the size is now identical to the other formats
Anyone?
What problem are you having building Vorbis? It should build in mingw with _zero problems_. You need to also compile libogg.
Everyone in the vorbis using world is really eager to get people to not us the ffmpeg vorbis encoder, it really is very poor. If you’d like some help you can join the #vorbis channel on irc.freenode.org (http://webchat.freenode.net/) or hit-up the vorbis mailing lists and many people will be glad to help you get it working.
FFmpeg has integrated libvpx decoding and encoding support into the source tree…
mplayer-vp8-encdec-support-r4.tar.bz2 MPlayer/FFmpeg VP8 encode/decode patches – using libvpx.git@6cd4a10 or later (includes 0.9.1)
ffmpeg+webm mingw32 build r4?
“FFmpeg has integrated libvpx decoding and encoding support into the source tree…”
The cleverest?
-level -lag etc. are not supported. It is possible to consider that libvpx there is not present.
The big request to compile r4 as on the basis of a script most it it was not possible to make.
started a ffmpeg ivfenc mapping spreadsheet a few days ago, for those interested see (and edit if you want):
http://spreadsheets.google.com/ccc?key=0AvWxUS1XGCPAdGNtNW10a2p4c1VwdG1VZk1uMl9MUEE&hl=en
Does not compile. Lay out, who could compile, fresh build. libvpx 9.1