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
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 20th December 2016, 11:19   #961  |  Link
Clare
Registered User
 
Join Date: Apr 2016
Posts: 61
Quote:
Originally Posted by Neavrie View Post
@Clare
Try this:
Code:
ffmpeg -y -i in.y4m -c:v libvpx-vp9 -b:v 0 -crf 20 -quality good -threads 8 -cpu-used 2 -tile-columns 4 -arnr-maxframes 7 -arnr-strength 5 -an out.webm
vpxenc --good -p 1 --threads=8 --cpu-used=2 --tile-columns=4 --end-usage=q --cq-level=20 -o out.webm in.y4m
or this:
Code:
ffmpeg -y -i in.y4m -c:v libvpx-vp9 -b:v 0 -crf 20 -quality good -threads 8 -cpu-used 2 -tile-columns 4 -arnr-maxframes 7 -arnr-strength 5 -an -pass 1 -f null -
ffmpeg -y -i in.y4m -c:v libvpx-vp9 -b:v 0 -crf 20 -quality good -threads 8 -cpu-used 2 -tile-columns 4 -arnr-maxframes 7 -arnr-strength 5 -an -pass 2 out.webm

vpxenc --good -p 2 --threads=8 --cpu-used=2 --tile-columns=4 --end-usage=q --cq-level=20 -o out.webm in.y4m
I tried that but it doesn't account for the large difference in size.
Clare is offline   Reply With Quote
Old 20th December 2016, 12:29   #962  |  Link
Neavrie
Registered User
 
Join Date: Nov 2015
Posts: 3
@Clare
vpxenc uses 2-pass mode by default. That's why you get difference in file size.
Neavrie is offline   Reply With Quote
Old 20th December 2016, 12:59   #963  |  Link
Clare
Registered User
 
Join Date: Apr 2016
Posts: 61
Quote:
Originally Posted by Neavrie View Post
@Clare
vpxenc uses 2-pass mode by default. That's why you get difference in file size.
Huh you're right! I didn't think a two-pass encode would bring such a huge difference in file size. Now I get the exact same metrics for both FFMPEG and vpxenc.

Thanks a lot.
Clare is offline   Reply With Quote
Old 20th December 2016, 15:29   #964  |  Link
Jamaika
Registered User
 
Join Date: Jul 2015
Posts: 708
@Clare
For pass one is 600kb difference in 100 frames 4K.
For pass two isn't difference between the file size(~100kb). This is puzzling, but it is worth knowing. So, I understand that the tests should only do to pass two, because otherwise there is no sense.
The correct command is:
Code:
ffmpeg.exe -loglevel trace -y -i iphone6s_4k.yuv -c:v libvpx-vp9 -b:v 0 -passlogfile vp9.log -crf 20 -quality good -threads 4 -cpu-used 2 -tile-columns 4 -arnr-maxframes 7 -arnr-type 3 -arnr-strength 5 -pass 1 -an out1a.ivf
ffmpeg.exe -loglevel trace -y -i iphone6s_4k.yuv -c:v libvpx-vp9 -b:v 0 -passlogfile vp9.log -crf 20 -quality good -threads 4 -cpu-used 2 -tile-columns 4 -arnr-maxframes 7 -arnr-type 3 -arnr-strength 5 -pass 2 -an out1b.ivf
vpxenc.exe -v --ivf --good --passes=2 --pass=1 --fpf=vp9.pass --threads=4 --target-bitrate=256 --cpu-used=2 --tile-columns=4 --end-usage=q --cq-level=20 --arnr-maxframes=7 --arnr-type=3 --arnr-strength=5 -o NUL iphone6s_4k.yuv 
vpxenc.exe -v --ivf --good --passes=2 --pass=2 --fpf=vp9.pass --threads=4 --target-bitrate=256 --cpu-used=2 --tile-columns=4 --end-usage=q --cq-level=20 --arnr-maxframes=7 --arnr-type=3 --arnr-strength=5 -o out2.ivf iphone6s_4k.yuv

