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 > Capturing and Editing Video > New and alternative a/v containers

Reply
 
Thread Tools Search this Thread Display Modes
Old 19th January 2021, 23:03   #24181  |  Link
nevcairiel
Registered Developer
 
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 10,342
Quote:
Originally Posted by chros View Post
I have an audio splitter question: there's this option "Prefer audio stream with highest quality".
The problem is (let's say the file has 2 audio track: DD ger [default], DTS-HDMA eng) if there's an audio track with default track, then that one will be used (DD ger tack).
So, is there any rules I can use for audio with which I can force to select the highest quality in this case as well (without specifying the language)?
Thanks
No, "default" always overrides the selection, as the matroska specification mandates.

The option you named only influences ordering in absence of such a factor, ie. it would always use the first then if its turned off.
__________________
LAV Filters - open source ffmpeg based media splitter and decoders
nevcairiel is online now   Reply With Quote
Old 20th January 2021, 08:16   #24182  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,752
So it may be suitable to edit Matroska header flags to achieve your desired default stream selection for this specific file.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 21st January 2021, 14:11   #24183  |  Link
Yups
Registered User
 
Join Date: Sep 2011
Posts: 362
Quote:
Originally Posted by GTPVHD View Post
Yups, Intel released 9079 driver but I'm guessing AV1 bug won't be fixed until next year earliest.

They have fixed DXVA2 AV1 in 9168. However, D3D11 runs faster, this is the preferred mode for Tigerlake.
Yups is offline   Reply With Quote
Old 21st January 2021, 19:41   #24184  |  Link
chros
Registered User
 
chros's Avatar
 
Join Date: Mar 2002
Posts: 2,323
Quote:
Originally Posted by nevcairiel View Post
No, "default" always overrides the selection, as the matroska specification mandates.

The option you named only influences ordering in absence of such a factor, ie. it would always use the first then if its turned off.
Thanks, I forgot about default flag overrides everything, even the language selector in LAV splitter.

Quote:
Originally Posted by LigH View Post
So it may be suitable to edit Matroska header flags to achieve your desired default stream selection for this specific file.
Yes, cheers, or I can use the language selector in the player (MPC-HC/BE).
__________________
Ryzen 5 2600,Asus Prime b450-Plus,16GB,MSI GTX 1060 Gaming X 6GB(v398.18),Win10 LTSC 1809,MPC-BEx64+LAV+MadVR,Yamaha RX-A870,LG OLED77G2(2160p@23/24/25/29/30/50/59/60Hz) | madvr config
chros is offline   Reply With Quote
Old 23rd January 2021, 23:58   #24185  |  Link
jmone
Registered User
 
Join Date: Dec 2007
Posts: 652
@VictorLS,

Yes the files from the FX6 are large as they are not only 10-Bit, 4:2:2, UHD, 50fps, with HLG, but are all I frame AVC. Great for editing.

Here is a screen shot of DXVA Checker (is that what you want?). - https://behome.dyndns.info/index.php/s/9Q2n7XFRH6Qb3HR

I've tried (common) combinations of HEVC vs AVC / 10-Bit vs 8-Bit / 4:4:4 vs 4:2:2 vs 4:2:0 with the different LAV decoding options coupled with madVR with HDR. Apart from 4:2:0 the rest don't kick in HW Acceleration (including your sample). The "closest" alternative if I want to keep higher chroma sub-sampling and have HDR, is to encode in the same AVC-I (or Long GOP) 10bit 4:2:2 profile but converting the HLG to PQ. This will use SW Decoding, with madVR then doing the HDR processing and it will play just fine on my i7-9900K / RX3090 but my HTPC use older i5's and the SW decoding maxes these boxs out. Anyway, here is the PQ version of the sample file. https://behome.dyndns.info/index.php/s/Sfp8XJESWB8xfdB

Here is what I'm using to mux the fist two Mono Audio channels in the MXF container to MXV with the Video untouched.
ffmpeg -i input.mxf -map 0:0 -c:v copy -filter_complex "[0:1][0:2] amerge=inputs=2" -c:a pcm_s16le output.mkv

Last edited by jmone; 24th January 2021 at 06:54.
jmone is offline   Reply With Quote
Old 24th January 2021, 07:19   #24186  |  Link
jmone
Registered User
 
Join Date: Dec 2007
Posts: 652
So back to where this started. Am I correct in saying:
- nvidia Turning and Ampere cards support decode/encode of HEVC 10-Bit 4:4:4,
- I can see apps like Resolve use it,
- but..... as the HEVC 10-Bit 4:4:4 profile is not enumerated by DXVA2 or D3D11, LAV can not use it?
Thanks
Nathan
jmone is offline   Reply With Quote
Old 24th January 2021, 22:24   #24187  |  Link
VictorLS
Registered User
 
Join Date: Mar 2009
Location: Russian Crimea
Posts: 335
Quote:
Originally Posted by jmone View Post
Yes the files from the FX6 are large as they are not only 10-Bit, 4:2:2, UHD, 50fps, with HLG, but are all I frame AVC. Great for editing.
I agree.
Quote:
Originally Posted by jmone View Post
Here is a screen shot of DXVA Checker (is that what you want?)...the HEVC 10-Bit 4:4:4 profile is not enumerated by DXVA2 or D3D11
Yes - great screenshot where clearly nVIDIA can't hardware decode h265 4:4:4 through DXVA2/D3D11 at all - you're right. So just CUVID and (may be) some next step of nVIDIA's CUVID (can work with 12-bit - old can natively just 8-bit as nevcairiel) can (I don't saing about newest Intel products now).
Quote:
Originally Posted by jmone View Post
I've tried (common) combinations of HEVC vs AVC / 10-Bit vs 8-Bit / 4:4:4 vs 4:2:2 vs 4:2:0 with the different LAV decoding options coupled with madVR with HDR...Apart from 4:2:0 the rest don't kick in HW Acceleration (including your sample)
Thanks. But for sure I'd propose you to begin from simple MPC-HC(MPC-BE can do HLGtoSDR processing with i.e. EVR-CP or MPC-VR) beginning with ordinary EVR to see hardware acceleration.
Other way is to use consistently
ffmpeg -benchmark -i FX6_Sample_25fps.mp4 -f null out.null
to get like

