libvpx v0.9.5 (Aylesbury) released

115 views
Skip to first unread message

John Koleszar

unread,
Oct 29, 2010, 9:55:11 AM10/29/10
to WebM Discussion, Codec Developers, Application Developers
Hi,

Just occurred to me that we only announced this release via a blog
post[1] and not on the mailing lists, so:
[1]: http://blog.webmproject.org/2010/10/vp8-codec-sdk-aylesbury-release.html

Aylesbury is the first named release of libvpx (v0.9.5). We'll be
making named releases quarterly. If we need to do a bugfix release, it
will be based off the last named release and will not incorporate the
other improvements we've made in our master branch. Here's the
CHANGELOG for Aylesbury:

2010-10-28 v0.9.5 "Aylesbury"
Our first named release, focused on a faster decoder, and a better encoder.

- Upgrading:
This release incorporates backwards-incompatible changes to the
ivfenc and ivfdec tools. These tools are now called vpxenc and vpxdec.

vpxdec
* the -q (quiet) option has been removed, and replaced with
-v (verbose). the output is quiet by default. Use -v to see
the version number of the binary.

* The default behavior is now to write output to a single file
instead of individual frames. The -y option has been removed.
Y4M output is the default.

* For raw I420/YV12 output instead of Y4M, the --i420 or --yv12
options must be specified.

$ ivfdec -o OUTPUT INPUT
$ vpxdec --i420 -o OUTPUT INPUT

* If an output file is not specified, the default is to write
Y4M to stdout. This makes piping more natural.

$ ivfdec -y -o - INPUT | ...
$ vpxdec INPUT | ...

* The output file has additional flexibility for formatting the
filename. It supports escape characters for constructing a
filename from the width, height, and sequence number. This
replaces the -p option. To get the equivalent:

$ ivfdec -p frame INPUT
$ vpxdec --i420 -o frame-%wx%h-%4.i420 INPUT

vpxenc
* The output file must be specified with -o, rather than as the
last argument.

$ ivfenc <options> INPUT OUTPUT
$ vpxenc <options> -o OUTPUT INPUT

* The output defaults to webm. To get IVF output, use the --ivf
option.

$ ivfenc <options> INPUT OUTPUT.ivf
$ vpxenc <options> -o OUTPUT.ivf --ivf INPUT


- Enhancements:
ivfenc and ivfdec have been renamed to vpxenc, vpxdec.
vpxdec supports .webm input
vpxdec writes .y4m by default
vpxenc writes .webm output by default
vpxenc --psnr now shows the average/overall PSNR at the end
ARM platforms now support runtime cpu detection
vpxdec visualizations added for motion vectors, block modes, references
vpxdec now silent by default
vpxdec --progress shows frame-by-frame timing information
vpxenc supports the distinction between --fps and --timebase
NASM is now a supported assembler
configure: enable PIC for shared libs by default
configure: add --enable-small
configure: support for ppc32-linux-gcc
configure: support for sparc-solaris-gcc

- Bugs:
Improve handling of invalid frames
Fix valgrind errors in the NEON loop filters.
Fix loopfilter delta zero transitions
Fix valgrind errors in vp8_sixtap_predict8x4_armv6().
Build fixes for darwin-icc

- Speed:
20-40% (average 28%) improvement in libvpx decoder speed,
including:
Rewrite vp8_short_walsh4x4_sse2()
Optimizations on the loopfilters.
Miscellaneous improvements for Atom
Add 4-tap version of 2nd-pass ARMv6 MC filter.
Improved multithread utilization
Better instruction choices on x86
reorder data to use wider instructions
Update NEON wide idcts
Make block access to frame buffer sequential
Improved subset block search
Bilinear subpixel optimizations for ssse3.
Decrease memory footprint

Encoder speed improvements (percentage gain not measured):
Skip unnecessary search of identical frames
Add SSE2 subtract functions
Improve bounds checking in vp8_diamond_search_sadx4()
Added vp8_fast_quantize_b_sse2

- Quality:
Over 7% overall PSNR improvement (6.3% SSIM) in "best" quality
encoding mode, and up to 60% improvement on very noisy, still
or slow moving source video