Last edited by Jamaika; 20th December 2016 at 15:32.
Jamaika is offline   Reply With Quote
Old 20th December 2016, 15:37   #965  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,565
vpxenc has automated two-pass. You only run it once. If you run it twice you are basically doing 4 passes with the first 2 being wasted into NUL. Try running it only once and check if that is the case. It was for me the last time I tested. (Granted, long time ago and I don't remember the commands I used from the top of my head.)
sneaker_ger is offline   Reply With Quote
Old 20th December 2016, 15:49   #966  |  Link
Jamaika
Registered User
 
Join Date: Jul 2015
Posts: 708
OK. I accepted the news, but this command ffmpeg gave different results. Different (~300kb)
Code:
ffmpeg.exe -loglevel trace -y -i iphone6s_4k.yuv -c:v libvpx-vp9 -b:v 0 -crf 20 -quality good -threads 4 -cpu-used 2 -tile-columns 4 -arnr-maxframes 7 -arnr-type 3 -arnr-strength 5 -pass 2 -an out1a.ivf
Jamaika is offline   Reply With Quote
Old 20th December 2016, 16:06   #967  |  Link
easyfab
Registered User
 
Join Date: Jan 2002
Posts: 332
Perhaps others settings have not the same defaults in FFmpeg and Vpxenc ?
easyfab is offline   Reply With Quote
Old 21st December 2016, 02:23   #968  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,565
Quote:
Radeon Software Crimson ReLive Edition 16.12.2 Highlights
Fixed Issues
  • Chromium may fail to utilize hybrid decode for VP9 content.
http://support.amd.com/en-us/kb-arti...ase-Notes.aspx
sneaker_ger is offline   Reply With Quote
Old 9th January 2017, 06:00   #969  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,277
According to https://en.wikipedia.org/wiki/VP9:
Quote:
VP9 supports HDR video using Hybrid Log-Gamma (HLG) and Perceptual Quantizer (PQ)
but when I compile vp9 using (https://github.com/jb-alvarado/media-autobuild_suite) the vpxenc command line options don't mention it and I can't find any documentation about 'VP9-HLG' which describes how to create such content.
-> Does anyone here have a clue how to create VP9 with HLG ?

Cu Selur
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 9th January 2017, 07:58   #970  |  Link
Jamaika
Registered User
 
Join Date: Jul 2015
Posts: 708
Quote:
Originally Posted by Selur View Post
VP9 supports HDR video using Hybrid Log-Gamma (HLG) and Perceptual Quantizer (PQ)
https://www.tapatalk.com/topic/47413...dr-android-7-0
I am writing as an amateur because he didn't compile VP9.
For me, reading google is an option only android 7.0. And I think this is April Fool's Day.
Then it was written that this isn't an option codec VP9 only container matroska. Not this topic.
Option container matroska can be found in the directory libwebm / mkvmuxer / mkvmuxerutil.cc
PHP Code:
bool IsTransferCharacteristicsValueValid(uint64_t value) {
  switch (
value) {
    case 
mkvmuxer::Colour::kIturBt709Tc:
    case 
mkvmuxer::Colour::kUnspecifiedTc:
    case 
mkvmuxer::Colour::kReservedTc:
    case 
mkvmuxer::Colour::kGamma22Curve:
    case 
mkvmuxer::Colour::kGamma28Curve:
    case 
mkvmuxer::Colour::kSmpte170MTc:
    case 
mkvmuxer::Colour::kSmpte240MTc:
    case 
mkvmuxer::Colour::kLinear:
    case 
mkvmuxer::Colour::kLog:
    case 
mkvmuxer::Colour::kLogSqrt:
    case 
mkvmuxer::Colour::kIec6196624:
    case 
mkvmuxer::Colour::kIturBt1361ExtendedColourGamut:
    case 
mkvmuxer::Colour::kIec6196621:
    case 
mkvmuxer::Colour::kIturBt202010bit:
    case 
mkvmuxer::Colour::kIturBt202012bit:
    case 
mkvmuxer::Colour::kSmpteSt2084:
    case 
mkvmuxer::Colour::kSmpteSt4281Tc:
    case 
mkvmuxer::Colour::kAribStdB67Hlg:
      return 
true;
  }
  return 
false;

Edit: Ok, In VP9 has inactive option HDR if we compile (hdr_util.cc, file_util.cc). In theory it should work. The strange thing is that I can't add a transfer option.
https://chromium-review.googlesource.com/#/c/400084/

PS The codec has damaged the function fps.

Last edited by Jamaika; 9th January 2017 at 15:55.
Jamaika is offline   Reply With Quote
Old 9th January 2017, 10:05   #971  |  Link
nevcairiel
Registered Developer
 
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 10,348
Quote:
Originally Posted by Selur View Post
-> Does anyone here have a clue how to create VP9 with HLG ?
VP9 itself doesn't signal any of the HDR metadata, neither in HDR10 (ie. PQ) mode or HLG mode, it needs to be signaled through the container (ie. webm/matroska).

So basically, just encode the content mastered in HLG, and then instruct the container to convey the HLG transfer information during muxing.
Luckily HLG doesn't need any fancy metadata, other then signaling that the content is in fact HLG.
__________________
LAV Filters - open source ffmpeg based media splitter and decoders

Last edited by nevcairiel; 9th January 2017 at 10:12.
nevcairiel is offline   Reply With Quote
Old 10th January 2017, 05:59   #972  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,277
So we will have to wait till muxers like mkvtoolnix, mp4box, ffmpeg,.. support signaling the content as HLG and there isn't anything needed for the encoders to support.
Thanks for the explanations.

Cu Selur
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 10th January 2017, 12:52   #973  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,565
For mkvmerge see:
https://mkvtoolnix.download/doc/mkvmerge.html#d4e2614
https://www.matroska.org/technical/s...ex.html#Colour
sneaker_ger is offline   Reply With Quote
Old 10th January 2017, 13:41   #974  |  Link
david.copperfield1337
Registered User
 
Join Date: Apr 2015
Posts: 2
https://github.com/YouTubeHDR/hdr_metadata

Gesendet von meinem Nexus 7 mit Tapatalk
david.copperfield1337 is offline   Reply With Quote
Old 10th January 2017, 16:17   #975  |  Link
Jamaika
Registered User
 
Join Date: Jul 2015
Posts: 708
Quote:
Originally Posted by david.copperfield1337 View Post
https://github.com/YouTubeHDR/hdr_metadata

Gesendet von meinem Nexus 7 mit Tapatalk
Sorry, something I don't understand. Youtube boasts movies VP9 HDR. Unfortunately, I don't see movies 10bit. Are they done with HDR at 8bit color range tv?
Code:
./src/mkvmerge \
      -o output.mkv\
      --colour-matrix 0:9 \
      --colour-range 0:1 \
      --colour-transfer-characteristics 0:16 \
      --colour-primaries 0:9 \
      --max-content-light 0:1000 \
      --max-frame-light 0:300 \
      --max-luminance 0:1000 \
      --min-luminance 0:0.01 \
      --chromaticity-coordinates 0:0.68,0.32,0.265,0.690,0.15,0.06 \
      --white-colour-coordinates 0:0.3127,0.3290 \
      input.mov
--colour-bits-per-channel 0:10 ???
--chroma-subsample 0:1,0 ???
--colour-range 0:2 ???


https://www.youtube.com/watch?v=tO01J-M3g0U
Jamaika is offline   Reply With Quote
Old 10th January 2017, 16:21   #976  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,565
10 bit VP9 is there. Doesn't have to be tagged as 10 bit on the container level to be 10 bit.
https://forum.doom9.org/showpost.php...&postcount=543

Meaning of Matroska values are in the specs:
https://www.matroska.org/technical/s...ex.html#Colour
sneaker_ger is offline   Reply With Quote
Old 10th January 2017, 16:29   #977  |  Link
Jamaika
Registered User
 
Join Date: Jul 2015
Posts: 708
Quote:
Originally Posted by sneaker_ger View Post
Doesn't have to be tagged as 10 bit on the container level to be 10 bit.
None of this don't understand.
"Free YouTube download" doesn't see the color matrix or HDR. For me fake.
Stream #0:1(eng): Video: vp9 (Profile 0), yuv420p(tv, bt709/unknown/unknown), 3840x2160, SAR 1:1 DAR 16:9, 59.94 fps, 59.94 tbr, 1k tbn, 1k tbc (default)
Jamaika is offline   Reply With Quote
Old 10th January 2017, 16:32   #978  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,565
Read the post I linked. youtube-dl can download the 10 bit (profile 2) streams.
sneaker_ger is offline   Reply With Quote
Old 10th January 2017, 17:43   #979  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,277
@sneaker_ger: Thanks.
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 10th January 2017, 18:16   #980  |  Link
Jamaika
Registered User
 
Join Date: Jul 2015
Posts: 708
Quote:
Originally Posted by sneaker_ger View Post
Read the post I linked. youtube-dl can download the 10 bit (profile 2) streams.
Ah, I understood what was going on. I don't know why so many intricacies.
youtube-dl.exe -o "The World in HDR.webm" -v -f "(mp4)bestvideo/best[height=2160]+bestaudio/best[height=2160]" https://www.youtube.com/watch?v=tO01J-M3g0U
And even displays ffmpeg the message.
Stream #0:0(eng): Video: vp9 (Profile 2), yuv420p10le(tv, bt2020nc/bt2020/smpte2084), 3840x2160, SAR 1:1 DAR 16:9, 59.94 fps, 59.94 tbr, 1k tbn, 1k tbc (default)
Side data:
Mastering Display Metadata, has_primaries:1 has_luminance:1 r(0.6800,0.3200) g(0.2649,0.6900) b(0.1500 0.0600) wp(0.3127, 0.3290) min_luminance=0.001000, max_luminance=1000.000000

..., but where came it from? It's only change for file 10/12bit apart from the colour range and matix.

Last edited by Jamaika; 10th January 2017 at 18:33.
Jamaika is offline   Reply With Quote
Reply

Tags
google, ngov, vp8, vp9, vpx, webm


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 04:03.


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