in comparison with
ffmpeg -benchmark -hwaccel cuda -i FX6_Sample_25fps.mp4 -f null out.null
to get like

if hardware acceleration is working
Btw I've tested and took above screenshots on 4K h265 4:2:0 10-bit HLG 20190526-164153_RTL UHD.ts from https://forum.doom9.org/showthread.p...34#post1919134 - I guess it's good start point for your hardware acceleration testing.
Quote:
Originally Posted by jmone View Post
Anyway, here is the PQ version of the sample file.
Looks pretty well on my own but size in MB is still amazing...
Quote:
Originally Posted by jmone View Post
Here is what I'm using to mux the fist two Mono Audio channels in the MXF container to MXV with the Video untouched.
ffmpeg -i input.mxf -map 0:0 -c:v copy -filter_complex "[0:1][0:2] amerge=inputs=2" -c:a pcm_s16le output.mkv
Thanks.
Quote:
Originally Posted by jmone View Post
I can see apps like Resolve use it
Screenshot?
VictorLS is offline   Reply With Quote
Old 24th January 2021, 23:31   #24188  |  Link
jmone
Registered User
 
Join Date: Dec 2007
Posts: 652
Here are the screenshots of HEVC 10-Bit 4:4:4 HW Acceleration working with Davinci Resolve for both playback (decoding) and rendering (encoding) of that test clip. It is really fast and works well, even the encoding is about Real Time, and it does not seem to break a sweat with decoding for playback.
Decoding: https://behome.dyndns.info/index.php/s/SknLnYqsgT8eSeN
Encoding: https://behome.dyndns.info/index.php/s/Cj4SWWdsx4YBcwe

So my preference would be for my "best quality" rendering:
- Nev (somehow) enables HEVC 4:4:4 HW Decoding = Good Chroma, Small(ish) File Size & does playback on modern CPU/GPU's combos

else... either of
- HEVC 4:2:0 PQ = Small(ish) File Size, plays back on existing GPU / CPU but has weird Chroma noise in some scenes
- AVC 4:2:2 PQ = Good Chroma, Large File Size (500mbps), will need to upgrade my HTPC CPUs to i7 for SW Decoding (I've got a 2nd hand i7-7700 coming to test)

FYI
- I'm use JRiver Media Center and I'm not going to change to MPC.
- Yup Camera records in 500Mbps AVC 4:2:2 in UHD 50fps, so the files are big!

Last edited by jmone; 25th January 2021 at 02:15.
jmone is offline   Reply With Quote
Old 25th January 2021, 09:10   #24189  |  Link
VictorLS
Registered User
 
Join Date: Mar 2009
Location: Russian Crimea
Posts: 335
jmone
Thanks for screenshots but small CPU utilization graph in top left corner will be appreciated in a future.
But I see 86% utilization of your powerful CPU when encoding - so not only v3090's encoding blocks is used in process of encoding.
Btw can Davinci Resolve play external files like h265 4:4:4 FX6_Sample.mp4 and FX6_Sample_25fps.mp4? It's interesting can your 3090 accelerate both of them?
Quote:
Originally Posted by jmone View Post
I'm use JRiver Media Center and I'm not going to change to MPC.
I've understood from first time you wrote but MPC-HC(BE) are just small portable freeware players (btw they are can with near correctly colors play HLG files on SDR monitor - madVR can't) to have as test players only in your case.
VictorLS is offline   Reply With Quote
Old 25th January 2021, 10:28   #24190  |  Link
jmone
Registered User
 
