Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > VP9 and AV1

Reply
 
Thread Tools Search this Thread Display Modes
Old 4th November 2015, 05:16   #21  |  Link
xyzone
Registered User
 
xyzone's Avatar
 
Join Date: Oct 2013
Posts: 24
I think my question was pretty clear, and you are dismissing it. The link is the one I posted twice.

And I don't care about what's "official". I care about what's better.
xyzone is offline   Reply With Quote
Old 4th November 2015, 11:25   #22  |  Link
BadFrame
Registered User
 
Join Date: Jun 2013
Posts: 98
Quote:
Originally Posted by xyzone View Post
And I don't care about what's "official". I care about what's better.
I don't know what you are babbling about anymore, if you are convinced ffmpeg is somehow better at encoding vp9 despite using the exact same library as the upstream encoder, then just use it.
BadFrame is offline   Reply With Quote
Old 15th November 2015, 11:27   #23  |  Link
xyzone
Registered User
 
xyzone's Avatar
 
Join Date: Oct 2013
Posts: 24
The thread and links posted are there for any idiot with two eyes to take a look at.

Quote:
Originally Posted by BadFrame View Post
if you are convinced ffmpeg is somehow better at encoding vp9 despite using the exact same library as the upstream encoder, then just use it.
What I am convinced of is that ffmpeg is not a haphazard little project, and that its docs have more merit than some random person on a forum. Not 100% certain that it's better, but I certainly got no definitive answers, here.

Last edited by xyzone; 15th November 2015 at 11:30.
xyzone is offline   Reply With Quote
Old 15th November 2015, 13:13   #24  |  Link
foxyshadis
ангел смерти
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Lost
Posts: 9,565
vp9, on the other hand, is a haphazard little project that seems more poorly managed than a lot of community projects. Google only seems to care about it as far as it can be used to reduce Youtube's bandwidth bills, and any attempt to mimic x264's and x265's excellent command line, multicore use, rate control, and exhaustive documentation are basically ignored.

I gave the new release a shot, but I didn't bother with a full test suite, it wasn't noticeably faster than 1.4 nor any better quality in the first (although some artifacts changed). They haven't updated the rate control, so what's the point in testing two-pass, it'll still be just as wildly off. Maybe it's just ARM optimizations.

Edit: Missed that this was a splinter thread, not the main VP9 thread.
foxyshadis is offline   Reply With Quote
Old 19th November 2015, 23:37   #25  |  Link
xyzone
Registered User
 
xyzone's Avatar
 
Join Date: Oct 2013
Posts: 24
I found a compromise to get some kind of quick seeking (in most cases). 2-pass with '-auto-alt-ref 1' on pass 2. Overall, this is how I'm getting better results on low resolution content, especially flat pixels video:

ffmpeg -i [input] -c:v libvpx-vp9 -b:v 0 -crf 28 -threads 4 -speed 1 -f webm -pix_fmt yuv420p -profile:v 0 -an -sn -pass 1 /dev/null
ffmpeg -i [input] -c:v libvpx-vp9 -b:v 0 -crf 28 -threads 4 -speed 1 -f webm -pix_fmt yuv420p -profile:v 0 -an -sn -pass 2 -auto-alt-ref 1 -lag-in-frames 25 [output].webm

In a way, that's even more desirable, because it tends to seek where the scene changes. But if the pixels on screen never completely swap out, still no fast seek with ffmpeg vp9 constant quality.
xyzone is offline   Reply With Quote
Old 19th November 2015, 23:44   #26  |  Link
MoSal
Registered User
 
Join Date: Jun 2013
Posts: 93
Quote:
Originally Posted by xyzone View Post
I found a compromise to get some kind of quick seeking (in most cases). 2-pass with '-auto-alt-ref 1' on pass 2. Overall, this is how I'm getting better results on low resolution content, especially flat pixels video:

ffmpeg -i [input] -c:v libvpx-vp9 -b:v 0 -crf 28 -threads 4 -speed 1 -f webm -pix_fmt yuv420p -profile:v 0 -an -sn -pass 1 /dev/null
ffmpeg -i [input] -c:v libvpx-vp9 -b:v 0 -crf 28 -threads 4 -speed 1 -f webm -pix_fmt yuv420p -profile:v 0 -an -sn -pass 2 -auto-alt-ref 1 -lag-in-frames 25 [output].webm

In a way, that's even more desirable, because it tends to seek where the scene changes. But if the pixels on screen never completely swap out, still no fast seek with ffmpeg vp9 constant quality.
You need to explicitly set the GOP. Try passing '-g 250'.
__________________
saldl: a command-line downloader optimized for speed and early preview.
MoSal is offline   Reply With Quote
Old 20th November 2015, 10:10   #27  |  Link
xyzone
Registered User
 
xyzone's Avatar
 
Join Date: Oct 2013
Posts: 24
Quote:
Originally Posted by MoSal View Post
You need to explicitly set the GOP. Try passing '-g 250'.
The problem with that is that it tends to add size to some encodes.

I encoded a 3 minute sample of content I knew would produce the seeking issue, despite auto-alt-ref. First with -g 250, then without. All else the same.

The gop set file is 30,979,544 bytes.
The file without gop set is 28,246,134 bytes.

Not much, but there's still a difference. So I guess bigger file size is the price for guaranteeing some kind of quick seek.

Be that as it may, with or without gop, auto-alt-ref still helps a lot in most videos, and this makes vp9 more usable for my purposes.

Last edited by xyzone; 20th November 2015 at 10:20.
xyzone is offline   Reply With Quote
Old 20th November 2015, 10:30   #28  |  Link
nevcairiel
Registered Developer
 
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 10,221
Quote:
Originally Posted by xyzone View Post
Not much, but there's still a difference. So I guess bigger file size is the price for guaranteeing some kind of quick seek.
Of course. For proper seeking you need more I frames, and I frames take up space.
__________________
LAV Filters - open source ffmpeg based media splitter and decoders
nevcairiel is offline   Reply With Quote
Old 22nd November 2015, 06:51   #29  |  Link
mustafa
Registered User
 
Join Date: Nov 2015
Posts: 1
Pass "-g seconds" as an encoding parameter

Quote:
Originally Posted by xyzone View Post
Is there a way to get VP9 video to seek properly? I only have mpv to work with, and the version of VLC I'm using can't play VP9. But I also try playing on chrome and the same thing happens. On firefox, too, and there the colors in the video are all messed up, but that's another issue.

Here is a short sample that I encoded with ffmpeg (libvpx-vp9). When you try to seek forward, which is 10 seconds on mpv, it goes to 00:02:46. Is there supposed to be some encoding option to get around this issue?
This is a strange default for ffmpeg with libvpx, the max distance between key-frames is 9999, you should pass something like '-g 150' when encoding to make it about 5 seconds.
http://ffmpeg.org/ffmpeg-all.html#libvpx
https://github.com/Kagami/webm.py/wi...tings#defaults
https://chromium.googlesource.com/we...x_iface.c#1440

Regards
mustafa is offline   Reply With Quote
Reply

Tags
seek, vp9

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 13:43.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2022, vBulletin Solutions Inc.