Motion compensated temporal filter for Alt-Ref Noise Reduction
Improved use of trellis quantization on 2nd order Y blocks
Tune effect of motion on KF/GF boost in two pass
Allow coefficient optimization for good quality speed 0.
Improved control of active min quantizer for two pass.
Enable ARFs for non-lagged compress

Kai Hendry

unread,
Nov 3, 2010, 10:49:46 AM11/3/10
to WebM Discussion
I'm just trying out Aylesbury now and it seems to be taking forever to
finish an encoding...

hendry@x201 libvpx$ ./vpxenc -o output.webm output.yuv
Pass 1/1 frame 6483/6482 7878103B

Is there a feature planned to give some sort of indication how much
time it will take the encoding to complete?

I noticed it only uses one processor. http://flic.kr/p/8QttG9 I did
try --cpu-used=4 and it didn't seem to make a difference. :( Have I
mis-understood? Do I need to use all my processors in some sort of
`make -j4` way? http://natalian.org/archives/2010/01/08/Parallelized_processes/

Is it possible to Ctrl+C a encoding and then run the previous command
to resume a long encoding process? Like the behaviour of rsync or
`wget -c`


Oh incidentally output.webm, I uploaded to http://webm.naovi.com/done.webm
and I can't play it back. :( `mplayer -demuxer rawvideo -rawvideo
w=1920:h=1088 output.yuv` does work on the INPUT however.

Many thanks,

Chester

unread,
Nov 3, 2010, 11:00:32 AM11/3/10
to webm-d...@webmproject.org
On Wed, Nov 3, 2010 at 9:49 AM, Kai Hendry <kai.h...@gmail.com> wrote:
> I'm just trying out Aylesbury now and it seems to be taking forever to
> finish an encoding...

> I noticed it only uses one processor. http://flic.kr/p/8QttG9 I did


> try --cpu-used=4 and it didn't seem to make a difference. :( Have I
> mis-understood? Do I need to use all my processors in some sort of
> `make -j4` way? http://natalian.org/archives/2010/01/08/Parallelized_processes/

You need to use the --threads option or just -t n where 'n' is the
number of maximum threads

John Koleszar

unread,
Nov 3, 2010, 11:07:28 AM11/3/10
to webm-d...@webmproject.org
On Wed, Nov 3, 2010 at 10:49 AM, Kai Hendry <kai.h...@gmail.com> wrote:
> I'm just trying out Aylesbury now and it seems to be taking forever to
> finish an encoding...
>
> hendry@x201 libvpx$ ./vpxenc -o output.webm output.yuv
> Pass 1/1 frame 6483/6482 7878103B
>
> Is there a feature planned to give some sort of indication how much
> time it will take the encoding to complete?
>

Nothing planned. Feel free to file an enhancement request at
http://code.google.com/p/webm/issues. I suspect this is taking extra
long because vpxenc doesn't have the correct resolution for your file.

> I noticed it only uses one processor. http://flic.kr/p/8QttG9 I did
> try --cpu-used=4 and it didn't seem to make a difference. :( Have I
> mis-understood? Do I need to use all my processors in some sort of
> `make -j4` way? http://natalian.org/archives/2010/01/08/Parallelized_processes/
>

You want the --threads option (-t for short).

> Is it possible to Ctrl+C a encoding and then run the previous command
> to resume a long encoding process? Like the behaviour of rsync or
> `wget -c`
>

No, not possible at this time.

>
> Oh incidentally output.webm, I uploaded to http://webm.naovi.com/done.webm
> and I can't play it back. :( `mplayer -demuxer rawvideo -rawvideo
> w=1920:h=1088 output.yuv` does work on the INPUT however.
>

I can play that video as a 320x240 webm file (the vpxenc default for
raw video), though the content is wrong because you didn't tell vpxenc
the size of the raw video. I strongly recommend changing your workflow
to use yuv4mpegpipe format instead of rawvideo, as this will propagate
the correct resolutions for you automatically. Note that you can write
the yuv4mpegpipe data to a file and consume it the same way you're
using the .yuv file now, it doesn't have to be used in a pipe despite
the name.

James Zern

unread,
Nov 3, 2010, 1:38:42 PM11/3/10
to webm-d...@webmproject.org
320x240 is a rather arbitrary default, perhaps it's better to require
the parameter in the yuv case to avoid such issues.

John Koleszar

unread,
Nov 3, 2010, 1:48:28 PM11/3/10
to webm-d...@webmproject.org

But 320x240 is the resolution of my favorite raw test clip! :)

Sounds good to me.. I'll put a patch together now.

Kai Hendry

unread,
Nov 4, 2010, 10:15:28 AM11/4/10
to WebM Discussion
On Nov 3, 3:07 pm, John Koleszar <jkoles...@google.com> wrote:
> to use yuv4mpegpipe format instead of rawvideo, as this will propagate
> the correct resolutions for you automatically. Note that you can write
> the yuv4mpegpipe data to a file and consume it the same way you're
> using the .yuv file now, it doesn't have to be used in a pipe despite
> the name.

ffmpeg -i samurai-ambush.mov -pix_fmt yuv420p -f yuv4mpegpipe - 2>/dev/
null | ./vpxenc -t 4 -o sam.webm -

Created a video I could playback locally with `mplayer`. However with
no sound. :}

And I was a bit disappointed by the default quality of the video. I
guess I need to play with the bitrate. Is there a way to interrogate
the file to see how it was encoded?

Alarmingly I can't playback the video http://webm.naovi.com/video.html
in Chrome 8.0.552.23 or Opera 10.63.6450.

nandan amar

unread,
Nov 4, 2010, 10:51:03 AM11/4/10
to webm-d...@webmproject.org
I think vpenc


--
You received this message because you are subscribed to the Google Groups "WebM Discussion" group.
To post to this group, send email to webm-d...@webmproject.org.
To unsubscribe from this group, send email to webm-discuss...@webmproject.org.
For more options, visit this group at http://groups.google.com/a/webmproject.org/group/webm-discuss/?hl=en.




--
Amar Kumar Nandan
MS by Research
IIIT-Bangalore
Karnataka ,India , 560100
http://aknandan.co.nr

nandan amar

unread,
Nov 4, 2010, 10:52:00 AM11/4/10
to webm-d...@webmproject.org
i think vpxenc encode only video.
so no audio.

On 4 November 2010 19:45, Kai Hendry <kai.h...@gmail.com> wrote:
--
You received this message because you are subscribed to the Google Groups "WebM Discussion" group.
To post to this group, send email to webm-d...@webmproject.org.
To unsubscribe from this group, send email to webm-discuss...@webmproject.org.
For more options, visit this group at http://groups.google.com/a/webmproject.org/group/webm-discuss/?hl=en.

KenMcD

unread,
Nov 4, 2010, 9:49:46 PM11/4/10
to WebM Discussion

On Nov 4, 7:15 am, Kai Hendry <kai.hen...@gmail.com> wrote:
> ... Is there a way to interrogate
> the file to see how it was encoded?

I would also like to know this.
Are there any tools available which can show the encoding parameters
used?

Thanks.

John Koleszar

unread,
Nov 4, 2010, 10:14:30 PM11/4/10
to webm-d...@webmproject.org
On Thu, Nov 4, 2010 at 10:15 AM, Kai Hendry <kai.h...@gmail.com> wrote:
> On Nov 3, 3:07 pm, John Koleszar <jkoles...@google.com> wrote:
>> to use yuv4mpegpipe format instead of rawvideo, as this will propagate
>> the correct resolutions for you automatically. Note that you can write
>> the yuv4mpegpipe data to a file and consume it the same way you're
>> using the .yuv file now, it doesn't have to be used in a pipe despite
>> the name.
>
> ffmpeg -i samurai-ambush.mov -pix_fmt yuv420p -f yuv4mpegpipe - 2>/dev/
> null | ./vpxenc -t 4 -o sam.webm -
>
> Created a video I could playback locally with `mplayer`. However with
> no sound. :}
>

Correct. You need to transcode the audio separately and then "remux"
the video and audio into a single file.

> And I was a bit disappointed by the default quality of the video. I
> guess I need to play with the bitrate. Is there a way to interrogate
> the file to see how it was encoded?
>

You can run vpxenc with the -v option to see the values for (almost)
all of the parameters. In this case you'll find that the default
bitrate is 256kbit, which won't give you very good output for 1080p
source.

> Alarmingly I can't playback the video http://webm.naovi.com/video.html
> in Chrome 8.0.552.23 or Opera 10.63.6450.
>

Looking at that page, it appears to be trying to play 'sam.webvm',
which doesn't exist. Changing the html to play sam.webm played ok.

Chester

unread,
Nov 4, 2010, 10:40:10 PM11/4/10
to webm-d...@webmproject.org
On Thu, Nov 4, 2010 at 9:14 PM, John Koleszar <jkol...@google.com> wrote:
> On Thu, Nov 4, 2010 at 10:15 AM, Kai Hendry <kai.h...@gmail.com> wrote:
>> On Nov 3, 3:07 pm, John Koleszar <jkoles...@google.com> wrote:
>>> to use yuv4mpegpipe format instead of rawvideo, as this will propagate
>>> the correct resolutions for you automatically. Note that you can write
>>> the yuv4mpegpipe data to a file and consume it the same way you're
>>> using the .yuv file now, it doesn't have to be used in a pipe despite
>>> the name.
>>
>> ffmpeg -i samurai-ambush.mov -pix_fmt yuv420p -f yuv4mpegpipe - 2>/dev/
>> null | ./vpxenc -t 4 -o sam.webm -
>>
>> Created a video I could playback locally with `mplayer`. However with
>> no sound. :}
>>
>
> Correct. You need to transcode the audio separately and then "remux"
> the video and audio into a single file.
>
>> And I was a bit disappointed by the default quality of the video. I
>> guess I need to play with the bitrate. Is there a way to interrogate
>> the file to see how it was encoded?
>>
>
> You can run vpxenc with the -v option to see the values for (almost)
> all of the parameters. In this case you'll find that the default
> bitrate is 256kbit, which won't give you very good output for 1080p
> source.
>

I think he meant to ask if there is a way to look at an existing
webm/vp8 encoded file and see how it was encoded. I would like to know
this too, because when I use ffmpeg to encode a file using libvpx, I
use the preset:
g=120
level=216
profile=0
qmax=42
qmin=10
rc_buf_aggressivity=0.95
vb=2M

And it gives me a decently small file with very high quality video.
But I choose to use vpxenc because it's much faster than ffmpeg's implementation

But I can't get vpxenc to encode with the same quality without
creating a ridiculously huge file. I've tried "translating" those
options in the preset for vpxenc, but still can't achieve the same
quality. Using the "best vbr" encoding example in the vpxenc
documentation doesn't give me the same quality either. There must be
something missing.. Need to see what other options I need in vpxenc

John Koleszar

unread,
Nov 5, 2010, 8:05:54 AM11/5/10
to webm-d...@webmproject.org
On Thu, Nov 4, 2010 at 10:40 PM, Chester <somethin...@gmail.com> wrote:
> On Thu, Nov 4, 2010 at 9:14 PM, John Koleszar <jkol...@google.com> wrote:
>> On Thu, Nov 4, 2010 at 10:15 AM, Kai Hendry <kai.h...@gmail.com> wrote:
>>> On Nov 3, 3:07 pm, John Koleszar <jkoles...@google.com> wrote:
>>>> to use yuv4mpegpipe format instead of rawvideo, as this will propagate
>>>> the correct resolutions for you automatically. Note that you can write
>>>> the yuv4mpegpipe data to a file and consume it the same way you're
>>>> using the .yuv file now, it doesn't have to be used in a pipe despite
>>>> the name.
>>>
>>> ffmpeg -i samurai-ambush.mov -pix_fmt yuv420p -f yuv4mpegpipe - 2>/dev/
>>> null | ./vpxenc -t 4 -o sam.webm -
>>>
>>> Created a video I could playback locally with `mplayer`. However with
>>> no sound. :}
>>>
>>
>> Correct. You need to transcode the audio separately and then "remux"
>> the video and audio into a single file.
>>
>>> And I was a bit disappointed by the default quality of the video. I
>>> guess I need to play with the bitrate. Is there a way to interrogate
>>> the file to see how it was encoded?
>>>
>>
>> You can run vpxenc with the -v option to see the values for (almost)
>> all of the parameters. In this case you'll find that the default
>> bitrate is 256kbit, which won't give you very good output for 1080p
>> source.
>>
>
> I think he meant to ask if there is a way to look at an existing
> webm/vp8 encoded file and see how it was encoded.
>

Ahh, I understand now. No, you can't get that data from the encoded
file unfortunately.

> I would like to know
> this too, because when I use ffmpeg to encode a file using libvpx, I
> use the preset:
> g=120
> level=216
> profile=0
> qmax=42
> qmin=10
> rc_buf_aggressivity=0.95
> vb=2M
>
> And it gives me a decently small file with very high quality video.
> But I choose to use vpxenc because it's much faster than ffmpeg's implementation
>
> But I can't get vpxenc to encode with the same quality without
> creating a ridiculously huge file. I've tried "translating" those
> options in the preset for vpxenc, but still can't achieve the same
> quality. Using the "best vbr" encoding example in the vpxenc
> documentation doesn't give me the same quality either. There must be
> something missing.. Need to see what other options I need in vpxenc
>

There's code in ffmpeg to show the parameters it's passing to libvpx.
That should be fairly straightforward to convert to vpxenc command
line. Try increasing the verbosity to see that output. James Zern may
be able to give a little more info here too.

Chester

unread,
Nov 5, 2010, 1:46:25 PM11/5/10
to webm-d...@webmproject.org

How may I do that? The only thing relating to verbosity is -loglevel
verbose, but that doesn't really tell me anything other than the flags
libvpx was compiled with =\.

James Zern

unread,
Nov 5, 2010, 3:23:03 PM11/5/10
to webm-d...@webmproject.org
On Fri, Nov 5, 2010 at 10:46, Chester <somethin...@gmail.com> wrote:
> On Fri, Nov 5, 2010 at 7:05 AM, John Koleszar <jkol...@google.com> wrote:
>>
>> On Thu, Nov 4, 2010 at 10:40 PM, Chester <somethin...@gmail.com> wrote:
>> > On Thu, Nov 4, 2010 at 9:14 PM, John Koleszar <jkol...@google.com> wrote:
> [...]

>>
>> > I would like to know
>> > this too, because when I use ffmpeg to encode a file using libvpx, I
>> > use the preset:
>> > g=120
>> > level=216
>> > profile=0
>> > qmax=42
>> > qmin=10
>> > rc_buf_aggressivity=0.95
>> > vb=2M
>> >
Note some of these have changed with the latest patchset now that
codec-specific parameters are available.

>> > And it gives me a decently small file with very high quality video.
>> > But I choose to use vpxenc because it's much faster than ffmpeg's implementation
>> >
>

Odd given that the encoder used is libvpx. The only additional
overhead should be the source decode and any audio encoding being
done.

>> > But I can't get vpxenc to encode with the same quality without
>> > creating a ridiculously huge file. I've tried "translating" those
>> > options in the preset for vpxenc, but still can't achieve the same
>> > quality. Using the "best vbr" encoding example in the vpxenc
>> > documentation doesn't give me the same quality either. There must be
>> > something missing.. Need to see what other options I need in vpxenc
>> >
>>
>> There's code in ffmpeg to show the parameters it's passing to libvpx.
>> That should be fairly straightforward to convert to vpxenc command
>> line. Try increasing the verbosity to see that output. James Zern may
>> be able to give a little more info here too.
>>
>
> How may I do that? The only thing relating to verbosity is -loglevel
> verbose, but that doesn't really tell me anything other than the flags
> libvpx was compiled with =\.
>

At loglevel debug (48) or higher, libvpxenc will print out the SDK
parameters. The first set will be the library defaults followed by the
updated values based on the ffmpeg parameter mapping.

Kai Hendry

unread,
Nov 6, 2010, 5:01:30 AM11/6/10
to WebM Discussion
On Nov 5, 2:14 am, John Koleszar <jkoles...@google.com> wrote:
> Correct. You need to transcode the audio separately and then "remux"
> the video and audio into a single file.

I have not found a example of this "remux" procedure after a Google
and a look around http://www.webmproject.org/

> bitrate is 256kbit, which won't give you very good output for 1080p
> source.

Any recommendation? What do Youtube/Vimeo use for their HD videos?

> Looking at that page, it appears to be trying to play 'sam.webvm',
> which doesn't exist. Changing the html to play sam.webm played ok.

Oops! Thanks :-)

Steve Lhomme

unread,
Nov 6, 2010, 5:16:09 AM11/6/10
to webm-discuss
On Sat, Nov 6, 2010 at 10:01 AM, Kai Hendry <kai.h...@gmail.com> wrote:
> On Nov 5, 2:14 am, John Koleszar <jkoles...@google.com> wrote:
>> Correct. You need to transcode the audio separately and then "remux"
>> the video and audio into a single file.
>
> I have not found a example of this "remux" procedure after a Google
> and a look around http://www.webmproject.org/

You can do that with mkvmerge (which also has a GUI version), ffmpeg
or GStreamer.

Kai Hendry

unread,
Nov 6, 2010, 7:23:14 AM11/6/10
to WebM Discussion
Can you please suggest a simple cmdline to do so? I'm not fan of
GUIs. :)

http://webm.naovi.com/video.html

Chester

unread,
Nov 6, 2010, 12:30:42 PM11/6/10
to webm-d...@webmproject.org
this is what I use for muxing

ffmpeg -i input_ivf -i input_ogg -vcodec copy -f webm output.webm -newaudio

Kai Hendry

unread,
Nov 6, 2010, 2:18:20 PM11/6/10
to WebM Discussion
On Nov 6, 4:30 pm, Chester <somethingsome2...@gmail.com> wrote:
> this is what I use for muxing
> ffmpeg -i input_ivf -i input_ogg -vcodec copy -f webm output.webm -newaudio

My input is MOV and the encoded webm as you can see from
http://webm.naovi.com/video.html

How does it work in my case?

With thanks,

Chester

unread,
Nov 6, 2010, 2:42:19 PM11/6/10
to webm-d...@webmproject.org
Is the vp8 codec geared towards a specific length of video? I noticed
that when I limit the encoder to about 850 frames, the quality is
amazing, but as I increase the limit, the quality drops, and if I take
it up to 140000 frames, it looks pretty bad with the exact same
settings.

These were two pass encodes

Chester

unread,
Nov 7, 2010, 1:27:49 AM11/7/10
to webm-d...@webmproject.org
I seem to be getting better quality using 1-pass encoding for all the
videos i'm encoding. The 2-pass (as mentioned earlier) gives me
horrible quality.. I'm probably doing something wrong here, 2-pass
should give me better quality (I believe).
I'm using mplayer to pipe to vpxenc.. Is something wrong with this
setup? Maybe the firstpass is inaccurate because mplayer is outputting
slightly different video each pass? I'm not sure

mplayer -ao null -ac dummy -vo yuv4mpeg:file=/dev/stdout -really-quiet
${1} | vpxenc - -o hbcv_ivf --pass=1 -p 2 --fpf=firstpass_ivf --best
--cpu-used=0 -t 1 --ivf \
--auto-alt-ref=1 --lag-in-frames=25 \
--psnr --verbose --static-thresh=0 --sharpness=0 --token-parts=0 \
--min-q=0 --max-q=41 --target-bitrate=2000 \
&& \
mplayer -ao null -ac dummy -vo yuv4mpeg:file=/dev/stdout -really-quiet
${1} | vpxenc - -o hbcv_ivf --pass=2 -p 2 --fpf=firstpass_ivf --best
--cpu-used=0 -t 1 --ivf \
--auto-alt-ref=1 --lag-in-frames=25 \
--psnr --verbose --static-thresh=0 --sharpness=0 --token-parts=0 \
--min-q=0 --max-q=41 --target-bitrate=2000 \

John Koleszar

unread,
Nov 7, 2010, 8:00:45 PM11/7/10
to webm-d...@webmproject.org
Here's an example.. You'll need to adjust the parameters as
appropriate for your video/audio, but it should give you a basic
recipe for creating a webm video (with audio) with vpxenc and ffmpeg:

# Encode the audio:
$ ffmpeg -i sintel-1280-stereo.mp4 -vn -acodec libvorbis audio.ogg

# Encode the video:
$ ffmpeg -i sintel-1280-stereo.mp4 -an -f yuv4mpegpipe - 2>/dev/null |
vpxenc --target-bitrate=2000 -o video.webm -

# Mux the audio and video:
$ ffmpeg -i audio.ogg -i video.webm -acodec copy -vcodec copy -f webm
sintel-1280-stereo.webm

John Koleszar

unread,
Nov 7, 2010, 8:04:41 PM11/7/10
to webm-d...@webmproject.org
I think you're on to something with the video being different between
the two passes. I'm guessing that mplayer is dropping frames on you,
which would be inconsistent between the first and second passes, which
is going to cause you problems. Adding -noframedrop may be sufficient,
otherwise you could try using mencoder instead of mplayer. If you're
not relying on mplayer's binary codec functionality, you could use
ffmpeg too.

Paul Wilkins

unread,
Nov 8, 2010, 6:38:32 AM11/8/10
to WebM Discussion
No there is no bias based on file length. In fact generally the longer
the file the better two pass rate control works.

Paul Wilkins

unread,
Nov 8, 2010, 6:49:30 AM11/8/10
to WebM Discussion
Two pass encode only requires one command and should almost always
give better results than 1 pass, though there will be sections where
one pass may be better because of the bit distribution choices made.

You don't need to separately do a first pass (if this is what you are
doing) and the first pass of a two pass encode does not currently
create a valid output video, it just gathers stats.

The command line I use for two pass test encodes at the moment is as
follows, though you may not want the same min and max q.. I have these
set wide for testing purposes.
The %x and %% values are holders for values passed in from outside.
The -p 2 tells it to do a two pass encode (both passes one after the
other)

--good --cpu-used=0 -v -t 0 -w %6 -h %7 --fps=%5/1000 --lag-in-
frames=25 --target-bitrate=%%i --min-q=0 --max-q=63 --end-usage=0 --
codec=vp8 --auto-alt-ref=1 -p 2 --kf-max-dist=9999 --kf-min-dist=0 --
drop-frame=0 --static-thresh=0 --bias-pct=50 --minsection-pct=0 --
maxsection-pct=800 --sharpness=0 --arnr-maxframes=7 --arnr-strength=3
--arnr-type=3 --sharpness=0

For the record, as things stand there is no point specifying --lag-in-
frames for one pass encodes because only two pass encodes currently
make use of this.

Paul Wilkins

unread,
Nov 8, 2010, 6:55:59 AM11/8/10
to WebM Discussion
It WOULD mess things up badly if the first pass stats gathering was in
effect using a different set of frames than was available to the
second pass.

Apart from messing the rate control, key frames might get inserted in
the wrong places in the second pass with horrible consequences....

For example it might encode a big key frame one frame early (huge
waste of bits) then try to code a real scene change with a very small
number of bits (terrible looking and a bad predictor for the frames
that follow).
> > On Sat, Nov 6, 2010 at 1:42 PM, Chester <somethingsome2...@gmail.com> wrote:
> >> Is the vp8 codec geared towards a specific length of video? I noticed
> >> that when I limit the encoder to about 850 frames, the quality is
> >> amazing, but as I increase the limit, the quality drops, and if I take
> >> it up to 140000 frames, it looks pretty bad with the exact same
> >> settings.
>
> >> These were two pass encodes
>
> > --
> > You received this message because you are subscribed to the Google Groups "WebM Discussion" group.
> > To post to this group, send email to webm-disc...@webmproject.org.
> > To unsubscribe from this group, send email to webm-discuss+unsubscr...@webmproject.org.

Chester

unread,
Nov 8, 2010, 11:54:10 AM11/8/10
to webm-d...@webmproject.org
The problem is that vpxenc only accept yv12 or i420 input, so I have
to pipe it through something. I can't have a 20-something gigabyte
file on my harddrive, the IO just kills my PC.. Is it now possible to
use the original source file as input? I don't suppose it's possible
to do a two pass encode (using one command) with a pipe?

Also, why is the number of threads = cpu's - 1?
I have a dual core, and it seems to be a waste with just 1 thread,
although I seemed to have a higher psnr using only one thread in a
simple test I ran.

> To post to this group, send email to webm-d...@webmproject.org.
> To unsubscribe from this group, send email to webm-discuss...@webmproject.org.

Kai Hendry

unread,
Nov 21, 2010, 7:55:23 AM11/21/10
to WebM Discussion
Hi John,

I followed your instructions to the letter and mplayer says "Your
system is too SLOW to play this!" and it plays without sound on Google
Chrome 9.0.587.0.

http://webm.naovi.com/

I did a fresh pull from libvpx
755e2a290bc2bc606f3434a7f979f59099011846
and ffmpeg configured like so: ./configure --disable-encoder=vorbis --
enable-libvorbis

Kind regards,
Reply all
Reply to author
Forward
0 new messages