Join Date: Dec 2007
Posts: 652
Yes. Davinci Resolve will use HW Acceleration for both 4:2:0 and 4:4:4 HEVC for both Playback and Encoding.... though it is not a "player" as such, it's a video editing package but does use HW Acceleration where it can.

Also, keep in mind that the High CPU during the encoding of the HEVC 4:4:4 in Resolve is because the CPU is being used to decode the original AVC 4:2:2 500MBit & the other tasks that Dacinci Resolve is doing (Audio Transcoding, other Effects etc). It can not do HW decoding acceleration for 4:2:2 as the GPU does not support it.

While I've not tested every combination, Davinci Resolve seems to support all the NVDEC supported HW Accelerated Profiles https://en.wikipedia.org/wiki/Nvidia_NVDEC content for both playback (decoding) and rendering (encoding) with a modern nvidia card, which includes HEVC 4:4:4.
jmone is offline   Reply With Quote
Old 25th January 2021, 17:19   #24191  |  Link
VictorLS
Registered User
 
Join Date: Mar 2009
Location: Russian Crimea
Posts: 335
Quote:
Originally Posted by jmone View Post
Davinci Resolve will use HW Acceleration for both 4:2:0 and 4:4:4 HEVC for both Playback and Encoding.... though it is not a "player" as such, it's a video editing package but does use HW Acceleration where it can
I try to continue: i.e. both FX6_Sample.mp4 and FX6_Sample_25fps.mp4 are hardware accelerated in Davinci Resolve when I tried to encode them into (some easy format) well - is it true (or just FX6_Sample_25fps.mp4 is accelerated)?
Screenshot with CPU and Video Decode load
Also ffmpeg -benchmark -i FX6_Sample_25fps.mp4 -f null out.null and ffmpeg -benchmark -hwaccel cuda -i FX6_Sample_25fps.mp4 -f null out.null (I use ffmpeg version 2021-01-12-git-ca21cb1e36-full_build-www.gyan.dev Copyright (c) 2000-2021 the FFmpeg developers built with gcc 10.2.0 (Rev6, Built by MSYS2 project) - what version do you use?) are the same so hardware acceleration isn't work - is it true? If not and -hwaccel cuda use Video Decode upload screenshot, please.
Quote:
Originally Posted by jmone View Post
Also, keep in mind that the High CPU during the encoding of the HEVC 4:4:4 in Resolve is because the CPU is being used to decode the original AVC 4:2:2 500MBit & the other tasks that Dacinci Resolve is doing (Audio Transcoding, other Effects etc). It can not do HW decoding acceleration for 4:2:2 as the GPU does not support it.
I thought the same but your explanation was appreciated.
Quote:
Originally Posted by jmone View Post
While I've not tested every combination, Davinci Resolve seems to support all the NVDEC supported HW Accelerated Profiles https://en.wikipedia.org/wiki/Nvidia_NVDEC content for both playback (decoding) and rendering (encoding) with a modern nvidia card, which includes HEVC 4:4:4.
I've watched the same on https://developer.nvidia.com/video-e...ort-matrix-new but asterix *H.265 (HEVC) 4:4:4 isn't explaned there - I can assume may be it means i.e. not through DXVA2 or D3D11

Last edited by VictorLS; 25th January 2021 at 17:25.
VictorLS is offline   Reply With Quote
Old 25th January 2021, 21:34   #24192  |  Link
jmone
Registered User
 
Join Date: Dec 2007
Posts: 652
Davinci Resolve: HW Acceleration is used for both encoding and decoding the HEVC UHD 4:4:4 10-Bit 50fps sample. Here are the screen shots showing both GPU & CPU usage for:
- AVC UHD 4:2:2 10 Bit 50fps (CPU Decoding) ----> HEVC UHD 4:4:4 10 Bit 50fps (GPU Encoding)
https://behome.dyndns.info/index.php/s/MGsi7amYKRqa4iT
- HEVC UHD 4:4:4 10 Bit 50fps (GPU Encoding) ----> HEVC UHD 4:4:4 10 Bit 50fps (GPU Encoding)
https://behome.dyndns.info/index.php/s/qqfEwYoZ8EAZEAE

I'll look at ffmpeg later.
jmone is offline   Reply With Quote
Old 25th January 2021, 22:02   #24193  |  Link
jmone
Registered User
 
Join Date: Dec 2007
Posts: 652
ffmpeg: Yes HW acceleration (decode) works on the HEVC UHD 10 Bit 4:4:4 50fps sample when adding "-hwaccel cuda" - https://behome.dyndns.info/index.php/s/yxgwZ64ajWioakQ

Here the log of both runs (with and without "-hwaccel cuda") - https://behome.dyndns.info/index.php/s/yZwPLBD8zPoyRsY

Last edited by jmone; 25th January 2021 at 22:27.
jmone is offline   Reply With Quote
Old 25th January 2021, 22:18   #24194  |  Link
VictorLS
Registered User
 
Join Date: Mar 2009
Location: Russian Crimea
Posts: 335
jmone
Many thanks.
I guess https://behome.dyndns.info/index.php/s/qqfEwYoZ8EAZEAE for FX6_Sample.mp4 namely (on your previous screenshots I saw name of encoding file in Davinci Resolve but this time name of file absent)? If so, I agree test with FX6_Sample_25fps.mp4 is unnecessary.
It's seems I was wrong so I ask you repeat test with FX6_Sample.mp4 and upload HEVC UHD HDR 10Bit 444 50fps.mov for our future testing.
Btw saying about CPU load in top left corner I meant just (name of playing file and H/W also important):

but you've done better (but some harder to do).
If I understand right FX6_Sample.mp4 and HEVC UHD HDR 10Bit 444 50fps.mov are not hardware accelerated in JRiver Media Center with LAV Video Decoder (CUVID) and madVR - right?
I ask you try with latest MPC-HCx64 (LAV CUVID) https://github.com/clsid2/mpc-hc/rel....8.148.x64.zip and ordinary EVR to watch H/W in bottom left corner

Last edited by VictorLS; 25th January 2021 at 22:38.
VictorLS is offline   Reply With Quote
Old 26th January 2021, 00:36   #24195  |  Link
jmone
Registered User
 
Join Date: Dec 2007
Posts: 652
HEVC 4:4:4 is not HW Accelerated in either JRiver Media Center or MPC-HCx64 (from your zip file) with LAV set to CUVID.

Last edited by jmone; 26th January 2021 at 02:38.
jmone is offline   Reply With Quote
Old 26th January 2021, 07:23   #24196  |  Link
VictorLS
Registered User
 
Join Date: Mar 2009
Location: Russian Crimea
Posts: 335
jmone
Thanks but I don't know until now have you tried FX6_Sample.mp4 or just yours HEVC UHD HDR 10Bit 444 50fps.mov?
VictorLS is offline   Reply With Quote
Old 26th January 2021, 08:43   #24197  |  Link
jmone
Registered User
 
Join Date: Dec 2007
Posts: 652
Neither your "FX6_Sample.mp4" (HEVC 4:4:4 but 25fps and low bitrate) or my HEVC UHD HDR 10Bit 444 50fps.mov uses HW Accelerated in either JRiver Media Center or MPC-HCx64 (from your zip file) with LAV set to CUVID. They all drop back to SW Decoding (avcodec) in LAV.

Last edited by jmone; 26th January 2021 at 08:47.
jmone is offline   Reply With Quote
Old 26th January 2021, 11:10   #24198  |  Link
VictorLS
Registered User
 
Join Date: Mar 2009
Location: Russian Crimea
Posts: 335
jmone
That's better - thanks but I've asked about ffmpeg -benchmark... test with FX6_Sample.mp4 and (if hardware decoding not work with 50fps but due test with HEVC UHD HDR 10Bit 444 50fps.mov I'm sure Ampere can - may be Turing can't) FX6_Sample_25fps.mp4 - it was at http://forum.doom9.org/showthread.ph...08#post1934308

nevcairiel
What do you think - is it possible to add support of 4:4:4 h265 in LAV Video Decoder via CUVID for nVIDIA's Turing and Ampere owners like jmone and (may be - I don't know exactly) you?
May be its time for adding Dolby-E support https://github.com/FFmpeg/FFmpeg/com...dd7b8fad188add in LAV Audio Decoder I've asked http://forum.doom9.org/showthread.ph...35#post1928735 with Sample Eurovision 2019 Tel Aviv.ts contained Dolby-E audiotrack there?
VictorLS is offline   Reply With Quote
Old 26th January 2021, 18:19   #24199  |  Link
clsid
*****
 
Join Date: Feb 2005
Posts: 5,642
He has already said that CUVID is deprecated. Don't expect any updates for it. Plus CUVID does not support exporting HDR metadata, so it is becoming useless.

There is no Dolby-E decoder in FFmpeg yet. Only a parser.
clsid is offline   Reply With Quote
Old 26th January 2021, 19:21   #24200  |  Link
richardpl
Registered User
 
Join Date: Jan 2012
Posts: 272
Quote:
Originally Posted by clsid View Post
There is no Dolby-E decoder in FFmpeg yet. Only a parser.
False information and propaganda. FFmpeg have decoder for Dolby-E.
richardpl is offline   Reply With Quote
Reply

Tags
decoders, directshow, filters, splitter

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 12:12.


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