View Full Version : LAV Filters - DirectShow Media Splitter and Decoders


Pages : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 [25] 26

NikosD
18th August 2020, 08:32
Haswell's and probably onwards Intel's HW H.264 is the fastest (even from Turing) and I have already tested 4K H.264 L5.2 Ref 16 with huge bandwidth (1Gbps) and with success And I have to correct myself, as 4K H.264 L5.2 samples of my test, had Ref 5 and 1080p H.264 L5.2 samples had Ref 16.

alleway
18th August 2020, 08:47
hi i would like to know is there a way lav is able to decode dts:x. if i set atmos to bitstream my avr will indicate atmos is playing but for dts:x when i set it to bitstream my avr doesnt indicate it is playing dts:x. my avr is atmos and dts:x capable.

nevcairiel
18th August 2020, 08:53
And I have to correct myself, as 4K H.264 L5.2 samples of my test, had Ref 5 and 1080p H.264 L5.2 samples had Ref 16.

Thats the big limit there, more then 5 ref frames at 4K is going over the L5.2 limit and likely causing these issues.

nevcairiel
18th August 2020, 09:13
hi i would like to know is there a way lav is able to decode dts:x. if i set atmos to bitstream my avr will indicate atmos is playing but for dts:x when i set it to bitstream my avr doesnt indicate it is playing dts:x. my avr is atmos and dts:x capable.

No, LAV does not decode DTS:X, but if its present in the bitstream then the full bitstream is being send untouched to your receiver. LAV does not modify it at all.

alleway
18th August 2020, 09:33
No, LAV does not decode DTS:X, but if its present in the bitstream then the full bitstream is being send untouched to your receiver. LAV does not modify it at all.

thanks nev for the info. so dts:x audio will still be present if i set it to bitstream right?

nevcairiel
18th August 2020, 10:37
It should be. LAV does not modify it at all.

alleway
18th August 2020, 10:57
It should be. LAV does not modify it at all.

got it. thanks nev👍👍

NikosD
18th August 2020, 11:31
Thats the big limit there, more then 5 ref frames at 4K is going over the L5.2 limit and likely causing these issues. The first HW decoders of H.264 could properly decode 1080p up to L4.1 with maximum number of ReF 4, which was the level used by Blu-ray.
It took years for HW decoders to support properly H.264 1080p L5.1 Ref 16, due to very limited commercial support.
I still remember that 1080p H.264 L5.1 Ref 16 Samsung demo clip with something like an aquarium, which was a nightmare to decode for HW H.264 decoders of that time.
Likewise, due to very limited commercial support of beyond UHD use of H.264 codec, I don't expect companies to revise their HW H.264 decoder soon (or ever) in order to support L6.x

clsid
20th August 2020, 12:22
HEVC sample (https://www.sendspace.com/file/4we5kx) that decodes wrong with DXVA2. Playback is ok with software decoding or CUVID.

Problem seems to be that main10 dxva2 decoder is used, while this video is 8bit. MediaInfo indicates profile "Main 10@L4.1@Main".

VBB
20th August 2020, 23:11
Nev, just wanted to let you know that the cert to 1f0.de has expired again, which you probably already know :)

nevcairiel
21st August 2020, 06:58
It was supposed to have moved to a new server by now, but I haven't had the time to finish the move... But i updated the old certificates in the meantime.

chainik_svp
27th August 2020, 14:57
nevcairiel
Could you please give a small hint regarding DirectShow magic?
https://forum.doom9.org/showthread.php?t=180424 - a DS transform filter running Avisynth script. We want to pass-through HDR meta-data from LAV to madVR. What could be the easiest way to do this?
AFAIU IMediaSideData must be attached to the media sample. But when I simply trying to QueryInterface() on the received IMediaSample - it doesn't work. What am I doing wrong? o_O
Probably there's another way to simply copy that "attached" data block from the input sample to output, w/o "parsing" it?

nevcairiel
27th August 2020, 16:18
If you are implementing your own sample allocator, you need to make sure that it implements IMediaSideData on the samples, otherwise it wouldn't come from anywhere. I don't think LAV actually implements it on a normal sample allocator, since in practically every normal case its provided by the renderer. So if you want to sit between LAV and madVR, you would either pass the madVR allocator to LAV, or implement IMediaSideData on a new one.

chainik_svp
27th August 2020, 16:48
Ah! indeed the IMediaSideData interface is available for the output samples. The picture begins to take shape...

vosya
28th August 2020, 08:14
In the PotPlayer's settings of the built-in video decoder there is an option "Use output queue". Activating it seems to result a more stable FPS on heavy videos. Is there something similar in LAV Video Decoder and is such functionality generally useful?

huhn
28th August 2020, 09:55
it's in the lav splitter part but except for streaming or in slow local networks this shouldn't help you. render queue like in madVR or EVR should do what you ask for but that's not lav filters job.

vosya
28th August 2020, 15:42
render queue like in madVR or EVR should do what you ask for but that's not lav filters job.
Don't you think that the video decoder and the video renderer are different entities, and the queues in them are also different, independently controlled? This is obviously observed in the mentioned PotPlayer.

huhn
28th August 2020, 20:09
no because it was possible to break hardware decoding with to big queue in madVR.

nevcairiel
28th August 2020, 23:20
There is no functional difference on which side the queue is.

vosya
29th August 2020, 04:43
There is no functional difference on which side the queue is.
The video renderer I use, Overlay Mixer - it seems to me has no queue at all. Therefore, there is no alternative to a queue in a video decoder.

nevcairiel
29th August 2020, 08:03
Use a better video renderer. There are no plans to add something like this.

vosya
29th August 2020, 10:08
There are no plans to add something like this.
Not critical, the last couple of years the built-in PotPlayer filters have reached the level that suits me and there is a constant positive dynamics. The need to use LAV Filters, previously absolutely necessary, is constantly decreasing.

foxyshadis
29th August 2020, 14:46
Overlay Mixer has been deprecated since 2001; it's now 2020, it's long since time to move on. Overlay is great because you hardly have to do anything, the driver takes care of everything. But Overlay means you can't customize anything, because the driver takes care of everything.

Plus, you know, high bit depth? HDR? Shaders? Things that people might like to have in 2020, that Overlay won't give you.

vosya
29th August 2020, 17:22
Things that people might like to have in 2020, that Overlay won't give you.
There are a lot of things that I personally don't need. Including the redundant capabilities of modern video renderers, as well as advice on their choice.

PCU
29th August 2020, 19:51
Why MPEG-4 HW acceleration is unavailable in D3D11? (i5 5th Gen)

nevcairiel
29th August 2020, 20:31
MPEG-4 acceleration is rather buggy, and any modern CPU can decode it without even breaking a sweat, so simply because its easier not to allow it.

PCU
30th August 2020, 14:20
:thanks:

huhn
31st August 2020, 22:54
madVR get's kinda nuts with progressive decoded 23p dvds.
the file still get's reported as 29p. with film mode it is switching to 23p "correctly" but according to the OSD it doesn't get a deinterlaced flag so why would it even care about film mode or video mode is it maybe present for 1 frame?
so i just want to make sure the frame times are not wrong or something else in the first place before i bring this up to madshi.
there doesn't seem to be a difference between hardware and software decode.

this doesn't happen when the DVD navigator is used the file is then decoded to 29i with hard telecine.
the file has been tested with direct vob file play DVD structure(DVDnavigator) and MKV remux.

nevcairiel
14th September 2020, 13:01
nev, can you please add AV1 hardware decoding to LAV Filters?

Hey, that idea never occured to me. :rolleyes:

VictorLS
15th September 2020, 22:33
GTPVHD
Thanks for link, it seems news about hardware acceleration of AV1 in future releases of Ampere-based nVIDIA videocards can be true.

huhn
15th September 2020, 23:38
https://www.nvidia.com/en-us/geforce/news/rtx-30-series-av1-decoding/

it's been confirmed.

NikosD
16th September 2020, 06:13
And for AMD Radeon RX 6000 series of course:
https://www.phoronix.com/scan.php?page=news_item&px=AV1-Decode-For-AMD-VCN-3.0

DMU
21st September 2020, 22:18
No, this would be a terrible experience. "I changed the stream but audio was still the wrong language for several seconds", yeah, not wasting my time on that, sorry.
Is it possible to implement this only for subtitles? That is, there will be no such issues with audio.

nevcairiel
21st September 2020, 22:54
The same thing would happen with subtitles, and potentially even more pronounced since subtitles themselves can show for a longer time. You would switch it and only see the switch after several seconds of playback.
The current solution is the best compromise available. A tiny playback glitch when the user presses a button is not very disruptive.

PCU
2nd October 2020, 23:24
I hope someone could develop LAV Filters plug-in for Adobe Audition 2020. Audition doesn't import Dolby, DTS, Bink Media & old QuickTime format & the only plug-in that can do all of this is LAV Filters. Also, what MP3 & AAC decoder FFmpeg uses?

LigH
5th October 2020, 07:41
Its own OpenSource decoders; ffmpeg is a CLI frontend for the libavcodec core library.

NanoBot
5th October 2020, 13:12
I hope someone could develop LAV Filters plug-in for Adobe Audition 2020. Audition doesn't import Dolby, DTS, Bink Media & old QuickTime format & the only plug-in that can do all of this is LAV Filters. Also, what MP3 & AAC decoder FFmpeg use?

I don't know if such plug-in filters for Audition can and will be developed, but perhaps you might give Audacity a try, which in my option is a very good free and open-source alternative for Audition. And for Audacity, you can get a ffmeg based plugin, which allows the use of some of the formats you mentioned.

https://www.audacityteam.org/ and https://manual.audacityteam.org/man/installing_ffmpeg_for_windows.html

PCU
7th October 2020, 23:30
Its own OpenSource decoders; ffmpeg is a CLI frontend for the libavcodec core library.
:thanks: Reversed or original code?
I don't know if such plug-in filters for Audition can and will be developed, but perhaps you might give Audacity a try, which in my option is a very good free and open-source alternative for Audition. And for Audacity, you can get a ffmeg based plugin, which allows the use of some of the formats you mentioned.

https://www.audacityteam.org/ and https://manual.audacityteam.org/man/installing_ffmpeg_for_windows.html

Thank you so much for suggestion, but did you check this site:
https://src.infinitewave.ca/
Quality of Audition is so much higher than any editor in that list, even Pro Tools! Pro Tools & Audition are standard in the world like Photoshop!

LigH
8th October 2020, 07:33
MP3 and AAC specifications (and reference software in source) are available and detailed enough to enable developers to write their own code. For these formats, there was certainly no need to disassemble binaries.

And regarding your "standard software hype" ... Premiere used to convert YUV to RGB before applying filters; advantage to AviSynth. Your mentioned site tells little without understanding the mathematical backgrounds of each implementation. Free software can use correct and precise implementations too. And be more user friendly at the same time by not chaining the user to a sadistic payment model.

PCU
8th October 2020, 14:13
MP3 and AAC specifications (and reference software in source) are available and detailed enough to enable developers to write their own code. For these formats, there was certainly no need to disassemble binaries.

And regarding your "standard software hype" ... Premiere used to convert YUV to RGB before applying filters; advantage to AviSynth. Your mentioned site tells little without understanding the mathematical backgrounds of each implementation. Free software can use correct and precise implementations too. And be more user friendly at the same time by not chaining the user to a sadistic payment model.

:thanks:
What software do you recommend for editing, ripping & converting audio files, free or commercial.

el Filou
8th October 2020, 20:29
Even when comparing Audition 2019 to Audacity (Best Quality) on that SRC comparison site, there are no audible differences between them (differences only above 20500 Hz), Audacity is just as good.

LigH
9th October 2020, 08:09
Wrong thread, @PCU... this is about LAV Filters. Please stay on topic here, and create a new thread for all the unrelated audio questions.

PCU
9th October 2020, 12:10
:thanks:

aufkrawall
12th October 2020, 11:59
Does Windows 10 offer native AV1 D3D11VA hardware decoding apart from Media Foundation?

nevcairiel
12th October 2020, 15:01
Microsoft of course doesn't provide anything out of the box anymore except Media Foundation. But any software, such as LAV, can of course make use of D3D11VA to decode AV1. Once I get access to any hardware, of course.

DMU
20th October 2020, 19:02
The current solution is the best compromise available. A tiny playback glitch when the user presses a button is not very disruptive.

Why don't I see such a playback glitch when playing DVD content? Both audio and subtitles are switched without stopping the video stream.

nevcairiel
20th October 2020, 23:10
That topic is done. I will not waste countless hours redesigning something that spans potentially multiple components and may not even work fully since third-party components are involved (renders), which I do not perceive as a problem.

clsid
21st October 2020, 23:40
AAC ltp decoding issue: sample file (https://drive.google.com/file/d/1kO7ynnZS8AvjlleLRhTCIr2BLLwKIXUH/view?usp=sharing)
Plays ok with VLC.

manolito
23rd October 2020, 09:31
Downloaded the sample just for fun. Of course no source filter would play it, but I was a bit surprised to see MediaInfo reporting 10 audio channels.

Does this madness ever stop? Will the next generation videos have 20 audio channels so users need a home theater setup with this number of speakers?

I think that 8 channels are already overkill, more than 6 audio channels are just a bloody hype...

Just my 2 cents... :devil:

LigH
23rd October 2020, 12:35
And then count in the different interference preferences of furniture and closet contents ... better you have a separate home cinema room in your basement. :sly:

el Filou
23rd October 2020, 19:15
I had already noticed LAV couldn't handle 10-channel audio when I tried testing some stuff with the Audio Creation mode of my X-Fi that allows up to 10 channels of "Multi-Channel Wave", but I figured it was a really niche case and no consumer file would ever use that. The additional two compared to 7.1 were 'Rear Center' and 'Top'. Is that standard in Windows' multi-channel wave layout?
I assume this sample here from Doom doesn't use that and it's rather two or more height channels like in Atmos?

v0lt
25th October 2020, 11:37
AAC ltp decoding issue: sample file (https://drive.google.com/file/d/1kO7ynnZS8AvjlleLRhTCIr2BLLwKIXUH/view?usp=sharing)
Plays ok with VLC.
ffplay 2020-10-21-git-289e964873 cannot play sound correctly.
VLC 3.0.11 plays in stereo.

regiregi22
25th October 2020, 23:12
I have an Intel i9 10900K cpu and an Nvidia 1080 gpu. I am currently the latest MPC-HC version (1.9.8 from clsid2) with LAV video version 0.74.1.75.

Would it be better to use D3D11 or just going directly for software decoding (none)?

Thanks!

Asmodian
26th October 2020, 07:57
I like D3D11 for 4K HEVC but for everything else software is better, even 4K HEVC is fine in software on a 10900K but it does heat up.

clsid
26th October 2020, 16:50
D3D11 is only beneficial if you use madVR or MPCVR. Because those renderers supports D3D11 native mode. With EVR-CP as renderer the best choice is DXVA2 Native (or None for <4K stuff).

regiregi22
26th October 2020, 17:19
D3D11 is only beneficial if you use madVR or MPCVR. Because those renderers supports D3D11 native mode. With EVR-CP as renderer the best choice is DXVA2 Native (or None for <4K stuff).
Thank you!

butterw2
26th October 2020, 17:32
I typically use hwdec on my old machine (intel hd4400 igpu).

However, with 4K30 8bit Hevc, software decoding seems to work better (avoids gpu @100% +frame stuttering).

clsid
26th October 2020, 22:43
Intel hd4400 only has partial acceleration for HEVC, which isn't very good. So with such GPUs you often get better results with CPU decoding.

mark0077
27th October 2020, 15:31
Hi guys. I remember discussing this many years back on this thread, but I'm wondering has anyone come across a way to achieve this with lav audio or some other external filter.

I'm trying to filter out frequencies above a certain frequency from the LFE channel, because many blu-rays I have such as the Dark Knight, have some awfully strange, high frequency content in the LFE channel. AVRs must normally filter this but as I don't have an AVR, I can't get rid of them so the sound flutters/clips (it sounds like that) in some scenes. I actually only have a 2.1 channel system (Outputting as 2.0 to LS50W + it then outputting low frequencies from the 2.0 to a PB16 Ultra sub). I have until now been using LAV Mixing to mix to 2.0 with 0.71 as the mixing level for center/surround, and 1.58 for the LFE Mix level.

I'm now trying again to see is there a way to solve this as other family members noticed the problem last night when I was "showing off" my system. Do you know if LAV Audio would ever have the ability to filter these frequencies out before mixing, as its difficult to filter them after the mix is done. I'm thinking one way would be to send the audio without mixing, to ffdshow raw audio or some other filter, and let it do the filtering (via a convolver maybe) and then mixing to 2.0 after the filtering.

Any inputs welcome. It'd be great if LAV Audio could do it but not sure is there any plans?

VictorLS
31st October 2020, 17:00
Can anyone confirm new H.265 4K SAT channel Mooz 4K (here's my record 20201031-170739_Mooz 4K.ts (56 MB) https://yadi.sk/d/NngfIFAIVyK-hQ ) with LAV Video Decoder 0.74.1-75 (I didn't test earlier versions) as minimum on nVIDIA's videocards GM206 and newer can't be accelerated with DXVA2 (native and copy-back) or gives artifacts in Win7x64? With CUVID hardware acceleration works well. MPC-BE, Cyberlink and MainConcept accelerates via DXVA2 well too.

sneaker_ger
31st October 2020, 19:59
Video
ID : 500 (0x1F4)
Menu ID : 2 (0x2)
Format : HEVC
Format/Info : High Efficiency Video Coding
Format profile : Main 10@L5.1@Main
Codec ID : 36
Duration : 20 h 30 min
Width : 3 840 pixels
Height : 2 160 pixels
Display aspect ratio : 16:9
Frame rate : 25.000 FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
https://github.com/Nevcairiel/LAVFilters/commit/cac4dcd705de5b908c181cab123e860ad6d18435

nevcairiel
31st October 2020, 20:02
I'll likely have to redesign profile/format selection for proper AV1 support, since it has a lot more supported formats, so maybe support for such streams will come at that point.

VictorLS
31st October 2020, 21:19
sneaker_ger, nevcairiel
Thanks

nevcairiel
6th November 2020, 23:28
A new LAV Filters nightly (0.74.1-87 and newer) is available now with support for AV1 DXVA2/D3D11 decoding.

For those with Intel Tiger Lake mobile CPUs or the lucky few with NVIDIA 30-series cards, if you encounter any issues, do let me know.
Only Profile 0 ("Main") is supported for now, which is 8-bit and 10-bit 4:2:0.

Film Grain is only supported on NVIDIA so far, as they apply it transparently, which is also what I tested on. For Intel (and presumably future AMD), Film Grain will require additional work, unfortunately I don't have such hardware myself (yet).

I have a bit more hardware things to work on, but once that is done I plan on making a new release version.

SamuriHL
7th November 2020, 02:55
Oh that's very exciting. Thanks, nev! Now, where'd I put that nVidia 3080....ohhhhh, right. Damn. :D Looking forward to being able to play some day!

VBB
7th November 2020, 03:11
Thanks for all your hard work, nev!

wanezhiling
7th November 2020, 12:14
A new LAV Filters nightly (0.74.1-87 and newer) is available now with support for AV1 DXVA2/D3D11 decoding.

For those with Intel Tiger Lake mobile CPUs or the lucky few with NVIDIA 30-series cards, if you encounter any issues, do let me know.
Only Profile 0 ("Main") is supported for now, which is 8-bit and 10-bit 4:2:0.

Film Grain is only supported on NVIDIA so far, as they apply it transparently, which is also what I tested on. For Intel (and presumably future AMD), Film Grain will require additional work, unfortunately I don't have such hardware myself (yet).

I have a bit more hardware things to work on, but once that is done I plan on making a new release version.

Not work on Tiger Lake iGPU, auto fallback to sw decoding, and even sw decoder fails too, just blackscreen.

clip (https://mega.nz/file/g5V30QTC#ibTcM6QWnQ7Uq4_LSz0DImO7l_RhbCSAsV_PsvO0pPg) for test

lvqcl
7th November 2020, 12:52
and even sw decoder fails too, just blackscreen.

Do you use 32-bit player?

wanezhiling
7th November 2020, 14:35
Do you use 32-bit player?

No, 64-bit

nevcairiel
7th November 2020, 14:44
Software decoding works just fine here in 64-bit, albeit slowly. Your system is likely just extremely overwhelmed with a 8K video.
It also hardware decodes fine here on my NVIDIA card. As mentioned before, I do not have access to an Intel system, I only had someone test a bit to confirm. The implementation follows the Microsoft specification, so any conforming hardware should work.

Do note that fallback is not guaranteed to work with DXVA2 Native (or possibly D3D11 native, even), as the renderer cannot really be reset from hardware mode back to software mode.

32-bit decoders, on the other hand, are not capable of handling 8K reliably at all. They just often run out of memory.

In general, it would also be a lot more helpful to avoid generic statements like "it doesn't work". Now I don't know if it doesn't work with any video? Or only not with that video, which happens to be 8K and maybe is just too much for a laptop? That means all I can do is guess.

v0lt
7th November 2020, 15:32
@wanezhiling
Perhaps the built-in graphics have limitations on the amount of allocated RAM.

clsid
7th November 2020, 16:26
Here are some more AV1 samples:
https://www.elecard.com/videos

If those also fail, then maybe there is a minimum Intel driver version needed for proper AV1 hardware decode?

ranpha
7th November 2020, 16:34
Playing that clip (https://mega.nz/file/g5V30QTC#ibTcM6QWnQ7Uq4_LSz0DImO7l_RhbCSAsV_PsvO0pPg) with DXVA2/D3D11 native with a RTX 3080 works just fine, but using any form of copy-back decoding methods and the performance goes down the toilet. Maybe because my motherboard only supports PCI-E v3?

nevcairiel
7th November 2020, 16:56
That clip is 8K 10-bit 60 FPS, that comes out to 7680 × 4320 (pixels) x 24 (total bits per pixel in P010) x 60 (fps) -> 47.8 Gbit/s, or 6GB/s
PCIe 3.0 x16 has a single duplex speed of ~16GB/s, so in theory its still enough, but who knows what else is going on. System memory on DDR4 has a speed of 40-50GB/s reading, possibly half that writing. Copy-back needs to go through the system memory, so a lot of bandwidth is being used here.

On top of all that, the copying actually uses CPU resources.
Its hard to say which is really bottlenecking. Maybe the transfer from/to GPU is too slow. Maybe the system memory is an issue. Maybe I'll try to find out. I would assume its either the GPU download or upload, or the combination of the two combined.

Keep in mind that 8K is 4 times as much data as 4K, if anyone was wondering about comparing those numbers.
In general I would say copy-back for 8K is dead. And likely software decoding as well, as these rates are getting out of control.

My Ryzen 5000 is still in the mail, so I can't check PCIe 4.0 yet, but I doubt that'll make a difference. But I'll let myself be surprised!

wanezhiling
7th November 2020, 17:30
@nevcairiel, i tested another three such samples (8k av1 10-bit) downloaded from youtube, same result, auto fallback to sw mode and no image output (blackscreen).
While if downgraded to 4k av1 10-bit (also these clips) ver, sw decoder works fine, hw decoder still doesn't work though.

PS: The movie and TV app plays fine with hw decoding. https://iili.io/FJkdN9.jpg

clsid
7th November 2020, 17:34
Assuming 8k60 copyback is unusable even on the new generation CPUs, maybe it is a good idea to force native mode when user has selected copyback? I know you are not a fan of such workarounds, but this feels like a valid exception.

Siso
8th November 2020, 11:02
A question about software decoding and hardware decoding dxva cp in Win 7, I see no difference, but maybe the more experienced users can point me to the right decoder. My cpu is xeon x5650, the video card is gtx 1050 ti. So in short software or hw decoding?

clsid
8th November 2020, 16:34
All decoders give the same quality.

Siso
8th November 2020, 16:39
All decoders give the same quality.

How about in terms of performance and stability?

VBB
8th November 2020, 20:24
For anything other than HEVC & VP9, I now use software only. madVR times are actually lower that way, and you get the benefit of black bar detection, de-interlacing, and more. Stable as can be, and my CPU is from 2008.

Siso
9th November 2020, 00:19
For anything other than HEVC & VP9, I now use software only. madVR times are actually lower that way, and you get the benefit of black bar detection, de-interlacing, and more. Stable as can be, and my CPU is from 2008.

Thank you for the reply, I'll leave it to software decoding.

mark0077
11th November 2020, 20:27
Guys using the latest nightly LAV Splitter/Video/Audio, I have seen an issue (not specific to this LAV version) with "The World Is Not Enough" Blu-ray. When I play the index.bdmv or the largest m2ts file, when I seek a significant way into the file, the player freezes for possibly a minute. I assume this is the fact that the file has been created without something like keyframes or something like that? Do you know if this is something LAV is behaving correctly with (ie taking this amount of time) or is there a way to make it faster without changing the actual files?

LigH
12th November 2020, 08:52
If the video stream did not have regular frequent keyframes, it would not be Blu-ray compliant and should have been rejected by any serious authoring tool... I would rather wonder about issues with the logical structure. But that's harder to prove.

VictorLS
13th November 2020, 21:56
is there a way to make it faster without changing the actual files?
Try to use MPC-BE's MpegSplitter.ax from standalone_filters-...zip i.e. lastest Beta's can be downloaded from https://cloud.mail.ru/public/V1rp/2iqNDT5Rx/Beta%20(Nightly)/1.5.6 or https://yadi.sk/d/AjAXDDHtHRIELg/Beta%20(Nightly)/1.5.6

doskabouter
15th November 2020, 12:39
I have a problem playing some avi files.
File source splitter perfectly adds a LAV video decoder if used in MPC/graphstudio but the LAV splitter does not add that automatically.
If LAV video decoder is added manually it plays perfectly.
Mediainfo of video:
General
Complete name : <redacted>.avi
Format : AVI
Format/Info : Audio Video Interleave
File size : 24.8 MiB
Duration : 1 min 50 s
Overall bit rate : 1 895 kb/s
Writing library : VirtualDub build 16250/release

Video
ID : 0
Format : Indeo 4
Codec ID : IV50
Codec ID/Info : Intel Indeo Video 5.0 Wavelet
Duration : 1 min 50 s
Bit rate : 1 800 kb/s
Width : 320 pixels
Height : 240 pixels
Display aspect ratio : 4:3
Frame rate : 15.000 FPS
Bits/(Pixel*Frame) : 1.563
Stream size : 23.6 MiB (95%)

Audio
ID : 1
Format : PCM
Format settings : Unsigned
Codec ID : 1
Duration : 1 min 49 s
Bit rate mode : Constant
Bit rate : 88.2 kb/s
Channel(s) : 1 channel
Sampling rate : 11.024 kHz
Bit depth : 8 bits
Stream size : 1.16 MiB (5%)
Alignment : Aligned on interleaves
Interleave, duration : 67 ms (1.00 video frame)
Interleave, preload duration : 500 ms


Is there something I'm missing?
The indeo format is checked in the video formats configuration
Version is 0.74.1

doskabouter
16th November 2020, 21:25
Hi all,

I have an issue with some old IV50 AVI files.
If I open them in MPC they play fine, with a generic filesource -> LAV video decoder and LAV audio decoder.
When opening them in graphstudio, LAV splitter is used, LAV audio decoder is added, but no video decoder.
Manually adding LAV Video decoder and connecting it to the splitter, playback is ok.
Mediainfo of this file:

General
Complete name : <redacted>.avi
Format : AVI
Format/Info : Audio Video Interleave
File size : 24.8 MiB
Duration : 1 min 50 s
Overall bit rate : 1 895 kb/s
Writing library : VirtualDub build 16250/release

Video
ID : 0
Format : Indeo 4
Codec ID : IV50
Codec ID/Info : Intel Indeo Video 5.0 Wavelet
Duration : 1 min 50 s
Bit rate : 1 800 kb/s
Width : 320 pixels
Height : 240 pixels
Display aspect ratio : 4:3
Frame rate : 15.000 FPS
Bits/(Pixel*Frame) : 1.563
Stream size : 23.6 MiB (95%)

Audio
ID : 1
Format : PCM
Format settings : Unsigned
Codec ID : 1
Duration : 1 min 49 s
Bit rate mode : Constant
Bit rate : 88.2 kb/s
Channel(s) : 1 channel
Sampling rate : 11.024 kHz
Bit depth : 8 bits
Stream size : 1.16 MiB (5%)
Alignment : Aligned on interleaves
Interleave, duration : 67 ms (1.00 video frame)
Interleave, preload duration : 500 ms


This all with LAV 0.74.1, and the indeo format checked in the videoformats config of LAV video.

Anyone able to shed a light on this?

mrmojo666
17th November 2020, 14:17
Hi

maybe someone can help me

yestrerday i got a rx5700 xt I see that with the internal win10 videoplayer files are correctly deinterlaced, all the other player that uses lav have broken DXVA deinterlacing, if i use copyback + software deint it works., at the start i thought it was Madvr but even with EVR it's the same ..... anyone have similar experience with that card ?
I noticed that before with rx460 i had more option under driver video custom setting, now there is only brightness.
Already tried with DDU to reset drivers


thank you fro any help

el Filou
17th November 2020, 14:52
Could you try with MPC Video Renderer? https://github.com/Aleksoid1978/VideoRenderer
I've read huhn say in the past that it supports D3D11 video processing, so if you set LAV to D3D11 native decoding it could work. If it does then it looks like AMD didn't bother testing backward compatibility with DXVA2. :(

Dogway
17th November 2020, 19:54
Does LAVFilters support mkv cropping feature? I'm not sure if I'm doing something wrong on mkvtoolnix or MPC-HC.

nevcairiel
17th November 2020, 23:30
No, cropping is not supported, unless its on a codec level.

mrmojo666
18th November 2020, 10:22
Could you try with MPC Video Renderer? https://github.com/Aleksoid1978/VideoRenderer
I've read huhn say in the past that it supports D3D11 video processing, so if you set LAV to D3D11 native decoding it could work. If it does then it looks like AMD didn't bother testing backward compatibility with DXVA2. :(

Thank you for the tip, with mpc-be and mpc-video render deinterlacing works. Lav filter dxva native.
Just I'm not sure that this renderer uses Hw deinterlacing (even if using dxva native should the only way to deinterlace is by HW).
Looks like the problem is in EVR and Madvr implementation :(

huhn
18th November 2020, 10:32
mpcVR can deint with d3d11.

hardware deint is generally broken on NAVI this is nothing new.
in best cases it uses bilinear which is not a deint algo that should ever be used or it is combing.

i mean: https://abload.de/img/amddeint2mji2.jpg
what so ever lavfilter has nothing todo with this.

quietvoid
18th November 2020, 20:07
Hi nevcairiel.
With the new Matroska spec (though it's not implemented in FFmpeg, the code from Plex's patches is available), Dolby Vision metadata can be inserted and decoded from MKV headers.
Would it be possible to parse the HEVC RPU NAL units and make that information available to the renderer (for example, madVR) through the LAV decoder?
HW acceleration might cause issues, though.

I have working code to parse this RPU data (at least for profile 7 files), but I'm not sure if it's feasible for that metadata to be useful.
I think it would be nice if the renderer could have access to pre defined per-frame information about min, max, average luminance and etc.

Just wondering if it's something that would be possible, because I'd be interested in helping to add support.

chros
18th November 2020, 21:01
Sound good quetvoid, thanks, hopefully you can some magic together :)

VictorLS
19th November 2020, 21:18
It seems AC-4 playing still possible with a fork only but what about Dolby E? In Sample Eurovision 2019 Tel Aviv.ts (154 MB) https://yadi.sk/i/j1zj1sqy2myOfw third (Dolby E) audio track plays like loud noise - that patch https://patchwork.ffmpeg.org/project/ffmpeg/patch/20201019081929.1926-2-nicolas.gaullier@cji.paris/ may helps to add Dolby E support in LAV Audio Decoder with adding all possible metadatas described in former NDA's document.

el Filou
19th November 2020, 22:58
Any support for new formats is always nice, but it's not really essential for LAV: Dolby E is a studio format for production, it's not supposed to be broadcast to end users. Just like 4:2:2 or 4:4:4 video isn't either. I'm amazed at how you keep "finding" weird streams like that.

VictorLS
20th November 2020, 00:08
I'm amazed at how you keep "finding" weird streams like that.
I'm just SAT-amateur ;)
Btw I haven't seen 4:4:4 from SAT yet (but hardware acceleration supported by nVIDIA's Turing and Ampere) and I often see 4:2:2 from more than 10 years ago but only newest Intel's GPUs (inside of CPU Tiger Lake or discrete videocard Xe) seems will support it.

aiyunyi
20th November 2020, 15:31
Hi everyone, new to the forum, is there anyway to know how lavfilters store its configuration?

VictorLS
20th November 2020, 17:28
aiyunyi
In registry (appears when although any parameter of LAV Filters' properties is changed once tough) - it's same for x86 and x64 version of LAV Filters so it hurts me sometimes when I need separate (i.e. CUVID Hardware acceleration for x86 in my favorite old version of KMPlayer not supported DXVA2 acceleration with LAV Video Decoder - with other decoders DXVA2 works in that version of KMPlayer just fine and DXVA2 (native) acceleration for x64 in app SmartDVBx64 for HLGtoSDR transformation (http://forum.doom9.org/showthread.php?t=176909) in EVR-CP to watch HLG programs with ~right colors directly from SATs):
[HKEY_CURRENT_USER\Software\LAV\Audio] for LAV Audio Decoder
[HKEY_CURRENT_USER\Software\LAV\Splitter] for LAV Splitter
and finally
[HKEY_CURRENT_USER\Software\LAV\Video] for LAV Video Decoder where I proposed to add key for skipping frames feature http://forum.doom9.org/showthread.php?p=1902404#post1902404 for live software decoding hard streams (like 8K, 4:2:2 etc) on weak processors with well audio.

VictorLS
21st November 2020, 13:26
Any support for new formats is always nice
I agree and I hope this document https://developer.dolby.com/globalassets/professional/dolby-e/dolby-e-high-level-frame-description.pdf with patch https://patchwork.ffmpeg.org/project/ffmpeg/patch/20201019081929.1926-2-nicolas.gaullier@cji.paris/ will help to implement full Dolby E support in LAV Audio Decoder and it'll be very useful for SAT receiving.

nevcairiel
3rd December 2020, 17:43
Hi nevcairiel.
With the new Matroska spec (though it's not implemented in FFmpeg, the code from Plex's patches is available), Dolby Vision metadata can be inserted and decoded from MKV headers.
Would it be possible to parse the HEVC RPU NAL units and make that information available to the renderer (for example, madVR) through the LAV decoder?
HW acceleration might cause issues, though.

I have working code to parse this RPU data (at least for profile 7 files), but I'm not sure if it's feasible for that metadata to be useful.
I think it would be nice if the renderer could have access to pre defined per-frame information about min, max, average luminance and etc.

Just wondering if it's something that would be possible, because I'd be interested in helping to add support.

I wouldn't mind supporting that, but getting a renderer to support it is the bigger problem here, as madVR seems to be stuck.

SamuriHL
3rd December 2020, 18:04
Which is a shame because everything else is in place to play them. It would be really nice to have that support on a PC.

JarrettH
4th December 2020, 18:54
Will there be further updates?

VBB
4th December 2020, 19:28
See here for the most up-to-date builds: https://files.1f0.de/lavf/nightly/?C=M;O=A

Here for commit/change log: https://github.com/Nevcairiel/LAVFilters/commits/master

quietvoid
4th December 2020, 20:07
Yea I think getting madshi to add support would be complicated.
Though NVIDIA seems to have APIs to enable the Dolby Vision playback chain on a display, no idea how the data is actually sent through.
It might just be the whole RPU, since the decoder is expected to verify the integrity of it.

I didn't really think this through.. maybe once people start sending patches to ffmpeg, as it appears Plex's code is incomplete.

vosya
5th December 2020, 06:27
In version LAVFilters-0.74.1-91, LAV Splitter has stopped detecting the presence of an audio stream with the following characteristics in m2ts, mkv video containers (possibly in others):
Audio
ID : 4352 (0x1100)
Menu ID : 1 (0x1)
Format : PCM
Format settings : Big / Signed
Muxing mode : Blu-ray
Codec ID : 128
Duration : 29 min 9 s
Bit rate mode : Constant
Bit rate : 2 304 kb/s
Channel(s) : 2 channels
Channel layout : L R
Sampling rate : 48.0 kHz
Bit depth : 24 bits
In version LAVFilters-0.74.1-90, such streams are recognized normally.

nevcairiel
5th December 2020, 11:18
In version LAVFilters-0.74.1-91, LAV Splitter has stopped detecting the presence of an audio stream with the following characteristics in m2ts, mkv video containers (possibly in others):
Audio
ID : 4352 (0x1100)
Menu ID : 1 (0x1)
Format : PCM
Format settings : Big / Signed
Muxing mode : Blu-ray
Codec ID : 128
Duration : 29 min 9 s
Bit rate mode : Constant
Bit rate : 2 304 kb/s
Channel(s) : 2 channels
Channel layout : L R
Sampling rate : 48.0 kHz
Bit depth : 24 bits
In version LAVFilters-0.74.1-90, such streams are recognized normally.

Will be fixed soon, thanks!

Brazil2
7th December 2020, 17:24
LAV Filters 0.74.1 (released 2019/03/19)
Please, make a new release.
Many people don't like to use beta versions and many sites won't spread beta versions as well.

ryrynz
8th December 2020, 07:01
Please, make a new release.


Just a wild guess here but I expect Nev would've released something this month if not early next anyway..
Nothing is stopping anyone using nightlies until then as these releases are essentially ongoing stable builds, a release build for LAV is no different from the nightlies other than in name.

manolito
8th December 2020, 08:37
nevcairiel thinks otherwise... :D
https://forum.doom9.org/showthread.php?p=1833908#post1833908

ryrynz
8th December 2020, 12:07
Bruh, that was 2018, things have changed :P

el Filou
8th December 2020, 13:41
There have been quite a lot of changes recently so I would assume you have to wait a bit for a release just to make sure everytrhing is OK. Wasn't there issues with hardware AV1 decode for instance?
Not useful to make a release if you've got to provide a hotfix quickly afterwards.

clsid
8th December 2020, 23:46
This 1440p VP9 Profile2 stream has massive frames drops with CUVID decoding. DXVA2 works fine.
https://www.youtube.com/watch?v=n3Dru5y3ROc
Played in MPC-HC with youtube-dl

nevcairiel
9th December 2020, 10:24
As i've stated recently, I plan to make a release when AV1 is done and some additional fixes are in.

This 1440p VP9 Profile2 stream has massive frames drops with CUVID decoding. DXVA2 works fine.
https://www.youtube.com/watch?v=n3Dru5y3ROc
Played in MPC-HC with youtube-dl
CUVID is not currently being developed further.

clsid
9th December 2020, 14:23
May I suggest that you finally remove the obsolete and outdated QuickSync in upcoming release? And migrate existing setting to DXVA2 copyback.
And move CUVID to bottom of the dropdown list and maybe rename it to "CUVID (deprecated)". By not having the vendor name in front of the option should make some people less tempted to select the inferior choices.

huhn
9th December 2020, 16:24
yeah for some reason people like to say i selected cuvid because i have a nvidia card.

VBB
9th December 2020, 19:45
@clsid - Since you're here, did you recently increase the default built-in LAV stream analysis duration from 1000 to 2100? I only found this, because MPC-HC did a full reset for some reason, and that particular setting seems to have fixed my lossless audio dropouts on resume :)

clsid
9th December 2020, 21:17
Yes, that fixes several (audio) issues. So maybe nev can change the default in the official builds as well.

nevcairiel
9th December 2020, 23:44
The only thing that option is supposed to affect is detecting of streams in header-less containers. If it has any impact on actual playback, please give me a case to reproduce.

clsid
10th December 2020, 01:27
Yes, I changed it for solving issues with certain online streams. I don't have a working example for you.
I can't recall it having effect on local files. VBB's issue probably got solved by something else.

VBB
10th December 2020, 01:27
Well, it seems to make a difference when pausing files with lossless audio. Perhaps clsid can explain it some more. After all, he made the change ;)

Or not LOL

I'm just happy it works now, regardless of what fixed it. If it makes any difference, none of my files are local, so in essence everything is streamed.

Snowknight26
10th December 2020, 14:23
Well, it seems to make a difference when pausing files with lossless audio. Perhaps clsid can explain it some more. After all, he made the change ;)

Is this the issue you mean?

https://forum.doom9.org/showthread.php?p=1914474#post1914474

VBB
10th December 2020, 19:08
Yes, that's the one.

chros
12th December 2020, 12:46
@nevcairiel, does LAVVideo decoder support HLG HDR? Sample (https://4kmedia.org/travelxp-4k-hdr-hlg-sample)
The output PIN info states: "VideoTransferFunction : 5 (BT.709)"
I'm asking because of madvr and this (https://forum.doom9.org/showthread.php?p=1930606#post1930606).
Cheers

huhn
12th December 2020, 14:38
try with mpcVR is does it doesn't send the metadata to madVR that's the current situation. can't handle it anyway.

nevcairiel
13th December 2020, 01:15
Indeed, madVR does not support HLG, and the HLG VideoTransferFunction function was used for a special madVR value in the past, hence with madVR it maps it to another format. Other renderers should receive the HLG flag (16), and they can then deal with it.
Sending the HLG flag to madVR would not give you anything good until madVR learns to deal with HLG. HLG is very different from HDR10, so no just masquerading as the same and somehow work.

chros
13th December 2020, 20:02
Thanks for the confirmation, I missed the part somehow that it's working with e.g. mpcVR (otherwise I wouldn't have asked it), sorry :o
Do you know any directshow renderer that can output HLG in HDR10 properly? Just noticed that e.g. VLC does (https://forum.doom9.org/showthread.php?p=1930642#post1930642) ...

Grimsdyke
18th December 2020, 18:20
@Nev, sorry to bother you but it would be nice if you could look into something.

As you may have heard the latest test build of MadVR caused playback issues for few users but an OS and/or driver update fixed it for most of them.
Unfortunately I still have the issue and I blamed my hardware and waited for a fix from Madshi.
However, the devs of MPC-BE are currently improving their own renderer and I wanted to look at it and was surprised that there is the same problem !

Issue : A file plays with sound but there is no image just a green (madvr) or black (mpcvr) screen when using LAV video decoder in D3D11 Native mode !

It works with every other setting but then I have performance problems, especially on 4K HDR. Is there maybe anything broken in native ?

chros
18th December 2020, 22:37
Which GPU is that and which driver? Take a look at my signature, those work fine.

jkauff
19th December 2020, 11:17
I'm running the latest test build (114) and have had no problems on either of my computers. One has a GTX 1660 Super, the other a GTX 1080. Using the most recent Nvidia driver, as I always do.

Yups
20th December 2020, 00:08
Tigerlake AV1: https://imgur.com/a/SR95o3C

D3D11 AV1 hardware decoding works, DXVA2 is corrupted. Tested on newest LAV and MPC HC.

VictorLS
20th December 2020, 07:07
Tigerlake AV1
D3D11 AV1 hardware decoding works, DXVA2 is corrupted.
Thanks - can you show DXVA Checker of Tigerlake like
https://i.postimg.cc/fV49HXZb/AMD-RX6800-DXVAchecker.png (https://postimg.cc/fV49HXZb)

Yups
20th December 2020, 09:45
Thanks - can you show DXVA Checker of Tigerlake like
https://i.postimg.cc/fV49HXZb/AMD-RX6800-DXVAchecker.png (https://postimg.cc/fV49HXZb)


I already did here: https://forum.doom9.org/showthread.php?p=1929258#post1929258

For some reason I cannot check D3D11 decoding performance from LAV in DXVA Checker: https://imgur.com/a/T1uJqZf

On a further note the inhouse Windows 10 player with the Microsoft AV1 extension works better, there is basically zero CPU and GPU load while playback (with Firefox running background): https://imgur.com/a/nKGVknN


And this is from MPC Home Cinema and LAV D3D11: https://imgur.com/a/zh0ELEC

1W more IA cores usage and it uses the GPU in addition to Video Decode and Processing.

I'm using the AV1 4K Summer Nature sample from here: https://www.elecard.com/videos

nevcairiel
20th December 2020, 11:12
DirectShow does not natively support D3D11, so we invented our own interface to do it with reduced overhead. DXVA Checker does not understand that. Neither do most video renderers. If you want to test full native D3D11 playback, you need to use madVR, or maybe mpcVR, which I believe supports that as well (none of which come natively with MPC-HC)
Of course you would have to make sure that the renderer then doesn't use additional resources, for a fair comparison.

DXVA2 not working sounds like a driver issue to me, the data being provided to the hardware is the exact same, even generated by the same code, for both DXVA2 and D3D11. Of course I cannot tell either way without access to hardware, and until cheap-ish NUCs come out, thats out of the question.

Yups
20th December 2020, 11:30
DXVA2 playback corruption is indeed a driver issue. I switched from 9077 back to 8853 and the issue is gone.

Yups
20th December 2020, 18:59
Unfortunately yes, 9030/9039/9077 same issue. The last working is 8935 which I will use for now.

VictorLS
20th December 2020, 19:35
back to 8853 and the issue is gone...last working is 8935 which I will use for now
Great job. Many thanks for DXVA Checker screenshot.
Can you confirm Intel QuickSync, DXVA2 and D3D11 hardware acceleration with TigerLake and LAV Video Decoder 0.74.1.92 while playing recorded from SAT feed 4:2:2 h265 4K 50fps file 20180428-175510_4K ENC 3 RMAD VS LEG.ts (563 MB) https://yadi.sk/d/m0s5ztpj3XnUyw and youtube 8K AV1 60fps file you can download I've described here https://forum.doom9.org/showthread.php?p=1903584#post1903584
Please provide CPU and VideoEngine load while playing both files.

As I understand there isn't Win7x64 driver for Intel Iris Xe graphics - am I wrong?

nevcairiel
20th December 2020, 19:47
There is no 4:2:2 hardware acceleration in DXVA2 or D3D11, and QuickSync in LAV is dead and likely to be removed.

VictorLS
20th December 2020, 20:34
There is no 4:2:2 hardware acceleration in DXVA2 or D3D11
Even if it's supported by Intel Xe? If so add it in LAV Video Decoder, please.
https://i.postimg.cc/2V9MwFjv/Intel-Iris-Xe-DXVAchecker-422.png (https://postimg.cc/2V9MwFjv)

Yups
20th December 2020, 20:55
Great job. Many thanks for DXVA Checker screenshot.
Can you confirm Intel QuickSync, DXVA2 and D3D11 hardware acceleration with TigerLake and LAV Video Decoder 0.74.1.92 while playing recorded from SAT feed 4:2:2 h265 4K 50fps file 20180428-175510_4K ENC 3 RMAD VS LEG.ts (563 MB) https://yadi.sk/d/m0s5ztpj3XnUyw and youtube 8K AV1 60fps file you can download I've described here https://forum.doom9.org/showthread.php?p=1903584#post1903584
Please provide CPU and VideoEngine load while playing both files.

As I understand there isn't Win7x64 driver for Intel Iris Xe graphics - am I wrong?


LAV doesn not support 4:2:2 by the looks of it and your AV1 sample is 4K only, not sure this is what you ask for. Intel does not support Windows 7 anymore.

el Filou
20th December 2020, 21:05
Yeah those are Intel-specific modes and not standard, just like NVIDIA has an MJPEG DXVA mode (even up to 4K) that only their own decoder uses. Unfortunately now most decoders provided by manufacturers are Media Foundation only.

VictorLS
20th December 2020, 21:40
el Filou
Thanks for explanation but I'm sure in case of h265 4:4:4 hardware acceleration on Turing and Ampere videocards works with LAV Video Decoder - it's a pity nVIDIA don't listen me and haven't implemented h265 4:2:2 support yet so I'll don't going to buy any new videocard in nearest future ;)
your AV1 sample is 4K only, not sure this is what you ask for
youtube-dl -F gives
571 mp4 7680x4320 4320p60 HDR 36464k , av01.0.17M.10.0.110.09.16.09.0, 60fps, video only, 831.39MiB
and MediaInfo confirm that:
General
Complete name : C:\Fireworks 2019 Hibikiya Omagari Enka [8KHDR]-d1VF4DfBPOY.mp4
Format : dash
Codec ID : dash (iso6/av01/mp41)
File size : 831 MiB
Duration : 3 min 30 s
Overall bit rate : 33.1 Mb/s
Encoded date : UTC 2019-12-24 16:03:06
Tagged date : UTC 2019-12-24 16:03:06

Video
ID : 1
Format : AV1
Format/Info : AOMedia Video 1
Format profile : Main@L6.1
HDR format : SMPTE ST 2086, HDR10 compatible
Codec ID : av01
Duration : 3 min 30 s
Bit rate : 33.1 Mb/s
Width : 7 680 pixels
Height : 4 320 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 59.940 (60000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 10 bits
Bits/(Pixel*Frame) : 0.017
Stream size : 831 MiB (100%)
Title : ISO Media file produced by Google Inc.
Encoded date : UTC 2019-12-24 16:03:06
Tagged date : UTC 2019-12-24 16:03:06
Color range : Limited
Color primaries : BT.2020
Transfer characteristics : PQ
Matrix coefficients : BT.2020 non-constant
Mastering display color primaries : Display P3
Mastering display luminance : min: 0.0050 cd/m2, max: 1000 cd/m2
Codec configuration box : av1C

nevcairiel
21st December 2020, 00:17
Even if it's supported by Intel Xe? If so add it in LAV Video Decoder, please.

This is not part of the DXVA specification, and Intel does not provide any documentation or works with Microsoft to update the proper one.

Yups
21st December 2020, 00:39
@VictorLS

I have tried this 8K60 sample. Unfortunately I have a black screen when I try this video in MPC-HC which seems unrelated to LAV or decoding in general, even without hardware decoding I have a black screen. Could it be HDR related?

The Microsoft mediaplayer app works and it runs without any frame drops from what I can see and keep in mind I'm running this 8K video on a 1080p screen, not sure if this makes a difference. The decoding engine runs at about 75% utilization and clocks with 1100 Mhz. Here the screen: https://imgur.com/a/BSFThv5

Yups
21st December 2020, 16:37
I have tried a non HDR 8K60 AV1, the problem is that in MPC HC with LAV it runs in slow motion and stutters. Oddly enough there is no visible hardware limitation, Video Decode about 35-40%, GPU usage 10%, CPU usage 10%. In Chrome directly or with the Microsoft player app no problem. GPU decode usage goes higher on them, it's like they can better utilize the GPU.

el Filou
21st December 2020, 16:40
Is the DXVA decoder using native mode?

Yups
21st December 2020, 16:51
Yes it was running DXVA2 native. I just tried D3D11 and it runs quite a lot better. The slow motion/severe stuttering is gone, however there are still visible frame drops. The load differs, there is a 50% GPU load. GPU decoding is the same at 35-40%. CPU usage is down from 10% to 3%.

nevcairiel
21st December 2020, 17:55
The DXVA2 interface and DirectShow are not well suited for modern stuff, unfortunately. For example, DXVA2 does not even specify any way to apply Film Grain for AV1. It works on NVIDIA because it applies it magically on its own, but other vendors might not do that. This is specified for D3D11 and D3D12 video decoding.

I have been thinking about Media Foundation for a while, but I'm not going to create a player, filters, and renderer on my own, and there arent really many other people left.
Someone got a chicken to my egg?

VictorLS
21st December 2020, 20:49
This is not part of the DXVA specification, and Intel does not provide any documentation or works with Microsoft to update the proper one...The DXVA2 interface and DirectShow are not well suited for modern stuff, unfortunately...I have been thinking about Media Foundation for a while...
Thanks - it seems Intel don't want I'll buy their Xe videocard ;) due to unsupported 4:2:2 by excellent software like LAV Video Decoder.
I'm not going to create a player, filters, and renderer on my own
BTW have you tried MPC Video Renderer by MPC-BE developers team? If yes what do you think? I'm impressed with HLG support and fluent playing of MPCVideoRenderer-v0.4.10.1542_git2020.12.15-45a2b1c (630 KB) https://yadi.sk/d/X0EVMKP4TcmnHQ but while playing http://forum.doom9.org/showthread.php?p=1919134#post1919134 4:2:2 h264 1080i50 BT.709 file from SAT feed Formula1.2019.Round06.Monaco.Race.Sat.Feed.1080i.H264.Multi.Language_fromMKVtsMuxerNotHDMVcompatible.ts (501 MB) https://yadi.sk/i/X1nPqEAqIAZXoQ I've got non-deinterlaced video until I uncheck all 4:2:2 Output Formats but YUY2 see MPC-VR_screenshots.7z (10 MB) https://yadi.sk/d/M23aZqcB66YGSw


I have tried this 8K60 sample. Unfortunately I have a black screen when I try this video in MPC-HC which seems unrelated to LAV or decoding in general, even without hardware decoding I have a black screen.
Many thanks for your great experiments and screenshots (just add Win10's 3D and Video Decode graphs in a future, please).
Could it be HDR related?
I don't know any AV1 8K60 without HDR(HLG) but I believe on 8K24 PQ Samsung QLED 8K HDR NASA 1minutes49seconds
youtube-dl -f 402 https://youtu.be/N8q7iTw14O8 mp4 7680x4320 4320p HDR 22607k , av01.0.16M.10.0.110.09.16.09.0, 24fps, video only, 151.81MiB
youtube-dl -f 571 https://youtu.be/N8q7iTw14O8 mp4 7680x4320 4320p HDR 32602k , av01.0.16M.10.0.110.09.16.09.0, 24fps, video only, 235.29MiB
and 8K30 HLG Go Central Japan 8K 3minutes55seconds
youtube-dl -f 402 https://youtu.be/XsVGYfsb3sI mp4 7680x4320 4320p HDR 19517k , av01.0.16M.10.0.110.09.18.09.0, 30fps, video only, 454.81MiB
youtube-dl -f 571 https://youtu.be/XsVGYfsb3sI mp4 7680x4320 4320p HDR 30943k , av01.0.16M.10.0.110.09.18.09.0, 30fps, video only, 708.09MiB
files (402 and 571 differ by bandwidth) will palying fluent with D3D11 and even DXVA2 (native) on your TigerLake.

The Microsoft mediaplayer app works and it runs without any frame drops
Despite of 'Intel does not provide any documentation or works with Microsoft' try 4:2:2 h265 4K 50fps SAT feed file 20180428-175510_4K ENC 3 RMAD VS LEG.ts (563 MB) https://yadi.sk/d/m0s5ztpj3XnUyw in Microsoft mediaplayer, please and look at Video Decode - may be it'll be not zero.

Yups
21st December 2020, 22:10
Many thanks for your great experiments and screenshots (just add Win10's 3D and Video Decode graphs in a future, please).


You can see these infos from HWinfo and actually HWinfo is more detailed.


Despite of 'Intel does not provide any documentation or works with Microsoft' try 4:2:2 h265 4K 50fps SAT feed file 20180428-175510_4K ENC 3 RMAD VS LEG.ts (563 MB) https://yadi.sk/d/m0s5ztpj3XnUyw in Microsoft mediaplayer, please and look at Video Decode - may be it'll be not zero.


Isn't it the same video from yesterday? I already did test it with the Windows 10 movie app player in #24187 and yes it runs, although it is hard on the limit I would say. Considering the GPU runs at only 1100 Mhz it's a really good result.
As for local AV1 playback on Iris Xe this player is the fastest especially for a notebook, the system power is lower which is really important. This player is super fast and efficient.

VictorLS
21st December 2020, 22:35
You can see these infos from HWinfo and actually HWinfo is more detailed.
Yes, but not graph - just current, minimum, maximum and average values. GPU-Z can't show Video Decode for Intel GPUs as for AMD GPUs and APUs (for Video Decode best is Win10's Task Manager on my own) - only for nVIDIA's videocards like mine GTX750v2 on GM206 GPU-Z shows Video Engine load even in WinXP.
Isn't it the same video from yesterday?
Yes - the same video.
I already did test it with the Windows 10 movie app player in #24187
In #24187 you've described 8K60 (second) test only but about 4:2:2 (first) test you wrote just LAV doesn not support 4:2:2 by the looks of it so I guessed you didn't test it with Windows 10 movie app player ;)
and yes it runs, although it is hard on the limit I would say. Considering the GPU runs at only 1100 Mhz it's a really good result.
As for local AV1 playback on Iris Xe this player is the fastest especially for a notebook, the system power is lower which is really important. This player is super fast and efficient.
So I guess quoted is about second so AV1 8K60 file? I agree - good results (it's a pity not in ordinary players with LAV Video Decoder) but for the first 4:2:2 h265 file I'd like to see Task Manager's CPU and GPU screenshots at the end of playing file ;)
I've just found two (24 and 60fps) AV1 Japan in 8K files without HDR:
youtube-dl -f 402 https://youtu.be/m1jY2VLCRmY mp4 7680x4320 4320p 19900k , av01.0.16M.08, 24fps, video only, 273.46MiB
youtube-dl -f 571 https://youtu.be/m1jY2VLCRmY mp4 7680x4320 4320p 30539k , av01.0.16M.08, 24fps, video only, 441.55MiB
and
youtube-dl -f 402 https://youtu.be/zCLOJ9j1k2Y mp4 7680x4320 4320p60 17561k , av01.0.17M.08, 60fps, video only, 625.04MiB
youtube-dl -f 571 https://youtu.be/zCLOJ9j1k2Y mp4 7680x4320 4320p60 27067k , av01.0.17M.08, 60fps, video only, 978.30MiB
so you can compare that with HLG version https://youtu.be/XsVGYfsb3sI ...

Yups
21st December 2020, 23:29
Yes - the same video.

In #24187 you've described 8K60 (second) test only but about 4:2:2 (first) test you wrote just so I guessed you didn't test it with Windows 10 movie app player ;)

So I guess quoted is about second so AV1 8K60 file?


Yes it's indeed from the second 8k60 called Omagari Fireworks 2019: https://imgur.com/a/eiRFLSD

The 4:2:2 does not start, it says playback not possible. It runs on MPC HC but uses the CPU cores.

VictorLS
21st December 2020, 23:36
It runs on MPC HC but uses the CPU cores.
Many thanks. Task Manager's CPU load like https://pics.computerbase.de/9/5/8/1/6-a12126ebeb660e56/38-1080.2b77b7cf.jpg at the right side with all logical cores visible will be appreciated.

huhn
26th December 2020, 00:47
Indeed, madVR does not support HLG, and the HLG VideoTransferFunction function was used for a special madVR value in the past, hence with madVR it maps it to another format. Other renderers should receive the HLG flag (16), and they can then deal with it.
Sending the HLG flag to madVR would not give you anything good until madVR learns to deal with HLG. HLG is very different from HDR10, so no just masquerading as the same and somehow work.

the next beta 115 handles HLG correctly. it's not a release build so nothing really changes right now.

jmone
26th December 2020, 11:27
FYI - I'm not seeing HLG kick in the HDR processing in 115 (with latest LAV) with HLG video shot on my FX6. I tried both the MXF container (just renamed to MKV/MP4 for playback in JRMC) and also used ffmpeg to remux it to MKV. Here is how media info reports the remuxed HLG video in a MKV container.

General
Unique ID : 265101255743292636328684448716645196182 (0xC770A5094B49A61D2C84F2E7883BE196)
Complete name : K:\Resolve\MXF to MKV Test\174_0066.MXF.mkv
Format : Matroska
Format version : Version 4
File size : 1.73 GiB
Duration : 29 s 280 ms
Overall bit rate : 507 Mb/s
Writing application : Lavf58.45.100
Writing library : Lavf58.45.100
ErrorDetectionType : Per level 1
COMPANY_NAME : Sony
GENERATION_UID : 50cdad94-869e-1232-a6ca-1848ca8aa829
MATERIAL_PACKAGE_UMID : 0x060A2B340101010501010D431300000051CEA022019205D71848CAFFFE8AA829
MODIFICATION_DATE : 2020-12-18T03:14:47.000000Z
OPERATIONAL_PATTERN_UL : 060e2b34.04010101.0d010201.01010900
PRODUCT_NAME : Mem
PRODUCT_UID : cede1104-8280-11de-8a39-08004678031c
PRODUCT_VERSION : 2.00
Time code of first frame : 00:40:01:18
Time code source : Matroska tags
UID : 50cdad8a-869e-1232-ae51-1848ca8aa829

Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High 4:2:2 Intra@L5.2
Format settings, CABAC : No
Format settings, GOP : N=1
Codec ID : V_MPEG4/ISO/AVC
Duration : 29 s 280 ms
Bit rate : 494 Mb/s
Width : 3 840 pixels
Height : 2 160 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 50.000 FPS
Standard : Component
Color space : YUV
Chroma subsampling : 4:2:2
Bit depth : 10 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 1.191
Stream size : 1.68 GiB (97%)
Default : Yes
Forced : No
Color range : Limited
Color primaries : BT.2020
Transfer characteristics : HLG
Matrix coefficients : BT.2020 non-constant
FILE_PACKAGE_UMID : 0x060A2B340101010501010D431300000052CEA022019205D71848CAFFFE8AA829

Audio #1
ID : 2
Format : PCM
Format settings : Little / Signed
Codec ID : A_PCM/INT/LIT
Duration : 29 s 280 ms
Bit rate mode : Constant
Bit rate : 1 536 kb/s
Channel(s) : 2 channels
Sampling rate : 48.0 kHz
Bit depth : 16 bits
Stream size : 5.36 MiB (0%)
Writing library : Lavc58.91.100 pcm_s16le
Default : Yes
Forced : No

Audio #2
ID : 3
Format : PCM
Format settings : Little / Signed
Codec ID : A_PCM/INT/LIT
Duration : 29 s 280 ms
Bit rate mode : Constant
Bit rate : 1 536 kb/s
Channel(s) : 2 channels
Sampling rate : 48.0 kHz
Bit depth : 16 bits
Stream size : 5.36 MiB (0%)
Writing library : Lavc58.91.100 pcm_s16le
Default : No
Forced : No

chros
26th December 2020, 12:44
the next beta 115 handles HLG correctly. it's not a release build so nothing really changes right now.
Does paasthrough work for you or only SDR?

VictorLS
26th December 2020, 21:33
the next beta 115 handles HLG correctly
How? Show screenshot, please - I'd want to compare madVR's colors while playing HLG files with shader (which is ~=VLC with OpenGL in Win7x64) and MPC Video Renderer http://forum.doom9.org/showthread.php?t=176909&page=3 despite of madVR still much slower than other renderers on my weak computer.
And http://madshi.net/madVRhdrMeasure115.zip madVR64.ax still shows v0.92.17 in bottom left corner of its properties - must it be so?

huhn
27th December 2020, 05:06
i haven't checked it in detail.

seems to be SDR only so this is nothing special like mpcVR.
it just doesn't go crazy anymore.
it can now read HLG meta data before that you should not send HDR meta data because madVR understood something different under it.

there is a reason i quoted nev please read it.

chros
27th December 2020, 07:12
I saw it, cheers, but it's useless this way...

huhn
27th December 2020, 10:07
better than buggy and madshi is aware.
so he could do something about it. well he fixed a major bug.

what so ever this is the lavfilter thread i only wanted nev to know that the work around he has added for madVR isn't needed anymore for a beta version.

i have nothing more to say.

maxkolonko123
8th January 2021, 10:24
quite noobish question, but lately ive messed up my mpc hc config, now when play movie right click filters it shows me lav filters and file source (async) from what i remember before file source wasnt in filters tab, is all good or something not right ?

Siso
8th January 2021, 16:42
Is it a known issue with lav video decoder, that when you use xyvsfilter, you can't use d3d11 native, it forces dxva copyback.

huhn
9th January 2021, 00:45
vsfilter runs on the CPU and burns the subtitle in the image so the image needs to be on the CPU.

subfilter doesn't care.

Siso
9th January 2021, 10:00
vsfilter runs on the CPU and burns the subtitle in the image so the image needs to be on the CPU.

subfilter doesn't care.

I see, thanks huhn.

jmone
10th January 2021, 05:06
I've been playing with editing/encoding UHD HLG 4:2:2 10-Bit 50fps footage from my Sony FX6 using Davinci Resolve to find a suitable UHD HDR playback format (mostly for JRiver MC). Here is what I've found so far in case anyone else is going down this path:
- Unfortunately, HLG Encoded Videos are not (yet?) supported by madVR at all
- HDR (ST2084) HEVC 10-Bit 4:2:0 encoded video revealed weird chroma noise on playback when "Optimize Hardware decoding for performed" (DXVA2-Native) was checked. Turning that off (so it uses D3D11) help a lot with the chroma noise.
- HDR (ST2084) HEVC 10-Bit 4:4:4 encoded video looks great .... but.... there does not seem to be HW Acceleration support for HEVC 4:4:4 in LAV (though I see it is supported by the last few generations of nvidia GPUs) so even my OC i9-9900KF flatlines and the GTX3090's decoding cores are at 0%.

Nev, any thought on HEVC 10-Bit 4:4:4 HW decoding support (or even if you have heard anything on HLG)?
Thanks
Nathan

v0lt
10th January 2021, 08:14
@jmone
Hardware acceleration for HEVC 10-Bit 4:4:4 is not supported over DXVA2 and D3D11 interfaces. See DXVA Checker (https://bluesky-soft.com/en/DXVAChecker.html) for details.

VictorLS
12th January 2021, 22:40
Dear Nathan
- Unfortunately, HLG Encoded Videos are not (yet?) supported by madVR at all
You're right - HLG is not supported by madVR (as minimum now)
if you have heard anything on HLG
I don't know madshi's plans about HLG support in madVR.
Read my thread about HLG https://forum.doom9.org/showthread.php?t=176909
I impressed with MPC Video Renderer (and it let use shaders in i.e. MPC-HC) by Russian developers of MPC-BE player including v0lt and Aleksoid1978 (link on MPC-VR in last my post of that my thread) on my weak computer with Athlon II x3 360 CPU and nVIDIA GTX750v2 on GM206 videocard with 1GB videomemory - it gives ideally fluent 4K H265 4:2:0 50-60Hz video with DXVA native (even ordinary EVR very seldom but stutters not saying about madVR which stutters almost permanent on 4K with its default so very light settings even if vertical frequency GTX750v2's output is equal - i.e. 50(60)Hz - or doubled - i.e. 48 in case of 24Hz(47,952Hz in case of 23,976Hz) - framerate of playing video).
- HDR (ST2084) HEVC 10-Bit 4:2:0 encoded video revealed weird chroma noise on playback when "Optimize Hardware decoding for performed" (DXVA2-Native) was checked. Turning that off (so it uses D3D11) help a lot with the chroma noise.
May you upload sample - I've never seen hardrware accelerated video looked worse than software decoded (except with high Reframes ~ten years ago - artifact was there)
- HDR (ST2084) HEVC 10-Bit 4:4:4 encoded video looks great .... but.... there does not seem to be HW Acceleration support for HEVC 4:4:4 in LAV (though I see it is supported by the last few generations of nvidia GPUs) so even my OC i9-9900KF flatlines and the GTX3090's decoding cores are at 0%.
Had you try NVIDIA CUVID harware acceleration?
According https://www.ffmpeg.org/index.html#news August 5th, 2019, FFmpeg 4.2 "Ada" almost atop ffmpeg supports 4:4:4 or nevcairiel as usually haven't implement useful for someone option in his LAV Video Decoder?
Btw can you upload here (with i.e. postimages.org like I did here (https://forum.doom9.org/showthread.php?p=1931518#post1931518) ) DXVAChecker4.5.1 or later of yours GTX3090 and on some file exchange server like transfiles.ru 4К HEVC 10-bit 4:4:4 sample?

huhn
13th January 2021, 06:43
under available information the current 444 decoder is lossless only.
this already created a major issue with x264 back in the day.

robl45
14th January 2021, 18:49
Posted in Madvr thread and thought maybe here would be good too.

Hello, I've been using lav filters and Madvr for 3d for 4 or 5 years now with no issues. About a week ago, it stopped working. Anyone know anything about this? I've reinstalled madvr and lav and still it doesn't work, when it does flip into 3d, its like the 3d is in slow motion. I thought it might be my hdmi to ethernet converters screwing something up so I connected the computer to my spare projector with straight HDMI and it did the same thing. I thought it was one specific file as we had literally watched 3d the day before and then realized it was all of them. Anyone have any ideas? I'm thinking a windows 10 update maybe or something broke it. Its a windows 10 machine with I3 processor Skylake with internal intel graphics.

clsid
14th January 2021, 19:45
LAV uses Intel decoder library (libmfxsw64.dll) for decoding H.264 MVC 3D video. Don't enable hardware acceleration for this, as it may cause problems.

Your problems are probably caused by Intel graphics driver.

jmone
15th January 2021, 01:17
@VictorLS
- Original Sample is here : https://behome.dyndns.info/index.php/s/4rYP8bqs4yaRd5p
- This thread has a Screen Shot showing the Chroma Noise Issue : https://yabb.jriver.com/interact/index.php/topic,120102.msg889524.html#msg889524
- I tried all the LAV Decoding Option including CUVID
- I tried using the MPC Video Renderer but could not successfully build a graph in JRiver Media Center (which I use) so I can't comment

Another option that I found that "could" work is that if I encode my video as HDR-PQ UHD 10-Bit 4:2:2 AVC All I then it will playback on PC's with a good CPU (i7/i9) for SW Decoding, and GPU for the madVR HDR part. Downsides are:
- my HTPC are i5-7500 and they do (mostly) play these files without dropping frames (mostly) but the CPU is at 100% and the 1660Ti have to use Dumb Mode for HDR
- They are slow to render out of Resolve (half real time), and the files are very large @ 5GB per minute, and still in the MKF wrapper with multiple mono tracks requiring a ffmpeg remux (at least that is pretty fast).

I guess I could also do a 2nd pass encode to drop the bitrate with ffmpeg.... but it is all getting a bit to irritating of a workflow + I'd need to upgrade the CPU in my HTPCs to avoid decoding performance issues.

robl45
15th January 2021, 04:05
LAV uses Intel decoder library (libmfxsw64.dll) for decoding H.264 MVC 3D video. Don't enable hardware acceleration for this, as it may cause problems.

Your problems are probably caused by Intel graphics driver.

It turns out it was windows. I reverted back to an older version after way too much fiddling and it works perfect again.

Klaus1189
17th January 2021, 12:34
... reverted back to an older version

What Windows version exactly? If another user searches the forum and has the same issue, (s)he would like to know this.

PCU
17th January 2021, 15:35
Why LAV doesn't play Bink Video 2: .bk2 (tested with mpc 1.9.8)

richardpl
17th January 2021, 15:37
Because nobody sponsored development of decoder.

PCU
17th January 2021, 15:48
Audio plays fine, but video is missing!

mzso
17th January 2021, 19:11
Hi!
Is there a practical solution to correcting sped up PAL video during playback?

clsid
17th January 2021, 19:32
MPC-HC menu > Play > playback Rate > 24fps

Additionally enable the internal audio renderer if you want automatic audio pitch correction.

chros
19th January 2021, 12:28
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

VictorLS
19th January 2021, 21:19
- Original Sample is here : https://behome.dyndns.info/index.php/s/4rYP8bqs4yaRd5p

Thanks - this 17 second video in this sample (btw its size 1,02 GB+0,03 GB 8 PCM audio and 4 others tracks) is h264 4:2:2 10bit (510 Mbis/s 50fps HLG) so I guess it will not be accelerated by any PC videocard in a future.
- I tried all the LAV Decoding Option including CUVID
Despite you haven't upload screenshot of DXVA Checker 4.5.1 of your 3090 (and your recoded with some software (?) sample) I asked in my previous post try recoded your FX6 Sample.MXF in HEVC 4:4:4 FX6_Sample.mp4 (2,1 MB - so about 500 time smaller than original) https://yadi.sk/i/BqcTHKuM9dYM2g with CUVID and others. Despite it isn't loseless it'll may be hadware accelerated.
- I tried using the MPC Video Renderer but could not successfully build a graph in JRiver Media Center (which I use) so I can't comment
OK - I use MPC-HC for MPC-VR (some days ago SAT receiving program SmartDVB supports MPC-VR well too).
requiring a ffmpeg remux (at least that is pretty fast)
What command-line do you use for remux to get output with one (or several) audio track(s)?

PS. Did you try other than LAV Video Decoder like MainConcept (Demo) AVC/H.264 Video Decoder with turned off hardware acceleration in first string of its settings? I.e. my weak Athlon II x3 360 can't decode all 25 fps with LAV Video Decoder of this 20171205-014323_4KUA.ts (73 MB) https://yadi.sk/d/AnnpTSYKkoNkUg sample recorded by me from SAT but with MainConcept (Demo) HEVC Video Decoder despite of about 95% load of each of three core.
PPS. While Turing can HW decode in the centre of article https://developer.nvidia.com/blog/nvidia-turing-architecture-in-depth/ HEVC YUV444 10/12b HDR at 30 fps, H.264 8K, and VP9 10/12b HDR, I've uploaded FX6_Sample_25fps.mp4 (1,9 MB) https://yadi.sk/i/61fKGLxWBoUIyA if Ampere still the same as Turing in HEVC 4:4:4 and can't hardware decode 50-60fps at all.

nevcairiel
19th January 2021, 23:03
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.

LigH
20th January 2021, 08:16
So it may be suitable to edit Matroska header flags to achieve your desired default stream selection for this specific file.

Yups
21st January 2021, 14:11
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.

chros
21st January 2021, 19:41
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.

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).

jmone
23rd January 2021, 23:58
@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

jmone
24th January 2021, 07:19
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

VictorLS
24th January 2021, 22:24
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.
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).
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
https://i.postimg.cc/NL0qZvzc/SW.png (https://postimg.cc/NL0qZvzc)
in comparison with
ffmpeg -benchmark -hwaccel cuda -i FX6_Sample_25fps.mp4 -f null out.null
to get like
https://i.postimg.cc/D4SN0F94/cuda.png (https://postimg.cc/D4SN0F94)
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.php?p=1919134#post1919134 - I guess it's good start point for your hardware acceleration testing.
Anyway, here is the PQ version of the sample file.
Looks pretty well on my own but size in MB is still amazing...
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.
I can see apps like Resolve use it
Screenshot?

jmone
24th January 2021, 23:31
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!

VictorLS
25th January 2021, 09:10
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?
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.

jmone
25th January 2021, 10:28
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.

VictorLS
25th January 2021, 17:19
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.
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.
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-encode-and-decode-gpu-support-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 ;)

jmone
25th January 2021, 21:34
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
25th January 2021, 22:02
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

VictorLS
25th January 2021, 22:18
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):
https://i.postimg.cc/D406VxPc/CPU.png (https://postimg.cc/D406VxPc)
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/releases/download/1.9.8.26/MPC-HC.1.9.8.148.x64.zip and ordinary EVR to watch H/W in bottom left corner ;)

jmone
26th January 2021, 00:36
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.

VictorLS
26th January 2021, 07:23
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?

jmone
26th January 2021, 08:43
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.

VictorLS
26th January 2021, 11:10
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.php?p=1934308#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/commit/0bf18db26aa277d11c4ae5ecb6dd7b8fad188add in LAV Audio Decoder I've asked http://forum.doom9.org/showthread.php?p=1928735#post1928735 with Sample Eurovision 2019 Tel Aviv.ts contained Dolby-E audiotrack there?

clsid
26th January 2021, 18:19
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.

richardpl
26th January 2021, 19:21
There is no Dolby-E decoder in FFmpeg yet. Only a parser.

False information and propaganda. FFmpeg have decoder for Dolby-E.

VictorLS
26th January 2021, 22:38
FFmpeg have decoder for Dolby-E.
Thanks - I hope you can prove that because MediaInfo in Sample Eurovision 2019 Tel Aviv.ts (https://yadi.sk/i/j1zj1sqy2myOfw) sees 4 audio tracks - third and fourth of them are DolbyE:
Audio #3
ID : 4144 (0x1030)-1
Menu ID : 1 (0x1)
Format : Dolby E
Format settings : Little
Muxing mode : SMPTE ST 302 / SMPTE ST 337
Codec ID : 6
Duration : 31 s 680 ms
Bit rate mode : Constant
Channel(s) : 6 channels
Channel layout : L C Ls X R LFE Rs X
Sampling rate : 48.0 kHz
Frame rate : 25.000 FPS (1920 SPF)
Bit depth : 20 bits
Delay relative to video : 39 ms
Title : ESC 2019

Audio #4
ID : 4144 (0x1030)-2
Menu ID : 1 (0x1)
Format : Dolby E
Format settings : Little
Muxing mode : SMPTE ST 302 / SMPTE ST 337
Codec ID : 6
Duration : 31 s 680 ms
Bit rate mode : Constant
Channel(s) : 2 channels
Channel layout : X X X L X X X R
Sampling rate : 48.0 kHz
Frame rate : 25.000 FPS (1920 SPF)
Bit depth : 20 bits
Delay relative to video : 39 ms
Title : Program 2
but ffmpeg lastest (less than half day since it was compiled so must include DolbyE parser) version n4.3.1-29-g89daac5fe2 Copyright (c) 2000-2021 the FFmpeg developers built with gcc 9.3-win32 (GCC) 20200320 from https://github.com/BtbN/FFmpeg-Builds/releases shows (as much older versions of ffmpeg and LAV Splitter too) only three audio track - third (and last) of them is:
Stream #0:3[0x1030]: Audio: s302m (BSSD / 0x44535342), stereo, s32 (20 bit), 2304 kb/s so where's DolbyE stream with 6 audio channels (namely fourth audio stream)? Or MediaInfo shows wrong information and audio streams 3 and 4 are not DolbyE at all?
So main question is:
[s302m @ 0000000000486980] S302 non PCM mode with data type 28 not supported
Last message repeated 13 times
[mpegts @ 00000000005aa680] decoding for stream 3 failed
[mpegts @ 00000000005aa680] Could not find codec parameters for stream 3 (Audio: s302m (BSSD / 0x44535342), stereo, s32 (20 bit), 2304 kb/s): unspecified sample rate
PS. I'm not power user of ffmpeg so show correct and working command line to extract only DolbyE stream from Sample Eurovision 2019 Tel Aviv.ts, please.

richardpl
26th January 2021, 23:18
Here is decoder:

http://git.videolan.org/?p=ffmpeg.git;a=blob;f=libavcodec/dolby_e.c;hb=HEAD

Note that DolbyE is muxed in various strange ways in different containers.
I'm not providing advanced ffmpeg usage for free, sorry.

jmone
26th January 2021, 23:43
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.php?p=1934308#post1934308 ;)

ffmpeg: Yes HW acceleration (decode) works on both FX6_Sample_25fps.mp4 & HEVC UHD 10 Bit 4:4:4 50fps sample when adding "-hwaccel cuda"

I've added the info from the log to the previous one - https://behome.dyndns.info/index.php/s/yZwPLBD8zPoyRsY

VictorLS
27th January 2021, 05:24
richardpl
I see
jmone
Many thanks but add FX6_Sample.mp4 (which is 50fps as HEVC UHD HDR 10Bit 444 50fps.mov too) in same way, please.

jmone
27th January 2021, 06:06
Many thanks but add FX6_Sample.mp4 (which is 50fps as HEVC UHD HDR 10Bit 444 50fps.mov too) in same way, please.
Done - same thing - HW Accel works. Log file updated.

VictorLS
27th January 2021, 19:06
jmone
Thanks again - now I have two h265 4:4:4 4K test files: FX6_Sample_25fps.mp4 and FX6_Sample.mp4 for nVIDIA's Turing and Ampere videocards to test hardware acceleration with nVIDIA CUVID (now it's calling NVDEC) in LAV Video Decoder if nevcairiel will forget "CUVID is deprecated" (clsid, btw can you explain why shaders in your MPC-HC with MPC-VR worked in both pre-resize and post-resize while author of MPC-VR says shaders must work only in post-resize and that is so in MPC-BE and SmartDVB?)

huhn
27th January 2021, 19:42
you know they just repacked CUVID and named it NVDEC. but CUIVD which is still the same is deprecated...
i'm sure he forgot.

clsid
27th January 2021, 19:57
CUVID is not currently being developed further.

can you explain why shaders in your MPC-HC with MPC-VR worked in both pre-resize and post-resize while author of MPC-VR says shaders must work only in post-resize and that is so in MPC-BE and SmartDVB?
The answer is written literally as a note on the Shaders page in MPC-HC settings. Pre-resize is done as post-resize when using MPCVR.

jmone
27th January 2021, 21:22
NVDEC is not going anywhere from nvidia's perspective (or all the apps that use it). Who knows if they ever add it 4:4:4 to D3D11 however.

It's up to nev regarding what to do with NVDEC support in LAV, and while "CUVID is not currently being developed further" is certianly his latest post, it was not that long ago that:


I've been thinking about replacing CUVID with NVDEC in LAV, with built-in deinterlacing and either copy-back like today or interop with D3D11, so that it could be efficient like D3D11 native, just with deinterlacing, and potential 12-bit and maybe 4:4:4 support (the latter would likely need renderer support first)

I for one would certainly support this.

jmone
27th January 2021, 21:40
I for one would certainly support this.

I know that HW acceleration for UHD HDR HEVC 10-BIT 4:4:4 support is a pretty niche requirement, but it looks like it would be the best format for rendering out my "master" FX6 footage ... so I'm happy to "put my money where my mouth is", that is....

...if Nevcairiel is open to a bounty for this to be supported in LAV, I'll pledge US$250.

VictorLS
27th January 2021, 22:58
CUVID is not currently being developed further
By nVIDIA or by nevcairiel himself?
The answer is written literally as a note on the Shaders page in MPC-HC settings. Pre-resize is done as post-resize when using MPCVR.
Thanks.

clsid
28th January 2021, 01:08
The implementation in LAV.

jmone
28th January 2021, 04:53
Oh well. The other idea of upgrading my HTPC from a i5-7600k to a i7-7000 to get more cores did not help for using SW decoding on 500mbit AVC-I UHD 10-Bit 4:2:2 PQ @ 50fps. Still can't keep the Render Queues full with all 8 threads running at 4ghz (and they all peak over 90%). My OC I9-9900KF running at 4.9ghz can do it (all 16 threads are at about 50%), but it turns it into a space heater. Also, the idea of pushing 500Mbit content over the LAN smells like it is asking for trouble anyway. I could also use a 150mbit AVC LGOP UHD 10-Bit 4:2:2 PQ Profile but that is even more taxing than all I .... and my I9-9900-KF will still drop the odd frame.

So I really am going to need 4:4:4 HEVC HW acceleration or much more powerful (maybe AMD) HTPCs if I want to keep anything better than 4:2:0 for playback.

VictorLS
28th January 2021, 05:47
jmone
Hardware acceleration is great (but not universal) thing - even my weakest possible nVIDIA GTX750v2 on GM206 1 GB videomemory easily plays without drop and video&audio synced my powerful processor test file Men.in.Black.1997.2160p.WEB-DL.mkv (2,3 GB) https://yadi.sk/i/I8FFU8PdzNRpt - you can try play it with and without hardware acceleration with every your processors.

jmone
28th January 2021, 07:54
No Need. My existing CPU/GPU combinations (with madVR tuning) has no issues with commercially available content that I buy (up to and including the two UHD HDR HFR HEVC titles - Billy Lynn, and Gemini Man - both of which are 4:2:0). What we are now exploring is taking UHD HDR HFR decoding from 4:2:0 to 4:2:2 or 4:4:4.
- 4:2:2 = There is no GPU HW acceleration option for 4:2:2 in any codec on any consumer GPU. It can be done in SW, but needs one of the latest gen powerful CPU to be done in real time, and even then it consumes a lot of power (and that is for AVC all I).
- 4:4:4 = This can be done by GPU acceleration for HEVC (not in AVC or AV1 etc) and has been supported for the last two nvidia GPU generations. It can not be done in SW even with a modern powerful CPU (well at least not even close with my i9-9900KF for HEVC 4:4:4 HDR HFR UHD samples).

VictorLS
28th January 2021, 09:24
jmone
I agree with all you've written in last post but very interesting to get results of MenInBlack (it's not commercially) test (with average CPU load) namely on your three processors without hardware acceleration. I guess "OC I9-9900KF running at 4.9ghz" can fluent play with ~40% load of each physical/logical core, may be i7-7000 with ~80% load but i5-7600k with 100% will can't fluent and video/audio synced play.

jmone
28th January 2021, 10:07
Victor, I'm not going to download a pirated copy and you should remove the link. I am happy to test on any of the over 1,000 movies (of which 250 are UHD BDs) I have purchased ... & I don't really see the point of this in the LAV thread.

jmone
28th January 2021, 10:40
Victor, Thank you for removing the link.

For your interest, here is a screen shot of play Gemini Man (BD UHD 59.94fps HDR 4:2:0) using just SW decoding on my i9-9900KF. I had to increase my queue sizes in madVR to stop the occasional dropped frame when the CPU spiked to 100%. I have no idea why anyone would want to use SW decoding when you could use HW acceleration. The only difference was I generated a lot of heat and fan noise.
https://behome.dyndns.info/index.php/s/xPjsaw3nXQG4Ws5

VictorLS
28th January 2021, 10:42
Victor, I'm not going to download a pirated copy
I see now and respect your point of view like "for all in our lives must be paid" and you'd be right if Men.in.Black.1997.2160p.WEB-DL.mkv is full movie - but it's just 1min33s (so about 200 Mbit/s) fragment for testing purpose only ;)

VictorLS
28th January 2021, 10:54
Victor, Thank you for removing the link.
I'll not going to remove link (see above)
I have no idea why anyone would want to use SW decoding when you could use HW acceleration
My videocard can but there's many people with old but powerful enough processors with old integrated videocard can't accelerate h265 at all ;)
For your interest, here is a screen shot of play Gemini Man (BD UHD 59.94fps HDR 4:2:0) using just SW decoding on my i9-9900KF. I had to increase my queue sizes in madVR
Thanks for test and screenshot. Which value of "queue sizes" was and present in madVR now?

jmone
28th January 2021, 11:03
... Men.in.Black.1997.2160p.WEB-DL.mkv (2,3 GB) ...
Must be my mistake from reading the file size.

File information
Name:Men.in.Black.1997.2160p.WEB-DL.mkv
Owner:victorls
Size:2.31 GB
Modified:01/18/2017 2:07 am
Image date:11/18/2016 9:14 am
Views:201
Downloaded:446 times

Edit - I can confirm this link is just a sample.

jmone
28th January 2021, 11:11
...Testing CPU Decoding performance on various GPU does make sense.... but I don't think it is a LAV topic. FWIW, a 23.976fps UHD HDR BD consumes just 30-35% on my i9-9900KF but it still runs at 4.9ghz.

I'll not be posting other results unless it is directly related to LAV in this thread.

VictorLS
28th January 2021, 12:01
...Testing CPU Decoding performance on various GPU does make sense.... but I don't think it is a LAV topic. FWIW, a 23.976fps UHD HDR BD consumes just 30-35% on my i9-9900KF but it still runs at 4.9ghz.
So my presumption near right ;)
It's a pity you haven't answered about "queue sizes" in madVR but it's interesting if you revert it to defaut (what namely?) value.
Btw I don't know on what TV/monitor do you watching at but did you something to watch 23.976fps films absolutely fluently from RTX3090 or/and from video (internal?) i5-7600k/i7-7000 in your HTPC? I use 23,976*2=47,952Hz output from videocard (23,976 isn't supported by my 24" PVA monitor) and have few number of stutters video which easily corrected with backward 5 seconds in KMPlayer - I know ReClock but don't like use it.
I'll not be posting other results unless it is directly related to LAV in this thread.
It's a pity again but you're right on my own.

VictorLS
28th January 2021, 18:10
Which value of "queue sizes" was and present in madVR now?
My general setting of madVR (I'm sure it's default settings)
https://i.postimg.cc/5QV7vhFt/mad-VR-general-settings.png (https://postimg.cc/5QV7vhFt)
what's yours to achieve ideal fluent video?
I guess you can't upload ~minute not recoded sample from Gemini Man (BD UHD 59.94fps HDR 4:2:0) where CPU load is near to maximum but if you can upload the sample, please.

jmone
28th January 2021, 20:40
Victor - here is the madVR thread for these questions - https://forum.doom9.org/showthread.php?t=146228

VictorLS
28th January 2021, 21:04
Victor - here is the madVR thread for these questions - https://forum.doom9.org/showthread.php?t=146228
I know but there wasn't there your increased queue sizes of madVR for Gemini Man (BD UHD 59.94fps HDR 4:2:0) in that thread that's why I asked here several times ;)
I've just watched Gemini Man VP9 4K (notHDR - my GTX750v2 can't hardware acceleration of VP9.2 HDR) from https://www.youtube.com/watch?v=vX2vsvdq8nw - very impressive quality...

jmone
29th January 2021, 00:57
I've replied in the madVR thread.

vanden
7th February 2021, 11:43
Hello,

I have a BUG with Windows 10 Enterprise 1903 1909 2004 20H2 ...
All other version (from 1809) works normally.
HP DL580G5 PC (4 x Xeon X7460) 32Go Ram and GFX 650 Ti.

Testing an UltraHD Blu-ray with Windows 10 Enterprise 1809:
MPC LAV 0.74.1.75 + MadVR + madVRhdrMeasure122:
http://vandenk.free.fr/1809-mpc.jpg
PotPlayer LAV 0.74.1.92 + MadVR + madVRhdrMeasure122:
http://vandenk.free.fr/1809-pot.jpg

Test with Windows 10 Windows 10 Enterprise 20H2:
MPC LAV 0.74.1.75 + MadVR:
http://vandenk.free.fr/20h2-mpc.jpg
PotPlayer LAV 0.74.1.92 + MadVR madVRhdrMeasure122:
http://vandenk.free.fr/20h2-pot.jpg
I repeated the MPC test with madVRhdrMeasure122: same result, it's weird the "decoder queue" remains full but the others are empty ...
Ditto with Windows 10 Enterprise 1903 1909 2004…

Is there a way to change the CPU management for Windows 10 Enterprise 1903 1909 2004 20H2 ?
I know the problem is not LAV but maybe someone has a solution ?

VictorLS
7th February 2021, 16:19
vanden
One game player I know with some Core i5+GTX1600 had problem (I don't know what namely) when he was playing games in Win10x64 1909 - he tried many things but problem was solved just when he's installed old Win10x64 (namely 1809 if I don't mistake).

el Filou
7th February 2021, 18:03
If you right-click on a process in Task Manager you can Set affinity.
This is really strange, it looks like it's using only sockets 3 & 4 with the 3rd one heavily loaded.problem was solved just when he's installed old Win10x64 (namely 1809 if I don't mistake).That's not a long-term solution obviously, 1809 is out of support in 3 months.

huhn
7th February 2021, 20:07
this looks like an upload issue.

try bilinear scaling instead of DXVA for a quick test.

vanden
7th February 2021, 20:42
If you right-click on a process in Task Manager you can Set affinity.
This is really strange, it looks like it's using only sockets 3 & 4 with the 3rd one heavily loaded.That's not a long-term solution obviously, 1809 is out of support in 3 months.

I have already checked this problem on Windows 10 1903 1909 2004 20H2 ... They are all ticked:
http://vandenk.free.fr/20h2-1-2.jpg
I also tested in LAV "Threads for Multi-Threading" @ 24 and also @ 32 ... it's not better.


I only use the CPU to decode 3840x2160 H265 10 bit

clsid
7th February 2021, 21:52
Don't use maximum CPU queue size in madVR. That only creates problems and solves absolutely nothing. Just use a more sane value like 32.

You may fix (part of) your performance regression by disabling the Spectre/Meltdown mitigations for your Intel CPUs.

reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v FeatureSettingsOverride /t REG_DWORD /d 3 /f

reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v FeatureSettingsOverrideMask /t REG_DWORD /d 3 /f

vanden
8th February 2021, 00:14
Don't use maximum CPU queue size in madVR. That only creates problems and solves absolutely nothing. Just use a more sane value like 32.

You may fix (part of) your performance regression by disabling the Spectre/Meltdown mitigations for your Intel CPUs.

reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v FeatureSettingsOverride /t REG_DWORD /d 3 /f

reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v FeatureSettingsOverrideMask /t REG_DWORD /d 3 /f
Thank you,

But unfortunately it doesn't work, I put 32 in MadVR and apply on the registry :
http://vandenk.free.fr/Registre.jpg
After reboot always the same (Windows 10 20H2) :
http://vandenk.free.fr/32-20h2.jpg
It still works fine in Windows 10 1809 :
http://vandenk.free.fr/32-1809.jpg

There really is a problem with CPUs management ...

VictorLS
8th February 2021, 17:36
try bilinear scaling instead of DXVA for a quick test
vanden, for a quick test I propose to set ordinary EVR (and MPC-VR http://forum.doom9.org/showthread.php?p=1931091#post1931091 ) instead of madVR in MPC-HC

vanden
8th February 2021, 23:30
thank you,

I am not testing MPC-VR, because it does not work well in Win10 1809 ... "Frames skipped" in DX11 and DX9, with hdr or not and whatever the algorithm to resize them :
http://vandenk.free.fr/1809-MPC-VR.jpg

I tested EVR in bilinear algorithm:
http://vandenk.free.fr/Evr.jpg
On 1809 it works well :
http://vandenk.free.fr/1809-EVR-Bill-FSdirec3d.jpg
On 20H2 it works as well :
http://vandenk.free.fr/20h2-EVR-Bill-FSdirec3d.jpg

CPU management is different but it plays the same videos !
I tested some video that does not play in Windows 10 1809 (too much CPU) and it hangs in the same place with Windows 10 20H2 !

On the other hand no solution for MadVR (Without HDR and in bilinear) : it does not work ...

clsid
9th February 2021, 02:18
You keep talking about CPU utilization. That doesn't seem to be the problem. madVR uses your GPU for almost everything it does. And even with EVR your screenshot shows significantly higher GPU usage on 20H2 vs 1809. In fact so high already that it is logical that you have issues with madvr.

So you need to figure out why GPU usage is so much higher. Turn off unnecessary Windows features such as the Game Bar, and also stuff like NVIDIA Shadowplay.

And be aware that your GPU is quite old to begin with, so not very powerful. You should consider getting something more modern. It is not really good enough for 4k play with madvr.

huhn
9th February 2021, 05:03
my idea about madVR without anything DXVA2 related comes from from the rendertiesm for DXVA and that it seem the CPU get's stressed by the upload. if it isn't uploaded to DXVA madVR may behaviours differently.

EVT "always" uses DXVA2.

so i need a screen to see what changes to get an idea.
BTW. can you add a folder to the madVR installation called "showrendersteps" before you make the screen?

still far fetched but the best i can come up with.

VictorLS
9th February 2021, 08:38
thank you
You're welcome but you were inattentive when I've written
ordinary EVR
I meant NOT Enhanced Video Renderer (custom presenter) as on your screenshot but just Enhanced Video Renderer - many (not only mine) experiments prove ordinary EVR is lightest known renderer (even in WinXP it works well enough - almost as lightest in WinXP VMR7windowed) but it can't process or passthrough HDR to display but I've proposed just for experiment (also with files not played fluently on other renderers) to see CPU(GPU) load.
Btw your experiment with EVR-CP well too.
I am not testing MPC-VR, because it does not work well in Win10 1809 ... "Frames skipped" in DX11 and DX9, with hdr or not and whatever the algorithm to resize them :
http://vandenk.free.fr/1809-MPC-VR.jpg
It's strange - even my weakest present but can Variable Length Decoding (VLD) H265 4K 10bit 4:2:0 videocard nVIDIA GTX750v2 1 GB (~100$ before first Pascal out) with MPC-VR in Win7x64 (I plan install Win10 20H2 on my new 512GB Crucial MX500 SSD in some weeks) works almost same (I mean low resources consumption watched in OpenHardwareMonitor's gadget) well as ordinary EVR.

Aleksoid1978
9th February 2021, 08:55
thank you,

I am not testing MPC-VR, because it does not work well in Win10 1809 ... "Frames skipped" in DX11 and DX9, with hdr or not and whatever the algorithm to resize them :
http://vandenk.free.fr/1809-MPC-VR.jpg

I tested EVR in bilinear algorithm:
http://vandenk.free.fr/Evr.jpg
On 1809 it works well :
http://vandenk.free.fr/1809-EVR-Bill-FSdirec3d.jpg
On 20H2 it works as well :
http://vandenk.free.fr/20h2-EVR-Bill-FSdirec3d.jpg

CPU management is different but it plays the same videos !
I tested some video that does not play in Windows 10 1809 (too much CPU) and it hangs in the same place with Windows 10 20H2 !

On the other hand no solution for MadVR (Without HDR and in bilinear) : it does not work ...

In EVR/EVR-CP used NV12, MPC-VR use P010 + shaders for color conversion, it's heavier format.

el Filou
9th February 2021, 15:48
How much VRAM does that 650 Ti have? IIRC there were models with 1 or 2 GB. Even 2 GB is short for madVR with 4K.
clsid's right, there's some problem with the GPU, maybe some driver setting or too old driver.
If using HDR passthrough and a light chroma upsampling algo and short render/present queues, it probably should still be OK with madVR even with 4K IMO.

clsid
9th February 2021, 18:08
Another difference in the screenshot is refreshrate: 71Hz vs 85Hz
Lower the refreshrate so the GPU has to do less work. 71Hz is also smoother for video playback.

madvr settings to adjust:
gpu queue size = 4
frames to present in advance = 1

nvidia settings:
Disable GSync
Enable VSync
Power management mode = Adaptive (or Normal in latest drivers)

Siso
9th February 2021, 20:23
Regarding the v-sync in nvidia control panel, is it required to be enabled for pascal cards too?

el Filou
9th February 2021, 20:57
One time I forced VSync by mistake in NVIDIA Control Panel on my 1050 and madVR rendering times skyrocketed and it started to stutter like crazy so I don't think you can use the same settings that are recommended for Turing & Ampere with older cards.

Siso
9th February 2021, 21:00
One time I forced VSync by mistake in NVIDIA Control Panel on my 1050 and madVR rendering times skyrocketed and it started to stutter like crazy so I don't think you can use the same settings that are recommended for Turing & Ampere with older cards.

I see, and you have the same card as mine. :D

Asmodian
10th February 2021, 08:33
Personally, I wouldn't enable v-sync on Turing or Ampere either. Is there a situation where it helps?

Disabling G-sync is a good idea though, at least for the player.

Siso
10th February 2021, 10:39
I tried enabling and disabling v-sync on my machine, and it didn't make a difference. :D

mzso
17th February 2021, 20:15
Hello!
Which HW acceleration option is supposed to be the fastest? Is it in the order of the drop-down list? I would expect native DXVA in front of copy-back.

Is there a way to conveniently compare the performance of decoding options? Particularly HW vs SW.

chros
17th February 2021, 21:05
d3d11-native is the fastest (https://forum.doom9.org/showthread.php?t=176642).

mzso
18th February 2021, 16:54
d3d11-native is the fastest (https://forum.doom9.org/showthread.php?t=176642).

Thanks.

max79
19th February 2021, 17:19
SUPPORT REQUEST - #34

@Nevcairiel
LAVSplitter ignore information written after "-" character in CUE-chapters. Example:
https://feeds.soundcloud.com/stream/339564921-yannickburky-electromix-120.m4a

Any feedback would be appreciated.

max79
19th February 2021, 17:20
SUPPORT REQUEST - #35

@Nevcairiel
Starting from LAV_v0.73.1-28(I have no such issue on v0.73.1-19 and older) i got live stream issues: playback stops right after approx 8-10minutes for two hundreds HLS-streams from yandex.ru site. Example(Geo block. Only for Russia):
https://strm.yandex.ru/kal/rt_hd/rt_hd0.m3u8

Any feedback would be appreciated.

UPDATE: Fixed in LAVFilters_v0.74.1-108!

max79
19th February 2021, 17:25
@Nevcairiel
LAVVideoDecoder[Native & Copy-back modes]_v0.74.1-32 in Win7(x64) on NVidia GeForce GTX1650 card with latest drivers gives artifacts issues. if this OS is still supported by you, I can describe the problem in details with a UHD HEVC-10 video short example.

UPDATE: Fixed in v0.74.1-87 and newer!

VictorLS
19th February 2021, 22:56
Can anyone confirm new H.265 4K SAT channel Mooz 4K (here's my record 20201031-170739_Mooz 4K.ts (56 MB) https://yadi.sk/d/NngfIFAIVyK-hQ ) with LAV Video Decoder 0.74.1-75 (I didn't test earlier versions) as minimum on nVIDIA's videocards GM206 and newer can't be accelerated with DXVA2 (native and copy-back) or gives artifacts in Win7x64? With CUVID hardware acceleration works well. MPC-BE, Cyberlink and MainConcept accelerates via DXVA2 well too.
Corrected in 0.74.1-87 - thanks.

max79
19th February 2021, 23:40
Corrected in 0.74.1-87 - thanks.

My message #24298 was about exactly the same issue!

max79
20th February 2021, 00:25
SUPPORT REQUEST - #36

@Nevcairiel
Starting from LAVSplitter_v0.74.1-34 i got issues after seeking to the beginning on HLS VideosOnDemand, now playback is starting but in fact, frames are output that do not correspond to the beginning position, but those that were at the time that was before the rewind to the beginning. On v0.74.1-32 and older LAV version I have differ behavior, it just didn't start to play media(i didn't hear sound and see only one frame that were at the time that was before the rewind to the beginning. And I liked this behavior better), example:
http://demo.unified-streaming.com/video/machete/machete.ism/machete.m3u8

Seems it looks like something similar with the problem here:
https://github.com/Nevcairiel/LAVFilters/issues/306

Any feedback would be appreciated.

UPDATE: Fixed in v0.74.1-98 and newer!

clsid
20th February 2021, 01:33
Reverting 9fbf56d (https://github.com/Nevcairiel/LAVFilters/commit/9fbf56df5b1c5cc3e9fb4ad46f5164148d9efd95) does fix that seek issue.

max79
20th February 2021, 11:25
Reverting 9fbf56d (https://github.com/Nevcairiel/LAVFilters/commit/9fbf56df5b1c5cc3e9fb4ad46f5164148d9efd95) does fix that seek issue.
@clsid
Awesome. Thank you!

nevcairiel
26th February 2021, 08:39
Reverting 9fbf56d (https://github.com/Nevcairiel/LAVFilters/commit/9fbf56df5b1c5cc3e9fb4ad46f5164148d9efd95) does fix that seek issue.

There is a reason for this check. Reverting it just breaks other cases to fix one thing, instead of investigating why it fails. Which case is more important, the one the complained the most recent? :)

gfxnow
27th February 2021, 06:52
Why no new release in 2 years despite so much activity here?

Klaus1189
27th February 2021, 08:31
Is there a new nightly available for the recent commits? I only know: https://files.1f0.de/lavf/nightly/

jkauff
27th February 2021, 11:36
The latest version of MPC-HC (1.9.10) includes a current build of LAV. Also, most of the codec packs (like K-Lite) do their own builds from the nightlies. Or you can build your own, of course.

mzso
27th February 2021, 15:24
d3d11-native is the fastest (https://forum.doom9.org/showthread.php?t=176642).

For heavens sake...
It seems to have a decent improvement in seeking performance, but there's no deinterlacing anymore. madVR wouldn't deinterlace with dxva11 it seems. Why?

And LAV is only ever willing to use HW deinterlacing with CUVID, and won't use software deinterlacing. Super annoying that deinterlacing is always a problem with LAV+madVR.

el Filou
27th February 2021, 17:13
madshi didn't implement it. Probably considered not high priority.
I would like D3D11 deinterlace with NVIDIA but then D3D11 decode causes many issues in MediaPortal so would mean even more debug. :(

huhn
27th February 2021, 17:22
mpcVR does this fine it just a problem with madVR.

Klaus1189
27th February 2021, 20:15
The latest version of MPC-HC (1.9.10) includes a current build of LAV. Also, most of the codec packs (like K-Lite) do their own builds from the nightlies. Or you can build your own, of course.

I am a MPC-BE user and do not want to install a codecpack on my system. Compiling myself is to high for me.
I am only a video guy, not a programming guy :(

@nevcairiel:
I beg on my knees for a nightly build ;) Please Nev :)

VBB
27th February 2021, 20:19
@jkauff - I'm sure Klaus meant the commits from yesterday. The last nightly is from 12/6/2020.

Commits on Feb 26, 2021

Update ffmpeg

Update ffmpeg for HLS seeking fix

Add Ampere to SM->Core mapping

Support ProRes4444XQ

Fix codec ID to check for ASS style changes

Change H.264 Level 6 check to check actual number of ref frames, instead of the level

max79
27th February 2021, 20:38
@nevcairiel:
I'm also like everyone else waiting for the nightly build ;) Please Nev :)

mzso
27th February 2021, 20:46
mpcVR does this fine it just a problem with madVR.

Which variant of MPC? Can it be installed system-wide? (provided any app can even use it.)

Edit:
Never mind. I found it on github as a separate filter. It doesn't work with the tuner app though, and only there I have interlaced video. Out of curiosity had a look at it in PotPlayer. The output became too dark with a lot of detail swallowed.

clsid
27th February 2021, 23:38
The latest release build of MPCVR is a bit buggy. Try with the nightly build:
https://yadi.sk/d/X0EVMKP4TcmnHQ

mzso
28th February 2021, 00:06
The latest release build of MPCVR is a bit buggy. Try with the nightly build:
https://yadi.sk/d/X0EVMKP4TcmnHQ

Works identically. With "Use Directx 11" it produces abnormally dark picture.

clsid
28th February 2021, 00:18
Press Ctrl+J to show the renderer debug/statistics overlay and make a screenshot. Post that in the MPC-BE topic so that the developers can have a look at it.

Shark007
28th February 2021, 00:20
To use MPCVR you need to uncheck the 3 boxes in its settings.
Use for [NV12] [P010/P016] [Other supported formats]

its a bit convoluted.

Klaus1189
28th February 2021, 11:43
@jkauff - I'm sure Klaus meant the commits from yesterday. The last nightly is from 12/6/2020.

Exactly :)

nevcairiel
28th February 2021, 12:36
I've fixed the issue that prevented nightlys from being uploaded and future changes should hopefully result in new nightlys once again

I'm also planning on a release version in March.

Klaus1189
28th February 2021, 12:50
Yay :)

VBB
28th February 2021, 20:29
Thanks Nev! Always appreciated :)

mzso
1st March 2021, 11:39
To use MPCVR you need to uncheck the 3 boxes in its settings.
Use for [NV12] [P010/P016] [Other supported formats]

its a bit convoluted.

That disabled deinterlacing. So, I'm back right where I started.

huhn
1st March 2021, 12:12
with an AMD card?

max79
1st March 2021, 12:54
I'm also planning on a release version in March.
LAVFilters_v0.74.1-98 fixing this nightmare "seeking" issue. Thank you Nev!:thanks:

mzso
1st March 2021, 14:54
with an AMD card?

Yes. RX580

I wish LAV had a way to provide different preset/settings for particular apps. That would allow to work around my issues. I don't need HW decoding for measly 1080i AVC DVB streams, but I definitely need deinterlacing.

LAVFilters_v0.74.1-98 fixing this nightmare "seeking" issue. Thank you Nev!:thanks:

What's that about?

max79
1st March 2021, 15:10
What's that about?
https://github.com/Nevcairiel/LAVFilters/issues/306

huhn
1st March 2021, 17:54
Yes. RX580

I wish LAV had a way to provide different preset/settings for particular apps. That would allow to work around my issues. I don't need HW decoding for measly 1080i AVC DVB streams, but I definitely need deinterlacing.



What's that about?

the problem is that pretty much everything related to hardware stuff is pretty much broken on AMD.
calling it with lavfilter instead of a video renderer doesn't change that.

mzso
1st March 2021, 18:04
the problem is that pretty much everything related to hardware stuff is pretty much broken on AMD.
calling it with lavfilter instead of a video renderer doesn't change that.
Not quite. LAV+madVR produces proper image at least, but deinterlacing support is lacking.

jkauff
1st March 2021, 18:34
Not quite. LAV+madVR produces proper image at least, but deinterlacing support is lacking.
Nvidia Control Panel provides the option to deinterlace using Inverse Telecine. Doesn't AMD offer something similar?

Klaus1189
1st March 2021, 19:24
My RX480 does proper HW deinterlacing and the RX580 should be also ok, isn't it ok?

Nvidia Control Panel provides the option to deinterlace using Inverse Telecine

If I disable Inverse Telecine in Nvidia Control Panel HW deinterlacing still works. It is another feature.

el Filou
1st March 2021, 19:24
mzso would like to use D3D11 native hardware decoding (I assume probably for performance reasons with UHD) but madVR doesn't (yet? or won't ever?) support deinterlacing with D3D11, and as it's a DXVA native decoder there is no way to deinterlace in LAV itself as it must be managed by the renderer.
Not really LAV's fault, though.

chros
1st March 2021, 20:21
I wish LAV had a way to provide different preset/settings for particular apps. That would allow to work around my issues. I don't need HW decoding for measly 1080i AVC DVB streams, but I definitely need deinterlacing.

It sort of works with 2 MPC-HC (because it has LAV as internal filter) using ini files, or 1 HC and 1 BE.

Also, since LAV store its setting in registry, you can back it up as a reg file, and run the one you want before playback starts (e.g. from a bat file).

I'm not affected by this, in 2021 I don't watch any (!) interlaced content, that's why I use d3d11-native in LAV video.

nevcairiel
1st March 2021, 20:51
You can turn off HW decoding simply for AVC, as indeed any mediocre CPU should be able to handle that.

I might work on deinterlacing d3d11 native streams in the future, but thats a project a bit further down the list, and I barely get time to work on these.
First I want to work on re-envigorating CUVID and soem Blu-ray demuxing improvements. But thats after the next release.

VBB
1st March 2021, 20:57
That's exactly what I do. HW decoding only for HEVC, VP9, AV1. My 1st gen Core i7-920 handles everything else.

huhn
1st March 2021, 21:13
Not quite. LAV+madVR produces proper image at least, but deinterlacing support is lacking.

depends on other settings your card should be fine when scaling is also done with the hardware scaler which is not the case as soon as you are disabling the native formats.
madVR get's the image scaled.

d3d11 processing level are know to be broken for 5000 series to bad you have this issue to.

clsid
1st March 2021, 23:30
@mzso
Make a screenshot after pressing Ctrl+J.
Use the new AMD bug reporting tool to submit a description of the problem. And everyone else that can reproduce it should do the same. AMD does seem to work hard on improving drivers lately. But the main reason why some bugs are not getting fixed is the lack of (enough) proper detailed reports.

huhn
2nd March 2021, 05:46
well i guess i just call them again and revive the over 1.5 year old ticket that got the answer "that doesn't seem important".
just hope other user here have more luck.

Sven75
2nd March 2021, 14:43
Does anybody have an idea what could be the reason for the "flickering" in videos exported from presentations in PowerPoint when played back in MPC-BE (1.5.6 and 1.5.7), MPC-HC (1.9.10) with DXVA cb or native, D3D11 selected in LAV while software decoding works as expected?

I uploaded a simple demo file as well as a screen capture of the problem showing on one of my computers here:
https://www.sendspace.com/filegroup/zkYZ%2BOhLOfJamwiq22IVnA

It also happens in VLC player, but it will run fine using e. g. ffplay.exe (current ffmpeg build - maybe not surprising if ffplay is using software decoding by default).

It happens on Intel UHD 620 and on nVidia RTX 2080 with up to date drivers, but not if QuickSync is selected on the UHD 620 and CUVID on the RTX 2080.

Any help would be greatly appreciated.

el Filou
2nd March 2021, 15:16
You can turn off HW decoding simply for AVC, as indeed any mediocre CPU should be able to handle that.There is a special use case where hardware decode of AVC can be useful even if the CPU can easily handle it and that is broadcast TV where the signal is sometimes wonky. The NVIDIA decoder especially is very good at gracefully handling errors in streams. I sometimes have very short dips of my TV signal, and when that happens HW decode is much better at not producing stutter, whereas software decode causes a big pause in the stream and it takes longer to get an image back. I don't know if mzso sometimes has issues with TV signal, but in my case it's useful and why I keep using hardware decode.

VictorLS
2nd March 2021, 15:58
@el Filou
What namely nVIDIA's HW acceleration the best in your case?

mzso
2nd March 2021, 16:24
Nvidia Control Panel provides the option to deinterlace using Inverse Telecine. Doesn't AMD offer something similar?

How does that even function across the various renderers, decoders?

@mzso
Make a screenshot after pressing Ctrl+J.
Use the new AMD bug reporting tool to submit a description of the problem. And everyone else that can reproduce it should do the same. AMD does seem to work hard on improving drivers lately. But the main reason why some bugs are not getting fixed is the lack of (enough) proper detailed reports.

But I don't know if it's an AMD bug. much less what exactly is happening.

My RX480 does proper HW deinterlacing and the RX580 should be also ok, isn't it ok?.

But with what renderer, or what circumstance? Obviously HW deinterlacing is done by the GPU. If it's initiated.

huhn
2nd March 2021, 16:42
you can read more about this here: https://forum.doom9.org/showthread.php?t=176013

mzso
2nd March 2021, 16:47
You can turn off HW decoding simply for AVC, as indeed any mediocre CPU should be able to handle that.

I might work on deinterlacing d3d11 native streams in the future, but thats a project a bit further down the list, and I barely get time to work on these.
First I want to work on re-envigorating CUVID and soem Blu-ray demuxing improvements. But thats after the next release.

I didn't think of that. Can't remember coming across UHD AVC streams, so it shouldn't be a problem.
So I guess SW deinterlacing would be used by LAV as normal. Though YADIF does have its limitations (https://streamable.com/d8xrrk ) I think I can live with it.
I might work on deinterlacing d3d11 native streams in the future, but thats a project a bit further down the list, and I barely get time to work on these.
First I want to work on re-envigorating CUVID and soem Blu-ray demuxing improvements. But thats after the next release.
Oh well, whenever deinterlacing support happens, happens.

el Filou
2nd March 2021, 16:58
@el Filou
What namely nVIDIA's HW acceleration the best in your case?I don't think there is one that is best for every case, as each have limitations.
I use DXVA2 native for TV (smoother handling or errors in streams, better deinterlacing with madVR), DXVA2 copyback for SD/HD movies (no chroma loss with NVIDIA, allows madVR black bar detection to remove TV logos on 2.39 movies), and D3D11 native when I watch UHD (best performance and quality) which is not often.
I manually change between them with shortcuts to .reg files.How does that even function across the various renderers, decoders?The graphics driver's IVTC functionality works when using hardware deinterlacing and is transparent (you won't know it is working or not without advancing frame by frame during playback). NVIDIA has a checkbox to enable/disable it but AMD has removed all video processing options in their control panel so I guess it's always on? One never knows with AMD these days without testing.So I guess SW deinterlacing would be used by LAV as normal. Though YADIF does have its limitations I think I can live with it.If you use madVR, you can use hardware deinterlacing with software decoding, madVR will upload the frames to the GPU and then use DXVA deinterlacing. Of course this supposes your GPU drivers don't have bugs with deinterlacing.

mzso
2nd March 2021, 17:55
If you use madVR, you can use hardware deinterlacing with software decoding, madVR will upload the frames to the GPU and then use DXVA deinterlacing. Of course this supposes your GPU drivers don't have bugs with deinterlacing.

It doesn't work. MadVR says deinterlacing is on, but it is not working. Well, madVR deinterlacing doesn't seem to work at all actually.

el Filou
2nd March 2021, 18:25
Is that the old issue with DVB Viewer? I thought that had been fixed. :( (Edit: @nevcairiel yes, my bad, I think it was ProgDVB)
I just tested again with an interlaced video in MPC-HC and MediaPortal and with those apps it works.

nevcairiel
2nd March 2021, 18:38
If it was DVB Viewer, I probably would've heard, since I'm in contact with the devs directly on occasion. Probably some other DVB application.

huhn
2nd March 2021, 19:43
It doesn't work. MadVR says deinterlacing is on, but it is not working. Well, madVR deinterlacing doesn't seem to work at all actually.

you are not by accident using film mode?

el Filou
2nd March 2021, 20:22
Recently I have been watching old motorsport races from YouTube, and I encountered an unusual problem: the uploader had encoded them as progressive video (720x480 29.970 fps), but the images were still visually interlaced. So I tried setting Deinterlacing Mode in LAV to Forced for madVR to treat them as interlaced and it did but I was having the same issue as mzso: madVR was showing deinterlacing on and output was 60 fps, but I could still see the combing artifacts (film mode wasn't on). To solve it I had to uncheck "Use inverse telecine" in NVIDIA's control panel.
Maybe something like that is happening with the DVB app mzso is using?
I have no idea why that happened and how I would achieve the same with AMD as you can't disable IVTC anymore in their control panel.

mzso
2nd March 2021, 21:00
Is that the old issue with DVB Viewer? I thought that had been fixed. :( (Edit: @nevcairiel yes, my bad, I think it was ProgDVB)
I just tested again with an interlaced video in MPC-HC and MediaPortal and with those apps it works.

I'm using SmartDVB.
I faintly remember having a similar problem, which was fixed on madVR's side. I remember it with SmartDVB (but I did use progDVB years ago though, so I'm not certain.)
Doesn't PDVB only have madVR support since not so long ago?

you are not by accident using film mode?
Since I got ample amount of combing I'm quite sure neither mode was active.

huhn
2nd March 2021, 23:20
with film mode on interlaced content you can only get combing and nothing else it only works on telecine content.

VictorLS
2nd March 2021, 23:24
@el Filou
Thanks for reply but I've asked is there any difference between HW acceleration method in case of SAT stream corruption? Or all you've mentioned is equal in your case?
@mzso
Btw I always turn off Inverse Telecine immediately after install nVIDIA's drivers to avoid deinterlacing issues while watching SD channels from SATs with excellent donateware SmartDVB.

mzso
2nd March 2021, 23:40
with film mode on interlaced content you can only get combing and nothing else it only works on telecine content.

Well, all I can say is that madVR's set to force video mode. And even if I cycle between modes manually the video doesn't change.

el Filou
3rd March 2021, 14:25
@mzso Try to go to Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4d36e968-e325-11ce-bfc1-08002be10318}\0000\UMD\DXVA in Registry Editor and change 3to2Pulldown (Binary) to 30 00 00 00 instead of 31 00 00 00 , and 3to2Pulldown_DEF (String) to 0 instead of 1.
I can't guarantee this will work, but worth a try.
(I'm using Radeon Software 20.11.2 WHQL and that is the exact key)@el Filou
Thanks for reply but I've asked is there any difference between HW acceleration method in case of SAT stream corruption? Or all you've mentioned is equal in your case?Wrt handling DVB streams with corruption, on my very old system native DXVA is a bit better than DXVA copyback or CUVID (less stutter). Both are much better than software decoding. But I only have H.264 channels, not H.265.

VictorLS
3rd March 2021, 18:29
@el Filou
Thanks. I've bought GTX750v2 on GM206 special with 1 GB (not 2 GB) videomemory (~100$) to prove to myself 1 GB enough for fluent 4K playing (it's really enough 1 GB videomemory) and it was fluent with EVR and even CUVID but when HDR (HLG) appears EVR (not EVR-CP) give not right colors and madVR requires more than 1 GB videomemory but MPC-BE's MPC-VR shows even Gemini Man H265 4K 60fps sample absolutely fluently with two external shaders. And for 4:2:0 H264 1920x1080i50 (incl. 4:2:2 (https://forum.doom9.org/showthread.php?p=1919134#post1919134)) I don't see difference between software (~30% CPU load) and CUVID or DXVA (native&copy-back) hardware (~10% CPU load) acceleration with my old AthlonII x3 460 - ideally fluent playing in all cases (if CPU isn't loaded with other hard tasks).

LigH
4th March 2021, 09:08
MPC-VR is indeed a bit conservative, compared to madVR, and helped me playing 4K UHD videos on a GT 450 with only 1 GB VRAM where madVR demanded better hardware.

max79
6th March 2021, 02:52
SUPPORT REQUEST - #35
...i got live stream issues: playback stops right after approx 8-10minutes for two hundreds HLS-streams...
@nevcairiel
Thank you Nev! :) Fixed in LAVFilters_v0.74.1-108 :thanks:

UPDATE: Excuse me please for making wrong conclusion. I'm confused because the problem #35 still appears...

Manni
6th March 2021, 14:43
Hi Nev,

Two questions:

1) Does nightly 114 fix the bd menus issue with d3d11 native that we discussed in the jRiver forums?
2) I have LAV and LAV64 installed in the plugins folders of jRiver to have only one install of LAV in the system. How do you get the files only for the nightly builds, in order to avoid having to install LAV with the exe and create a new LAV install?

Thanks!

M.Scott
7th March 2021, 01:43
2) I have LAV and LAV64 installed in the plugins folders of jRiver to have only one install of LAV in the system. How do you get the files only for the nightly builds, in order to avoid having to install LAV with the exe and create a new LAV install?
A zip package of the files alone would be great, simply extract the zip to the existing folder and over-write existing files seems like an easy thing to accomplish.

Note: This is what I do and haven't had any issues and things appear to work, please make sure you're confident this is safe for you, otherwise please keep asking for a zip or 7z archive and ignore my post :)

I haven't used the installer in a while so I don't recall if you can point the installer to your existing folder and over-write existing install but most apps have this functionality.

What I have been doing is using an extraction tool and extracting the contents of the latest beta builds to a temp folder, then moving the updated files into my existing folder.

The tool I use is Universal Extractor 2:
More Info: https://bioruebe.com/dev/uniextract/
Zip Download: https://github.com/Bioruebe/UniExtract2/releases

UE2 extracts the important files to \x86 & \x64 folders, the other stuff is for the installer and can be deleted.

I used a stable release portable version install to make sure I continued to follow the same layout - this is what I grab from the relevant x86/x64 folders, this continues to match my original portable install, the installer may do things different so be careful:
\LAV\ (13 files)
.................. avformat-lav-58.dll
.................. avfilter-lav-7.dll
.................. avcodec-lav-58.dll
.................. avresample-lav-4.dll
.................. swscale-lav-5.dll
.................. LAVAudio.ax
.................. avutil-lav-56.dll
.................. libbluray.dll
.................. LAVVideo.ax
.................. IntelQuickSyncDecoder.dll
.................. LAVSplitter.ax
.................. LAVFilters.Dependencies.manifest
.................. COPYING

Note: The COPYING file was installed with the original portable install so I continue to move it along with the other 12 files, it is likely not needed but it's small and I want to stay consistant.

It took longer to write this versus running UE2 on the latest LAV beta and moving the new files over.

I'm confident if this is a really stupid way to update LAV someone will chime in (I Hope) but it has continued to work for me, LAV is being used with MPC-BE portable and I see the player using the external LAV filters.

HTH & good luck :)

Manni
7th March 2021, 01:52
Hi M.Scott, thanks for this, I’ll wait to hear from Nev but it sounds like an easy solution if there is no zip available for nighties.

wanezhiling
7th March 2021, 12:43
I bought a new laptop with i5-11300H (Iris Xe Graphics)
Driver: latest 27.20.100.9316 (3/3/2021)
LAVFilters-0.74.1-114

LAV AV1 dxva2 decoder is active only in DXVA Checker (https://i.postimg.cc/JmnLkqsr/LAV-in-DXVA-Checker.png), not working with madVR (https://i.postimg.cc/Gr51JyDk/LAV-with-mad-VR.png) or MPC-VR
(https://i.postimg.cc/FNkXPHbw/LAV-with-MPC-VR.png).


ps: tested with many 4k/8k av1 clips(8-bit,10-bit), same result
pps: lav d3d11 decoder, same result

VictorLS
7th March 2021, 17:37
Manni
I do like M.Scott in many years (at first I was using Inno Setup Unpacker Editor but some years ago begin to use latest UniExtract). After extraction I copy all files inside x86 folder to my favorite player KMPlayer and to LAVFilters folder in latest release of MPC-HC (and x64 to LAVFilters64) and register LAV...ax's by myself for using in donateware app SmartDVB to watch SAT channels with latest LAV Filters.
wanezhiling
Thanks for information - while Intel Xe isn't supported by LAV Video Decoder (AV1 and 4:2:2 4:4:4 hardware acceleration) I even don't think about purchasing it (when it'll support h266 VVC hardware acceleration may be will necessary for me tough in case of h266 VVC will become new SAT encoding standard after h265 HEVC) so let us know if AV1 hardware acceleration will work in ordinary players like MPC-HC(BE), please.

Manni
7th March 2021, 21:55
Uniextract works great and nightly 114 resolves the issue with BD menus when using D3D11 native. Thanks for fixing this. :)

Yups
7th March 2021, 22:24
I bought a new laptop with i5-11300H (Iris Xe Graphics)
Driver: latest 27.20.100.9316 (3/3/2021)
LAVFilters-0.74.1-114

LAV AV1 dxva2 decoder is active only in DXVA Checker (https://i.postimg.cc/JmnLkqsr/LAV-in-DXVA-Checker.png), not working with madVR (https://i.postimg.cc/Gr51JyDk/LAV-with-mad-VR.png) or MPC-VR
(https://i.postimg.cc/FNkXPHbw/LAV-with-MPC-VR.png).


ps: tested with many 4k/8k av1 clips(8-bit,10-bit), same result
pps: lav d3d11 decoder, same result


D3d11 decoding should work with this driver and LAV, I've tried it on my Iris Xe - no problem. I believe DXVA2 AV1 has been disabled/deprecated in newest drivers.

https://community.intel.com/t5/Graphics/AV1-DXVA2-decoding-broken-27-20-100-9033/m-p/1250542#M93831

wanezhiling
8th March 2021, 00:02
D3d11 decoding should work with this driver and LAV, I've tried it on my Iris Xe - no problem. I believe DXVA2 AV1 has been disabled/deprecated in newest drivers.

https://community.intel.com/t5/Graphics/AV1-DXVA2-decoding-broken-27-20-100-9033/m-p/1250542#M93831

I tried,LAV d3d11 decoding is active only in DXVA Checker, not working with madVR or MPC-VR either. is something setup wrong here?

VictorLS
8th March 2021, 09:05
wanezhiling
May be wrong player - have you tried in graphstudionext with ordinary EVR (and with EVR in MPC-HC(BE))?

jpsdr
8th March 2021, 18:50
Where do you find recent releases ?
The last official is almost 2 years old...
https://github.com/Nevcairiel/LAVFilters/releases
Are lav filters dead...? :(

jkauff
8th March 2021, 19:01
Nev wrote a few days ago that he's planning a new official release this month. Lots of folks have been doing their own compiles from the nightlies (MPC-HC, K-Lite Codec Pack, etc.).

el Filou
8th March 2021, 19:43
Where do you find recent releases ?
The last official is almost 2 years old...The unmodified nightly builds are here: https://files.1f0.de/lavf/nightly/

wanezhiling
9th March 2021, 05:38
wanezhiling
May be wrong player - have you tried in graphstudionext with ordinary EVR (and with EVR in MPC-HC(BE))?

graphstudionext with ordinary EVR -> blackscreen but d3d11 decoding works


with EVR in MPC-HC(BE -> fall back to sw always

v0lt
9th March 2021, 18:51
The D3D11 decoder will only work on a video renderer that supports D3D11. EVR is not, it only supports D3D9.

VictorLS
9th March 2021, 19:30
@Yups
Thanks for https://community.intel.com/t5/Graphics/AV1-DXVA2-decoding-broken-27-20-100-9033/m-p/1250542#M93831
@wanezhiling
Explain please
d3d11 decoding works
how D3D11 decoding works (except DXVAChecker) namely with your Intel Xe?

Btw can you test colorshift issue (https://forum.doom9.org/showthread.php?p=1919062#post1919062) at first with madVR (as nVIDIA has) and then with any available in MPC-HC(BE) renderer (as Vega8 has) presence with Intel Xe?

Strix
16th March 2021, 07:10
Hey all,

I've taken the jump into MPC-BE w/ LAV and madVR. Followed a very thorough guide to get everything setup and all the profiles are working as intended. I am, however, running into MAJOR issues when attempting to stream any content. I hope it's alright that I've attached a couple public Google Drive links with videos showcasing the behavior. I figure this is some kind of LAVSplitter issue or something... Stock MPC-BE never had problems.

Example 1 (https://drive.google.com/file/d/1Oz4-fiMKgRdoR8p5AgLI3sTT6Ep98kLo/view?usp=sharing)
Example 2 (https://drive.google.com/file/d/1OuMIBrj5GSE41Hi1Wef6u-9O2GKraUwS/view?usp=sharing)

Klaus1189
16th March 2021, 20:13
Just for more info: rightclick on MPC-BE -> Filters > Copy filters list to clipboard -> paste it here.

Strix
16th March 2021, 20:42
Just for more info: rightclick on MPC-BE -> Filters > Copy filters list to clipboard -> paste it here.

Here's what is loaded playing the "Dave" file:

MPC-BE 1.5.6.6000
Filters currently loaded:
- Default DirectSound Device
- madVR Renderer
- Audio Switcher
- LAV Video Decoder
- LAV Audio Decoder
- LAV Splitter
- File Source (URL)

v0lt
18th March 2021, 05:02
@Strix
Try using only "LAV Splitter Source" instead of "File Source (URL)" and "LAV Splitter".

Strix
18th March 2021, 06:30
@Strix
Try using only "LAV Splitter Source" instead of "File Source (URL)" and "LAV Splitter".

I don't believe I see an option to turn off the "File Source (URL)" filter. Would you be able to help me pinpoint where that setting is? All of the Internal Filters are turned off as per the madVR setup instructions.

patul
18th March 2021, 11:53
I don't believe I see an option to turn off the "File Source (URL)" filter. Would you be able to help me pinpoint where that setting is? All of the Internal Filters are turned off as per the madVR setup instructions.

View | Options | External Filters
Add "LAV Splitter Source" to External Filters and choose "Prefer"

Probably will need to block "File Source (URL)" (and probably "File Source (Async)" as well)

Strix
18th March 2021, 19:41
View | Options | External Filters
Add "LAV Splitter Source" to External Filters and choose "Prefer"

Probably will need to block "File Source (URL)" (and probably "File Source (Async)" as well)

Alright, just for posterity and to make sure everything looks correct,

I added "LAV Splitter Source" to the External Filters list and chose "Prefer". I left LAV Splitter checked as well.

https://i.imgur.com/qmNIF0Q.png
https://i.imgur.com/qOdPYbR.png

"LAV Audio Decoder" and "LAV Video Decoder" are also set to "Prefer".

I have no idea where "File Source (URL)" nor "File Source (Async)" are, but just doing the above changes, the Filters list is now:
MPC-BE 1.5.6.6000
Filters currently loaded:
- Default DirectSound Device
- madVR Renderer
- Audio Switcher
- LAV Video Decoder
- LAV Audio Decoder
- LAV Splitter Source

Opening files seems to take a bit longer than stock MPC-BE, but it seems to be working now.

LigH
19th March 2021, 08:12
"File Source (URL)" and "File Source (Async)" are Microsoft Windows original filters, you would possibly have to use "Add Filter ..." to get them in the list to block them... but preferring LAV Splitter Source seems to be sufficient.

nodiaque
19th March 2021, 13:13
Hello everyone,

I'm having an "issue" with the lav splitter. First, it's working fine, I use it in mpc-be and it's great, with MadVR. But, the lav splitter and icons are always present in systray. When I click on the splitter, there's an audio source:

pcm_s16le, 44100 HZ, 2 channels, s16, 1411 kb/s

It does this on 2 totally different computer, one I just recently built (amd 2021 and intel 2009).

My idea here is not to uncheck the show tray icon but to understand what is using the lav filter. It shows up as soon as I start the computer.

Thank you

nevcairiel
19th March 2021, 17:42
Sounds like some application you are using is using it to play audio in the background, and/or not closing down its stuff properly.

clsid
19th March 2021, 18:20
Download Process Explorer:
https://docs.microsoft.com/en-us/sysinternals/downloads/process-explorer

You can use its search function to find out which application is using lavsplitter.ax

Decalicatan_Decalicatan
20th March 2021, 09:49
Hi!

Maybe it is more an issue with my config (MPC-BE or dsplayer with bitstreaming to an AV amplifier) more than with LAV but is there a way to automatically prefer the audio stream with the highest channel numbers, when all stream are of the same quality?

For instance, I have a file with a flac 2.0 (48kHz, 16bits) stream (flagged as default) and a TrueHD 5.1 (48kHz, 24bits). Even with "Prefere Audio Stream with the highest quality" ON, the first stream is always preferred :(...

I use the lastest official release of LAV Filters, i.e 0.74.1. Thanks in advance

nevcairiel
20th March 2021, 10:51
LAV would do that by default, your player is likely overriding the choice.

Decalicatan_Decalicatan
20th March 2021, 12:10
thanks.
I will try to find which setting in the players is the culprit....

clsid
20th March 2021, 13:39
Actually, if the track is flagged as default, then that overrides the quality option, right?

Decalicatan_Decalicatan
20th March 2021, 15:35
Actually, if the track is flagged as default, then that overrides the quality option, right?

Looks that way, sadly. Thanks for the info.

I updated the header of one of the file with mkvtoolnix to force the default flag as No for both audio tracks. Now the 5.1 tracks is now preferreed as wanted.

Too bad the default flag overrides the quality option. Sometimes I don't want to update the headers, either because I'm too lazy ^^ or to keep the files as they were.

wanezhiling
20th March 2021, 16:31
Is there anything wrong with this file (https://mega.nz/file/tldUWDIL#_9TJvQkIne-Bhfb07SNVPSeVIOXGnhAC7H5xuvvDp3o)?
Set LAV output YV12 with evr, blackscreen.
Only happens on intel though

VictorLS
22nd March 2021, 16:42
Is there anything wrong with this file (https://mega.nz/file/tldUWDIL#_9TJvQkIne-Bhfb07SNVPSeVIOXGnhAC7H5xuvvDp3o)?
Set LAV output YV12 with evr, blackscreen.
Only happens on intel though
On Intel i3-8100 with 630 graphics (Coffee Lake) I see not fluent video with YV12 and with EVR in DXVA2(native) mode - in other hardware acceleration modes (even None) malevich.
Moreover in many cases I found just one way to play hard videos (like GeminiMan 4K 60Hz h265 10bit 4:2:0) fluently - play them in ordinary mpv with hwdec=d3d11va (or with lighter files hwdec=dxva2) in mpv.conf file near mpv.exe

LAV AV1 dxva2 decoder is active only in DXVA Checker (https://i.postimg.cc/JmnLkqsr/LAV-in-DXVA-Checker.png), not working with madVR (https://i.postimg.cc/Gr51JyDk/LAV-with-mad-VR.png) or MPC-VR
(https://i.postimg.cc/FNkXPHbw/LAV-with-MPC-VR.png)
Ordinary mpv has big advantage over other players like MPC-HC(BE) on Coffee Lake (of course, it can't accelerate AV1) - it doesn't use Video Processing (even DXVA Checker used Video Processing sometimes) so try lastest version of mpv (https://mpv.io) to get hardware acceleration of AV1.

wanezhiling
23rd March 2021, 01:59
@VictorLS
thanks.

mpv is light and fast for intel indeed, i tried it before.
but for me, mpc-be is more friendly and full features.

ps: do you get same result like this (https://community.intel.com/t5/Graphics/color-problem-when-using-evr/m-p/1266233)?



---------------------
another request for assistance, can you test whether native dxva decoding works in graphstudionext (https://github.com/cplussharp/graph-studio-next) on your UHD 630 graphics? you can test any video files with evr renderer

always sw decoding (https://i.postimg.cc/7wc8yT5n/QQ-20210323100152.jpg) for me, whatever mpc decoder or lav decoder... i just don't know why

VictorLS
23rd March 2021, 16:18
mpv is light and fast for intel indeed, i tried it before...always sw decoding for me, whatever mpc decoder or lav decoder... i just don't know why
So try mpv now to see what will happen with hardware acceleration while playing various files in that light (but I agree - not user-friendly) player.
but for me, mpc-be is more friendly and full features.
Usually I use old KMPlayer (for best usability) but once it can't DXVA2 with LAV Video Decoder and MPC-VR I use MPC-HC(BE) instead and seldom PotPlayer (on left button click to switch on/off HDR processing).
ps: do you get same result like this?
I'm not sure but this (not mine) Coffee Lake first show not washed out colors while playing HDR(HLG) files but I didn't like that colors.
another request for assistance, can you test whether native dxva decoding works in graphstudionext (https://github.com/cplussharp/graph-studio-next) on your UHD 630 graphics? you can test any video files with evr renderer
Before this Coffee Lake with default 26.20.100.7262 driver (at the end of experiments I offline - that computer mustn't have Internet connection at all - overwrite with igfx_win10_100.9316.exe almost half-terabyte videodriver but of course it isn't add non-integer frequencies like 47,952Hz - I've just found in registry key to change modes (https://disk.yandex.ru/d/Slh69oZ8Y7_4iw) without any other programs like CRU) gone to it's owner I tried graphstudionext64-0.7.1.61.exe (https://www.videohelp.com/software/GraphStudio) and LAV Video Decoder DXVA2(native) - EVR was always active (of course, on supported files) but playing was far from fluent (even if resources are mostly free - even DXVA Checker can't full load 630 as mine nVIDIA GTX750v2) on hard files like your 170325 Magic SEOHYUN... VP9 file (https://mega.nz/file/tldUWDIL#_9TJvQkIne-Bhfb07SNVPSeVIOXGnhAC7H5xuvvDp3o) or GeminiMan 4K 60Hz h265 10bit 4:2:0
https://i.postimg.cc/KkzcKPp8/mpv-d3d11va.png (https://postimg.cc/KkzcKPp8)
Btw can you set new non-integer (real) vertical frequencies on your Tiger Lake?

Klaus1189
23rd March 2021, 19:04
I have a question regarding the WEBVTT support added in latest nightly build:
https://github.com/Nevcairiel/LAVFilters/issues/80

I made a testfile and muxed a WEBVTT subtitle into a MKV using latest continuous build of MKVToolNix 55.0:
https://drive.google.com/file/d/1euLqLi02YvRhWqpx99clO2NvWwRjnnWv/view?usp=sharing

Subtitle is not listed in MPC-BE, but if I use internal filters it is.
I don't know, perhaps there is support for external files only, I don't know. Please help :)

nodiaque
23rd March 2021, 20:41
Download Process Explorer:
https://docs.microsoft.com/en-us/sysinternals/downloads/process-explorer

You can use its search function to find out which application is using lavsplitter.ax

Hello,

I just tried and no dice, nothing come up. I tried lav* and lav?, no dice. Even on fresh boot it's already there :(

Thanks!

clsid
23rd March 2021, 23:33
It does not support (or need) wildcard characters. Just search for lav and it will show everything that contains that string.

nevcairiel
24th March 2021, 09:44
I have a question regarding the WEBVTT support added in latest nightly build:
https://github.com/Nevcairiel/LAVFilters/issues/80

I made a testfile and muxed a WEBVTT subtitle into a MKV using latest continuous build of MKVToolNix 55.0:
https://drive.google.com/file/d/1euLqLi02YvRhWqpx99clO2NvWwRjnnWv/view?usp=sharing

Subtitle is not listed in MPC-BE, but if I use internal filters it is.
I don't know, perhaps there is support for external files only, I don't know. Please help :)

Shows up just fine for me in MPC-HC with the latest nightly build.
Note that I have no idea what kind of support MPC-BE has for WebVTT subtitles, they may not support the way LAV Splitter exports them (which is based on the Microsoft Media Foundation subtype as well as the WebM Packet format), since there is no "official" way.

In case anyone is interested in adding support for WebVTT, the format is pretty simple, so i'll quickly outline below how LAV Splitter exports it to DirectShow:

MediaSubtype = {C886D215-F485-40BB-8DB6-FADBC619A45D} = MFSubtitleFormat_WebVTT
Packet Format based on the WebM packaging:
- First Line: WebVTT Cue Identifier, if any, or an empty line
- Second Line: WebVTT Cue Settings, if any, or an empty line
- Third Line onwards: Actual subtitles

The first/second line are always present, even if they are entirely empty and are just a line-break, so if a parser does not care for this information, they can always skip the first and/or second line to get to the subtitle data.
All possible combinations of line-breaks are allowed, although LAV will always use a windows-style CRLF linebreak.

stax76
25th March 2021, 03:02
But there are very user-friendly frontends:

https://github.com/mpv-player/mpv/wiki/Applications-using-mpv

One of them is a little project of mine, ok it's nowadays my favorite project since I gave up encoding.

digimaster
25th March 2021, 09:14
Hi,

I have an issue with a MOV file, captured with Blackmagic Card: it's an HDR file (Mediainfo confirm this) but Lav Video seems not to pass the correct data to Madvr that shows REC709 (best guess), no REC2020, no HDR.

And now, the really strange thing: if I use FFmpeg to mux this file in a MKV container, LAV pass the right data to Madvr (REC2020, HDR with correct metadata).

This is the MOV Mediainfo:

General
Complete name Untitled 01.mov
Format : MPEG-4
Format profile : QuickTime
Codec ID : qt 2005.03 (qt )
File size : 1.24 GiB
Duration : 6 s 629 ms
Overall bit rate : 1 604 Mb/s
Encoded date : UTC 2021-03-24 16:42:15
Tagged date : UTC 2021-03-24 16:42:15
Writing library : Apple QuickTime
TIM : 00:00:00:00
TSC : 24000
TSZ : 1001

Video
ID : 1
Format : YUV
HDR format : SMPTE ST 2086, HDR10 compatible
Codec ID : v210
Codec ID/Hint : AJA Video Systems Xena
Duration : 6 s 629 ms
Duration_LastFrame : 4 s 127 ms
Bit rate mode : Constant
Bit rate : 4 242 Mb/s
Width : 3 840 pixels
Clean aperture width : pixel0
Height : 2 160 pixels
Clean aperture height : 2 160 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 23.976 (24000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:2
Bit depth : 10 bits
Scan type : Progressive
Compression mode : Lossless
Bits/(Pixel*Frame) : 21.333
Stream size : 1.24 GiB (100%)
Language : English
Encoded date : UTC 2021-03-24 16:42:15
Tagged date : UTC 2021-03-24 16:42:15
Color primaries : BT.2020
Transfer characteristics : PQ
Matrix coefficients : BT.2020 non-constant
Mastering display color primaries : Display P3
Mastering display luminance : min: 0.0000 cd/m2, max: 1000 cd/m2
Maximum Content Light Level : 1000 cd/m2
Maximum Frame-Average Light Level : 400 cd/m2

Audio
ID : 2
Format : PCM
Format settings : Little / Signed
Codec ID : in24
Duration : 6 s 629 ms
Bit rate mode : Constant
Bit rate : 2 304 kb/s
Channel(s) : 2 channels
Channel layout : L R
Sampling rate : 48.0 kHz
Bit depth : 24 bits
Stream size : 1.82 MiB (0%)
Language : English
Encoded date : UTC 2021-03-24 16:42:15
Tagged date : UTC 2021-03-24 16:42:15

Other
ID : 3
Type : Time code
Format : QuickTime TC
Duration : 6 s 629 ms
Frame rate : 23.976 (24000/1001) FPS
Time code of first frame : 00:00:00:00
Time code, striped : Yes
Title : 001
Language : English
Encoded date : UTC 2021-03-24 16:42:15
Tagged date : UTC 2021-03-24 16:42:15

This is the MKV Mediainfo (video only):

General
Unique ID : 63447010645303056334747674940859238427 (0x2FBB732405003FF5758FB55567D8481B)
Complete name Untitled 01.mkv
Format : Matroska
Format version : Version 4
File size : 1.24 GiB
Duration : 6 s 629 ms
Overall bit rate : 1 602 Mb/s
Writing application : Lavf58.47.100
Writing library : Lavf58.47.100
ErrorDetectionType : Per level 1

Video
ID : 1
Format : YUV
HDR format : SMPTE ST 2086, HDR10 compatible
Codec ID : V_MS/VFW/FOURCC / v210
Codec ID/Hint : AJA Video Systems Xena
Duration : 6 s 629 ms
Bit rate : 1 570 Mb/s
Width : 3 840 pixels
Height : 2 160 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 24.000 FPS
Color space : YUV / YUV
Chroma subsampling : 4:2:2
Bit depth : 10 bits
Compression mode : Lossless
Bits/(Pixel*Frame) : 7.885
Time code of first frame : 00:00:00:00
Time code source : Matroska tags
Stream size : 1.21 GiB (98%)
Writing library : Uncompressed 10-Bit YUV
Language : English
Default : Yes
Forced : No
Color primaries : BT.2020
Transfer characteristics : PQ
Matrix coefficients : BT.2020 non-constant
Mastering display color primaries : Display P3
Mastering display luminance : min: 0.0000 cd/m2, max: 1000 cd/m2
Maximum Content Light Level : 1000
Maximum Frame-Average Light Level : 400

Any suggestions?

Thanks!

Aleksoid1978
25th March 2021, 10:22
Hi,

I have an issue with a MOV file, captured with Blackmagic Card: it's an HDR file (Mediainfo confirm this) but Lav Video seems not to pass the correct data to Madvr that shows REC709 (best guess), no REC2020, no HDR.

And now, the really strange thing: if I use FFmpeg to mux this file in a MKV container, LAV pass the right data to Madvr (REC2020, HDR with correct metadata).

This is the MOV Mediainfo:

General
Complete name Untitled 01.mov
Format : MPEG-4
Format profile : QuickTime
Codec ID : qt 2005.03 (qt )
File size : 1.24 GiB
Duration : 6 s 629 ms
Overall bit rate : 1 604 Mb/s
Encoded date : UTC 2021-03-24 16:42:15
Tagged date : UTC 2021-03-24 16:42:15
Writing library : Apple QuickTime
TIM : 00:00:00:00
TSC : 24000
TSZ : 1001

Video
ID : 1
Format : YUV
HDR format : SMPTE ST 2086, HDR10 compatible
Codec ID : v210
Codec ID/Hint : AJA Video Systems Xena
Duration : 6 s 629 ms
Duration_LastFrame : 4 s 127 ms
Bit rate mode : Constant
Bit rate : 4 242 Mb/s
Width : 3 840 pixels
Clean aperture width : pixel0
Height : 2 160 pixels
Clean aperture height : 2 160 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 23.976 (24000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:2
Bit depth : 10 bits
Scan type : Progressive
Compression mode : Lossless
Bits/(Pixel*Frame) : 21.333
Stream size : 1.24 GiB (100%)
Language : English
Encoded date : UTC 2021-03-24 16:42:15
Tagged date : UTC 2021-03-24 16:42:15
Color primaries : BT.2020
Transfer characteristics : PQ
Matrix coefficients : BT.2020 non-constant
Mastering display color primaries : Display P3
Mastering display luminance : min: 0.0000 cd/m2, max: 1000 cd/m2
Maximum Content Light Level : 1000 cd/m2
Maximum Frame-Average Light Level : 400 cd/m2

Audio
ID : 2
Format : PCM
Format settings : Little / Signed
Codec ID : in24
Duration : 6 s 629 ms
Bit rate mode : Constant
Bit rate : 2 304 kb/s
Channel(s) : 2 channels
Channel layout : L R
Sampling rate : 48.0 kHz
Bit depth : 24 bits
Stream size : 1.82 MiB (0%)
Language : English
Encoded date : UTC 2021-03-24 16:42:15
Tagged date : UTC 2021-03-24 16:42:15

Other
ID : 3
Type : Time code
Format : QuickTime TC
Duration : 6 s 629 ms
Frame rate : 23.976 (24000/1001) FPS
Time code of first frame : 00:00:00:00
Time code, striped : Yes
Title : 001
Language : English
Encoded date : UTC 2021-03-24 16:42:15
Tagged date : UTC 2021-03-24 16:42:15

This is the MKV Mediainfo (video only):

General
Unique ID : 63447010645303056334747674940859238427 (0x2FBB732405003FF5758FB55567D8481B)
Complete name Untitled 01.mkv
Format : Matroska
Format version : Version 4
File size : 1.24 GiB
Duration : 6 s 629 ms
Overall bit rate : 1 602 Mb/s
Writing application : Lavf58.47.100
Writing library : Lavf58.47.100
ErrorDetectionType : Per level 1

Video
ID : 1
Format : YUV
HDR format : SMPTE ST 2086, HDR10 compatible
Codec ID : V_MS/VFW/FOURCC / v210
Codec ID/Hint : AJA Video Systems Xena
Duration : 6 s 629 ms
Bit rate : 1 570 Mb/s
Width : 3 840 pixels
Height : 2 160 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 24.000 FPS
Color space : YUV / YUV
Chroma subsampling : 4:2:2
Bit depth : 10 bits
Compression mode : Lossless
Bits/(Pixel*Frame) : 7.885
Time code of first frame : 00:00:00:00
Time code source : Matroska tags
Stream size : 1.21 GiB (98%)
Writing library : Uncompressed 10-Bit YUV
Language : English
Default : Yes
Forced : No
Color primaries : BT.2020
Transfer characteristics : PQ
Matrix coefficients : BT.2020 non-constant
Mastering display color primaries : Display P3
Mastering display luminance : min: 0.0000 cd/m2, max: 1000 cd/m2
Maximum Content Light Level : 1000
Maximum Frame-Average Light Level : 400

Any suggestions?

Thanks!

Upload MOV.

digimaster
25th March 2021, 11:30
Here you go:

https://we.tl/t-32ohn4k4XH

Thanks!

Aleksoid1978
25th March 2021, 12:42
Here you go:

https://we.tl/t-32ohn4k4XH

Thanks!

You file don't contain info about: Color primaries, Transfer characteristics and Matrix coefficients. Only HDR metadata.

digimaster
25th March 2021, 13:04
Yeah, but the same file in MKV container play well. So...

And, in any case, a file with these specs can't be REC709, no HDR...

digimaster
25th March 2021, 17:33
This one has all info (Color primaries, Transfer characteristics and Matrix coefficients), same issue:

https://we.tl/t-0gqx7SuLFP

Thanks for your help!

Qotscha
25th March 2021, 18:12
Are there plans to add support for WebVTT also with HLS (example (https://demo.unified-streaming.com/video/tears-of-steel/tears-of-steel-multiple-subtitles.ism/.m3u8))?

nevcairiel
26th March 2021, 08:21
Are there plans to add support for WebVTT also with HLS (example (https://demo.unified-streaming.com/video/tears-of-steel/tears-of-steel-multiple-subtitles.ism/.m3u8))?

The HLS parser does not fully support subtitles yet, so no immediate plans right now.

digimaster
30th March 2021, 10:08
Hi Nev,

Have you had the chance to read my previous post? This issue seems incomprehensible...

Thanks for your help!

nevcairiel
30th March 2021, 13:35
LAV Filters 0.75

LAV Splitter
- NEW: Support for DASH streaming
- NEW: WebVTT support in Matroska/WebM
- Changed: Improved Font support from Matroska files
- Fixed: Large queue size limits could result in the wrong limit being applied
- Fixed: Resolved a memory leak in Matroska demuxing
- Fixed: Avoid selecting a stream with only a single video frame in MP4 files, which is often a cover art
- Fixed: Seeking in Matroska files with only audio cue points did not function
- Fixed: Seeking to the beginning of certain HLS streams did not work properly
- Fixed: Duration information in Matroska files is more reliable

LAV Video
- NEW: AV1 DXVA2/D3D11 hardware decoding support
- NEW: ProRes 4444 XQ support
- Faster: Updated dav1d decoder and improved thread configuration for significantly improved AV1 decoding speed
- Fixed: Added a workaround for VP9 hardware decoding on AMD video cards
- Fixed: H.264 streams exceeding the Level 5.1 DPB limit will no longer be hardware decoded
- Fixed: Improved handling of missing reference frames in H.264 streams with hardware decoding
- Fixed: HEVC streams encoding 8-bit video in a Main10 profile can be properly hardware decoded
- Deprecated: NVIDIA CUVID and Intel QuickSync have been deprecated for future removal/replacement

LAV Audio
- Fixed: Resolved an issue with glitching TrueHD bitstreaming on seamless-branching titles
- Fixed: Resolved a compatibility issue with some playback applications
- Deprecated: Support for the binary DTS decoder (dtsdecoderdll.dll) has been deprecated for future removal

Download: Installer (both x86/x64) (https://files.1f0.de/lavf/LAVFilters-0.75.exe) -- Zips: 32-bit (https://files.1f0.de/lavf/LAVFilters-0.75.zip) & 64-bit (https://files.1f0.de/lavf/LAVFilters-0.75-x64.zip)

Its been two years since the last release, which is a factor of LAV getting more mature/stable and the last two years being rather busy to complete a few changes I wanted for the next release.
Some of those changes have been worked on, some have been postponed for the next version, hopefully not in two more years.

Lets dive into some of the notable improvements since 0.74

AV1 improvements and DXVA2/D3D11 support

A lot has changed in the AV1 landscape in the last two years. The dav1d decoder is a lot faster now, and we finally have hardware acceleration on all three major GPU vendors, NVIDIA 30-series, AMD 6000 series, and Intel Xe.
One caveat for hardware decoding, film grain synthesis may not work on Intel or AMD. Due to lack of hardware I did not have the ability to test. On NVIDIA 30-series, it works, however.

DASH streaming

LAV Splitter now supports rudimentary DASH streaming, through FFmpeg. However, I must note that the DASH demuxer in FFmpeg is not perfect, and I can only provide it "as-is", and would suggest to reproduce and report issues with DASH streams directly to FFmpeg.

WebVTT support
LAV Splitter now supports demuxing WebVTT subtitles from Matroska/WebM, as well as from stand-alone files.
As with any new subtitle standard, support in the subtitle renderer is required to display them.

If any developers of subtitle renderers/players are interested in adding support for WebVTT, I've documented the basic packet format that LAV Splitter sends here:
https://forum.doom9.org/showthread.php?p=1938913#post1938913

Matroska improvements

A lot of improvements for Matroska have accumulated. Better font support, support for the Matroska rotation tags, improved seeking, better duration reporting on some oddly muxed Matroska files, and overall fixes.

Hardware acceleration improvements

In LAV Video, nearly everything is about hardware accelerated decoding. Additional checks to avoid decoding incompatible streams with hardware, improvements to handle streams in hardware that previously could not, and fixes to error concealment with missing frames.

Deprecations

I'm sure some of these will be controversial, but they currently just suffer bitrot and lack key features.

NVIDIA CUVID and Intel QuickSync are deprecated, not recommended for usage, and will be removed in a future version.

However, there is some light at the end of the tunnel. A replacement for the old CUVID implementation, which had serious deficiencies, will hopefully be available at the same time, based on FFmpegs NVDEC hardware acceleration support, which solves many of the shortcomings (like missing HDR metadata, among other things), while still providing deinterlacing out of the box. And maybe even with D3D11 interop, which means that it could devlier d3d11 native frames to the renderer, and avoid the copy-back overhead.

As for Intel QuickSync, frankly Intels decoding API is cumbersome to work with, I have no modern Intel GPU available to me, and unless key advantages come to light to give it the same treatment as CUVID/NVDEC, it should simply get replaced by DXVA2/D3D11.
As a bonus, it might be possible to enable decoder-based deinterlacing for DXVA2/D3D11, even in native-decoding mode, but I cannot promise this and its mostly a theoretical thought at the moment.

A bit more clearcut, the old binary dtsdecoderdll.dll support is also scheduled for removal from LAV Audio. With the complete FFmpeg DTS-HD decoder it serves practically no purpose anymore, and the software its from no longer exists.

As always, please report issues, specifically regressions, in as much detail as possible with a sample file if applicable.

Have fun!

digimaster
30th March 2021, 13:55
Hi Nev,

I've just tried this new release, unfortunately the issue is still there...

nevcairiel
30th March 2021, 14:12
There were no claims to have it fixed, and repeatedly asking isn't going to make it so either. :)
I do not have the time to immediately investigate any forum post. If you want to make sure it gets seen, there is a bug tracker for it, include all the details and the file.

digimaster
30th March 2021, 14:21
My previous post was only for info purpose, not to complain in any way. I'm going to the Bug Tracker just now.

Thanks for your great work!

SamuriHL
30th March 2021, 14:40
Looks like a nice solid build, thanks! Looking forward to trying the new nVidia side of that when it's ready. That sounds intriguing.

VBB
30th March 2021, 18:21
Thanks Nev!

chros
30th March 2021, 21:24
Me. too!

el Filou
31st March 2021, 10:24
Anyone else getting a "this file is not often downloaded and might be dangerous" when downloading the last release with Chrome?
I get that with Windows SmartScreen but I never got that in Chrome even with the nightlies. Oh well, passed it through VirusTotal and there wasn't any warning, but still strange.

jmone
31st March 2021, 11:12
Thanks Nev! Lots of goodies to try.

AV1 Questions:
- Does it support Main (0), High (1), and Professional (2) profiles?
- Any one have links to UHD AV1 Samples at various frame rates etc?

nevcairiel
31st March 2021, 11:38
In Software, any single AV1 file should be supported.

In Hardware, only Main profile is supported for now, even though the specification includes support for more modes, until I get hardware that can handle it, there is little I can do.

nevcairiel
31st March 2021, 11:41
Anyone else getting a "this file is not often downloaded and might be dangerous" when downloading the last release with Chrome?
I get that with Windows SmartScreen but I never got that in Chrome even with the nightlies. Oh well, passed it through VirusTotal and there wasn't any warning, but still strange.

These warnings are how Microsoft wants you to buy expensive EV certificates, as thats the only way to by-pass it entirely. They have absolute no data on the file being "bad", they just throw a warning at you because they don't know it, and you didn't pay them to avoid it.

Otherwise, it'll go away after a while as those checks get used to the file. The issue being exacerbated as I got a new signing certificate, the old one expired.

jmone
31st March 2021, 23:46
...good point, looks like the current 30 series only supports decoding Main profile (8 or 10 bit, 4:2:0 or 4:0:0) but all the way to Level 6 (up to 8K@30fps or 4K@120fps). Shame options for AV1 encoder support is still not that great.

tormento
1st April 2021, 14:57
Out of curiosity: why to deprecate CUVID if the withdraw is to lose the hardware deinterlacer? Can't find any way to have it back with other methods.

wai148
1st April 2021, 15:10
hardware deinterlacer CUVID very good

onekmilesbehind
1st April 2021, 15:27
Out of curiosity: why to deprecate CUVID if the withdraw is to lose the hardware deinterlacer? Can't find any way to have it back with other methods.

Check the "Deprecations" section of Nev's most recent release notes, a successor implementation should be available in the future.

nevcairiel
1st April 2021, 16:34
Out of curiosity: why to deprecate CUVID if the withdraw is to lose the hardware deinterlacer? Can't find any way to have it back with other methods.

Because it has no future, and already several problems, and leaving something around to suffer bitrot because it could be useful for someone is not how I work.

levizx
2nd April 2021, 00:01
looks awesome!

one issue i have is right now my laptop has intel gen 10 (no av1) and rtx30, the only combination that works is to use d3d11+manually choose rtx30, d3d11+auto defaults to intel, and both dxva2 options require an active display so these are out.

is there any chance to add hw capability detection to use discreet gpu for av1 only if the cpu/apu doesn't support it (such as intel up to gen10 amd amd apu with vega)?

Thank you.

nevcairiel
2nd April 2021, 00:22
Its a one-time setup step to select the more capable GPU, auto-detection wouldn't add any additional capability and add quite a bunch of additional layers, so not likely. "Native" modes are required to share the device with the renderer (the renderer picks), so those don't get a choice anyway.

Marsu42
2nd April 2021, 09:38
LAV Filters 0.75
[CODE]
One caveat for hardware decoding, film grain synthesis may not work on Intel or AMD. Due to lack of hardware I did not have the ability to test. On NVIDIA 30-series, it works, however.


Is there a specific concern film grain synthesis might not work on non-Nvidia hardware, or is it simply due to lack of test hardware? Thanks!

mts1
2nd April 2021, 20:31
Hi guys.

I have a question about VP9 hardware acceleration using Radeon WX 7100.
Is it possible to have it with LAV Filters?
If not, would it be possible to have it in the near future? Or this is dead end?
Perhaps you know any other way/filters to achieve that?

Thanks.

huhn
3rd April 2021, 02:01
this is a polaris based card the VP9 decoder is hybrid which is often worse than just using the CPU and is currently not available at all there where only a could of old drivers where it worked in chrome.

i have not rechecked this information in a long time so things could be different but it should still be a dead end.

levizx
3rd April 2021, 10:23
Its a one-time setup step to select the more capable GPU.

yes, it's more capable, but also much more power hungry. that's not good for a laptop and sometimes defeats the purpose of having hw decoder altogether.

mts1
3rd April 2021, 14:41
this is a polaris based card the VP9 decoder is hybrid which is often worse than just using the CPU and is currently not available at all there where only a could of old drivers where it worked in chrome.

i have not rechecked this information in a long time so things could be different but it should still be a dead end.

Got it.
Thanks.

Sunspark
3rd April 2021, 17:16
I think I have located a video decoding bug, but I am not certain if the issue is LAV or another part of the chain.

A 10-bit P010 anime file is the source, being displayed in D3D9 exclusive on Windows 10.

DXVA2 Copy-Back - Works
DXVA2 Native - Video is split in two, left half is purple tinted, and right half is a solid block of green
Intel Quicksync - Works
DX11 Native - Image freezes
DX11 Copy-Back - Works

The issue with the DXVA2 and DX11 Native modes doesn't happen with non-P010 videos. I also checked and it was present in the previous release as well.

wanezhiling
4th April 2021, 14:41
Hi, lav hw decoding seems not work with this clip (https://mega.nz/file/Y18ATDIL#jW3ArmEYBFmoLtz33oMGc6cTuFgh1p4yIGQPliYAVM0), always sw decoding.

anyone confirm?

el Filou
4th April 2021, 15:14
A 10-bit P010 anime file is the source [...] The issue with the DXVA2 and DX11 Native modes doesn't happen with non-P010 videos.P010 is normally an output format, what's the video format + encoding (level, profile, other coding parameters)? Maybe post the video section of MediaInfo.
What's the hardware and driver? Does this also happen with older/newer drivers?
What's the video renderer? Does it also happen with other renderers/other modes than D3D9 exclusive?

Sunspark
4th April 2021, 18:15
P010 is normally an output format, what's the video format + encoding (level, profile, other coding parameters)? Maybe post the video section of MediaInfo.
What's the hardware and driver? Does this also happen with older/newer drivers?
What's the video renderer? Does it also happen with other renderers/other modes than D3D9 exclusive?

Hardware is an Intel HD Graphics 6000 (Broadwell CPU). MadVR .92.17 is the video renderer. The image/chroma scaling I'm using with it is DXVA.

Mediainfo below. Looking at it, I didn't realize that it was HEVC.. Interesting! I guess that explains why my CPU was running higher than expected while it was playing since on this GPU for things like VP9 it runs in hybrid mode (both cpu and some functions in gpu).

Video
ID : 1
Format : HEVC
Format/Info : High Efficiency Video Coding
Format profile : Main 10@L4@Main
Codec ID : V_MPEGH/ISO/HEVC
Duration : 24 min 21 s
Bit rate : 3 078 kb/s
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 23.976 (24000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 10 bits
Bits/(Pixel*Frame) : 0.062
Stream size : 536 MiB (87%)
Writing library : x265 3.3+2-gbe2d82093:[Windows][GCC 9.2.0][64 bit] 10bit
Encoding settings : cpuid=1111039 / frame-threads=4 / numa-pools=24 / wpp / no-pmode / no-pme / no-psnr / no-ssim / log-level=2 / input-csp=1 / input-res=1920x1080 / interlace=0 / total-frames=35040 / level-idc=0 / high-tier=1 / uhd-bd=0 / ref=4 / no-allow-non-conformance / no-repeat-headers / annexb / no-aud / no-hrd / info / hash=0 / no-temporal-layers / open-gop / min-keyint=23 / keyint=250 / gop-lookahead=0 / bframes=8 / b-adapt=2 / b-pyramid / bframe-bias=0 / rc-lookahead=25 / lookahead-slices=4 / scenecut=40 / hist-scenecut=0 / radl=0 / no-splice / no-intra-refresh / ctu=64 / min-cu-size=8 / rect / no-amp / max-tu-size=32 / tu-inter-depth=1 / tu-intra-depth=1 / limit-tu=0 / rdoq-level=2 / dynamic-rd=0.00 / no-ssim-rd / signhide / no-tskip / nr-intra=0 / nr-inter=0 / no-constrained-intra / strong-intra-smoothing / max-merge=3 / limit-refs=3 / limit-modes / me=3 / subme=3 / merange=57 / temporal-mvp / no-frame-dup / no-hme / weightp / no-weightb / no-analyze-src-pics / deblock=1:1 / sao / no-sao-non-deblock / rd=4 / selective-sao=4 / no-early-skip / rskip / no-fast-intra / no-tskip-fast / no-cu-lossless / no-b-intra / no-splitrd-skip / rdpenalty=0 / psy-rd=1.00 / psy-rdoq=1.00 / no-rd-refine / no-lossless / cbqpoffs=0 / crqpoffs=0 / rc=crf / crf=18.0 / qcomp=0.60 / qpstep=4 / stats-write=0 / stats-read=0 / ipratio=1.40 / pbratio=1.30 / aq-mode=3 / aq-strength=0.80 / cutree / zone-count=0 / no-strict-cbr / qg-size=32 / no-rc-grain / qpmax=69 / qpmin=0 / no-const-vbv / sar=0 / overscan=0 / videoformat=5 / range=0 / colorprim=2 / transfer=2 / colormatrix=2 / chromaloc=0 / display-window=0 / cll=0,0 / min-luma=0 / max-luma=1023 / log2-max-poc-lsb=8 / vui-timing-info / vui-hrd-info / slices=1 / no-opt-qp-pps / no-opt-ref-list-length-pps / no-multi-pass-opt-rps / scenecut-bias=0.05 / hist-threshold=0.01 / no-opt-cu-delta-qp / no-aq-motion / no-hdr10 / no-hdr10-opt / no-dhdr10-opt / no-idr-recovery-sei / analysis-reuse-level=0 / analysis-save-reuse-level=0 / analysis-load-reuse-level=0 / scale-factor=0 / refine-intra=0 / refine-inter=0 / refine-mv=1 / refine-ctu-distortion=0 / no-limit-sao / ctu-info=0 / no-lowpass-dct / refine-analysis-type=0 / copy-pic=1 / max-ausize-factor=1.0 / no-dynamic-refine / no-single-sei / no-hevc-aq / no-svt / no-field / qp-adaptation-range=1.00 / no-scenecut-aware-qpconformance-window-offsets / right=0 / bottom=0
Default : Yes
Forced : No

nevcairiel
4th April 2021, 19:26
Hi, lav hw decoding seems not work with this clip (https://mega.nz/file/Y18ATDIL#jW3ArmEYBFmoLtz33oMGc6cTuFgh1p4yIGQPliYAVM0), always sw decoding.

anyone confirm?

The video has too many reference frames. H.264 4K at Level 5.1 only supports up to 5, not 16 as the video uses.

DMU
5th April 2021, 01:18
anyone confirm?

CPU: AMD Ryzen 3 3200G with Radeon Vega Graphics
GPU: AMD Radeon(TM) Vega 8 Graphics
Decoder: LAV Video Decoder
Decoder Device: H264_VLD_NoFGT
Frames: 1798
FPS: 174.177 [152-182]
CPU Usage: -
GPU 3D Engine Usage: 15 [14-16] %
GPU Video Codec 0 Engine Usage: 93 [86-95] %

wanezhiling
5th April 2021, 02:54
The video has too many reference frames. H.264 4K at Level 5.1 only supports up to 5, not 16 as the video uses.
Got it, thanks.

CPU: AMD Ryzen 3 3200G with Radeon Vega Graphics
GPU: AMD Radeon(TM) Vega 8 Graphics
Decoder: LAV Video Decoder
Decoder Device: H264_VLD_NoFGT
Frames: 1798
FPS: 174.177 [152-182]
CPU Usage: -
GPU 3D Engine Usage: 15 [14-16] %
GPU Video Codec 0 Engine Usage: 93 [86-95] %
As nevcairiel explained above, LAV won't decode such file in hw, so maybe something is wrong on your side?

DMU
5th April 2021, 10:55
I would be glad if you find something wrong on my side.
Pic (https://drive.google.com/file/d/11eT_8pLURN6uNvxUAfuvgr23Nejauh5W/view?usp=sharing).

wanezhiling
5th April 2021, 11:59
I would be glad if you find something wrong on my side.
Pic (https://drive.google.com/file/d/11eT_8pLURN6uNvxUAfuvgr23Nejauh5W/view?usp=sharing).

Because you are using an old LAV build(0.74.1-92) which still supports such H.264 file in hw decoding.

Update your MPC-HC (https://github.com/clsid2/mpc-hc/releases) and your lav will lose that ability.:p

el Filou
5th April 2021, 12:35
Hardware is an Intel HD Graphics 6000 (Broadwell CPU). [...] Looking at it, I didn't realize that it was HEVC.. Interesting!Interesting indeed, because IIRC the HEVC decoder in Broadwell was hybrid (used GPU compute and not fixed function unit), so maybe that's where the difference comes from? I would think it's a driver problem but it's hard to know really. Does it give a corrupt image too when using standard EVR ?

VictorLS
5th April 2021, 19:57
Because you are using an old LAV build(0.74.1-92) which still supports such H.264 file in hw decoding.
Update your MPC-HC and your lav will lose that ability.:p
Even next 0.74.1-98 can't DXVA2 HW acceleration of your Girls.Generation.Oh.4in1.201002.HDTV.x264.2160p.120fps.DTSES.6.1ch.mkv but even newest 0.75.0-2 can old NVIDIA CUVID acceleration with about 100 MB more videomemory consumption (so about 700 MB of 1 GB of my GTX750v2 GM206 videocard) than DXVA2 native in 0.74.1-92 but NVIDIA CUVID can't decode all frames while audio stops (DXVA2 native in 0.74.1-92 and also Cyberlink, MainConcept and MPC-BE Video Decoder with DXVA can).

nevcairiel
5th April 2021, 20:09
Don't encode your videos out of spec if you want them to work better. If it actually uses 16 ref frames on 4K, then it would artifact decoding in hardware, I didn't add those checks out of nowhere, and this was on modern NVIDIA hardware too.
If it doesn't use all 16 but is flagged to contain 16, then the stream is just bad. As a general rule, 16 ref frames rarely offer a solid advantage, which is why it was reduced on HEVC again to max 8 active ref frames per frame as well.

Artifacts are the worst thing that can happen. I rather not decode some obscure out-of-spec video in hardware then risk artifacts. That has always been my stance on this.

Sunspark
5th April 2021, 20:13
Interesting indeed, because IIRC the HEVC decoder in Broadwell was hybrid (used GPU compute and not fixed function unit), so maybe that's where the difference comes from? I would think it's a driver problem but it's hard to know really. Does it give a corrupt image too when using standard EVR ?

No, I checked just now with EVR Custom Presenter, and it displayed fine in DXVA2 Native mode. Thanks for the suggestion to check that.

So based on this, it appears that the bug may be with MadVR after all which hasn't received a public update for a couple years now.

Update: I found a way to make it work in DXVA2 Native mode w/ MadVR for this type of video. If you uncheck "Present frames in advance" it will change it to backbuffers which is D3D9 Old Path. Frames in advance is D3D9 New Path. Not completely sure what the difference between Old and New is, but old works if you want to use Native instead of Copy-Back and even more curious, it very subtly appears to be smoother on panning motion than new.

VictorLS
5th April 2021, 22:51
Don't encode your videos out of spec if you want them to work better.
Most cases is playing enocoded by someone files (streams, i.e. from SAT) but not own encoded.
Artifacts are the worst thing that can happen. I rather not decode some obscure out-of-spec video in hardware then risk artifacts. That has always been my stance on this.
So you still live in ideal world and still don't want to give choice for people as v0lt in their modern MPC-VR with always turning on HLG processing or MPC-BE Video Decoder - just one version has Skip non I-frames (newer has Skip B-frames only isn't enough for 8K in my case)
https://i.postimg.cc/mtQP0pM7/MPC-BE-Video-Decoder-Settings.png (https://postimg.cc/mtQP0pM7)
I use 1.5.3(build4166) (https://disk.yandex.ru/d/ZBA-K2-6UUV4TQ) only - in case of LAV Video Decoder I'll have to use i.e. 0.74.1-92 in case of playing such Girls.Generation.Oh.4in1.201002.HDTV.x264.2160p.120fps.DTSES.6.1ch.mkv files but I prefer use one (desirable most modern) and most universal video decoder with various settings for all possible cases - if I see artifacts with DXVA2 I prefer just change acceleration to NVIDIA CUVID then install older version of LAV Video Decoder ;)

nevcairiel
5th April 2021, 23:20
So you still live in ideal world and still don't want to give choice for people

Luckily, I don't have to care what you think, and those options will never happen. You are free to not use my software if you don't like my decisions. I don't get anything from it.

VictorLS
5th April 2021, 23:57
I don't have to care what you think, and those options will never happen.
I guess many people want to have one universal enough good product than many special (but even worse than universal) products for each case.
I don't get anything from it.
If you don't want to get 250$ (https://forum.doom9.org/showthread.php?p=1934493#post1934493) it's your decision ;)
wanezhiling
What about your TigerLake and mpv - it can use HW acceleration (without Video Processing) in cases where LAV Video Decoder and others couldn't?

wanezhiling
6th April 2021, 03:54
wanezhiling
What about your TigerLake and mpv - it can use HW acceleration (without Video Processing) in cases where LAV Video Decoder and others couldn't?
mpv only supports quicksync for av1, too slow.
for hevc vp9 h264, mpv seems a bit faster than mpc-be.

well, i stick with mpc-be:)

nevcairiel
6th April 2021, 08:27
If you don't want to get 250$ (https://forum.doom9.org/showthread.php?p=1934493#post1934493) it's your decision ;)

This is an entirely different request, for exposing additional hardware capability and not a cheap performance hack that degrades quality, and will most likely be supported in the re-designed NVDEC backend (which is part of the reason it is infact being replaced, as the old CUVID one has limitations), as I have already responded to before.
But, I also wouldn't do a quick hack to get it working just because someone put some money up. Thats just not my goal with LAV.

monohouse
6th April 2021, 09:57
thank :) 0.75 nice work :)

VictorLS
6th April 2021, 15:52
wanezhiling, nevcairiel
Thanks for your replies

wanezhiling
11th April 2021, 05:31
Question about HDR on Intel

Hi nevcairiel, do you have Intel GPUs (7th Kabylake and above)? Can you test whether the image on Intel (https://i.postimg.cc/bqNsPVzZ/hdr-evr-on-intel.png) is different with the one on AMD/NVIDIA (https://i.postimg.cc/3YZdPQHM/hdr-evr-on-amd-nvidia.png) when playing any HDR videos(for example (https://mega.nz/file/Bo1SlZSK#A5uBPSygx-3V0H_StNyWwLNp4fZQA6Gd8z7ZKuo_lR4)) with vanilla EVR. And do you know how does intel process?

ps: If you use wmp12 (microsoft's built-in decoder), the image will be the same as AMD/NVIDIA even on intel.

nevcairiel
11th April 2021, 09:07
I do not. But EVR doesnt do any HDR processing, any outcome will be wrong. The difference is likely from obeying the color matrix or not, and the MS decoder just not sending that information. But as said, neither properly reproduces HDR, so its always wrong.

wanezhiling
11th April 2021, 11:24
Thanks.
Some developers told me that's intel's problem, but a workaround on decoder side can solve this.
Maybe you can investigate further once you got a iGPU. Anyway, it's up to you.


edit: mpc-be r6170 (https://sourceforge.net/p/mpcbe/code/6170/) changed codes for this situation. because Intel automatically tries some transformation when it met hdr videos (VideoTransferMatrix = BT.2020) with evr.

VictorLS
12th April 2021, 09:57
wanezhiling
Many thanks - I saw the same color distortion (it looks much worse than without any transformation on my own) with ordinary EVR (so not EVR-CP) - I guess you've called it vanilla EVR - with HDR videos when I tried with Intel's Comet Lake with integrated UHD Graphics 630 and igfx_win10_100.9316.exe driver

nevcairiel
12th April 2021, 10:59
edit: mpc-be r6170 (https://sourceforge.net/p/mpcbe/code/6170/) changed codes for this situation. because Intel automatically tries some transformation when it met hdr videos (VideoTransferMatrix = BT.2020) with evr.

But BT.2020 does not mean HDR, and sending another flag then that one would just be plain wrong. I don't think this issue is understood well enough to make blanket changes that practically make the decoder lie just to make it look wrong in another fashion, so I won't.
It does sound to me like its actually processing BT.2020 (like its supposed to), but you just don't want that for some reason, and thus lie to the renderer.

wanezhiling
12th April 2021, 11:20
But BT.2020 does not mean HDR, and sending another flag then that one would just be plain wrong. I don't think this issue is understood well enough to make blanket changes that practically make the decoder lie just to make it look wrong in another fashion, so I won't.
It does sound to me like its actually processing BT.2020 (like its supposed to), but you just don't want that for some reason, and thus lie to the renderer.
so the best solution is reporting to intel? let intel change in their driver?

this does affect all bt.2020 videos, indeed. I can't believe no intel users ever found it before? ....:devil:

VictorLS
12th April 2021, 11:26
so the best solution is reporting to intel? let intel change in their driver?
I guess answer on both your questions is Yes ;)
May be you'll ask Intel how to activate their hardware acceleration of H265 4:2:2 and 4:4:4 in Intel Xe (Tiger Lake)?

*MidnightWatcher*
13th April 2021, 04:07
Just updated from 0.74.1 to the new 0.75. Unfortunately, all video streams from my FTP server now take around 20 seconds before the videos start playing (local files play immediately). This never happened under 0.74.1 -- they all play immediately. Any idea what setting, if any, I need to change in 0.75, or should I just stick with 0.74.1?

Player: MPC-BE 1.5.6 x64
Renderer: madVR b128

Thanks in advance!

Update: If I only install the LAV Video Decoder 0.75 and keep the splitter and audio decoder at 0.74.1, the videos streamed via FTP play immediately, but if the splitter or audio decoder 0.75 are installed, it takes about 20 seconds before the video begins playing.

RealSnoopyDog
13th April 2021, 09:09
It would be helpful to know for which file format this happens for you. I don't have problems where starting a video stream takes 20 seconds or more on a network storage. They all start immediately (plain mpeg and mkv)

SeeMoreDigital
13th April 2021, 09:28
Just updated from 0.74.1 to the new 0.75. Unfortunately, all video streams from my FTP server now take around 20 seconds before the videos start playing (local files play immediately). This never happened under 0.74.1 -- they all play immediately. Any idea what setting, if any, I need to change in 0.75, or should I just stick with 0.74.1?
When was the last time you disabled the mains power from all your gear, waited between 30 to 60 seconds, and switched everything back on again!?

My Synology NAS was behaving strangely a few weeks ago after an update. After "switching it off and on again"... It's working fine ;)

el Filou
13th April 2021, 10:37
If I only install the LAV Video Decoder 0.75 and keep the splitter and audio decoder at 0.74.1, the videos streamed via FTP play immediately, but if the splitter or audio decoder 0.75 are installed, it takes about 20 seconds before the video begins playing.I know this could be a bit time consuming, but what you could do is try to install each of the nightlies here: https://files.1f0.de/lavf/nightly/0.74/ and see after each upgrade/downgrade if the problem appears/disappears.
Proceed using a sort of "divide search": install a build from the middle of the list, like 0.74.1-59, check if the problem happens, if it does then the issue was introduced in a build between 0.74.1 and that one, if it doesn't it was in a later one, then repeat the same process with the smaller resulting selection.
At worst it should take you only installing 6 of those to pinpoint which one exactly introduced the issue.
Then you can see all the codes changes that happened here: https://github.com/Nevcairiel/LAVFilters/compare/0.74.1...master and hopefully find something that explains it and nev can take a look at it.It would be helpful to know for which file format this happens for you. I don't have problems where starting a video stream takes 20 seconds or more on a network storage. They all start immediately (plain mpeg and mkv)What protocol? Maybe it only affects FTP.

*MidnightWatcher*
13th April 2021, 15:12
It would be helpful to know for which file format this happens for you. I don't have problems where starting a video stream takes 20 seconds or more on a network storage. They all start immediately (plain mpeg and mkv)
All my videos are mkv.

*MidnightWatcher*
13th April 2021, 15:14
When was the last time you disabled the mains power from all your gear, waited between 30 to 60 seconds, and switched everything back on again!?

My Synology NAS was behaving strangely a few weeks ago after an update. After "switching it off and on again"... It's working fine ;)
It plays fine with 0.74.1, but not with 0.75. If it were the server I'd have issues regardless of version.

nevcairiel
13th April 2021, 16:28
Does it actually use LAV Splitter to access the FTP server, or is it using an external URL Source Filter? More information is more better. :)

PS:
Issues are not always as straight forward as you might think. Restarting your NAS takes you as much time as declaring that its not the cause. :D

*MidnightWatcher*
13th April 2021, 18:35
Does it actually use LAV Splitter to access the FTP server, or is it using an external URL Source Filter? More information is more better. :)

PS:
Issues are not always as straight forward as you might think. Restarting your NAS takes you as much time as declaring that its not the cause. :D
Hi nev, I restarted the FTP server and still the same.

I'm using Kodi with MPC-BE as the external player, and MPC-BE is set up to use only LAV for splitter, audio, video. They are all active in the task bar also when a video is playing. Does this answer your question?

clsid
13th April 2021, 19:40
MPC-BE Menu > Play > Filters

It is probably using "File Source (URL)", which may be caching the whole file before playback starts.

You can edit this registry key to change the source filter:
HKEY_CLASSES_ROOT\ftp
LAV = {B98D13E7-55DB-4385-A33D-09FD1BA26338}

*MidnightWatcher*
14th April 2021, 04:56
MPC-BE Menu > Play > Filters

It is probably using "File Source (URL)", which may be caching the whole file before playback starts.

You can edit this registry key to change the source filter:
HKEY_CLASSES_ROOT\ftp
LAV = {B98D13E7-55DB-4385-A33D-09FD1BA26338}

MPC-BE 1.5.7.6005

Filters currently loaded:
- Default DirectSound Device
- XySubFilter (=> madVR)
- madVR Renderer
- Audio Switcher
- LAV Video Decoder
- LAV Audio Decoder
- LAV Splitter Source

I tried updating FTP Source Filter value data in the registry as suggested, but still takes 20 seconds to start playing a video.

biship
14th April 2021, 11:23
For me playing files from my Synology NAS it takes 5-7s before the video starts, and oddly, the screen is also blank for the first 5s of the video. I can hear the audio. All MKVs.

*MidnightWatcher*
14th April 2021, 14:28
For me playing files from my Synology NAS it takes 5-7s before the video starts, and oddly, the screen is also blank for the first 5s of the video. I can hear the audio. All MKVs.
It takes 5-7 second before playing, plus another 5 seconds for the video to be displayed? Curious -- is your connection "fast ethernet" (10/100) or gigabit (10/100/1000)? The blanking sounds like your display is adjusting to the frame/refresh rate. My JVC projector takes about 6 seconds, which is normal.

clsid
14th April 2021, 22:02
@nevcairiel
I am debugging a hang in m_pDXVA2Allocator->GetBuffer()
The free list is empty/null and m_lCount=m_lAllocated=23

I assume that this situation of all buffers being in use should not happen under normal conditions?
This problem occurred for a user with heavy GPU usage by Firefox. Could it be that a buffer is not freed (or re-used) when a failure occurs somewhere in the DXVA2 code (of FFmpeg)?

VictorLS
18th April 2021, 17:06
Here's fp3.mkv (9 MB) https://TransFiles.ru/2t9vj well visible colorshift issue (http://forum.doom9.org/showthread.php?p=1919062#post1919062) but this time it isn't decoder's problem because it's progressive so it's not mine reencoding issue.

huhn
18th April 2021, 19:24
this file has a really low quality so what has this todo with lavfilter?
this should be a simple chroma luma channel mismatch by 1 frame.

VictorLS
18th April 2021, 21:55
this file has a really low quality so what has this todo with lavfilter?
With LAVFilters-0.75.0-2 YADIF still doesn't work on Formula1.2019.Round06.Monaco.Race.Sat.Feed.1080i.H264.Multi.Language_fromMKVtsMuxerNotHDMVcompatible.ts to solve colorshift issue on such 4:2:2 SAT feeds on every videocard ;)
this should be a simple chroma luma channel mismatch by 1 frame.
Seems you're right - each frame from two serial frames.

brazen1
22nd April 2021, 03:07
When I bitstream any audio format (incl DTS) with my AVR on, all is well and the AVR displays the correct format is decoding.
When I turn my AVR off I get down converted stereo audio through my 2 panel speakers and all is well.

However, DTS and DTS HD do not produce any audio with the AVR off using MPC-HC/BE which use LAV Filters.
I am able to play DTS audio with the AVR off when I use the Kodi internal VideoPlayer. Same with other players such as PowerDVD and DVDFab Media Player. Of course it's in 2chl which is fine.

I notice if I unselect DTS bitstreaming in the LAV Audio Configuration settings, both MPC players produce DTS audio (2chl) just like other players when the AVR is off.
This leads me to believe I have a problem with LAV Filters exclusively and I'm seeking help.
I'm using 0.75.0. I tried 0.71.0 and they had the same behavior.
I don't think the fix for me is to manually enable/disable DTS bitstreaming per AVR on/off state is it?

Aleksoid1978
22nd April 2021, 04:04
When I bitstream any audio format (incl DTS) with my AVR on, all is well and the AVR displays the correct format is decoding.
When I turn my AVR off I get down converted stereo audio through my 2 panel speakers and all is well.

However, DTS and DTS HD do not produce any audio with the AVR off using MPC-HC/BE which use LAV Filters.
I am able to play DTS audio with the AVR off when I use the Kodi internal VideoPlayer. Same with other players such as PowerDVD and DVDFab Media Player. Of course it's in 2chl which is fine.

I notice if I unselect DTS bitstreaming in the LAV Audio Configuration settings, both MPC players produce DTS audio (2chl) just like other players when the AVR is off.
This leads me to believe I have a problem with LAV Filters exclusively and I'm seeking help.
I'm using 0.75.0. I tried 0.71.0 and they had the same behavior.
I don't think the fix for me is to manually enable/disable DTS bitstreaming per AVR on/off state is it?

Try internal MPC-BE audio decoder.

brazen1
22nd April 2021, 05:38
Try internal MPC-BE audio decoder.

I changed to MPC audio renderer from DirectSound default and vice versa using MPC-BE. I unchecked LAV Audio Decoder. I ticked DTS for Internal Audio Decoder. I restarted title. No change.

I did the same with MPC-HC. No change. I unticked Allow bitstreaming and of course it worked since it's similar to turning off DTS in LAV audio. I can't find a similar Allow bitstreaming in MPC-BE but I want to bitstream when my AVR is on anyway understanding this is just a test.

Does this confirm that since internal decoder and external LAV decoder produce the same negative result, that something else is the root of my problem? Windows or NVidia HDAudio driver - except Kodi, PDVD, FAB players do work. Both MPC players? Maybe it's just exclusive to my system - I'm lucky like that :confused: Thank you for the suggestion.

Aleksoid1978
22nd April 2021, 07:35
MPC-BE audio decoder have options "Pass-through (S/PDIF, HDMI)".

el Filou
22nd April 2021, 12:56
What could be happening is that Windows caches the EDID information from the AVR stating that the HDMI sink supports DTS and your TV doesn't supports DTS but the info is not updated when the AVR is turned off. I don't know if that would be a Windows problem or an HDMI audio driver problem.
(Edit: maybe the other players distinguish between sink devices using the device name? Does the device change depending on whether your AVR is on or off?)

Does it also happens when you cold boot Windows with the AVR off?

brazen1
22nd April 2021, 16:15
MPC-BE audio decoder have options "Pass-through (S/PDIF, HDMI)".

Yes, I know and they are all ticked.

What could be happening is that Windows caches the EDID information from the AVR stating that the HDMI sink supports DTS and your TV doesn't supports DTS but the info is not updated when the AVR is turned off. I don't know if that would be a Windows problem or an HDMI audio driver problem.
(Edit: maybe the other players distinguish between sink devices using the device name? Does the device change depending on whether your AVR is on or off?)

Does it also happens when you cold boot Windows with the AVR off?

You are correct. My panel does not support DTS but shouldn't something in the chain down convert to PCM or something the panel speakers can handle? It doesn't support ATMOS either but I get audio? Cold boot with AVR off makes no difference.

I don't know how to check possible device name change dependent on AVR state?

el Filou
22nd April 2021, 17:24
Normally, LAV's "Fallback to PCM if Bitstreaming is not supported" should take care of that, but maybe something is giving it a wrong information on whether DTS is supported?

I have no idea how to check if the device is identified differently, I don't use passthrough or ARC with my AVR, maybe someone else knows? But there must be a way for those other playback apps to accurately determine that DTS isn't supported while LAV decoder fails.

Maybe try this utility: https://www.entechtaiwan.com/util/moninfo.shtm and compare what's displayed in the real-time and registry pages.

Tsukinyan
25th April 2021, 20:41
I've done a bunch of searching of a few different threads on this forum and I think I understand the difference between "Normalize Matrix" and "Clipping Protection", but I'm not 100% confident. I'm hoping someone can correct me or verify my thoughts below.

- Normalize Matrix = lowers the level of the entire audio stream across all channels to make sure no levels go above 1.00. Thus the distance between the lowest level and the highest level would be preserved. In practice, the volume difference between a character whispering in one scene and an explosion in a different scene would be the same with normalize matrix on or off.

- Clipping Protection = if a stream were to go above 1.00, instead play it at 1.00. Thus if the lowest level was 0.09 and the highest was 1.04 (difference of 0.95), clipping protection would make the highest 1.00 and the difference between lowest and highest level would be 0.91. In practice, the volume difference between a character whispering in one scene and an explosion in a different scene would be different with clipping protection on or off.


I'm making up numbers in those explanations, but I'm mostly trying to convey the theory behind the settings and not give realistic examples. That said, if my explanation of Clipping Protection is correct, would this volume difference actually be noticeable? I mostly watch at my desktop using high-end headphones connected to a fairly powerful AMP, so it's less important to me if the overall volume is lowered slightly. But it would bother me if I knew the difference between peak lows and highs was being modified (even if I couldn't notice it).

LigH
26th April 2021, 07:21
Normalize won't certainly reduce the volume (that usually happens only during a downmix of multi-channel audio to stereo, with or without Dolby ProLogic surround matrix, where a weighted sum of more than 2 channels may exceed 100% volume). It may as well rise it in case the peak of the source is below the target maximum (which you may set below 100%; rising volume is probable for stereo audio without dynamic compression). In general, normalization needs a look-ahead to discover the peak. For offline processing it may be the entire audio. In a real-time filter it may be a sliding window being pre-decoded before playing, but with a limited range, which may cause alternating loudness.

I am not sure which kind of implementation LAV Filters uses for Clipping Protection; I guess it is a kind of dynamic compression. There may be a simple filter which "flattens the peaks" per sample, or a more elaborate filter which dynamically reduces the volume of short audio blocks... "dynamic" is about what you mean as difference between levels, but there are standards to calculate it in decibels.

Asmodian
26th April 2021, 22:40
I think normalize matrix is very different from a normal normalize.

Normalize matrix is simply changing the weights of a downmix matrix so it is impossible for the downmix to go over 100% in any channel, isn't it? This is always quieter, but will never clip.

Clipping protection doesn't care what the lowest level is at all, it simply lowers the total volume to prevent clipping anytime the volume goes too high. This has the somewhat odd effect of causing the average volume level to be lower after a loud noise that would have clipped at the previous level. It is like a single pass normalize that decrease the total volume only of all audio past each loudest peak. So if there was a pretty loud noise 15min into a video, it might lower the gain to 0.96, but if later there was an even louder noise it might lower the gain again, e.g. from 0.96 to 0.87.

Dynamic range compression is entirely separate, both of these options do not do any range compression themselves and are only adjusting a global volume gain.

LigH
27th April 2021, 07:30
Normalize matrix is simply changing the weights of a downmix matrix so it is impossible for the downmix to go over 100% in any channel, isn't it? This is always quieter, but will never clip.

I would agree.

mogli
27th April 2021, 08:17
IIRC clipping protection just uses a limiter, i.e. goes down if the volume is too high but quickly goes back to full volume afterwards.

Clipping protection doesn't care what the lowest level is at all, it simply lowers the total volume to prevent clipping anytime the volume goes too high. This has the somewhat odd effect of causing the average volume level to be lower after a loud noise that would have clipped at the previous level. It is like a single pass normalize that decrease the total volume only of all audio past each loudest peak. So if there was a pretty loud noise 15min into a video, it might lower the gain to 0.96, but if later there was an even louder noise it might lower the gain again, e.g. from 0.96 to 0.87.Why would anyone do that? One would eventually end up with the same volume as matrix normalization for most movies but could hear how the volume goes down over the playing time. No benefit at all but very annoying.

nevcairiel
27th April 2021, 11:49
Why would anyone do that? One would eventually end up with the same volume as matrix normalization for most movies

Thats far from the truth. Especially if you don't include LFE in the downmix, as eg. Dolby recommends, most 5.1 streams can be downmixed to stereo without a change in volume, or only a very small one.
Mastering of commercial content rarely maxes out single channel levels.

No benefit at all but very annoying.

You are free to not use it. But given the above reasoning, its a perfectly reasonable experience.

mogli
27th April 2021, 13:25
Mastering of commercial content rarely maxes out single channel levels.We're talking about downmixing so channels will add up and e.g. even overload at half the full volume.

Asmodian
27th April 2021, 17:54
We're talking about downmixing so channels will add up and e.g. even overload at half the full volume.

I often use it for headphones, I very rarely notice the volume decreasing due to a loud noise.

Have you tried it? It isn't a bad experience. You are free to use the normalized matrix option instead too, that is why it exists. :)

nevcairiel
29th April 2021, 10:03
We're talking about downmixing so channels will add up and e.g. even overload at half the full volume.

Good that I explained the line above what you quoted why that isn't a problem in typical content.

Yes, it can theoretically happen that the volume lowers to the same level, however in the real-world with typical consumer-grade content this is not the case.
There are various factors that allow this. As said above already, channels are never maxed out, so there is headroom to do mixing in. Additionally, surround channel are often quieter for a more ambient experience then fronts, and due to the way PCM works, only if the audio is coherent would peaks actually add up perfectly. Additionally, not including LFE enables it to be much more reliable. And of course this only applies to 5.1, if you downmix 7.1 without dropping the rear channel, the chances of running into a volume reduction are much higher.

This is factually a technique used in many downmixing applications to various degrees. Sometimes in a hybrid fashion, where the mixing matrix is reduced so incoherent audio signals will never clip under any circumstances (disregarding existing headroom etc), but a coherent one still would. Preserving volume when downmixing for headphones is important for many users.

It does sound to me like you haven't even tried it, nor fully understood how and why it works.

At the end of the day, I'm not even sure what you are arguing for. This mode has been popular over the various years it has existed. But its also not the only mode you can use. You can just let it overflow (by checking no options), or you can use a fully normalized matrix where clipping is impossible, and handle the reduced volume in other ways. There is also no secret how it works, the potential for sudden volume changtes is even mentioned in the tooltip of the option. If you don't like one particular mode, you can just use another, there is nothing to gain from complaining that it exists and how bad it might be in your eyes.

manolito
29th April 2021, 23:32
What I do not understand is why the two options "normalize matrix" and "clipping protection" can be ticked at the same time. Since both options should prevent clipping when only one of them is ticked (as Asmodian explained) then in which situation could it be useful to activate both options?

nevcairiel
30th April 2021, 13:02
What I do not understand is why the two options "normalize matrix" and "clipping protection" can be ticked at the same time. Since both options should prevent clipping when only one of them is ticked (as Asmodian explained) then in which situation could it be useful to activate both options?

Its not really useful, unless the signal would overflow on its own, which is only really possible with float codecs, so not really a common thing.
I suppose I could've locked the checkbox, but eh, doesn't really change anything.

Sunspark
1st May 2021, 01:47
Its not really useful, unless the signal would overflow on its own, which is only really possible with float codecs, so not really a common thing.
I suppose I could've locked the checkbox, but eh, doesn't really change anything.

A streaming radio station I like, the input states vorbis codec, 32bit Float and the output states PCM codec, 32bit Float. Checked another one, the input codec was aac, but it was also 32bit Float.

Maybe float is more common with streaming radio?

nevcairiel
1st May 2021, 02:02
A streaming radio station I like, the input states vorbis codec, 32bit Float and the output states PCM codec, 32bit Float. Checked another one, the input codec was aac, but it was also 32bit Float.

Maybe float is more common with streaming radio?

Those are just lossy codecs that decode to float, but they wouldn't really overflow.

mogli
2nd May 2021, 10:02
@nevcairiel

I just hope for an improved clipping protection.
If it's overflowing often it can't be helped and the overall volume needs to be decreased permanently for that movie. However, as you said yourself, that's rarely the case. Maybe only a few seconds, miliseconds or even samples overflow in a whole movie. Using a limiter in such a situation would allow to keep the overall volume steady and loud. So essentially I hope for short time (limiting) and long time overshoots (normalization, leveling) to be handled separately.
At 2 minutes in decreasing the volume by 2dB because 2 samples overflowed for the rest of a 2 hour movie doesn't sound reasonable to me.

Sunspark
4th May 2021, 17:55
Personally I don't use either normalize or clipping. I don't think it's needed because the player is set for 85% volume (though I leave it at 100% for web stuff), the PC is set for 73% volume, and the powered speakers have their own volume control as well. If you were running at 100% in everything, then yes, but in my example I am not, so I believe there is headroom.

clsid
13th May 2021, 14:58
@nev
Can you make a MinGW GCC 10.3 (or 11.1) build?

Astray
16th May 2021, 07:42
Hey there, got another audio/subtitle language order question. I watch a lot of anime and made a pretty crazy subtitle preference instructor

eng:*|f, eng:eng@Signs, eng:off, jpn:eng@Full, jpn:eng@Subtitles, jpn:eng, *:eng|d, *:*|df

The issue I'm having is with a lack of flexibility in the audio language currently. Generally I want to have jpn as the default language, but on rare occasions there are some anime that have better, or at least comparable, English voice acting and the .mkv files have it as the default audio language. This gets completely overwritten by the audio language preferences though. I don't even think forced audio languages would be respected in the files, in which case I can just remux the files, but I haven't tested.

Is there a way to do something like

*|df, jpn, eng

for the audio language preference and make it work?

nevcairiel
16th May 2021, 07:59
The advanced selector syntax is only available for subtitles, for audio only a list of languages is available currently.

Astray
18th May 2021, 10:16
The advanced selector syntax is only available for subtitles, for audio only a list of languages is available currently.

Where would be a good place to submit feedback and/or feature request for this? I would imagine it's not too difficult to add the feature in since you could probably copy and paste most of the code used for the subtitle selection.

sofakng
20th May 2021, 15:09
Is it possible to use DXVA2/D3D11 copy-back for 8K videos? (ie. 7260x3630)

I'm using an i7-8700k (PCIe 3.0 x16) an RTX 3080 but it's extremely slow.

Native-mode works fine but I need copy-back to use AviSynth and some filters on the video.

If it's not possible, what is the bottleneck?

el Filou
20th May 2021, 16:15
It's hard to pinpoint a single component that makes copyback slow or OK. In theory it should be fine with all systems but some even with IMC already had issues with it in 4K.
We had a thread dedicated to that here: https://forum.doom9.org/showthread.php?t=176642

LigH
21st May 2021, 07:38
I would say it is a quite safe bet that elaborate filtering of 8K UHD video in AviSynth+ won't work in real time. Certainly slower than untouched copy-back rendering.

clsid
28th May 2021, 13:21
I am now using a tool to convert GCC debug info into PDB, so that the crash reporter of MPC-HC is able to create proper stack traces for crashes that happen inside the FFmpeg code. It seems to be working well for traces, although it lacks values of variables.

One of the crashes it has logged so far is this one in the Matroska parser:
https://imgur.com/a/EvddqYY
readbytes is called with a nullpointer for the buffer. The code lacks a check for memalloc failure.

The crash dump indicates that user had 400+ MB of free memory. But that might have been heavily fragmented.

GMJCZP
1st June 2021, 23:04
I'm having a problem playing this .ape file, it sounds noisy, both with WMP and MPC-HC, when opening it in Adobe audition it sounds fine.

SampleAPE (http://www.filedropper.com/kalimba)

Edit: I am using BeHappy 0.3.0.19814 and Monkey's Audio Console Front End 3.99 as encoder. I am using LavFilters 0.75.

filler56789
2nd June 2021, 13:01
I'm having a problem playing this .ape file, it sounds noisy, both with WMP and MPC-HC, when opening it in Adobe audition it sounds fine.

SampleAPE (http://www.filedropper.com/kalimba)

Confirmed, noisy with LAV Filters, plays OK with MPV.

Monkey's Audio Console Front End 3.99

FWIW: latest Monkey's Audio is version 6.29 :-|

GMJCZP
2nd June 2021, 15:25
The lasts versions of MAC are not compatible with BeHappy because a problem with Stdin (?).

hubi73
8th June 2021, 00:14
Should this vulnerability be fixed in LAV Filters? Maybe in a nightly update?

https://nvd.nist.gov/vuln/detail/CVE-2021-33815
https://github.com/FFmpeg/FFmpeg/commit/26d3c81bc5ef2f8c3f09d45eaeacfb4b1139a777

PCU
9th June 2021, 18:14
Can I request features?

Calvi
12th June 2021, 06:06
Because it has no future, and already several problems, and leaving something around to suffer bitrot because it could be useful for someone is not how I work.

No argument from me and I am keen to move to d3d11 but I also need Deinterlacing.

CUVID still works best for our DVB broadcasts, but I understand it is deprecated by Nvidia.

My question to Nev is do you plan to replace Cuvid with NVDec or similar, or will it just be removed?

huhn
12th June 2021, 10:00
CUVID and NVdec are the same and he talk about a really cool alternative with deint and such.
nvidia just renamed it.

PCU
12th June 2021, 11:08
Request: please support de-blocking feature for low quality encoded files.

Calvi
13th June 2021, 00:53
CUVID and NVdec are the same and he talk about a really cool alternative with deint and such.
nvidia just renamed it.

https://docs.nvidia.com/cuda/video-decoder/index.html
Claims CUVID is now deprecated and replaced with NVDec, but I don’t really care what’s it’s called. I’d just like to have an equivalent deinterlacing solution to CUVID (as dxva2 is NOT the same as CUVID when using Lav filters now)

huhn
13th June 2021, 02:46
they are the same there is absolutely zero chance they have coded 2 hardware decoder it's just buggy with DXVA2 you could try mpcVR with d3d11 VP support it may work better.

as said before nev had an idea where nvdec would work like d3d11 native and with deint support. it's done when it's done if he even works on it all.

Calvi
13th June 2021, 03:19
Relax Huhn,

I’m not making any demands, just would like to know what Nev might be planning for deinterlacing support (if anything).

Whether it’s due to buggy dxva2 or not, lav with CUVID does not deinterlace the same as lav with dxva2. I’ve tried everything and they both deinterlace, usually very similarly, but definitely NOT the same. CUVID always does better on the fringe cases.

I wish dvb would just switch to progressive so I never have to worry about interlacing again.

I have posted these before, but here are two clips (and screenshots) that show what happens with DXVA2 deinterlacing. Neither issue happens with CUVID. I know one is an interlaced overlay and the other may have its own issues but CUVID deals with all the interlaced content I encounter while DXVA2 only deals with some. MadVR or EVR renderer - makes no difference.
https://1drv.ms/u/s!AuEm8LURKbbGaa4Ff1evj4W50Oc?e=gRDMWT

VictorLS
13th June 2021, 17:18
I’m not making any demands, just would like to know what Nev might be planning for deinterlacing support (if anything).
Best regards - I'm SAT amateur too and can say nevcairiel don't care about us - I wrote people have to have choice about useful CUVID (and not all-frame decoding for H265 4K 4:2:2 feeds and 8K channels on weak computers) many times here (you can read find and read my posts) but all he done are 10bit CUVID decoding support but too late (I wanted it for WinXP but he stops support WinXP before - just cleaver Russian guy Aleksoid1978 from MPC-BE and MPC-VR project helped me that time) and switchable CUVID DXVA processing for "broken" with nVIDIA's DXVA streams.
I wish dvb would just switch to progressive so I never have to worry about interlacing again.
I hope FullHD will be 1920x1080p50(60) but they did it 1920x1080i50(60) (
It's a pity even modern 4K channels despite of progressive sometimes are 25p instead of 50p even on Euro2020(4x~92 MB, 4х29 seconds) https://transfiles.ru/pu0jw - to watch HLG with right colors on SDR monitor read my thread https://forum.doom9.org/showthread.php?t=176909
I have posted these before, but here are two clips (and screenshots) that show what happens with DXVA2 deinterlacing. Neither issue happens with CUVID. I know one is an interlaced overlay and the other may have its own issues but CUVID deals with all the interlaced content I encounter while DXVA2 only deals with some. MadVR or EVR renderer - makes no difference.
In Win7x64 there isn't any problem (I've watched in MPC-HC 1.9.13 in stop frame mode with Ctrl+RightArrow) with both CUVID and DXVA2 deinterlacing while playing Deinterlacing 7HD Powerball.ts and Deinterlacing 10HD - BBPan.ts on my nVIDIA GTX750v2 on GM206 with EVR(-CP), MPC-VR and madVR:
https://i.postimg.cc/nMjzjP3M/LAV-Auto.png (https://postimg.cc/nMjzjP3M)
I see the problem as on your screenshots only when I disable deinterlacing in LAV Video Decoder:
https://i.postimg.cc/CBdjfs2Y/LAV-Disabled.png (https://postimg.cc/CBdjfs2Y)
PS. If I've got some free time I'm going to install Win10x64 21H1 to try D3D11 on my old computer with Athlon II x3 460 CPU.

el Filou
13th June 2021, 19:15
In Win7x64 there isn't any problem with both CUVID and DXVA2 deinterlacing while playing Deinterlacing 7HD Powerball.ts and Deinterlacing 10HD - BBPan.ts on my nVIDIA GTX750v2 on GM206 with EVR(-CP), MPC-VR and madVRDo you have the "use inverse telecine" setting in Nvidia Control Panel enabled or not?
The problem with the powerball clip and DXVA is that when you disable that option, it deinterlaces the overlay with the balls correctly but does not do pulldown anymore, so progressive material broadcast in interlaced is lower quality.
If you enable the option, it then does pulldown for progressive but if there is interlaced overlay like here it decides the image is till progressive and does not deinterlace.

VictorLS
13th June 2021, 21:24
Do you have the "use inverse telecine" setting in Nvidia Control Panel enabled or not?
As SAT amateur I always disable (uncheck) "Use inverse telecine" setting in Nvidia Control Panel immediately after install driver and I forget to mention that in my previous post - thanks. With checked "Use inverse telecine" I see interlace with both CUVID and DXVA2 hardware acceleration.
Btw I'm going to experiment with Ryzen 3 3200g with Vega graphics deinterlacing of H265 SD and HD quasi-interlaced channels soon so can anyone show how to disable Inverse Telecine in Adrenalin's Control Panel (and btw in modern Intel's Control Panel)?
progressive material broadcast in interlaced is lower quality
I don't care about it (I don't watch movies and so on from interlaced channels - I'd say I don't watch movies almost at all) but will appreciate examples how namely looks that lower quality.

Calvi
14th June 2021, 06:20
Do you have the "use inverse telecine" setting in Nvidia Control Panel enabled or not?
The problem with the powerball clip and DXVA is that when you disable that option, it deinterlaces the overlay with the balls correctly but does not do pulldown anymore, so progressive material broadcast in interlaced is lower quality.
If you enable the option, it then does pulldown for progressive but if there is interlaced overlay like here it decides the image is till progressive and does not deinterlace.

Thanks el Filou.

You are right, I did have IVTC switched on. DXVA is much closer to Cuvid with it switched off. But still not the same, Cuvid is OK with IVTC on while DXVA is not.

I also tried the Cheese Slices from here (with both IVTC on and off):
https://www.avsforum.com/threads/hd-1080i-test-pattern-to-determine-vector-adaptive-deinterlacing-others-icl-ticker.1157287/

and the results are different for DXVA2 vs Cuvid with these as well (whether IVTC is on or off).
DXVA2 Copy Back vs Native seem identical, but Cuvid gives an entirely different result (Seems slightly worse actually, but definitely different).

I will say that with IVTC off and DXVA2 the Australian Broadcasts seem ok so I can probably live with this setup.

Would still like to know what causes the difference though as it would seem having IVTC and deinterlacing working correctly would cover the most formats out there?

VictorLS
14th June 2021, 08:46
You are right, I did have IVTC switched on. DXVA is much closer to Cuvid with it switched off. But still not the same, Cuvid is OK with IVTC on while DXVA is not...and the results are different for DXVA2 vs Cuvid with these as well (whether IVTC is on or off).
DXVA2 Copy Back vs Native seem identical, but Cuvid gives an entirely different result
Some CUVID vs DXVA2 difference screenshots, please.
(Seems slightly worse actually, but definitely different)
Seems that's why nevcairiel didn't want to do CUVID DXVA deinterlacing switchable for "broken streams" for a long time but I don't see difference.
Btw I used Cheese Slices since 2009 for tests - i.e. at the end of 2009 I choose Samsung 40B652 PVA TVset (despite one broken dark subpixel) instead of identical LG IPS namely due to much more quality of deinterlacing ;)

Calvi
14th June 2021, 12:59
Screen Caps saved to same folder as above.
Named Slices Cuvid.jpg and Slices DXVA-CB.jpg
Both with IVTC off, but IVTC makes no noticeable difference in these tests.

VictorLS
14th June 2021, 15:38
Calvi
Thanks - I don't see artifacts like on your Slices Cuvid.jpg in any mode.

el Filou
14th June 2021, 20:18
I don't care about it (I don't watch movies and so on from interlaced channels - I'd say I don't watch movies almost at all) but will appreciate examples how namely looks that lower quality.I didn't keep screenshots from when I tested that, but what happens is with 50i the deinterlacer will treat two fields from one same image (as happens in 2:2 film mode) as being from two different images and will try to analyse motion between them and also the next field to produce two output frames. As they are from the same image it won't find much motion, but very fine detail will appear to be shimmering.
With 30i it will completely mess up the 3:2 cadence and you'll see moiré and aliasing.

VictorLS
14th June 2021, 21:09
el Filou
Thanks - will try to find described you artifacts in a future on movies on interlaced channels trying switch on/off "Use inverse telecine" in nVIDIA Control Panel
I wish dvb would just switch to progressive so I never have to worry about interlacing again.
It seems interlacing will follow us (SAT amateurs) ;) for a long time in a future:
https://i.postimg.cc/N5WPCZ37/TRT-4-K-interlace.png (https://postimg.cc/N5WPCZ37)
from 20210614-205013_TRT 4K.mkv (28 MB) https://transfiles.ru/cum1l
It's a pity I didn't record from live translation of that match to see was interlace artifacts or not (I'm sure there wasn't artifacts).

SeeMoreDigital
14th June 2021, 21:18
...It seems interlacing will follow us (SAT amateurs) ;) for a long time in a future:
Studio content has too many overlays, so it doesn't provide an accurate example. The actual game play would be better... But it looks progressive to me!

ashlar42
16th June 2021, 21:36
I use Kodi DSPlayer as my main player... today I've finally managed to get a RTX3070, preparing for when my new 4K TV will be here.

As such I have tried playing back some 4K HDR files (tonemapped through madVR). Initially I got all strange colors, blocks, general crap... At first I did not understand, then I realized that I had tried, years ago, to decode through the Lentoid HEVC decoder, as an experiment. I removed that from my system aaaand... there is pretty much no way I can get LAV Video to be used to decode HEVC. I have unregistered Lentoid, I have selected LAV Video, nothing... video starts but there is sound and no video.

I tried with both MPC-HC and MPC-HC BE and even though I deselect the internal filters and place LAV Video as preferred, they both fall back to the internal filter (MPC-HC stating "Lav Video (internal low merit)"). It's as if LAV is not usable for HEVC (HEVC is selected in configuration).

I have upgraded to 75, downgraded to 74.1, reupgraded to 75, nothing changed. I restarted the machine too (Windows 10 x64).

Asmodian
16th June 2021, 23:54
I wonder if Lentoid HEVC set LAV's merit very low.

This is a free utility that makes it easy to see and change filter merits:
InstalledCodec (https://www.nirsoft.net/utils/installed_codec.html)
LAV Video and Audio should be 0x00800003, LAV Splitter should be 0x00800004 (values in hex). Higher merit is the first to be used.

ashlar42
17th June 2021, 10:37
I wonder if Lentoid HEVC set LAV's merit very low.

This is a free utility that makes it easy to see and change filter merits:
InstalledCodec (https://www.nirsoft.net/utils/installed_codec.html)
LAV Video and Audio should be 0x00800003, LAV Splitter should be 0x00800004 (values in hex). Higher merit is the first to be used.Very late last night (I write from Europe) I solved it by completely uninstalling LAV and then reinstalling (before I was upgrading and downgrading in place, not passing through uninstall).

I am sorry not to have tried what you suggested because I'm left with the curiosity to understand what happened.

LAV's merit being set very low could be an explanation but can you set the merit of a DS filter only for a specific codec? Because H264 material was working just fine. And, also, with Kodi DS player you can tell the program which filters to use, ignoring the merits system. And yet it wasn't working.

Mystery will probably remain but I have solved the problem.

el Filou
17th June 2021, 17:42
It seems interlacing will follow us for a long time in a future:Is that a 1080i feed downconverted from original 4K progressive? Or a 4K progressive feed with an insert from a badly deinterlaced 1080i feed?
I see this on Formula 1 too, on onboard cameras the white/coloured pattern on the kerbs changes too much between consecutive fields and it confuses the deinterlacer.

lvqcl
17th June 2021, 23:03
No new nightly builds available?

nevcairiel
17th June 2021, 23:13
There should be one tonight

nevcairiel
21st June 2021, 07:26
LAV Filters 0.75.1

LAV Splitter
- Changed: AV1 files with no extradata will now generate a format header with stream information for decoders to use
- Fixed: Improved stream selection when multiple "default" video tracks are present

LAV Video
- Changed: Updated dav1d for significant improvements in AV1 10-bit decoding performance
- Changed: AV1 hardware decoding will more reliably engage when provided with additional stream information from the demuxer

LAV Audio
- Fixed: Opus decoding had audible artifacts in some files in 0.75

Download: Installer (both x86/x64) (https://files.1f0.de/lavf/LAVFilters-0.75.1.exe) -- Zips: 32-bit (https://files.1f0.de/lavf/LAVFilters-0.75.1.zip) & 64-bit (https://files.1f0.de/lavf/LAVFilters-0.75.1-x64.zip)

Check 0.75 Release Notes (https://forum.doom9.org/showthread.php?p=1939462#post1939462) if you missed them!

AV1 software decoding of 10-bit content is now significantly faster with the new version of dav1d.

Other then that, just few small fixes and updates.

Take care, and have fun!

chros
21st June 2021, 07:35
Cheers!

filler56789
21st June 2021, 07:52
LAV Filters 0.75.1

Thanks! :thanks:

P.S.:
https://files.1f0.de/lavf/nightly/ hasn't been updated yet :)

nevcairiel
21st June 2021, 08:11
P.S.:
https://files.1f0.de/lavf/nightly/ hasn't been updated yet :)

Nightlies are updated automatically .. at night. Its 9am. :)

Weirdo
21st June 2021, 09:46
Thank you. Amazing work.

RealSnoopyDog
23rd June 2021, 11:36
There is a square bracket missing in the first line of the first post ;)

Thank you for the new release!

GMJCZP
24th June 2021, 22:37
I'm having a problem playing this .ape file, it sounds noisy, both with WMP and MPC-HC, when opening it in Adobe audition it sounds fine.

SampleAPE (http://www.filedropper.com/kalimba)

Edit: I am using BeHappy 0.3.0.19814 and Monkey's Audio Console Front End 3.99 as encoder. I am using LavFilters 0.75.

@nevcairiel:

Please check this.

v0lt
25th June 2021, 04:06
@GMJCZP
The problem is not with LAV Filters. The problem is with FFmpeg or your file.

GMJCZP
25th June 2021, 15:29
Confirmed, noisy with LAV Filters, plays OK with MPV.



FWIW: latest Monkey's Audio is version 6.29 :-|

Since this issue was confirmed, FFMpeg has nothing to do with it. The file plays correctly in a player that does not depend on Lav filters.

nevcairiel
25th June 2021, 16:37
@nevcairiel:

Please check this.

You mention problems with an .ape file and link to a MP3 file. There is nothing to look at.

GMJCZP
25th June 2021, 20:59
Sorry, upload corrected:

Here (http://www.filedropper.com/sampleapedef)

PCU
26th June 2021, 15:20
Deblocking videos by ffdshow doesn't work on latest version of MPC-HC, So please add deblocking to LAV if possible.
Thanks

ryrynz
29th June 2021, 10:51
Thanks

Nev isn't going to add any post-processing to LAV ever AFAIA, I don't see why ffdshow shouldn't work, it's just an external filter you add to the filter chain.
Maybe you have an issue with it's installation or something? Reinstall it and check your external filter list.

mclingo
4th July 2021, 00:36
Hi, getting an odd volume issue with lav filters, been noticing i'm having to max out my headphone volume for movies recently to the point where they are just not loud enough. I first thought it was just the mix as they sound ok through my speakers but when I play the same movie using VLC, windows media or film and TV player they are much louder and much more the volume i'm used to. I've tried reinstalling LAV filter, no joy, I dont have DRC turned either.

Any ideas anyone?


EDIT - tried it with bitstreaming on / off - no difference.

Asmodian
4th July 2021, 00:52
Hi, getting an odd volume issue with lav filters, been noticing i'm having to max out my headphone volume for movies recently to the point where they are just not loud enough.

What about Normalize Matrix?
https://hosting.photobucket.com/images/dd496/asmodian3/LAV_-_Normalize_Matrix.png?width=590&height=370&fit=bounds (https://app.photobucket.com/u/asmodian3/p/3d917179-2a91-4639-9d62-100433133ccc)

mclingo
4th July 2021, 01:00
nah, unticked, enable mixing also unticked, just installed pot player, default setting not changes, at least twice the volume, no idea whats going on, defo seems to be LAV filters.

clsid
4th July 2021, 01:04
Enable Mixer and set it to Stereo. Set center mix level to 1.0. Do not touch any other settings, leave everything at default.

mclingo
4th July 2021, 01:12
no difference at all mate, thought it might be an add issue with my Arctis pro wireless headphones but is louder played through my reciever amp and speakers too.

mclingo
4th July 2021, 01:24
ok, so if I enable volume equalization in enhancements in the windows audio properties all the volume comes back, are these supposed to be all disabled?

https://1drv.ms/u/s!AgvFafeelEBior9Oe41B57P7ksa24A?e=DqHMfn


EDIT - that only worked for my amp, did nothing for my headphones, so confused.

EDIT 2 - if I remove the steelseries software so the headphones are running on a basic driver i can get the volume back using the equalization tick enable, anyone any idea whats going on here, surely all enhancments should be disabled?

filler56789
4th July 2021, 02:43
ok, so if I enable volume equalization in enhancements in the windows audio properties all the volume comes back, are these supposed to be all disabled?

https://1drv.ms/u/s!AgvFafeelEBior9Oe41B57P7ksa24A?e=DqHMfn


EDIT - that only worked for my amp, did nothing for my headphones, so confused.

EDIT 2 - if I remove the steelseries software so the headphones are running on a basic driver i can get the volume back using the equalization tick enable, anyone any idea whats going on here, surely all enhancments should be disabled?

It looks like all those "enhancements" are actually *bugs* :)

mclingo
4th July 2021, 11:47
did a full wipe or drivers,. lav and steelseries software. Much better now but there is still a notable difference in volume in LAV playback vs default potplayer and windows movie and TV player, is this normal?

el Filou
4th July 2021, 13:14
If you don't use mixing in LAV, then something else down the chain has to do the downmixing to stereo for your headphones. Or are you using a "surround virtualiser" for headphones in the drivers?
Are you using exclusive mode (this bypasses APOs including those not exposed in Windows Sound Control Panel UI but that are still active anyway, could be useful to test)?
There are so many elements in the chain that can possibly be the culprit.

clsid
4th July 2021, 13:36
Potplayer can use LAV if you disable its internal decoder. Test if it gives lower volume then as well.

Windows has separate volume level for each individual application. Click on the Windows volume icon, and check that you didn't accidentally set lower volume for MPC.

In MPC you can choose different audio renderers, which use different audio APIs: DirectSound/WaveOut/Wasapi
MPC Options > Playback > Output

Does it also happen with stereo sources, or just 5.1 stuff?

And if it happens only with 5.1, then which sounds are lower volume? Everything, including explosions, or just the voices, which are mostly coming from the center channel?

mclingo
4th July 2021, 19:31
HI, yeah I checked the app volume levels, no joy there all 100%.

cheers guys, I have a lot to look at there, i'll do some more diags and report back when I have a rough idea whats going on.

Grimsdyke
7th July 2021, 18:31
I have a few MP4 files on my hardrive which seem to be problematic.
According to MediaInfo v21.03 these files are in 24,520 fps and when opened in MPC-BE + internal splitters + MadVR they play just fine.
But using LAV splitters MadVR claims these files are in 48 fps which means I loose frames on that system during playback.
Does anyone maybe now what could be causing this ?

huhn
7th July 2021, 20:05
the file is most likely vfr.

el Filou
7th July 2021, 20:44
24 to 48 is quite a range! Are they progressive?
You didn't force deinterlacing or something like that in LAV settings?

Grimsdyke
8th July 2021, 13:34
24 to 48 is quite a range! Are they progressive?
You didn't force deinterlacing or something like that in LAV settings?

I think I checked/unchecked all settings that I could find in LAV but the only thing that works is using BE's internal splitter(s).

But are these files just weirdly flagged and BE simply ignores that or should LAV be patched ?
Hope Nev will comment.

clsid
8th July 2021, 14:17
As always with this kind of problems, if you want an answer about what is wrong, then you need to provide a sample file.

DragonQ
10th July 2021, 10:45
I'm sure this has been asked many times but are there any plans to add a "fallback" hardware decoder option? On my desktop I use D3D11 for any content that isn't H.264 or MPEG2, because it doesn't support interlaced video and those two codecs could be interlaced TV recordings. Software decoding is then used for MPEG2 and H.264, which is fine.

However, my laptop is not fine with the same settings because it heats up a lot with loud fans when using software decoding. I essentially need it to use DXVA2 Native for SD/HD and D3D11 for UHD, which isn't possible currently. Alternatively, DXVA2 Native for interlaced content and D3D11 for progressive content, but I know from experience that it's not always easy to tell the difference, particularly with MKV files. Another alternative would be DXVA2 Native for MPEG2/H.264 and D3D11 for everything else? Currently I have to manually change between the two, which is obviously annoying.

PCU
10th July 2021, 16:42
Why does LAV not support Black Magic RAW?

el Filou
13th July 2021, 14:16
Doesn't look like it's FFmpeg https://ffmpeg.org/general.html#Supported-File-Formats_002c-Codecs-or-Features

raymondjpg
14th July 2021, 05:13
I have tried (unsuccesfully) for many years to get english subtitle selection working well in MPC-BE with LAV filters.

No matter what configuration I try with MPC-BE and LAV Splitter, the first english subtitle in a matroska container is selected, whether it be forced, SDH or normal.

Setting LAV Splitter Subtitle Selection Mode to Advanced, and deselecting default track preference in MPC-BE, then "eng|n" in the subtitle field should select a normal english subtitle track, and ignore any english forced or SDH track. Unfortunately not. If the first subtitle listed is SDH then it selects that. Similarly, if the first subtitle listed is forced then it selects that.

Setting "eng|n eng|!h" in the subtitle does not resolve this. I think that I may gave had some success with suppressing the forced subtitle track using "eng|n eng|!f".

I can find no obvious settings in MPC-BE which might override the subtitle selection mode in LAV Splitter.

Can anyone suggest a reason for this behaviour, or offer a suggestion to overcome it?

Currently my only solution is to extract the normal subtitle track and have MPC-BE configured to prefer external subtititles over embedded subtitles.

Windows 10 Professional 21H1
MPC-BE 1.5.8.6302
madVR 92.17
Either XySubFilter, or Internal subtitle renderer
LAV Splitter or LAV Splitter Source 0.75.1 set as preferred External Filter

glorp
14th July 2021, 22:02
Setting LAV Splitter Subtitle Selection Mode to Advanced, and deselecting default track preference in MPC-BE, then "eng|n" in the subtitle field should select a normal english subtitle track, and ignore any english forced or SDH track.

I don't think your advanced mode config string is the correct format. It's needs to be pairs of audio:subtitle language codes separated by spaces or semicolons. The meaning of each pair is: When the audio language is this, then select subs like this. The pairs are evaluated in order to find the first one satisfied and processing stops.

A very basic string for English speaking people who need only forced subs for English dialog, but full subs for any other audio language might be:
eng:eng|f;eng:off;*:eng|d
(the smiley is <colon>o)

This will:
-Select English forced subs when the audio is English, or else
-Turn subs off completely if the audio is English, or else
-Select the English default subs if the audio is anything other than English (since the first two rules handle the English audio cases)

There should be a readme.txt file in the LAV installation directory. It describes this and provides some examples.

raymondjpg
15th July 2021, 01:13
I don't think your advanced mode config string is the correct format. It's needs to be pairs of audio:subtitle language codes separated by spaces or semicolons.

You could be right, I thought that eng|n in the subtitle field assumed normal english subtitles for all audio languages.

However, setting the subtitle field to eng:eng|n or *:eng|n makes no difference to the behaviour in MPC-BE. If the first listed english subtitle in a matroska container is SDH or forced, that will still be selected over a normal english track that is further down the list.

Qotscha
16th July 2021, 15:22
You could be right, I thought that eng|n in the subtitle field assumed normal english subtitles for all audio languages.

However, setting the subtitle field to eng:eng|n or *:eng|n makes no difference to the behaviour in MPC-BE. If the first listed english subtitle in a matroska container is SDH or forced, that will still be selected over a normal english track that is further down the list.

After testing this a bit, it seems to me that LAV does not recognize visual or hearing impaired flags in Matroska at all. In track listing there are no [visual impaired] or [hearing impaired] texts and, when using advanced subtitle selection, hearing impaired tracks are treated like normal tracks (or default and/or forced if you flag them that way).

With TS files those texts are shown in track listing and subtitle selection works correctly.

glorp
16th July 2021, 19:36
mkvmerge added new track header flags for things like hearing/visual impaired, commentary, etc. That was a fairly recent addition (version 54.0, Feb 21). I imagine LAV splitter isn't aware of them yet. IIRC it used to look for "SDH" in the Title tag of a Matroska sub track to determine that it was hearing impaired.

raymondjpg
17th July 2021, 02:08
After testing this a bit, it seems to me that LAV does not recognize visual or hearing impaired flags in Matroska at all. In track listing there are no [visual impaired] or [hearing impaired] texts and, when using advanced subtitle selection, hearing impaired tracks are treated like normal tracks (or default and/or forced if you flag them that way).

With TS files those texts are shown in track listing and subtitle selection works correctly.

If I mux the Matroska file into a TS file with tsMuxeR 2.6.12, then all subtitle tracks (listed as PGS) have no track names and have the default flag set to "Yes".

Interestingly playing the TS file in both MPC-HC 1.8.5 (fairly old) with internal LAV filters 0.74.0, and in MPC-BE with external LAV filters 0.75.1, LAV splitter appears to have picked up the first listed English subtitle track (SDH in the matroska container), but displays subtitles from the normal track. This is consistent with your contention that subtitle selection is correct in TS files.

However, manually selecting the English subtitle from further down the list (the normal track in the matroska container) in the LAV splitter subtitle track selection still delivers the normal English subtitles! It's as if the SDH subtitle has disappeared. The SDH track is still there, as it can be selected under the Play|Subtitle Track selection in the player.

All tests were conducted with eng|n in the LAV Splitter subtitle field. Changing that to eng|h or eng:eng|h does not force the SDH subtitles, throwing some doubt on the contention that subtitle selection is correct in TS files.

mkvmerge added new track header flags for things like hearing/visual impaired, commentary, etc. That was a fairly recent addition (version 54.0, Feb 21). I imagine LAV splitter isn't aware of them yet. IIRC it used to look for "SDH" in the Title tag of a Matroska sub track to determine that it was hearing impaired.

Remuxing the matroska file with the latest version of MKVToolNix GUI (v59.0.0), and setting the "Hearing impaired" flag to "Yes" makes no difference to the behaviour. With eng|n or eng:eng|n in the LAV Splitter subtitle field, the first listed English subtitle track (SDH) is still selected in preference over the normal track further down the list.

This is consistent with your contention that LAV filters may not have caught up with recent changes to flags in the matroska container, but it also appears that LAV splitter is not recognising "SDH" in the name tag of a Matroska sub track.

This behaviour is not new. I raised a similar issue about three years ago in the MPC-BE forum.

nevcairiel
17th July 2021, 12:12
LAV does not even attempt to determine the type of a track based on its name - such detection is honestly rather unreliable in the best of cases, so I also have no plans to do that. So that not working is perfectly expected.
Matroska SDH flags or such are not read yet, but i'll put it on the list to fix.

raymondjpg
18th July 2021, 13:05
LAV does not even attempt to determine the type of a track based on its name - such detection is honestly rather unreliable in the best of cases, so I also have no plans to do that. So that not working is perfectly expected.
Matroska SDH flags or such are not read yet, but i'll put it on the list to fix.

Thanks for that advice.

Regards

Sunspark
19th July 2021, 23:45
ok, so if I enable volume equalization in enhancements in the windows audio properties all the volume comes back, are these supposed to be all disabled?


Part of it is the codec, and part of it is the player. If the audio codec is E-AC3 and if I am using MPC-HC I have to turn on Normalise and 400% max amplication with regain volume checked in the player's options. What you found in the Windows properties is the same basic idea. If using exclusive mode, you will have to use the player's options because the Windows setting is for directsound output.

ryrynz
25th July 2021, 11:40
NVDec support would be awesome for DVD stuff, the difference between it and other deinterlacers is huge based on my own experience.
In the meantime I'll just switch to CUVID manually any time I play a DVD.

Sunspark
1st August 2021, 04:30
Think you're on to something there.

I use the System Default renderer (more info about that below).

It's definitely related to 5.1 vs. 2.0. If I uninstall AC3Filter I can switch between the 5.1 and 2.0 tracks in that sample, and the 5.1 track loads Monogram and the 2.0 track loads LAVCAudio.

With lavcaudio set to "prefer":
AC3 2.0 track: LAVCAudio loads (alone) and sounds good.
AC3 5.1 track: Highest merit AC3 decoder is used. Internal, ffdshow etc. LAVCAudio is not loaded at all.

I'll just include some more info in case it helps (this is all with The Gift sample):

With AC3Filter installed:
LAVFSplitter -> LAVCAudio -> AC3Filter -> Audio Switcher -> Default DirectSound Device - CLSID : {79376820-07D0-11CF-A24D-0020AFD79767}

Without AC3Filter:
LAVFSplitter -> Monogram AAC decoder -> Audio Switcher -> Default DirectSound Device - CLSID : {79376820-07D0-11CF-A24D-0020AFD79767}

Default DirectSound Device should be Speakers on Realtek ALC 885 HDAUDIO. Configured for stereo (tried changing to 5.1, even though I don't have enough speakers, but no change in behavior).

Not using custom mapping in MPC-HC audio switcher.

Tried "DirectSound: AMD HDMI Output" (which I use regularly for my TV), and it also goes straight to Monogram AAC (when AC3Filter isn't installed), like the Realtek DS default.

Tried Speakers (without the DirectSound prefix), and lavcaudio now loads, but no audible result (silence).

The only audiorenderer option in MPC-HC that produces proper sound for me without AC3Filter is "Default WaveOut Device - CLSID : {E30629D1-27E5-11CE-875D-00608CB78066}".

So summarized, I guess LAVCAudio is happy to accept 2.0 tracks, but doeesn't want 5.1 tracks when used with with any of my DirectSound renderers. With non-DS renderers the results are mixed.

If you want me to copy/paste the pin info from a particular place in the chain, with or without AC3Filter installed, let me know.

Apologies for necro-quoting a comment from 10 years ago, but it is still relevant today because I was fiddling with it, so I am going to write about it.

I have the current versions of both MPC-BE and MPC-HC installed and currently both of them have matching LAV filter versions for the purpose of this exercise. One key difference with the audio renderer however is that MPC-BE uses its own mpc audio renderer that is not producing identical sound output to the internal audio renderer in MPC-HC (different CLSIDs) even though both of them are set to exclusive WASAPI mode--as opposed to shared mode.

I felt that the output from MPC-HC was noticeably quieter than MPC-BE and I didn't understand why, since one would assume with WASAPI it would be identical and both were set to 100% volume.

Like Ger, I'm also using a Realtek device and I was working with a 6-channel E-AC3 video that is being downmixed to 2-channel stereo over an analog 3.5mm connection.

One challenge I have, is that I don't have good hearing but I do feel given between two samples to choose from that I can identify which one is has more clarity or is louder than the other.

My current understanding of the 3 main audio outputs Windows uses; DirectSound, WaveOut and WASAPI is that directsound which is the primary sound system will mix & resample anything and everything that it processes. Waveout is also part of the OS but will not be mixed/resampled by Windows afaik, and WASAPI is supposed to be completely untouched by the OS.

In MPC-HC eac3 downmixed voices will be loudest and have decent tonality (more body?) when using Default WaveOut Device.

There is still a slight (I feel) listening difference between it and MPC-BE's audio renderer set for WASAPI exclusive mode but I am not able to quantify what it is but volume wise they are relatively comparable.

So, if you're using MPC-HC downmixing to stereo analog, my opinion is that waveout is best. MPC-BE does not have a waveout renderer. It's either use the wasapi one or directsound.

Probably these results are completely different over HDMI or something else.

For most people likely none of this matters because they're probably using digital connections or receivers, but if someone reading this is using a realtek chip analog 2.1 system I'd love to know if you agree or disagree with my listening observations here.

UPDATE: After clsid wrote below in post #24575 I tried shared mode on the internal audio renderer (wasapi) and everything was loud and clear for my analog output. Comparable to directsound. Directsound is also a shared wasapi method in Windows. I am not using waveout (which is a very old output method) and am set for wasapi shared mode in the internal audio renderer.

ryrynz
1st August 2021, 06:57
Why not record the resulting audio from both for a better analysis? Could compare them visually as well as audibly.

Sunspark
1st August 2021, 07:40
I don't know how, because I've never done it before.

I'm willing to give it a try. Are there instructions you recommend?

Especially if the results can be depicted visually.

clsid
1st August 2021, 13:54
Some people seem to think that exclusive mode magically improves audio quality. It doesn't. It restricts audio output to one application at a time. Which one might consider to actually be a bad thing.

Even when using WASAPI, there can still be resampling taking place in the driver.

Even with DirectSound, resampling is of high enough quality that I doubt you can hear any difference compared to no resampling.

The main difference between WaveOut and DirectSound is how the volume setting in the player behaves. This might be the reason for the difference that you are noticing.
With WaveOut 100% volume in player equals the main output volume level in Windows. With DirectSound 100% in player corresponds to the application volume level (which can be lower than main level). Click on the volume icon in the system tray to see application volume level.

If you want higher volume for voices when downmixing, then that can be achieved by changing the center mix level to 1.0 in LAV audio decoder mixing settings.

el Filou
2nd August 2021, 13:20
One key difference with the audio renderer however is that MPC-BE uses its own mpc audio renderer that is not producing identical sound output to the internal audio renderer in MPC-HC (different CLSIDs) even though both of them are set to exclusive WASAPI mode--as opposed to shared mode. [...] There is still a slight (I feel) listening difference between it and MPC-BE's audio renderer set for WASAPI exclusive mode but I am not able to quantify what it is but volume wise they are relatively comparable.Do you see information in the respective audio renderers' property dialog on whether they are doing the downmixing themself, or leaving that to the audio driver?
From my own personal experience, there is no guarantee even when using exclusive mode that the audio driver won't touch the sound before getting it to the output. For example, my Creative X-Fi will gladly accept multichannel input in exclusive mode even though it only has stereo outputs, and downmix it in the driver.
Exclusive mode only guarantees the sound won't be touched my Windows' mixer, after that what happens is up to the audio driver.
I don't know how, because I've never done it before.
I'm willing to give it a try. Are there instructions you recommend?
I don't have time to do a drawing, but if your motherboard/soundcard has a "line in" 3.5mm input (= blue colour, not pink), you can connect the "speakers" 3.5 mm output directly to it and then record with an application like Audacity during playback.If you want higher volume for voices when downmixing, then that can be achieved by changing the center mix level to 1.0 in LAV audio decoder mixing settings.Indeed, in general if you want best results I find it's preferable to enable mixing in LAV and set it to the same channel layout as your output, rather than to leave it to the audio driver/renderer.

SamuriHL
2nd August 2021, 17:04
The only issue with having LAV decode audio is that for things like ATMOS you lose the extension metadata. Apple gets around this limitation by decoding to PCM and then encoding that and the ATMOS metadata into a MAT 2.0 signal that's sent to the audio device. Man I wish we could do that on the PC.

Sunspark
2nd August 2021, 17:28
UPDATE: I won't keep writing about this because at this point it's about the renderer and not the decoder which the LAV filters are, I just wanted to say one last thing to close this off in case it helps someone else. After clsid wrote in post #24575 above, I then tried shared mode on the internal audio renderer (wasapi) and everything rendered loud and clear on my analog output. Comparable to directsound. Directsound is also a shared wasapi method in Windows. I am not using waveout (which is a very old output method) and am now happy with wasapi shared mode in the internal audio renderer.

el Filou
2nd August 2021, 17:35
LAV has downmixing options even though it's a decoder not a renderer, so I don't think it's off-topic. The issue here was the downmixing and there are many steps in the chain where it can be done.

Sunspark
2nd August 2021, 18:45
Good point to make because the implementation thereof is another variable affecting output (the # value used, etc). I am doing the downmixing in LAV. So there are actually 3 possible places on the chain for the downmixing to happen; in LAV, the MPC-BE audio renderer which has an optional mixer (MPC-HC does not have a visible one, just an option to ignore the system mixer which I have checked), and the Windows sound system mixer itself. My hearing is not capable to test these 3 at all beyond general perceptual differences such as loudness and maybe clarity.

Strange that shared mode made such a difference compared to exclusive mode on my system. I am uncertain whether this is because of the audio driver implementation by Realtek or if Windows itself does additional processing even though ignore system mixer is checked. The output from LAV is 32 bit float, but in Windows my system is configured as 24 bit/48000. I have no idea if Windows "knows" that the extra 8 bits are padding or if it literally resamples it down to 24.

el Filou
2nd August 2021, 21:31
MPC-HC's renderer does automatic downmixing if you check exclusive mode. It then says "Processors: Matrix" in the filter info dialog.

The Windows mixer internally works in 32-bit float too, so there's no conversion from the output of LAV. It then converts to the configured output format for shared mode, but 32 float to 24 int audio is a lossless conversion.

huhn
4th August 2021, 06:41
float to int and such is a bit is a bit messy in the audio world.

with int the negative audio can be "louder" with float the positive can be louder. which makes it a bit messy in conversation with clipping and such.

32 bit float or 24 bit int are good enough that is doesn't matter but lossless no.

LigH
4th August 2021, 09:11
Assuming normalized values (fixed mantissa), it can be equivalent, just omit the mantissa... but there is no guarantee. And floating point samples may exceed the normal range.

huhn
4th August 2021, 11:31
http://blog.bjornroche.com/2009/12/int-float-int-its-jungle-out-there.html

looks like fun

el Filou
4th August 2021, 12:03
Yes we're mostly talking video here so I was assuming no clipping or near-clipping.
In standardized video material it's quite rare to have the audio get close to 0 dBFS I think.

PCU
6th August 2021, 12:08
LAV Filters doesn't support Bink Video v2!

LigH
6th August 2021, 22:21
LAV Filters doesn't support more than libavcodec, the core of FFmpeg. Apparently no programmer implemented it for free for FFmpeg, yet.

Balling
12th August 2021, 23:36
Thanks.
Some developers told me that's intel's problem, but a workaround on decoder side can solve this.
Maybe you can investigate further once you got a iGPU. Anyway, it's up to you.


edit: mpc-be r6170 (https://sourceforge.net/p/mpcbe/code/6170/) changed codes for this situation. because Intel automatically tries some transformation when it met hdr videos (VideoTransferMatrix = BT.2020) with evr.

That is wrong. It is PQ transfer that means HDR. 8 bit videos even in avc tagged with PQ are still HDR. BT.2020 spec is only SDR, HDR was defined in BT.2100. With fflay you can get correct bt.2020-ncl decoding (that still does not allow for primaries and tranafer changes (thus no HDR and no WCG), alas). ffplay
-vf scale=in_color_matrix=auto,format=gbrp.

clsid
13th August 2021, 14:59
Hi nev, just a FYI regarding your GCC 10.3 build. It has a bug in setjmp/longjmp (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100402) which affects the matroska parser. This is currently the #1 crash in latest MPC-HC build.

Could you perhaps make a 10.4-dev build? Meanwhile I will revert back to 10.2.

nevcairiel
13th August 2021, 15:40
I don't do pre-release GCC versions. But I can probably update to 11.2 which also has that fixed.

filler56789
16th August 2021, 00:07
I don't do pre-release GCC versions. But I can probably update to 11.2 which also has that fixed.

:cool: :cool: :cool:

:thanks:

https://files.1f0.de/mingw/

bofex
16th August 2021, 10:56
Hi Nev!
splitter 0.75 can't open the stream!

rtsp://mediacam:mcam5452@192.168.22.140:8554/axis-media/media.amp?videocodec=h264&streamprofile=feratel_1080_stream

until ver. 0.70 (don't test all other newer releases) working fine with stream analysis duration 3000.
(need to add rtsp/CLID manual in reg)

Best Regards
bofex

clsid
21st August 2021, 13:01
I don't do pre-release GCC versions. But I can probably update to 11.2 which also has that fixed.Thanks for the new GCC build.

Would you recommend using the posix threads build? Or does it have any disadvantages compared to the regular build?

richardpl
21st August 2021, 14:36
LAV Filters doesn't support more than libavcodec, the core of FFmpeg. Apparently no programmer implemented it for free for FFmpeg, yet.

Big Lies.

VictorLS
21st August 2021, 18:40
Big Lies.
Proof it, please. Your forks not count ;)
When I've asked deinterlacing of quasi-interlaced channels like 20190815-114627_France24 English.ts (38 MB, 59s) https://disk.yandex.ru/d/quskGJLUjn7bqA - btw it's left from 33e1 11758v:
https://i.postimg.cc/Tpk2wZNx/33e1-10758v-Left.png (https://postimg.cc/Tpk2wZNx)
But here http://forum.doom9.org/showthread.php?p=1846662#post1846662 and here http://forum.doom9.org/showthread.php?p=1847554#post1847554 I was spoken if ffmpeg don't support deinterlacing of such half-height streams so it's impossible LAV Video Decoder can do it. Btw I've found way to do high quality deinterlacing with my AviSynth script and ffdshow raw video filter (with software and even hardware deinterlacing working well on nVIDIA's videocards) or AviSynth filter (only with software Yadif x2 deinterlacing that more actual on AMD's and Intel's videocards which have poorer quality hardware deinterlacing than nVIDIA).

But I believe nevcairiel will can to do automatic deintelacing (to don't change ordinary Auto/Auto settings in LAV Video Decoder) of old ordinary interlaced 20200202-191258_Racing Channel.ts (164 MB, 7min34s) https://disk.yandex.ru/d/U-CvCg8fAF5Djw - I thought it was exception channel so didn't ask that before but today I've received 33e1 12722v16730 Polsat News HD HEVC:
https://i.postimg.cc/Q9WKkjPc/33e1-12722v16730-Polsat-News-HD-HEVCon.png (https://postimg.cc/Q9WKkjPc)
and record two files 20210821-144140_Polsat News HD HEVC.ts (24 MB, 1min5s) https://disk.yandex.ru/d/6QO-DmcBvT-fiw and 20210821-144958_Polsat News HD HEVC.ts (11 MB, 29s) https://disk.yandex.ru/d/-8sldJNRs2DhIg -
look at moving arrow at the end of second Polsat's file
Now deinterlacing of that ordinary interlaced h265 (HEVC) three files works only with follow settings in LAV Video Decoder (I'd want it'll work with Auto/Auto settings):
https://i.postimg.cc/LnSgLKVZ/LAVvideo-Decoder-Deinterlace-Settings.png (https://postimg.cc/LnSgLKVZ)

Balling
21st August 2021, 22:54
@VictoLS
Those new two files are not interlaced, these are 25.000 HEVC progressive. Sigh. First one is indeed interlaced hevc, bottom first.

"Your forks do not count " Nev also uses a fork. Some commits are very strange, like https://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=422f0a61367f068fb8b1b9ab8cc2eee1808c803c (IMHO 16 should be enough, some tried 64, but it is just strange).

"Video Decoder can do it" It can recognise it, but not even x2 the demisions on one type of interlaced hevc due to ffmpeg fixes (top first, see https://trac.ffmpeg.org/attachment/ticket/5514/src13_interlaced_cut.265). There are two here (second can be only done with hwupload workaround) and more possible in the spec, including soft telecine progressive fields and field duplication and triplication. You screenshot setting do not allow for decoding of your first sample correctly.

Workaround is ffplay src13_interlaced_cut.265 -vcodec hevc_cuvid -vf weave,hwupload_cuda,yadif_cuda=mode=0:parity=0:deint=0,hwdownload,format=nv12

-vcodec is still the only option in ffplay. Very funny. Using "s" to step frame by frame you can see that both top and bottom first are correctly decoded, which is nice.

nevcairiel
22nd August 2021, 07:28
Some commits are very strange, like https://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=422f0a61367f068fb8b1b9ab8cc2eee1808c803c (IMHO 16 should be enough, some tried 64, but it is just strange).

What are you even talking about? That commit is from ffmpeg upstream master, and its for mpegts muxing, code thats not even compiled for LAV Filters since its a demuxer/decoder, not a muxer.

As for HEVC interlaced, I have no interest in that topic. If you want it to be supported, convince someone to work on it for ffmpeg, then LAV will automatically inherit it.

VictorLS
22nd August 2021, 09:07
nevcairiel
I see, thanks for reply.

Balling
22nd August 2021, 17:07
I meant this commit, sorry. https://git.1f0.de/gitweb/?p=ffmpeg.git;a=commit;h=9cb8c3a70facbdc9a73750af2c63fcd723eb6ba2;js=1

huhn
22nd August 2021, 17:16
CPU with much more cores are pretty common now and this is not only for real time decode.

VictorLS
22nd August 2021, 21:03
Those new two files are not interlaced, these are 25.000 HEVC progressive. Sigh.
Just read https://forum.videohelp.com/threads/393570-Interlace-Checking
First one is indeed interlaced hevc, bottom first.
It seemed you're right - I haven't know how to call such France24 English.ts streams so I called them quasi-interlaced. May be you can give a link to official document (i.e. ITU) where such France24 English.ts streams are called indeed interlaced?
And yes - in yadif of my script (or in ffdshow raw video decoder Output for hardware deinterlacing) I set Bottom Field first.

Balling
22nd August 2021, 21:36
CPU with much more cores are pretty common now and this is not only for real time decode.

MAX_SLICES is for slice thread decoding, am I right... Yet somehow the original increase was caused by bria SIP videophone avc sample https://github.com/FFmpeg/FFmpeg/commit/6fd91fa11909f27902498648680dbb3d13f1f175 and here increase to 64 happens thanks to HW encoder using h264 (multithreaded SW part of HW decoding, right, genious...) https://github.com/wang-bin/QtAV/issues/923

I was not able to reproduce!

huhn
22nd August 2021, 21:56
slices are also defined while encoding.

i'm not going into the h264 spec to figure out how many slices a decoder has to support and i don't go into the decode spec to figure out if a file encdode with 256 slices need max slices set to 256.

and the github has a bug shown where increasing the max slices help a file with no counter argument where it would hurt.
the bug ticket doesn't go into why it helps.

so why is it odd if no case is know where it hurts? while on the other hand we have indication that increasing slice number get's more and more popular

Balling
22nd August 2021, 22:26
@VictorLS

Please point to a particular post in that thread. I suppose the arrow in 20210821-144958_Polsat News HD HEVC.ts sample may have confused you, but that is just a style choice, since after the first interlaced look it is no longer interlaced looking. In your second sample the news studio is progressive but the camera they are overlaying with is interlaced and they are not deintelacing, well, dumb. But that does not make the stream interaced. As for the ITU-T Rec. H.265 spec, this is specified on page 326, "Table D.2 – Interpretation of pic_struct", "Top field paired with previous bottom field in output order" and "Bottom field paired with previous top field in output order" are used (those two both) in your sample.

nevcairiel
23rd August 2021, 10:48
A too low value for MAX_SLICES has a performance penality for software decoding, as well as just breaking hardware decoding. A higher value does nothing but cost a tiny amount of memory, eg. in software decoding its like 33kb for the 256 slices. That is literally nothing in comparison to the actual slices or frames.
There is no question what value to use, because the answer is always that one that uses a tiny bit more memory but ensures everything decodes as expected. The value of 256 was recommended by one of the primary authors of x264 as a reasonable maximum by the way, and isn't just randomly taken from nowhere.

MAX_SLICES is for slice thread decoding, am I right...

The value has nothing to do with multithreading, it entirely depends on how many slices a video uses. So no, you are not right.

kasper93
23rd August 2021, 17:59
@Balling @VictorLS

Lots of words, but not much content... Victor even pointed to post that referenced related libavcodec issues for HEVC interlaced support.
https://trac.ffmpeg.org/ticket/4141
https://trac.ffmpeg.org/ticket/5514

As we can see there is little to none interest in those issues and unless you convince someone to work on it, it will stay this way. And rightfully so, interlaced HEVC is not something that should really be used in present day. All HEVC broadcast in Poland are currently in testing stage, including those Polsat samples. I've also posted different sample in mentioned issues for reference, but in the end of the day I don't believe this format will be used.

Like with everything if those interlace HEVC files became more widespread probably someone will contribute the support eventually, but until then there is little incentive to work on this.


Side-note, Poland will be switching to DVB-T2 (and HEVC) next year and in technical requirements issued by our government there is no interlaced formats at all. (sorry for polish text, but you can read the tech keywords :))

https://isap.sejm.gov.pl/isap.nsf/download.xsp/WDU20210000515/O/D20210515.pdf
Dla DVB-T2 za podstawowe przyjęto parametry odbiornika cyfrowego zdefiniowanego w ETSI TS 101 154 [15] dla
poziomu 4.1 HDTV: 50 Hz HEVC HDTV 8-bit (rozdzielczości 1920 x 1080 p50, 1280 x 720 p50) MPEG-2 Audio Warstwa 2
i E-AC-3 audio. W przypadku odbiornika telewizyjnego zdolnego do wyświetlania obrazów UHD, odbiornik DVB-T2
obsługuje także format określony w ETSI TS 101 154 [15] w pkt 5.14 HEVC HDR UHDTV IRD wykorzystujący HLG10
oraz HEVC HDR UHDTV IRD wykorzystujący PQ10, Main 10 Profile, Main Tier dla UHDTV o rozdzielczości 3840 x 2160
oraz AC-4 audio.

Balling
23rd August 2021, 22:56
@kasper93 It is being used right now on Ostankino's DVB-T2. Interlaced hevc, bottom first. Also those samples are DVB-S(2), i.e. satellites. Nobody is going to switch from them. https://www.lyngsat.com/Eutelsat-33E.html
@nev
P.S. Apparently you can even have 8192 slices. And that will need actually that value in ffmpeg. Oogh. What a joke. https://forum.doom9.org/showthread.php?p=1320333#post1320333

Then the question is how would you recognize amount of slices in the body? Oogh. And recompile it on the fly. JIT in C. Also HW needing more slices defined is totaly a bug.

@VictorLS You can parse hevc bitstream ffmpeg -i "RTRN 770 03-26 03-26-25.ts" -map 0:17 -c copy -bsf:v trace_headers -f null -

And search for pic_struct. BTW, not cool that you removed the sample (I have it).

GMJCZP
25th August 2021, 16:22
Hi, I was doing some tests with BeHappy and I noticed that the TrueHD FFMPEG audio files can only be played from the beginning, if you want to play it from the middle you will not be able to. Here's a sample:

Sample (http://www.filedropper.com/samplethd)

filler56789
25th August 2021, 17:24
Hi, I was doing some tests with BeHappy and I noticed that the TrueHD FFMPEG audio files can only be played from the beginning, if you want to play it from the middle you will not be able to. Here's a sample:

Sample (http://www.filedropper.com/samplethd)

I presume that that's normal and expected, because TrueHD files are VBR streams which lack the index of a proper container.

nevcairiel
25th August 2021, 18:15
That sounds about right, seeking in raw files is often not supported. Put it into a mka or such if you want a better experience.

GMJCZP
25th August 2021, 19:05
Thank you both for your answers.
@nevcairiel: What has happened to what I raised in my post #24536 (https://forum.doom9.org/showthread.php?p=1945905#post1945905). ?

Balling
25th August 2021, 23:19
.thd files are capable of seeking. https://samples.ffmpeg.org/ffmpeg-bugs/trac/ticket4490/6zc.thd

P.S. Just like .eac3 or .flac without SEEKTABE (ffmpeg does not support SEEKTABLE yet and flac ref. encoder has a slow bug to encode SEEKTABLE) or MPEG-TS unless it is a buggy LG Chess sample or Dolby E since March (commit https://github.com/FFmpeg/FFmpeg/commit/47d0b86cf3d83abdcf60c5c224bbf6f4a0198d5d). This is a bug in ffmpeg "Lossless check failed" which is either because of file created by old very buggy ffmpeg or ac3 presence. AND NO. Mediainfo no longer shows ac3 presence due to a bug. https://forum.doom9.org/showpost.php?p=1882651&postcount=1660

SuperLumberjack
25th August 2021, 23:56
Hello nevcairiel! :)

I have an issue that I posted here with Media Player Classic and some dropped frames which are apparently caused by LAV Audio Decoder: https://forum.doom9.org/showthread.php?t=183149

A nice user recommended to me to talk to you about this problem.

In fact, I have some dropped frames in movies with big soundtracks, in Dolby TrueHD or Dolby Atmos for example, but some movies with DTS-HD Master Audio too.

I thought that the problem came from MadVR, but I tried other video renderers like "EVR custom pres.", I changed modes in LAV Video Decoder, disabled the hardware acceleration, etc., but I noticed that the problem disappeared when I unchecked the "Auto A/V Sync correction" option in LAV Audio Decoder.

But it's only with bitstreaming, not if I choose PCM.

I tried to uninstall Media Player Classic and the filters (I used the K-Lite codecs pack for a long time, but I know that lots of people don't like it) and I started from zero with just Media Player Classic BE, LAV filters and MadVR, all in the last version, for no ambiguity

But I still have the same problem. It's strange, because even with my old laptop I hadn't that :confused:

And I have a AMD Ryzen 5 3600X CPU with a Nvidia GeForce RTX 2060 GPU and 16 Gb of RAM.

It should be enough for 1080p videos no ? :o

So I don't know what to do.

Thanks for your help! ;)

Balling
26th August 2021, 15:00
Okay, your thd sample is actually 7 seconds long (00:00:07.61 + 16 frames, all together 8458 frames, duration of frames is not 1200 fps but 1 102.5 fps, cool, so actual length is 7.671 seconds) and thus when you seek in ffplay it will just seek to the end, since left/right is 10 seconds. Now, to close ffplay when it is over your need -autoexit option:
ffplay -autoexit -i .\sample.thd

mpv will allow to seek 5 seconds and it does seek there on your sample. Ooogh. How I did not see it immediately?

BTW, full parsing in mediainfo (frame count is from 0, not from 1) E496A HD - PTS 00:00:07.671 - 8457 (0x2109) (128 bytes)
E496A Header (4 bytes)
E496A CRC?: 12 (0xC) - (4 bits)
E496A Size: 64 (0x040) - (12 bits)
E496C Timestamp?: 10560 (0x2940)
E496E substream_directory (2 bytes)
E496E extra_substream_word: No
E496E restart_nonexistent: Yes
E496E crc_present: Yes
E496E reserved: No
E496E substream_end_ptr: 61 (0x03D) - (12 bits)
E4970 (Data): (122 bytes)
E49EA --------------------------
E49EA --- AC-3, finished ---
E49EA --------------------------

GMJCZP
26th August 2021, 21:14
Okay, your thd sample is actually 7 seconds long (00:00:07.61 + 16 frames, all together 8458 frames, duration of frames is not 1200 fps but 1 102.5 fps, cool, so actual length is 7.671 seconds) and thus when you seek in ffplay it will just seek to the end, since left/right is 10 seconds. Now, to close ffplay when it is over your need -autoexit option:
ffplay -autoexit -i .\sample.thd

mpv will allow to seek 5 seconds and it does seek there on your sample. Ooogh. How I did not see it immediately?

BTW, full parsing in mediainfo (frame count is from 0, not from 1) E496A HD - PTS 00:00:07.671 - 8457 (0x2109) (128 bytes)
E496A Header (4 bytes)
E496A CRC?: 12 (0xC) - (4 bits)
E496A Size: 64 (0x040) - (12 bits)
E496C Timestamp?: 10560 (0x2940)
E496E substream_directory (2 bytes)
E496E extra_substream_word: No
E496E restart_nonexistent: Yes
E496E crc_present: Yes
E496E reserved: No
E496E substream_end_ptr: 61 (0x03D) - (12 bits)
E4970 (Data): (122 bytes)
E49EA --------------------------
E49EA --- AC-3, finished ---
E49EA --------------------------

Just follow nevcairiel's recommendation. This also happens with the h264 and m2v files and once inside a suitable container the search is activated.

Balling
27th August 2021, 08:21
H264 and m2v are even more so capable of searching. For h264 this should be ideally implemented https://trac.ffmpeg.org/ticket/628

Of course there are some unseakable Annex B files. Like that one: https://github.com/wang-bin/QtAV/issues/923

SuperLumberjack
28th August 2021, 00:01
Hello again,

In fact, as I said, I have repeated frames when the "Auto A/V Sync correction" option is checked in LAV Audio Decoder on my desktop PC.

https://i.lensdump.com/i/ZfID3q.md.png (https://lensdump.com/i/ZfID3q)

But I have no problem with my old laptop bought in 2013... :confused:

https://i3.lensdump.com/i/ZcEO6D.md.png (https://lensdump.com/i/ZcEO6D)

And it is with the same cable!

Balling
28th August 2021, 12:36
You are using madvr there as can be seen by Ctrl-J menu.

el Filou
28th August 2021, 13:30
Does this happen only with this particular file, or with different types of files?
I see on the desktop it's using DXVA11 decoding, and not on the laptop, have you tried to change the decoder? Does this also happen if you use software decoding? Another thing to try: go to the Formats tab in LAV Video and uncheck "Use Microsoft WMV9 MFT decoder".
These are just wild guesses of course.

SuperLumberjack
28th August 2021, 15:58
Thanks for your answers! ;)

You are using madvr there as can be seen by Ctrl-J menu.

In fact, I uninstalled Media Player Classic and the filters and started from zero with Media Player Classic BE and all the filters updated.

Here are the active filters :

https://i.lensdump.com/i/ZcqxoZ.md.png (https://lensdump.com/i/ZcqxoZ)

But the problem is still the same. And no problem with my old laptop as I said and the same cable connected to the AV receiver.

Does this happen only with this particular file, or with different types of files?
I see on the desktop it's using DXVA11 decoding, and not on the laptop, have you tried to change the decoder? Does this also happen if you use software decoding? Another thing to try: go to the Formats tab in LAV Video and uncheck "Use Microsoft WMV9 MFT decoder".
These are just wild guesses of course.

No, I have dropped frames with other movies. But generally not with movies with a Dolby Digital sountrack for example.

In fact, after having tried everything related to the video, I wondered if it wasn't something else. So I just tried to switch from the Dolby TrueHD soundtrack (English) to the Dolby Digital soundtrack (French) with "Animatrix" and then I noticed that there is no dropped frame.

I think it's more with some big soundtracks, but it's strange, because I copied my movies on a SSD, to be sure it's not caused by the HDD.

I tried with no hardware acceleration in LAV Video and with all the other modes. But same problem.

I tried to unckecked "Use Microsoft WMV9 MFT decoder" too and even with the internal filters of MPC.

In all cases, the problem appears when I use LAV Audio Decoder and that the "Auto A/V Sync correction" option is checked.

I have no problem with Windows Media Player or VLC either.

ryrynz
28th August 2021, 21:14
In all cases, the problem appears when I use LAV Audio Decoder and that the "Auto A/V Sync correction" option is checked.


Can you try the Sanear audio renderer (latest builds bottom of page) just to test if it changes anything?

https://github.com/alexmarsev/sanear/issues/20

SuperLumberjack
28th August 2021, 22:49
Yes, but it seems that it's already an internal filter in MPC. No ?
But I will try with the internal audio filter too.

Thanks for your help! ;)

ryrynz
28th August 2021, 23:20
True. Best of luck figuring it out.

GMJCZP
29th August 2021, 04:09
H264 and m2v are even more so capable of searching. For h264 this should be ideally implemented https://trac.ffmpeg.org/ticket/628

Of course there are some unseakable Annex B files. Like that one: https://github.com/wang-bin/QtAV/issues/923

I do not take the whole reason, before when I used Windows XP I installed Real Media Alternative to be able to reproduce the .ra files and the search was activated, now in Windows 7 I cannot do it, I still do not know why.

SuperLumberjack
29th August 2021, 23:48
True. Best of luck figuring it out.

:thanks:

Balling
1st September 2021, 19:42
I do not take the whole reason, before when I used Windows XP I installed Real Media Alternative to be able to reproduce the .ra files and the search was activated, now in Windows 7 I cannot do it, I still do not know why.

BTW, I just checked one .h265 file from Apple Dolby Vision screensavers. Due to NAL unit 62 (which has RPU) it cannot seek in it, while latest PowerDVD can. Yeah. Just a bug.

SuperLumberjack
4th September 2021, 11:34
Hello :)

I just want to bring updates. I tried with the internal MPC audio decoder instead of LAV Audio and I have no problem. Zero dropped frames!

https://i1.lensdump.com/i/ZbfMra.md.png (https://lensdump.com/i/ZbfMra)

https://i2.lensdump.com/i/ZbfY4e.md.png (https://lensdump.com/i/ZbfY4e)

So there is a problem with LAV Audio, but I don't know what :confused:

I will stay with MPC Audio Decoder for the moment. Thanks ryrynz! ;)

ryrynz
4th September 2021, 22:43
I will stay with MPC Audio Decoder for the moment. Thanks ryrynz! ;)

Wicked. Wonder what's going on there.

SuperLumberjack
4th September 2021, 23:57
Yes, strange! :o

clsid
5th September 2021, 00:19
Isn't it obvious? You already concluded that your issues only happened when using "Auto A/V Sync correction" in LAV Audio + bitstreaming.

ryrynz
5th September 2021, 00:52
It's enabled by default though.

If that's the case knowing what's going on here would be useful in fact that's entirely the reason why this option exists.

'If you encounter sync issues, disabling this option can help in debugging the source of the problem'

I really should just remove that option, turning it off does usually never help.


Probably a good thing that never happened.

nevcairiel
5th September 2021, 08:38
If you turn that option off, the result is desync. Thats not something you want. All the option does is ensure that audio stays in sync with the timestamps from the container.

Siso
5th September 2021, 09:23
If you turn that option off, the result is desync. Thats not something you want. All the option does is ensure that audio stays in sync with the timestamps from the container.

What about using reclock, is this option still needed if reclock syncs video and audio?

nevcairiel
5th September 2021, 10:34
The option is always needed. It should only ever do anything if there is a gap in the audio, and you don't want your gap to turn into a sync issue.
If anything goes wrong with bitstreaming, that would just be a bug somewhere. However I think the issues were even system dependent, which has me rather puzzled.

nevcairiel
5th September 2021, 12:47
I did just apply a change that might resolve the issue with TrueHD bitstreaming, as it wasn't properly accounting for varying number of samples in every bitstream frame, which is uncommon for bitstreaming and only happens with TrueHD. It should average out typically, but there might be some corner cases where it didn't, so properly counting them makes sense.

You can test it on tomorrows nightly build.

SuperLumberjack
5th September 2021, 17:34
OK. :thanks: nevcairiel!

I will try when I will have more time ;)

ryrynz
6th September 2021, 00:14
Nice. I was going to check this out as well to see if my setup did the same thing. Will look tonight and report back.

Well, no frame drop issues before and none after but I do wonder if this solves the occasional audio drop out I've experienced.

clsid
6th September 2021, 15:15
Sample with DTS audio (https://www.sendspace.com/file/azot2u) where AV Sync Correction causes playback issues.

nevcairiel
6th September 2021, 16:04
That file is just broken, and AV Sync correction does what its supposed to. The audio in that file has severe gaps, and AV sync correction fixes the timings to maintain sync - that can result in audible gaps in such a case where its really bad.
If you turn it off, you can see how much of a severe desync it already accumulates over this not even 2 minutes of playback.

Other decoders might have more frequent shorter gaps, but it will still have them, constantly. At a quick glance every 8 audio frames there is a gap of some sort. Hence broken file.

My guess is the video was slowed down from 25 to 24 fps, but the audio was not adapted properly. The audio timings look like it might be around 4% gaps. (or an audio stream from a wrong version was muxed in)

clsid
6th September 2021, 17:12
Thanks for checking.

Audio only sample (QDM2) (https://www.sendspace.com/file/ih2jhj) where it also has issues. In this case it might be a bug in FFmpeg, because I think this one once played ok with a much older LAV version.

richardpl
7th September 2021, 15:21
Plays fine with mpv.

clsid
7th September 2021, 23:18
The problem is specifically with the "AV Sync" algo from LAV. It plays fine with that disabled.

huhn
8th September 2021, 09:54
can you think about a block for 8K HEVC10 for AMD navi RDNA1 cards they accept it but the output is ~2 black frames a sec.

they can barely do 60 FPS UHD anyway.

VictorLS
8th September 2021, 20:31
@VictoLS
Those new two files are not interlaced, these are 25.000 HEVC progressive. Sigh.
Only by flags but really Polish broadcasters just wrongly don't change flags according to the transmitted progressive or interlaced content.
In your second sample the news studio is progressive but the camera they are overlaying with is interlaced and they are not deintelacing, well, dumb. But that does not make the stream interaced.
In that file not only camera but tickers are also interlaced
https://i.postimg.cc/68L9dJCh/Polsat.png (https://postimg.cc/68L9dJCh)
In new Polish channel Wydarzenia 24 HD HEVC which replace
33e1 12722v16730 Polsat News HD HEVC
I've recorded 20210907-071646_Wydarzenia 24 HD HEVC.ts (127 MB, 5min52s) https://transfiles.ru/wvr42 all studio (camera, tickers and so on) is clearly interlaced (but flags are progressive):
https://i.postimg.cc/D8CMbxMM/WYDARZENIA.png (https://postimg.cc/D8CMbxMM)
You can parse hevc bitstream ffmpeg -i "RTRN 770 03-26 03-26-25.ts" -map 0:17 -c copy -bsf:v trace_headers -f null -
And search for pic_struct.
Thanks for new for me method but I've used non-CommandLine method before to achieve same results.
Repeat - content is mostly interlaced but sometimes (mostly on adv) is progressive but flags are always progressive:
general_progressive_source_flag=1; general_interlaced_source_flag=0; field_seq_flag=0 и pic_struct=0
BTW, not cool that you removed the sample (I have it).
I suppose I've never seen namely RTRN 770 03-26 03-26-25.ts (RTRN is translating in Moscow) before so you're wrong but I'm sure that file was recorded with DVBViewer or more possible TransEdit and uploaded by another Russian guy with nick vramor ;)
But I believe you can reupload it (vramor will not object) I can analyse that stream with both methods.
At the end
First one is indeed interlaced hevc, bottom first.
I prefer call it quasi-interlaced meaning "quasiprogressive interlaced" (also I called such streams half-height in this thread)
As for the ITU-T Rec. H.265 spec, this is specified on page 326, "Table D.2 – Interpretation of pic_struct", "Top field paired with previous bottom field in output order" and "Bottom field paired with previous top field in output order" are used (those two both) in your sample.
Of course, I've read that but I can't find namely word indeed in all over both T-REC-H.265-201911-I!!PDF-E.pdf downloaded from https://www.itu.int/rec/T-REC-H.265-201911-I/en and https://www.etsi.org/deliver/etsi_ts/101100_101199/101154/02.06.01_60/ts_101154v020601p.pdf (I believe that's lastest so actual versions) with the search engine. Btw I have to admit quasi-interlaced (or such) absent there too as any other term to distinguish two different interlace methods I suppose.
Btw MainConcept HEVC Video Decoder I mentioned in this thrad can qualitatively deinterlace quasi-interlaced HEVC video with Set Deinterlacing to By Renderer and MPC-VR with checked Double the frame rate when deinterlacing suppose, why ffmpeg can't I don't know.

richardpl
8th September 2021, 20:51
I checked your files and it deinterlace just fine with ffmpeg.

VictorLS
8th September 2021, 21:17
I checked your files and it deinterlace just fine with ffmpeg.
Yes, of course. But due to progressive flags deinterlace must be forced as at bottom of my post http://forum.doom9.org/showthread.php?p=1950162#post1950162

Balling
9th September 2021, 11:48
I checked your files and it deinterlace just fine with ffmpeg.

Yeah, with -vf yadif that is. I was also wrong about one of those files, it is actually interlaced, while second appears to have interlaced and progressive content (ads, that is).

Unfortunately, no interlaced flag there (as noted general_progressive_source_flag=1 all over), so it cannot be decoded automatically, not like with pic_struct. And of course, pict_struct is 1/2 height (when fields flag is present) so ffmpeg gets confused. Especially bad is bottom first, since that one is not even recognized by ffprobe as interlaced, while top first is.

"namely word indeed in all over both"

Indeed just meant actually. It is actually interlaced hevc.

Quasi-interlaced is already used by PsF (progressive segmented frame, as part of BT.709, esentially just soft telecine of DVDs). So qasi-interlace has opposite meaning: interlaced package has progressive frames inside, but some frames are absent and marked as repeat flag.

Balling
9th September 2021, 12:05
I did just apply a change that might resolve the issue with TrueHD bitstreaming, as it wasn't properly accounting for varying number of samples in every bitstream frame, which is uncommon for bitstreaming and only happens with TrueHD. It should average out typically, but there might be some corner cases where it didn't, so properly counting them makes sense.

You can test it on tomorrows nightly build.

That is nice, I did a lot of testing of TrueHD lately which resulted in richardpl fixing the encoder that was always forgetting last 16 frames (either 1200 fps for 48000 or less fps for 41000). I thought there are always only 40 samples in a frame, but okay. 48000/40 = 1200

We also activated after that 30 bit samples for 24 bit encoder (AFAIK 30 bit are not preserved, of course) container part of TrueHD encoder. Which appears to be lossless in ffmpeg decoder (all of it 16 bit, 24 bit (it is always 24 bit though, no metadata that signals that it is 16 bit)), but not so much when bitstreaming with Lavfilter. But also some bugs in ffmpeg encoder, like encoding mono TrueHD or no support of 8 channels (including for decoding, that appears to be not lossless somehow).

For those who wanna test it, both wav and hash and md5 stuff default to 16 bit. So you will have to force 24 bit. Then you can check whether outside of 16 bits are present by converting to 16 bit and then back to 24 bit. If the md5 of (again, do not forget to change to 24 bit md5 output) original 24 bit and new 24 bit is the same then it is just 16 bit inside of 24 bit container.

Lavfilter has a problem when bitstreaming those ffmpeg encoded truehd of 44100 Hz to LG C9 (desync, acceleration and deacceleration pattern, and also artefacts) and a problem when doing 48000 (only artefacts here). I also am interested what is the difference between MAT 2.0 streaming and Truehd streaming as specified in EDID. You use the first, ain't you?

Balling
11th September 2021, 13:52
Unfortunately TrueHD fix does not fix above mentioned files. Alas. same behaviour on both. Looks like ffmpeg encoder is after all not conformant even if now lossless with internal decoder.

https://github.com/Nevcairiel/LAVFilters/commit/d5088c6841f20a8722effcd39bf17704a035d868

Balling
11th September 2021, 13:57
This is insanely important patch to fix hevc conformance. Please apply, and review all who read it! https://patchwork.ffmpeg.org/project/ffmpeg/patch/20210910040948.14186-1-haihao.xiang@intel.com/

It fixes this very bad ticket. https://trac.ffmpeg.org/ticket/7799#comment:13

P.S. As for conformance see older version of the patch https://patchwork.ffmpeg.org/project/ffmpeg/patch/20191016025040.31273-2-andriy.gelman@gmail.com/

nevcairiel
11th September 2021, 16:23
LAV is about playback, not remuxing, please don't make any weird claims about nonsense.

VictorLS
12th September 2021, 21:51
nevcairiel
Once you don't want to do only keyframe (i.e. IDR- or I-frame) decoding in LAV Video Decoder can you add in LAV Splitter possibilty to set extremely non-synced mode so if computer can't play i.e. 8K fluently audio will permanently playing with normal speed (so without stuttering) and video more and more behind audio ;)

huhn
13th September 2021, 07:17
use a null renderer.

nevcairiel
13th September 2021, 07:41
Thats not possible, audio and video of the same time are near each other in the file, so you can't read one faster then the other, because where would it go? You would end up with the whole file in memory eventually, and some files are pretty big, so there is limits in place.

Balling
14th September 2021, 21:21
LAV is about playback, not remuxing, please don't make any weird claims about nonsense.

That commit is not for LAV. It is just for ffmpeg itself, it appears to trigger bugs in ripping Blu-rays and stuff as you can see in trac issue, its workaround hevc_metadata on the other hand only keeps the base layers
(nuh_layer_id == 0). BTW, do you want TrueHD encoded music I was testing with? I mean you can produce it yourself in latest ffmpeg... Maybe you already know that ffmpeg TrueHD is not HW decoding conformant even if it lossless with ffmeg decoder. Also, Atmos TrueHD music works perfectly as in 2020 triggering Atmos icon! I tested on John Williams - Live in Vienna Blu-ray.

clsid
14th September 2021, 22:11
LAV only uses a subset of ffmpeg code, primarily just demux/decode. hevc_mp4toannexb_bsf is not used by LAV, so that patch is irrelevant. This is not a ffmpeg discussion topic.

richardpl
15th September 2021, 08:10
That commit is not for LAV. It is just for ffmpeg itself, it appears to trigger bugs in ripping Blu-rays and stuff as you can see in trac issue, its workaround hevc_metadata on the other hand only keeps the base layers
(nuh_layer_id == 0). BTW, do you want TrueHD encoded music I was testing with? I mean you can produce it yourself in latest ffmpeg... Maybe you already know that ffmpeg TrueHD is not HW decoding conformant even if it lossless with ffmeg decoder. Also, Atmos TrueHD music works perfectly as in 2020 triggering Atmos icon! I tested on John Williams - Live in Vienna Blu-ray.

If you want to help you could provide info what is broken to get hw encoder compliant. But you instead chose to spam here. Also you can not help use because you are already banned from project because of your nonsense behavior.

Scoty
15th September 2021, 09:54
Is there a also a zip version for nightly? I see only a exe for install but need a zip please.

nevcairiel
15th September 2021, 10:08
Nightlies are only available as the installer.

filler56789
15th September 2021, 11:01
Is there a also a zip version for nightly? I see only a exe for install but need a zip please.

You can extract the relevant files from the installer with the Inno Setup Unpacker:

http://innounp.sourceforge.net/

VictorLS
17th September 2021, 22:50
Can anybody with powerful processor play 20210917-003653_(noname) SID 1.ts (1.6 GB, 6min) https://transfiles.ru/34i62 I've recorded from SAT with LAV Video Decoder and tell us what processor can play that h265 4K 4:2:2 video absolutely fluently in what player and renderer?
Thats not possible, audio and video of the same time are near each other in the file
Thanks for explanation but I believe while streaming it can be somehow done to audio decoding have full priority over video decoding (despite of any sync problem - I saw yellow clock in GraphEdit long time ago) and video decoding must be dropped to nearest I-frame to achieve non-stuttering audio playing - I'm sorry if my English is poor for you understand my point of view ;)
PS. With MPC-BE's MpegSplitter audio is hearable and non-stutter much longer while playing 8K with only I-frame decoding than with LAV Splitter so I presume MpegSplitter lets more non-synced video with audio.
PPS. Can somebody explain difference between MainConcept MPEG Push Demultiplexer and ordinary MainConcept MPEG Demultiplexer (without Push) (as I understand last one like LAV Splitter)?

Snowknight26
17th September 2021, 23:44
Can anybody with powerful processor play 20210917-003653_(noname) SID 1.ts

What is your goal? To find the cheapest one that can? Lots of CPUs can play that without stuttering/frame drops/etc.

Case in point:
https://www.stfcc.org/pics/i/0700a0e2625ae1dc1b7bbdd60c0b57f5_th.png (https://www.stfcc.org/pics/i/0700a0e2625ae1dc1b7bbdd60c0b57f5.png)

VictorLS
18th September 2021, 00:17
What is your goal? To find the cheapest one that can?
Yes, of course. Namely so I've chosen my 3-core Athlon II x3 460 because I knew such dual-core Athlon could decode h264 1920x1080i50 4:2:2 ~20 Mbit/s transmitted from some SAT feeds (for example small record of first FormulaE race in history at 13 September 2014 09-13_13-19-15_hy1_002.mkv (127 МБ, 35с) https://transfiles.ru/h0o80) with about 80% load of both cores absolutely fluently ;)
Btw you haven't mentioned your CPU ;)

Snowknight26
18th September 2021, 00:54
Btw you haven't mentioned your CPU ;)
Right, because it's overkill: 5900X.

I don't think your question is suited for this thread though, as any well-written multi-threaded decoder will perform similarly.

VictorLS
18th September 2021, 09:27
Right, because it's overkill: 5900X.
I don't think your question is suited for this thread though
I agree, but may be someone tried with slower processor on may compare LAV Video Decoder's speed (fps in renderer or DXVA Checker) with i.e. Mainconcept HEVC Video Decoder ;)

Balling
18th September 2021, 10:39
"powerful processor play 20210917-003653_(noname) SID 1.ts"

This sample breaks ffmpeg:

ffmpeg.exe -i "20210917-003653_(noname) SID 1.ts" -f null -

[hevc @ 000001e28cdd7000] video_delay is larger in decoder than demuxer 3 > 0.
If you want to help, upload a sample of this file to https://streams.videolan.org/upload/ and contact the ffmpeg-devel mailing list. (ffmpeg-devel@ffmpeg.org)

Looks like b frame pyramid is too crazy. Or maybe it cannot decode it that fast, since ffplay does not trigger it (but ffplay stops playing it too).

VictorLS
18th September 2021, 12:07
Balling
I don't see "video_delay" in log https://disk.yandex.ru/d/2a3wRKChuIjPGQ and ffplay plays both files.

Balling
18th September 2021, 12:34
Balling
I don't see "video_delay" in log https://disk.yandex.ru/d/2a3wRKChuIjPGQ and ffplay plays both files.

ffmpeg.exe -i "20210917-003653_(noname) SID 1.ts" -f null -

Not 004653 (made a typo). EBU bars is also decoded here no problem.

VictorLS
18th September 2021, 15:10
Not 004653 (made a typo)
I thought so - there is ffplay for both files in my log - repeat: I saw video on both.

Balling
18th September 2021, 15:55
>ffplay for both files in my log

That only happens with ffmpeg with -f null

giangibr
18th September 2021, 17:57
Hi,
my name is Gianluca, I am 52 yo, I live in Italy and I am a c/c++ windows programmer forever

I developed many years ago a software for a mediacenter called Chimera (I posted about that in an italian website HTPCItalia, but now that site doesn't exists anymore), this project is composed by:

1) tuner.exe - interface with tuner, save audio/video data on a timeshift file using a directshow filter developed by me called AVNetworkSender

2) chimera.exe - the frontend, I am able to see live TV by reading data from timeshift file, also for that I use a filter developed by me called AVNetworkReceiver (it's a push filter)

Everythings work ok from many years, but now, for switching from DVBT to DVBT2, things are changed.

I bought a DVBT2 tuner, and I have seen that MPEG2-Demultiplexer doesn't work with HEVC programs, so I realized a directshow filter that I use for creating a .ts timeshift file (by analyzing video and audio pids and writing on file only the pids for program requested)

So, on the frontend side, I have a .ts file that I need to view, but, WARNING, this file is growing (it is writed by tuner) while LAV Splitter decode it.
2 problems:

1) I create a graph few seconds after the .ts file is created, so LAV splitter detect Lenght of file at that time (for example 2 seconds) and keep that duration, also if the file is growing
2) Until the .ts file is at least 20 - 25 seconds of duration, LAV splitter stop the graph, so I must press play again. After 20 - 25 seconds, the playback of file is correct, but duration remain the same the LAV splitter has detected at the rendering time.

I tried also to create a Source Async Filter and use LAV splitter instead of LAV splitter (source) but the behavior is the same, although I return the current (increasing) Lenght of file. I also tried to implement CSourceSeeking interface and modified m_rtDuration and m_rtStop but nothing changed.

So my question is:
is there a solution for my problem? Is there a setting so LAV Splitter can update stream duration while play a timeshift file?
I tried to have a look of your source code but it is too complex for me ...

Of course I can share all my software Tuner and Chimera if someone is interested

Bye
Gianluca

VictorLS
18th September 2021, 19:10
That only happens with ffmpeg with -f null
My fault - now I see video_delay is larger in decoder than demuxer 3 > 0 there
But after remux in mkv with mkvtoolnix 61.0.0.0 seems all OK
Btw may be you want help to do ffmpeg better? So upload shorted sample at https://streams.videolan.org/upload and write to ffmpeg-devel@ffmpeg.org ;)

Balling
19th September 2021, 09:23
Even simple ffmpeg.exe -i "20210917-003653_(noname) SID 1.ts" -c copy new.ts

fixes this issue. Sigh.

Balling
20th September 2021, 15:24
I tested 192 kHz TrueHD, also bitstreaming works like 48000 (those use 1200 fps too yet 160 samples in frame).

Balling
24th September 2021, 16:12
I just remembered that Lavfilter's ffmpeg was not updated yet, so this https://github.com/FFmpeg/FFmpeg/commit/7ebeef6affb5f683febdc86f2dc45a339ac97f6c

can be used to fix 44100 Hz TrueHD desync that was affected! See the comment on mailing list about how 44100 was not correctly handled and thus I think MAT 2.0 packer was getting wrong stuff. https://patchwork.ffmpeg.org/project/ffmpeg/patch/20210905155836.6278-1-onemda@gmail.com/#66568

mzso
1st October 2021, 16:26
Hello!

When I record larger videos with OBS with lossless settings, full range setting, 4:4:4, everything seems fine, except when I play it back. I see madVR claiming "limited range (says upstream)" and plays it back in a borked way. When I manually switch to PC range, the video appears correctly.
I guess something is set wrong in the video file. Either that or something is wrong during decoding.

Where is the data stored that tells the decoder whether the video is limited range or not? Is it in the video stream, or the container? Can it be easily fixed?

Here's a sample: https://drive.google.com/file/d/1Gl8Ahqz5edfFd7V9URCeChNJP81K_u1G/view?usp=sharing

el Filou
1st October 2021, 20:03
On my system with latest LAV, it says "limited range (best guess)" instead of "(says upstream)".

Is it possible to configure OBS to output to another container format?
I don't know if it's possible for the UT Video bitstream to store the range information, but if I remux your file to mkv and manually add a full range flag (Range=2) in the colour format header, LAV then passes it correctly to madVR.

nevcairiel
2nd October 2021, 08:14
All UtVideo YUV formats are defined as limited range. (see the format list here: http://umezawa.dyndns.info/archive/utvideo/utvideo-22.6.0-readme.en.html#fourcc - your video was encoded as ULH4). You could use UtVideo RGB instead, as thats full range by definition.
Its unfortunate that OBS basically encodes a bad format like that.

mzso
2nd October 2021, 19:34
All UtVideo YUV formats are defined as limited range. (see the format list here: http://umezawa.dyndns.info/archive/utvideo/utvideo-22.6.0-readme.en.html#fourcc - your video was encoded as ULH4). You could use UtVideo RGB instead, as thats full range by definition.
Its unfortunate that OBS basically encodes a bad format like that.

Huh. That sucks. My guess is they resort to this because recording in RGB has abysmal performance. But I guess at least they should have added a full range flag to the stream in the container as el Filou did.

On my system with latest LAV, it says "limited range (best guess)" instead of "(says upstream)".

Is it possible to configure OBS to output to another container format?
I don't know if it's possible for the UT Video bitstream to store the range information, but if I remux your file to mkv and manually add a full range flag (Range=2) in the colour format header, LAV then passes it correctly to madVR.
How would I go by adding the full range flag? Did you use ffmpeg or mkvmerge? (or something else?)

Balling
3rd October 2021, 01:44
Well, you can use mpv.com --vf=format=colorlevels=full "borked full range video.avi"

As to how: ffmpeg.exe -i "borked full range video.avi" -c copy -color_range 2 borked1.mkv

Please check it is indeed BT.709 matrix.

filler56789
6th October 2021, 07:33
LAVFilters-0.75.1-6.exe

https://files.1f0.de/lavf/nightly/

clsid
6th October 2021, 14:58
Any chance JRVR will become available as a standalone filter in the future?

nevcairiel
6th October 2021, 15:41
Any chance JRVR will become available as a standalone filter in the future?

This is not planned.

chros
6th October 2021, 18:54
What is that?

huhn
6th October 2021, 19:01
jriver video renderer.

lvqcl
6th October 2021, 19:03
Apparently it's JRiver Video Renderer: https://yabb.jriver.com/interact/index.php/topic,130657.0.html
edit: ninja'd

chros
7th October 2021, 06:40
That's something, especially cross-platform support, congrats to you (guys)!

pacuro
7th October 2021, 08:52
Went through this topic and did not found an answer so can anyone confirm working hardware accelerated AV1 playback with LAV Filters?
I have built setup with i7-11700k and H570 on Windows10 and DXVA2-native playback of Costa Rica 4k60 AV1 is bad. H/W playback is indicated but it is not smooth. About 50-55 fps in my opinion.
I know there is a lot of cpu power to run this in software. I just need to check if UHD750 can handle AV1 4K60 in hardware.

jmone
7th October 2021, 08:52
+1 - Great work, a high quality cross platform Video Renderer. Well done nevcairiel.

nevcairiel
7th October 2021, 10:25
Went through this topic and did not found an answer so can anyone confirm working hardware accelerated AV1 playback with LAV Filters?
I have built setup with i7-11700k and H570 on Windows10 and DXVA2-native playback of Costa Rica 4k60 AV1 is bad. H/W playback is indicated but it is not smooth. About 50-55 fps in my opinion.
I know there is a lot of cpu power to run this in software. I just need to check if UHD750 can handle AV1 4K60 in hardware.

I believe Intel only supports AV1 with D3D11, not DXVA2.

goldfield
7th October 2021, 14:52
Hi there,

I've been using madvr for a long time, in conjunction with LAV filters,
with an RTX 3070 as the graphics card now.
Here I have noticed the following problem.

If "Hardware decoder to use" = DXVA2 or D3D11 (native) is set in LAV-Filters,
the HDR tone mapping (even at 60Hz) runs absolutely smoothly, without frame drops.
But the automatic detection of black bars in madvr doesn't work with DXVA2/D3D11 (native).
(A known problem).

If "Hardware decoder to use" DXVA2 or D3D11 = (copyback) is set,
the automatic detection of black bars works without any problems.
But 60Hz/HDR generates strong jerks and frame drops.

In madvr I have already tested all possible settings unsuccessfully to fix the jerking/dropped frames.
The only possibility for a smooth playback of 60Hz/HDR seems to me only to switch to DXVA2 or D3D11 = (native).

Is there a possible option in "LAV Filters" to switch automatically to (native) with 60Hz/HDR (or generally with HDR),
and automatically back to (copyback) with SDR.

lvqcl
7th October 2021, 16:47
Went through this topic and did not found an answer so can anyone confirm working hardware accelerated AV1 playback with LAV Filters?

I believe Intel only supports AV1 with D3D11, not DXVA2.
Yes. Here's what DXVAChecker says for Intel UHD 750:
AV1_VLD_Profile0: D3D11, SD / HD / FHD / 4K / 8K

QBhd
7th October 2021, 17:11
Hi there,

...

Why even use the HW decoder? Is your CPU so old that it can't handle the decoding?

QB

pacuro
7th October 2021, 17:35
@lvqcl to clarify - I know theory. I am looking for proof in reality.
@nevcairiel - I was writing from work and made mistake. You are right, it was all about D3D11 of course. Hardware decoding engaged but something is wrong with performance. Still looking someone with Rocket Lake to check this.

https://bpccdn.fra1.digitaloceanspaces.com/original/3X/8/b/8b6984f030b86884bd3bc5dd012efa1471e9ffdf.png

lvqcl
7th October 2021, 17:50
Hardware decoding engaged but something is wrong with performance.

Probably because of copyback. Try different renderer, such as madVR or MPC VR.

VictorLS
7th October 2021, 18:30
I have the same problem as goldfield with any renderer while playing 4K with hardware acceleration on my weakest possible nVIDIA GTX750 GM206 1GB videoRAM but I know nevcairiel well enough to even don't ask automatic switching ;)
Although we have possibility of manual switching so must say thanks for that - i.e. soon nVIDIA CUVID may becomes not supported by LAV Video Decoder so all nVIDIA's videocards will show "broken streams" with artifacts with hardware acceleration. Using software decoding often leads to not fluent playback even in cases when CPU isn't full load.

goldfield
7th October 2021, 19:35
Why even use the HW decoder? Is your CPU so old that it can't handle the decoding?

QB

At least it seems so.
(CPU is an i7-7700 CPU @ 3.60GHz.)

With "Hardware Decoder to use" = None I also have extreme jerking at 60Hz/HDR, and massive dropped frames.
The CPU load is around 70-80%, says my task manager.
With DXVA2 (native) just 20%.

el Filou
8th October 2021, 15:00
Why even use the HW decoder? Is your CPU so old that it can't handle the decoding?Maybe to save on useless wasted power and therefore also additional heat and fan noise that comes with it? (Edit: also things like seeking and fast forward are quicker with hardware decode)

huhn
8th October 2021, 17:10
you should not generalise these statemants with AMD you are nearly for sure faster with CPU decode.

with 4K you should be better of with hardware decode but even that is not a given.
there are some system which break with copyback and get throttled to no end.
intel hardware decode usually also loads the GPU shaders so using hardware decoding can lower your available resources.

ryrynz
9th October 2021, 02:24
Couple of minor releases of Dav1d since it was last updated in LAV, could you update plz? Thanks.

KoD
13th October 2021, 19:37
I've just switched from the official release LAVFilters-0.75.1 to the LAVFilters-0.75.1-7 nightly, and run into an issue when playing some bluray ripped ts files over the network (samba shares from another Windows PC). This is with madVR as renderer in MPC-BE 1.5.8.6300 (the most recent 1.5 version). At exactly the same points in the file, the playback starts stuttering massively, queues get depleted to 1-8 in madVR and never recover. These are ts files form a ripped bluray, nothing special about them, they're plain 1080p H264 + pcm 2.0 48KHz files.

The issue does not happen when I play the files from a local SSD, only when playing over the network. I've copied the files on the remote Windows PC from one of its disks to another, but the stutter happens the same way even from the new location, at exactly the same points in the file.

When I transfer the files on the remote Windows PC from one of its disk to another it's a constant >100MB/s transfer rate, so it's not an issue of file fragmentation. When I access the files over the network, it's a constant 80 MB/s transfer rate, with no drops whatsoever. A ping to the Windows PC from the computer that plays the file to the computer that hosts the file shows 2-4ms pings, with no variations. This makes me believe it's not an issue of latency or transfer speed.

And the stutter does not happen with the official 0.75.1, either.

Is there a way to run a debug version of the recent version of lav filters with some tracing enabled to identify where the issue lies?

ryrynz
14th October 2021, 09:56
Is there a way to run a debug version of the recent version of lav filters with some tracing enabled to identify where the issue lies?

Most likely the update to ffmpeg, try running LAVFilters-0.75.1-3 and confirm LAVFilters-0.75.1-4 is where the issue begins.

nevcairiel
14th October 2021, 10:03
There were no significant changes of any kind since 0.75.1 that should effect such behavior, either in LAV or in FFmpeg, since FFmpeg updates are currently coming from a release branch until the next FFmpeg release, which only contains security fixes.
But all nightly builds are available, so you could try to figure out where it started, if anywhere.

KoD
15th October 2021, 10:35
I repeated my tests and I eventually run into the issue when using the official 0.75.1 version of the LavFilters too, even though previously they worked fine.

I noticed the issue did not happen with other video renderers, only with madVR. And it seems to be triggered by a setting in madVR.

The "madVR settings -> rendering -> general settings" contains two options:
- delay playback start until render queue is full
- delay playback start after seeking, too

I had "delay playback start until render queue is full" enabled since forever, and this does not cause any problem.
I have recently enabled "delay playback start after seeking, too", and unfortunately this seems to be the cause of the sudden stutter and queue depletions in madVR after seeking in the file.

In order to reproduce the playback issue, I kept seeking to the file location where I knew the issue would manifest itself, then I paused the playback to refill the madVR buffers (because the madVR queues get depleted right away after seeking when playing a file over the network), and then resumed playback. Playback would resume, but when hitting certain points in the file the madVR queues would suddenly start to deplete and would not resume by themselves anymore. Pausing the playback would refill them, and on resuming playback everything would work again for a while and then the queue depletion would occur once more, and so on.

I can't really explain why the madVR queue depletion would happen at pretty much the same points in the file. What I can say is they don't happen anymore with that second setting disabled.

The issue only manifests itself on high bitrate content (like a 7GB ts file for a 25 minute anime episode), and not on low bitrate content like a 2 GB 45 minutes TV episode DVD file ripped to a mkv. It also does not happen when playing the same high bitrate file from a local SSD. Maybe the issue is triggered when playing from a SSD too, but it recovers too quickly to notice the stutter, while it never recovers when playing over the network.

Additional playback details would be: video decoding is done using D3D11 hardware acceleration in lav video, on automatic setting (so, native decoding). The GPU is a RTX 3090. The CPU is a Ryzen 5900x, so this should not be a bottleneck either. The video player is MPC-BE 1.5.8.6300. The MPC-BE audio renderer is used for WASAPI exclusive playback (using events). All "trade quality for performance" settings in madVR are disabled. madVR is using Direct3D 11 for presentation, but with "present a frame for every VSync" disabled. madVR "automatic fullscreen exclusive mode" is disabled too (as it makes sense no more on Windows 10 anyway). I have the lav video "Deinterlacing mode = Aggressive", because it would otherwise miss deinterlacing old DVD TV episodes (Star Trek Voyager ones, for example), but this should not matter on the progressive material I experienced the issue, and madVR does not do deinterlacing in d3d11 native mode anyway (I have to disable native d3d11 decoding in lav video when watching such deinterlaced material, by selecting explicitly the GPU to use for decoding, as only then madVR deinterlaces the video content).

One more thing is that using in madVR settings "rendering -> windowed mode -> after last render step = flush and wait (loop)" instead of the default "flush & wait (sleep)" makes the stutter events occur less, and allows more intensive scaling algos to work without frame stutters even on the integrated graphics of a i7 4790K CPU in another system (with all "trade quality for performance" settings disabled there, too). More intensive scaling algos in this case means Jinc for upscaling, SSIM for downscaling, and super-xbr for chroma upscaling, using correct linear light-scaling and with the anti-ringing filter enabled.

clsid
15th October 2021, 16:28
Increasing the queue settings in LAV Splitter could help in your case.

KoD
15th October 2021, 16:55
Increasing the queue size in lav splitter was one of the things I tried without effect, unfortunately.

vanden
18th October 2021, 10:31
Hello,
Here are my previous post
https://forum.doom9.org/showthread.php?p=1935458#post1935458
https://forum.doom9.org/showthread.php?p=1935623#post1935623

I have a BUG with Windows 10 Enterprise 1903 1909 2004 20H2 21H1 21h2 ...
All other version (from 1809) works normally.
HP DL580G5 PC (4 x Xeon X7460) 32Go Ram and GTX 650 Ti.
I also tested a GTX 770 with Windows 10 Enterprise 21H1 et 21H2 : Same result.
This PC does not support the GTX 960 and GTX 1060 ... impossible to have a GPU decoding!
Test with Nvidia driver 425.31, 456.71, 472.12.
Sound blaster X-Fi Xtreme Audio sound card in analog 24bits / 96Khz.
it works the same if I choose the SPDIF.
Driver XFXA_PCDRV_LB_WIN8_1_05_0001
The tests below are made with Nvidia driver 425.31 (the last to do 3D).

Testing an UltraHD Blu-ray with Windows 10 Enterprise 1809 :
MPC HC 1.9.16 + LAV 0.75.1.4 + MadVR 0.92.17 :
https://i.ibb.co/3FPDQDN/1809.jpg
I took a fullscreen windowed screenshot, because a Windows 1809 screenshot does not work in Exclusive. But in Exclusive it works well.

Test with Windows 10 Windows 10 Enterprise 21H1 (update from Windows 10 2004) :
MPC HC 1.9.16 + LAV 0.75.1.4 + MadVR 0.92.17 :
https://i.ibb.co/Jr4v6K8/21h1-16.jpg
https://i.ibb.co/0hCR3r5/21h1-32.jpg
https://i.ibb.co/5rTVT8b/21h1-128.jpg
I made screenshots in Fullscreen windowed, Windows 21h1 works well in Exclusive. I could have made an exclusive screenshot.
I tried several values for "decoder queue", "upload / dxva / render queue" and "present queue".

I did a clean installation (blank disk / USB key Windows 10 21H2) same results !
MPC HC 1.9.16 + LAV 0.75.1.4 + MadVR 0.92.17 :
https://i.ibb.co/9s6rCFD/21h2-16.jpg

Test with Windows 11 Enterprise 22000.194 ((update from Windows 10 21H1) update from Windows 10 2004) :
MPC HC 1.9.16 + LAV 0.75.1.4 + MadVR 0.92.17 :
https://i.ibb.co/3CcKYNC/22000-194.jpg
When it works it's OK ... but sometimes there is nothing to do, even after a reset of the graphics card (reset CRU Or MadVR "Custom modes" "remains GPU") you have to restart for it to work ...

I did a clean installation (blank disk / USB key WIndows 11 22468) …
MPC HC 1.9.16 + LAV 0.75.1.4 + MadVR 0.92.17 :
https://i.ibb.co/vLw7Nt3/22468.jpg
And the miracle it works nickel! even a little better than Windows 10 1809 !! a little less resource on the cpu.

I did a clean installation (blank disk / USB key WIndows 11 22000.282) it works the same (WIndows 11 22468).
MPC HC 1.9.16 + LAV 0.75.1.4 + MadVR 0.92.17 :
https://i.ibb.co/HrTM4jZ/22000-282.jpg

The only solution is to switch from Window 10 1809 to Windows 11 ... if this is possible with the final version ... ??

clsid
18th October 2021, 13:56
Test with DXVA Checker:
https://bluesky-soft.com/en/DXVAChecker.html

In your Windows 10 screenshots the GPU is labelled as "GPU 2" and "GPU 1". So there might be an unwanted GPU 0 with generic MS driver.

Tip: with D3D11 hardware acceleration in LAV you can choose the GPU that it should use.

vanden
18th October 2021, 23:54
Test with DXVA Checker:
https://bluesky-soft.com/en/DXVAChecker.html

In your Windows 10 screenshots the GPU is labelled as "GPU 2" and "GPU 1". So there might be an unwanted GPU 0 with generic MS driver.
Tip: with D3D11 hardware acceleration in LAV you can choose the GPU that it should use.it's the same with windows 10 1809 ...
I redid the test in GPU0: it still works well.
https://i.ibb.co/CJ752kS/1809-GPU0-128.jpg
I redid the test with Windows 10 21H2 in GPU0: it doesn't work better ...
https://i.ibb.co/TkKk8Zq/21h2-GPU0.jpg
https://i.ibb.co/MsBdm6N/21h2-GPU0-16.jpg

But I wonder where it came from ... in fact it's CRU (Custom Resolution Utility) (https://www.monitortests.com/forum/Thread-Custom-Resolution-Utility-CRU). When I do restart64 the GPU increases by 1 ...

clsid
19th October 2021, 00:28
Your "working" 1809 screenshots show high CPU usage. So why do you think hardware accelerated DECODING is active there? Are you just looking at the GPU usage graph in task manager? That is WRONG!!! The newer Win10 versions do not show all activity in the graph. Change DXVA scaling in madVR to something else, and you will probably see the GPU 3D usage increase.

MPC-HC will show "H/W" in the status bar when hardware accelerated decoding is active. It is as simple as that.

nevcairiel
19th October 2021, 05:25
A 650 Ti is far too old for HEVC hardware acceleration. In general HEVC isn't supported before Pascal (1000 series), with one exception, the GM206 chip used in the 950/960 (but no other 900 series cards). Most definitely not in 600 series.

vanden
19th October 2021, 09:46
Your "working" 1809 screenshots show high CPU usage. So why do you think hardware accelerated DECODING is active there? Are you just looking at the GPU usage graph in task manager? That is WRONG!!! The newer Win10 versions do not show all activity in the graph. Change DXVA scaling in madVR to something else, and you will probably see the GPU 3D usage increase.

MPC-HC will show "H/W" in the status bar when hardware accelerated decoding is active. It is as simple as that.

This PC does not support the GTX 960 and GTX 1060 ... impossible to have a GPU decoding!

A 650 Ti is far too old for HEVC hardware acceleration. In general HEVC isn't supported before Pascal (1000 series), with one exception, the GM206 chip used in the 950/960 (but no other 900 series cards). Most definitely not in 600 series.
Yes that's it and as already said 900 and 1000 impossible on it.

el Filou
19th October 2021, 15:52
There were changes to the CPU scheduler in 1903 (notably to better support architectures like Ryzen that can have different latencies between different cores from the same socket), this definitely looks like a Windows scheduler issue. I don't know if it would even be possible for the application (LAV + madVR) to fix that.
Maybe the fact it's Windows Enterprise has something to do with it too, of course using Pro you would only get half the sockets.
I would try posting this in a more general-purpose Windows forum to see if maybe people know settings to fine-tune the CPU scheduler to make it behave more like 1809.
That Xeon won't be officially supported by Windows 11, but maybe with a clean install from a ISO it will install.

nevcairiel
19th October 2021, 16:09
The decoder queue appears to be full, thats where LAVs involvement ends. In any case, LAV is not designed for multi-CPU systems, and I do not plan to put any effort into such setups either. You could try to externally constrain it to one CPU to avoid high latency between CPUs, but thats all I got.

vanden
19th October 2021, 16:48
There were changes to the CPU scheduler in 1903 (notably to better support architectures like Ryzen that can have different latencies between different cores from the same socket), this definitely looks like a Windows scheduler issue. I don't know if it would even be possible for the application (LAV + madVR) to fix that.
Maybe the fact it's Windows Enterprise has something to do with it too, of course using Pro you would only get half the sockets.
I would try posting this in a more general-purpose Windows forum to see if maybe people know settings to fine-tune the CPU scheduler to make it behave more like 1809.
That Xeon won't be officially supported by Windows 11, but maybe with a clean install from a ISO it will install.Yes I read that: https://borncity.com/win/2019/06/30/windows-10-v1903-optimization-for-zen-based-amd-cpus/
https://www.reddit.com/r/intel/comments/dbya11/windows_10_19h2_update_to_include_favored_cpu/
https://www.anandtech.com/show/11550/the-intel-skylakex-review-core-i9-7900x-i7-7820x-and-i7-7800x-tested/7
https://www.tomshardware.fr/windows-10-la-mise-a-jour-2h9-disponible-meilleure-gestion-du-cpu/


https://i.ibb.co/RvQ1zqk/1809-21-H2-22000.jpg
the 1st difference between (1507 to 1809), (1903 to 21H2) and Windows 11 is that the processors are not managed the same.
the second difference is also the use of the GPU (45% 1809, 31% Windows 11) when at (1903 at 21H2) it does not go up because : dropped frames ...

The decoder queue appears to be full, thats where LAVs involvement ends. In any case, LAV is not designed for multi-CPU systems, and I do not plan to put any effort into such setups either. You could try to externally constrain it to one CPU to avoid high latency between CPUs, but thats all I got.
I can select the number of cpu (By LAV or by the task manager) = it's worse !
it works very well with Windows 10 (1507 to 1809) and also with some Preview and developer of Windows 11.


but in my old post I tested EVR in bilinear algorithm:
http://vandenk.free.fr/Evr.jpg
On 1809 it works well :
http://vandenk.free.fr/1809-EVR-Bill-FSdirec3d.jpg
On 20H2 it works as well :
http://vandenk.free.fr/20h2-EVR-Bill-FSdirec3d.jpg

But look at the diferentes GPU usage 1809=44% 20H2=90% ...

chros
19th October 2021, 17:21
Additional playback details would be: video decoding is done using D3D11 hardware acceleration in lav video, on automatic setting (so, native decoding). The GPU is a RTX 3090. The CPU is a Ryzen 5900x, so this should not be a bottleneck either. The video player is MPC-BE 1.5.8.6300. The MPC-BE audio renderer is used for WASAPI exclusive playback (using events). All "trade quality for performance" settings in madVR are disabled. madVR is using Direct3D 11 for presentation, but with "present a frame for every VSync" disabled. madVR "automatic fullscreen exclusive mode" is disabled too (as it makes sense no more on Windows 10 anyway)...

One more thing is that using in madVR settings "rendering -> windowed mode -> after last render step = flush and wait (loop)" instead of the default "flush & wait (sleep)" makes the stutter events occur less, and allows more intensive scaling algos to work without frame stutters even on the integrated graphics of a i7 4790K CPU in another system (with all "trade quality for performance" settings disabled there, too). More intensive scaling algos in this case means Jinc for upscaling, SSIM for downscaling, and super-xbr for chroma upscaling, using correct linear light-scaling and with the anti-ringing filter enabled.
After last render step -> "flush & wait (sleep)" uses more CPU (visible in task manager), try out "don't flush" everywhere first (according to madshi's recommendation (https://forum.doom9.org/showthread.php?p=1405640#post1405640)), it works fine here with discrete GPU (see my signature), although the performance gain is negligible with this fast GPU (I can't use e.g. NGU Sharp low vs med for chroma with HDR10 pixelshader) and there's no rendering avg/max stats on OSD (but I consider this cosmetics).

vanden
20th October 2021, 00:31
The decoder queue appears to be full, thats where LAVs involvement ends. In any case, LAV is not designed for multi-CPU systems, and I do not plan to put any effort into such setups either. You could try to externally constrain it to one CPU to avoid high latency between CPUs, but thats all I got.
Well finally I redid the test, is it working !!
I was wrong !

but by LAV that is not enough, it must be done with the task manager on MPC HC like this :
https://i.ibb.co/QDcGvcz/Affinit-2.jpg
After you have to find the core that is the least used and we can re-light 1 ... impossible to do directly.
https://i.ibb.co/YjQhBWq/Affinit-3.jpg
The result under Windows 10 21H2 :
https://i.ibb.co/LQD7W3b/21H2OK.jpg

KoD
22nd October 2021, 20:45
After last render step -> "flush & wait (sleep)" uses more CPU (visible in task manager), try out "don't flush" everywhere first (according to madshi's recommendation (https://forum.doom9.org/showthread.php?p=1405640#post1405640)), it works fine here with discrete GPU (see my signature), although the performance gain is negligible with this fast GPU (I can't use e.g. NGU Sharp low vs med for chroma with HDR10 pixelshader) and there's no rendering avg/max stats on OSD (but I consider this cosmetics).

It's normal to see increased CPU usage, because it uses a loop to check for the D3D device flush to be completed instead of yielding the thread execution and letting the OS to wake the thread when it's done. Using "flush & wait (loop)" is definitely more responsive than (sleep) though, so I'll keep using it. The stutters happen with "flush & wait (sleep)" too, anyway. It's trying to fix this issue that made me switch to "flush & wait (loop)" in the end.

Regarding the stutter issues, they happen no matter what I do. The solution I thought I found was no solution at all, the stutter-after-skip-forward still happens. And it happens with MPC-VR as well, it's not just with madVR.

The buffer-depletion causing stutters happen as soon as I skip forward in a high-bitrate file in MPC, like when I play ts ripped BluRay files. All files with LPCM 2.0 audio have this issue. Pressing quickly arrow up 4 times (forward 20 sec for each press) and right once (forward 5 sec for a press) is enough to trigger the stutter. The video renderer queues get depleted, and the file stutters. Pausing the file and letting the buffers fill again and then resuming playback works for a while, but soon it starts happening again out of the blue. I can repeat this pause and resume playback many times, but as long as I don't close the file for playback, the stutters come back after a while.

The only way to keep watching the file stutter-free is to close the file and open it again (I have "Remember File position enabled in the player settings, so it starts playback from the location where I closed the player). As long as I don't skip forward or backward in the file, the stutters don't happen anymore until the end of the playback.

I tried many things, but nothing gets rid of this behavior when playing files over the network in MPC-BE or MPC-HC. I thought it might be my external USB DAC, but playing sound over the TV speakers has the same issue. I thought it might be a bug in the MPC audio renderer, but using the DirectSound audio renderers has exactly the same issue.

I thought there might be an issue with the server or the network connectivity but that's not it either. Latency measurements to the network server while playing a file shows no variations in latency at all. The transfer speed is as high as a Gbit connection allows. CPU usage monitoring on the server shows minimal usage (not surprisingly as it's an overpowered Windows PC for a file server task, running Windows Server).

The playback PC is again too overpowered to have this kind of issue. And it happens with no other processes in the background (I don't have social media apps or such running in the background, nor hardware monitoring software).

I simply don't understand why network playback has such kind of issues on such hardware, but that's how it is.

This is not a recent issue. It's been happening for years, but I had a i7 4790K system until this year, and thought that maybe it was due to that. It was not, apparently. Network playback is just as unreliable on the new system as it was on the old one when using MPC, lav filters and madVR.

clsid
22nd October 2021, 22:22
Are you playing actual .ts files? Then the solution would be to remux into .mkv.

MPEG-TS container does not have a seek index for quick seeking, so the splitter needs to parse a lot more data when seeking.

flossy_cake
24th October 2021, 16:47
Hello

Is my understanding correct that: LAV Video D3D11 hardware acceleration could work to accelerate decoding of HEVC on older GPUs which don't natively support HEVC decoding?

I am trying to get accelerated HEVC decoding on an old R9 380 which doesn't support it natively.

Thanks

lvqcl
24th October 2021, 18:30
Is my understanding correct that: LAV Video D3D11 hardware acceleration could work to accelerate decoding of HEVC on older GPUs which don't natively support HEVC decoding?

No, it's absolutely incorrect. Basically, D3D11 is a new programming interface to the same old hardware decoding blocks.

D3D11 can't do anything if your video card doesn't have hardware blocks to decode HEVC.

strumf666
24th October 2021, 23:20
win11, MPC-BE, lav filter and madvr; using latest nightly, D3D11 seems to be broken with latest amd drivers on 5700xt, dxva2 cb or software works. I tried playing a 1080p and 2160p with HDR .mkv but it immediately pauses/black screen.

huhn
25th October 2021, 05:48
Hello

Is my understanding correct that: LAV Video D3D11 hardware acceleration could work to accelerate decoding of HEVC on older GPUs which don't natively support HEVC decoding?

I am trying to get accelerated HEVC decoding on an old R9 380 which doesn't support it natively.

Thanks

no. it's one of many ways to access the hardware decoder not to accelerate unsupport formats.

flossy_cake
25th October 2021, 08:46
Thanks. In that case I might look into a new GPU which can decode HEVC.

I wonder though if it's possible in theory to implement the decoder in OpenCL which is supported by all GPUs. It wouldn't be as efficient as having the hardware decoding blocks, but maybe it could still exploit the parallelism of the GPU to achieve some acceleration that would make 4k HEVC playable?

huhn
25th October 2021, 11:39
it's but GPUs are absolutely terrible at this and a CPU is usually much better.

there are even cards that do that.

clsid
25th October 2021, 11:48
You need to get a newer GPU. END OF DISCUSION.

ryrynz
26th October 2021, 04:53
Thanks. In that case I might look into a new GPU which can decode HEVC.


That's the only solution for you as CLSID said above.


I wonder though if it's possible in theory to implement the decoder in OpenCL which is supported by all GPUs. It wouldn't be as efficient as having the hardware decoding blocks, but maybe it could still exploit the parallelism of the GPU to achieve some acceleration that would make 4k HEVC playable?

Pipedream. No market for this worth anyone's time to code it. When your software needs outgrow your hardware you upgrade your hardware. It won't be the last time..

DMU
27th October 2021, 17:41
What could be the reason for the decoding failure when playing some AVC video? Decoding breakdown occurs when jumping forward and continues until the video scene changes. Video playback at this time stutters, although MADVR does not show drop frames.

Pic. (https://drive.google.com/file/d/1eZ4kbUsCvTQ-q7fgZZis8rmm_qP1c_ko/view?usp=sharing)
Video sample. (https://drive.google.com/file/d/14enCzfnygnsD4dEvX6BjbxL0EvKkcUgu/view?usp=sharing)

lvqcl
27th October 2021, 18:27
What could be the reason for the decoding failure when playing some AVC video?

Does software decoding work?

DMU
27th October 2021, 18:51
Yeah, when using avcodec everything is fine.

flossy_cake
2nd November 2021, 16:03
What could be the reason for the decoding failure when playing some AVC video? Decoding breakdown occurs when jumping forward and continues until the video scene changes. Video playback at this time stutters, although MADVR does not show drop frames.

Pic. (https://drive.google.com/file/d/1eZ4kbUsCvTQ-q7fgZZis8rmm_qP1c_ko/view?usp=sharing)
Video sample. (https://drive.google.com/file/d/14enCzfnygnsD4dEvX6BjbxL0EvKkcUgu/view?usp=sharing)

Sounds like something to do with waiting for the next keyframe, maybe the GPU doesn't handle that scenario well.

sofakng
16th November 2021, 21:14
What's the difference between the following D3D11 decoding modes?

d3d11 cb
d3d11 cb direct
d3d11 native

d3d11 cb appears to mean D3D11 Copy-Back and is automatically enabled when AviSynth Filter is inserted into the graph.
d3d11 cb direct is more confusing but it is automatically enabled when I use EVR with D3D11 which isn't compatible so it's translating (?) it?
d3d11 native is self explanatory and appears to only work with madVR renderer. (ie. entire video frame/processing is done on GPU)

nevcairiel
16th November 2021, 21:56
"direct" is more efficient/faster, but only works if the next filter in the chain provides compatible video buffers and accepts the correct format. Most video renderers do. The AviSynth filter apparently does not.

sofakng
17th November 2021, 18:47
Is this something that I could ask the AVISynth Filter author to add support for? ...or is it really only applicable to renderers?

Adding support for something faster/more efficient would be nice.

LordX2
17th November 2021, 23:09
So, finally sat down just to enjoy a flick after getting MadVR and MPC-HC all sorted, and had something wackily different happen to me.

After about an hour and 15 minutes of straight watching, I noticed a 'click' in the sound - like a sound glitch. BTW I am bit-streaming through my Denon. This encode had Atmos.

Then, out of the blue, ALL the sound started coming out of just one of my rear speakers. I put the movie back 10 seconds, and bam, all sound normal again.

Could maybe just be the encode I was watching - but does this scream anything else to anyone? Never experienced anything like it before, but haven't really gotten to sit down and watch something more than 20 mins in a while.

LordX2
18th November 2021, 03:21
Watched a stereo encoded file with the kids tonight - at one point, it sped up the audio hilariously - like chipmunked it out.

I randomly unchecked Convert channels to standard layout - and that seemed to fix the problem.

Does that make any sense? Why did that solve it?

LordX2
21st November 2021, 02:01
Realized I was on a pretty outdated LAV filter version. Updated that - solved!

LordX2
21st November 2021, 22:28
Bitstreaming is causing a dropped/repeat frame now. It is a repeatable error at certain points in movies. Disabling bitstreaming stops the frame drops. But I LOVE my bitstreamed audio. Any ideas or suggestions would be greatly appreciated!

I lowered my version of MPC-HC to last year - .74 LAV Filters.... now no more dropped/repeat frames. What is in the newer versions that could cause this?

benus
28th November 2021, 22:28
A 650 Ti is far too old for HEVC hardware acceleration. In general HEVC isn't supported before Pascal (1000 series), with one exception, the GM206 chip used in the 950/960 (but no other 900 series cards). Most definitely not in 600 series.

Well to be 100% correct we should mention the pre-Pascal GeForce GTX 750 SE made for Asian market that had HEVC hardware decoding fully implemented :sly:

nevcairiel
28th November 2021, 22:30
Well to be 100% correct we should mention the pre-Pascal GeForce GTX 750 SE made for Asian market that had HEVC hardware decoding fully implemented :sly:

That uses the GM206 chip I already mentioned. No need to list every single model, especially when its very obscure. :p

PCU
5th December 2021, 13:58
That uses the GM206 chip I already mentioned. No need to list every single model, especially when its very obscure. :p

Hi nev
I have good news for you: I talked to developers in the official IRC FFmpeg chat, giving the source code to decode the Bink 2 format, which is open source, can be downloaded here:

https://git.nihav.org/?p=nihav.git;a=summary

That contains AGPL decoder for Bink2

I hope I helped you.

lvqcl
5th December 2021, 14:11
I hope I helped you.
You didn't.

PCU
5th December 2021, 14:28
You didn't.

What do you mean!?

nevcairiel
5th December 2021, 17:37
AGPL is a useless nonsense license, it makes it useless, and even then i'm not interested in some external library for some game codec. If FFmpeg supports it, then so will LAV, otherwise it just won't.

XYAKIŞIKLI
19th December 2021, 12:38
Hello nevcairiel.

Nevcairiel does not open any of the hls urls and links installed in LAV Filters (hls Apple HTTP live Streaming). While the other media players I have shown in the pictures are playing the hls url and links, the LAV Filters I have installed on my computer do not open the hls url and links. It is very necessary because we watch MPC-HC live TV broadcasts on the computer at work and at home. Our favorite regular player is the MPC-HC player. We prefer the MPC-HC player because it uses less CPU and memory (ram).

The addresses of the sites that broadcast live TV are below. We will be glad and happy if you add codecs that decode hls within these sites.

https://www.cnnturk.com/canli-yayin
https://www.kanald.com.tr/canli-yayin
https://www.teve2.com.tr/canli-yayin

For example, we create the m3u8 file from the live TV broadcasting sites with the Internet download manager of the HLS, HLS_LIVE, HLS_VOD codecs that broadcast live TV.

https://live.duhnet.tv/S2/HLS_LIVE/cnnturknp/track_4_1000/playlist.m3u8
https://kdlive.duhnet.tv/S2/HLS_LIVE/kanalddainp/track_4_1000/playlist.m3u8
https://teve2.duhnet.tv/S2/HLS_LIVE/teve2np/track_3_750/playlist.m3u8
https://2122248084.duhnet.tv//S12/HLS_VOD/338498_7883/2500/prog_index.m3u8

I really like LAV Filters codec components and I love using them. I wish you continued success, Nevcairiel. Goodbye with my regards.
Thank you for working with LAV Filters.

Detailed picture explanation links

https://imgur.com/19zgPaR
https://imgur.com/U4ifWMr
https://imgur.com/146xOQM
https://imgur.com/0J3ugg5
https://imgur.com/CwceYjm

nevcairiel
19th December 2021, 12:52
These links work just fine in MPC-HC for me. Just make sure you use the built-in HTTP(S) filter, so the Microsoft URL reader doesn't get in the way.

clsid
19th December 2021, 16:21
The problem is on the webserver side. First one has expired certificate. The m3u8 links all give HTTP error 405.

XYAKIŞIKLI
20th December 2021, 23:21
Hello nevcairiel.

Thank you for your kind and gentle response. Also, thank you for your interest.
I tried the MPC-HC player in the latest version and versions before the last version.
It doesn't play any of the HLS links and urls.

It would be nice if MPC-HC player could play and open HLS links and urls.
Nevcairiel is our request. Goodbye and take care, nevcairiel.

Detailed picture explanation link

https://imgur.com/aWSiOzu

pytyj
14th January 2022, 02:12
Hello, I'd like to ask question about playing Atmos movies on my computer using Potplayer + LavFilters + Madvr.
My Lavfilters has been upgraded to 0.75.1-43. My power amplifier is Marantz Sr7013 and 7.1.4 speakers.
1:When TrueHD is checked, the original sound data 4800hz 24 bit - > is converted to 19200hz 16 bit, which can light up the power amplifier Atmos. Is this the original Atmos data? Has the sound quality decreased?
converted to 19200hz 16 bit amp shows Dolby Atmos (https://imgtu.com/i/7iC37Q)

2:When bitstreaming format is unchecked, Atmos decoding is lost and becomes 7.1 channel 4800hz 24 bit or 7.1 channel 4800hz 32 bit.
With the same Atmos track and different settings, the three sounds are compared.
Atmos 19200hz 16 bit sound is relatively small, not lively enough, and the dynamic feeling is small. But there is more sound positioning.
7.1 channel 4800hz 24 bit = 7.1 channel 4800hz 32 bit, louder sound, more lively and dynamic. I like the sound instead, but there is no Atmos.
I wonder. Why are these options so different?
7.1 channel 4800hz 24 bit amp shows Dolby Surround (https://imgtu.com/i/7iC10g)
7.1 channel 4800hz 32 bit amp shows Dolby Surround (https://imgtu.com/i/7iClnS)

Aleksoid1978
14th January 2022, 10:40
DO not look at Pot's stats, look at what your amp shows.

pytyj
18th January 2022, 16:20
DO not look at Pot's stats, look at what your amp shows.
Now it's very clear that the original track format is 48000HZ 24bits.
But displayed by potlayers is 192000hz 16bit.
The power amplifier only displays Dolby Atmos.
I hope someone can answer whether the actual output track is 24 bits or reducedto 16 bits.Make clear who is wrong, displayed wrong or decoded wrong?

clsid
18th January 2022, 16:47
The tray icon of LAV Splitter can show you the actual format of the audio stream.

When bitstreaming, it is normal that the audio decoder does not show the actual output format of the audio stream. The value you see describes the "wrapper" of how data is transferred. Just ignore it.

When bitstreaming, your receiver is in full control of the audio. It does the decoding, mixing and volume control. So if it sounds worse, blame your receiver.

nevcairiel
22nd January 2022, 09:18
LAV Filters 0.76

LAV Splitter
- NEW: Added an option to re-evaluate subtitle stream selection when the audio language changes
- NEW: Improved advanced subtitle selection syntax with negated flags (positive and negative flags can now be combined for more flexible selection)
- Changed: Improved variant/stream selection in DASH and HLS streams
- Changed: Video streams with the highest bitrate are preferred (if equal resolution)

LAV Video
- NEW: Support for passing DoVi metadata to video renderers
- NEW: BobWeaver (BWDIF) software deinterlacer (a blend of YADIF and Weston, focusing on their individual strengths)
- NEW: Support for FIC screen capture video
- Changed: D3D11 video surfaces are flushed to black before decoding, avoiding green artifacts
- Changed: D3D11 devices are created up to feature level 12.1

LAV Audio
- Fixed: TrueHD bitstreaming could result in A/V sync issues or drop-outs
- Removed: Support for the external DTS decoder (dtsdecoderdll.dll) has been removed

Download: Installer (both x86/x64) (https://files.1f0.de/lavf/LAVFilters-0.76.exe) -- Zips: 32-bit (https://files.1f0.de/lavf/LAVFilters-0.76.zip) & 64-bit (https://files.1f0.de/lavf/LAVFilters-0.76-x64.zip)

A lot of good changes in this version, so lets into it!

LAV Splitter subtitle selection improvements

The advanced subtitle selection syntax in LAV Splitter has been improved, and positive and negative flags can now be combined, for example "d!f" means "default but NOT forced", which was not possible before (without a lot of extra conditions and strict ordering)

This makes negated conditions feel a lot more intuitive and simplifies advanced selection rules for users with very specific requirements.

Additional, a new option was introduced to re-select subtitles when the audio language is changed by the user, which interacts primarily with advanced rules that can make use of the audio language in the selectors as well. This is off by default, but can be enabled in the LAV Splitter options.

Video stream selection improvements

LAV Splitter should now more consistently select higher bitrate variants and higher bitdepth video streams when playing streaming content playlists like HLS or DASH.

BobWeaver (BWDIF) in LAV Video

BobWeaver is the latest algorithm to join the options available in LAV Video for software deinterlacing. BobWeaver is a hybrid algorithm made up of YADIF and Weston-3-Field, focusing on the strengths of both, and in ideal circumstances producing a better image then both algorithms individually, at barely an increased cost to performance.

DoVi metadata

LAV Video can now export DoVi metadata to a video renderer. This allows video renderers to process the DoVi metadata and improve the image. Note that LAV Video does not do any processing of the image itself, so a capable renderer is required.

--

Otherwise, half a year of fixes and improvements have gone into this version, in LAV itself and all external libraries.
If you encounter any issues, or regressions, please report them with as much detail as possible, ideally with a sample file if applicable.

filler56789
22nd January 2022, 12:01
LAV Filters 0.76

:thanks: :goodpost:


LAV Audio
- Fixed: TrueHD bitstreaming could result in A/V sync issues or drop-outs
- Removed: Support for the external DTS decoder (dtsdecoderdll.dll) has been removed


1) :cool:

2) yeah, about time! :sly:

mzso
22nd January 2022, 23:26
Hi!

Probably a silly question, but how can I tell that Windows Sonic is working properly. Is it even supposed to work with LAV decoding audio?
I can tell of course it's better than plain downmixing to stereo. But lacking a reference, I can't say if it's decoding Atmos correctly or just plain multi-channel audio as virtual speakers, like old Dolby Headphone and such. (I know very little of atmos and its like.)

(On a side not it's a bit disappointing it apparently completely ignores stereo audio, unlike Dolby Headphone. )

jmone
23rd January 2022, 11:02
Nice Update! I had a bit of a play with the new deinterlacer (BWDIF) and while it has promise, it is still not in the same league as HW deinterlacing from CUVID. I know CUVID is deprecated, but in the last update there was a hint that using FFmpegs NVDEC was on the cards. Any thoughts on this at this stage?

Thanks
Nathan

varekai
23rd January 2022, 12:11
Thanks for the update, much appreciated!
Question: Will installing 0.76 keep my settings in 0.75.1? Or will it overwrite them?

Best regards
varekai

nevcairiel
23rd January 2022, 23:54
Settings should be preserved when upgrading.

mzso
24th January 2022, 10:51
Changed: D3D11 video surfaces are flushed to black before decoding, avoiding green artifacts

When does this come into play? I did notice green artifacts when seeking just now. (madVR shows Directx11)
Or is it only relevant when using Dx11 acceleration. (Which I have disabled for AVC, and is decoded in software.)

Edit:
Experimenting a bit, it seems there's no green with HW acceleration. Which makes me wonder, couldn't the SW decoder do the same?

(By the way, where does this wacky shade of vivid green come from?)

nevcairiel
24th January 2022, 10:54
Only applies to D3D11 accelerated decoding. Software frames should be grey-ish black when they are filling in for a missing frame, but that part is all handled by FFmpeg.

mzso
24th January 2022, 11:30
Only applies to D3D11 accelerated decoding. Software frames should be grey-ish black when they are filling in for a missing frame, but that part is all handled by FFmpeg.

Well, it seems like I get green artifacts with SW, which disappears if I enable acceleration.

On a side note I have long standing problem with SmartDVB where SD channels (mpeg2) would go to blank video. (not sure what fails in the chain) In which case the whole screen turns green, even when I use D3d11 acceleration. (It's set to use all three parts of LAV)

dbezerra
27th January 2022, 17:58
LAV Filters 0.76

LAV Splitter
- NEW: Added an option to re-evaluate subtitle stream selection when the audio language changes
- NEW: Improved advanced subtitle selection syntax with negated flags (positive and negative flags can now be combined for more flexible selection)
- Changed: Improved variant/stream selection in DASH and HLS streams
- Changed: Video streams with the highest bitrate are preferred (if equal resolution)

LAV Video
- NEW: Support for passing DoVi metadata to video renderers
- NEW: BobWeaver (BWDIF) software deinterlacer (a blend of YADIF and Weston, focusing on their individual strengths)
- NEW: Support for FIC screen capture video
- Changed: D3D11 video surfaces are flushed to black before decoding, avoiding green artifacts
- Changed: D3D11 devices are created up to feature level 12.1

LAV Audio
- Fixed: TrueHD bitstreaming could result in A/V sync issues or drop-outs
- Removed: Support for the external DTS decoder (dtsdecoderdll.dll) has been removed

Download: Installer (both x86/x64) (https://files.1f0.de/lavf/LAVFilters-0.76.exe) -- Zips: 32-bit (https://files.1f0.de/lavf/LAVFilters-0.76.zip) & 64-bit (https://files.1f0.de/lavf/LAVFilters-0.76-x64.zip)

A lot of good changes in this version, so lets into it!

LAV Splitter subtitle selection improvements

The advanced subtitle selection syntax in LAV Splitter has been improved, and positive and negative flags can now be combined, for example "d!f" means "default but NOT forced", which was not possible before (without a lot of extra conditions and strict ordering)

This makes negated conditions feel a lot more intuitive and simplifies advanced selection rules for users with very specific requirements.

Additional, a new option was introduced to re-select subtitles when the audio language is changed by the user, which interacts primarily with advanced rules that can make use of the audio language in the selectors as well. This is off by default, but can be enabled in the LAV Splitter options.

Video stream selection improvements

LAV Splitter should now more consistently select higher bitrate variants and higher bitdepth video streams when playing streaming content playlists like HLS or DASH.

BobWeaver (BWDIF) in LAV Video

BobWeaver is the latest algorithm to join the options available in LAV Video for software deinterlacing. BobWeaver is a hybrid algorithm made up of YADIF and Weston-3-Field, focusing on the strengths of both, and in ideal circumstances producing a better image then both algorithms individually, at barely an increased cost to performance.

DoVi metadata

LAV Video can now export DoVi metadata to a video renderer. This allows video renderers to process the DoVi metadata and improve the image. Note that LAV Video does not do any processing of the image itself, so a capable renderer is required.

--

Otherwise, half a year of fixes and improvements have gone into this version, in LAV itself and all external libraries.
If you encounter any issues, or regressions, please report them with as much detail as possible, ideally with a sample file if applicable.

Very interested in the Dolby Vision feature. Any render that supports it yet?

kasper93
27th January 2022, 19:45
Very interested in the Dolby Vision feature. Any render that supports it yet?

There are people actively working on it in libplacebo. But in DirectShow world? Are there even other renderers than madVR and MPCVR (from mpc-be guys)? And no, none of them is supporting it yet.

dbezerra
27th January 2022, 20:48
There are people actively working on it in libplacebo. But in DirectShow world? Are there even other renderers than madVR and MPCVR (from mpc-be guys)? And no, none of them is supporting it yet.

Yeah, I am aware of the efforts with LibPlacebo and I also got a recent build of MPV with DV enabled to play with. However, I do have a problem with FFMPEG and some ATMOS tracks (like Thor Ragnarok as an example) that pushes me away from MPV. I already reported it but no improvements so far. Nev fixed it on LAV, so a DirectShow solution would be best...

mzso
30th January 2022, 09:58
Hi!

How does Dolby Atmos work? I'm trying to figure it out. LAV only shows EAC3 as input and PCM as output. So is it only decoded as plain 5.1 multi-channel?
Do I need some fancy proprietary audio decoder? Or is it supposed to work with LAV filter/Audio + Windows Sonic (or Dolby Access) ?

nevcairiel
30th January 2022, 10:11
LAV does nothing with Atmos. The only way to make any use of it is to use bitstreaming and an external Atmos-capable receiver.

mzso
31st January 2022, 12:45
LAV does nothing with Atmos. The only way to make any use of it is to use bitstreaming and an external Atmos-capable receiver.

So there's no software solution whatsoever? I thought Dolby Access, and Windows Sonic mainly existed for this (via using headphones).

Crimson Wolf
31st January 2022, 12:53
If you have Dolby Access, turn it on. Then go to MPC-HC settings > Playback > Output > Audio Renderer: Change this to "Default DirectSound Device"

mzso
31st January 2022, 15:50
If you have Dolby Access, turn it on. Then go to MPC-HC settings > Playback > Output > Audio Renderer: Change this to "Default DirectSound Device"

I wonder what does that accomplish? MPC is also based on LAV and nevcairiel just said it does nothing with Atmos. (Which I interpret that it's decoded as plain multi-channel audio, essentially TrueHD, if it's even lossless.)

clsid
31st January 2022, 16:15
When decoding with LAV, the extra Atmos layer is ignored, so it only decodes the TrueHD audio.

To include the Atmos part as well you need to bitstream. That Dolby Access app supposedly emulates an Atmos capable receiver that you can bitstream to. But it might now work will all renderers, hence that settings suggestion.

mzso
31st January 2022, 17:48
When decoding with LAV, the extra Atmos layer is ignored, so it only decodes the TrueHD audio.

To include the Atmos part as well you need to bitstream. That Dolby Access app supposedly emulates an Atmos capable receiver that you can bitstream to. But it might now work will all renderers, hence that settings suggestion.

I see. There is no Atmos bitstreaming option in LAV though. Do I need to enable bitstreaming for TrueHD or E-AC3? Or do I need bitstreaming to by supported by the player?

(Is this approach only functional for Dolby Access or Windows Sonic as well?)

clsid
31st January 2022, 18:48
You need to enable bitstreaming for TrueHD. And change the renderer in the player.

If that doesn't not work, then it simply does not work. This ability of Dolby Access is just something I have heard. I don't know if it is really true.

If you are going to use headphones then I doubt it will have much quality effect anyway.

mzso
31st January 2022, 18:58
If you are going to use headphones then I doubt it will have much quality effect anyway.

Why do you say this? Dolby access is for headphones. And besides headphones are the best suited to provide spatial audio.

clsid
31st January 2022, 20:54
Ultimately that is just two speakers. Not a 14 speaker Atmos setup.

el Filou
31st January 2022, 22:05
You need to enable bitstreaming for TrueHD.There's also Atmos in E-AC3. In fact, that's the only way to have Atmos from online streaming services, as TrueHD Atmos is only used on Blu-rays.
Now, I don't know the Dolby Access app and maybe it only works with TrueHD Atmos but I wanted to add that information for mzso.

mzso
1st February 2022, 23:24
Ultimately that is just two speakers. Not a 14 speaker Atmos setup.

Headphones are superior. You only have two ears. Headphones can provide the appropriate sound to each ear and can recreate spatial effects perfectly.

No speakers at a distance can do this whatever their number might be.

Haven't you heard any binaural recordings made with a virtual head? Those show this pretty well.

mzso
1st February 2022, 23:25
There's also Atmos in E-AC3. In fact, that's the only way to have Atmos from online streaming services, as TrueHD Atmos is only used on Blu-rays.
Now, I don't know the Dolby Access app and maybe it only works with TrueHD Atmos but I wanted to add that information for mzso.

Meaning it's lossy, right? How does that show up in Mediainfo?

huhn
2nd February 2022, 09:52
yes it is.

Ultimately that is just two speakers. Not a 14 speaker Atmos setup.
https://en.wikipedia.org/wiki/Head-related_transfer_function

a decent HRTF (like in computer games or atmos headphones) beats any number of speaker without a second of a doubt. if the creator want to they could make the audio sound like it comes out of your head which is close to "impossible" with speakers.
even sound from below where atmos setup struggle is trivial.

https://www.youtube.com/watch?v=4BltHXngvlk
and thsi very old video is not even up to date.

https://ffmpeg.org/ffmpeg-filters.html#headphone
ffmpeg has code for it too but as long as we are not able to decode the data that's where this story ends.

mzso
2nd February 2022, 18:41
yes it is.


https://en.wikipedia.org/wiki/Head-related_transfer_function

a decent HRTF (like in computer games or atmos headphones) beats any number of speaker without a second of a doubt. if the creator want to they could make the audio sound like it comes out of your head which is close to "impossible" with speakers.
even sound from below where atmos setup struggle is trivial.

https://www.youtube.com/watch?v=4BltHXngvlk
and thsi very old video is not even up to date.

https://ffmpeg.org/ffmpeg-filters.html#headphone
ffmpeg has code for it too but as long as we are not able to decode the data that's where this story ends.

I like this old demo: https://www.youtube.com/watch?v=IUDTlvagjJA
Though it's a cheat because they let acoustics do the signal processing, and just record it.

el Filou
3rd February 2022, 21:18
Meaning it's lossy, right? How does that show up in Mediainfo?I think the full name is "Dolby Digital Plus with Joint Object Coding" / "E-AC3 JOC".

Yes the E-AC3 is lossy but anyway the "Atmos for home" format is already different from the one used in theatres, so I don't think the Atmos metadata itself in E-AC3 will be different from the one in TrueHD (someone please correct me if this is wrong).
E-AC3 is pretty good if the bitrate is not something low like 192~256 Kbps.

varekai
7th February 2022, 09:24
Settings should be preserved when upgrading.OK, thanks!

Sunspark
8th February 2022, 05:22
There's also Atmos in E-AC3. In fact, that's the only way to have Atmos from online streaming services, as TrueHD Atmos is only used on Blu-rays.
Now, I don't know the Dolby Access app and maybe it only works with TrueHD Atmos but I wanted to add that information for mzso.

Netflix will stream Atmos audio tracks, but here is the weird thing. I don't have Dolby Access. Or a bitstreamed receiver. And yet, I am able to get "Atmos" audio out of a simple 3.5mm analog. I can hear the difference between it and the non-Atmos track and I don't think the Atmos track sounded better. I can't say whether it is just some equalizer settings to make it boomier, or if it's actually a differently weighted encode or something.

So, it's possible. If you want to take a listen, https://microsoftedge.microsoft.com/addons/detail/netflix_extension/oikpkeeoofpiapmjioabikmgjeaoggcn

Be sure to know the netflix key combination in the browser to overlay the stats so you can see what codecs, etc. are being used.

Damien147
12th February 2022, 23:21
Just watching a movie with 0.76 and by using D3D11 picture freezes every few seconds.Same source with software decoding is smooth.Any ideas?

LigH
14th February 2022, 08:30
Maybe the encoded video source is more complex than a hardware decoder can decode reliably, but the Profile@Level flag is wrong, so the player could not know that in advance?

Damien147
15th February 2022, 15:30
Since my post here I checked some movies and videos with nothing wrong happening by using D3D11.Maybe it just happened.All good for now.

Balling
15th February 2022, 16:34
Very interested in the Dolby Vision feature. Any render that supports it yet?

Mpv supports it.

sebas_led
16th February 2022, 21:09
Hi Nev!

First, thanks for LAV, it's a great piece of software.

Second, I have a couple of .mp4 files that LAV splitter (even version 0.76) dont recognize the video stream, only the audio stream (I've used GraphStudioNext to confirm).
VLC and Windows Media Player 12 play the files with autio and video, but the first 6-10 seconds the image it's freezed, so probably the file it's corrupted.

MediaInfo recognizes them as 'MPEG 4 visual'. Here are the details:
General
Complete name : C:\sebas\analize\ASSASIN_-_AURA.mp4
Format : MPEG-4
Format profile : Base Media
Codec ID : isom (isom/iso2/mp41)
File size : 27.5 MiB
Duration : 3 min 13 s
Overall bit rate mode : Constant
Overall bit rate : 1 194 kb/s
Writing application : Lavf58.28.100

Video
ID : 1
Format : MPEG-4 Visual
Format profile : Simple@L1
Format settings, BVOP : No
Format settings, QPel : No
Format settings, GMC : No warppoints
Format settings, Matrix : Default (H.263)
Codec ID : mp4v-20
Duration : 3 min 5 s
Bit rate mode : Constant
Bit rate : 1 104 kb/s
Width : 640 pixels
Height : 480 pixels
Display aspect ratio : 2.40:1
Original display aspect ratio : 2.40:1
Frame rate mode : Constant
Frame rate : 23.976 (24000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Compression mode : Lossy
Bits/(Pixel*Frame) : 0.150
Stream size : 24.4 MiB (89%)
Title : ISO Media file produced by Google Inc. Created on: 05/03/2019.
Writing library : Lavc58.53.100

Audio
ID : 2
Format : AAC LC
Format/Info : Advanced Audio Codec Low Complexity
Codec ID : mp4a-40-2
Duration : 3 min 13 s
Bit rate mode : Constant
Bit rate : 129 kb/s
Channel(s) : 2 channels
Channel layout : L R
Sampling rate : 44.1 kHz
Frame rate : 43.066 FPS (1024 SPF)
Compression mode : Lossy
Stream size : 2.96 MiB (11%)
Title : ISO Media file produced by Google Inc. Created on: 05/03/2019.
Default : Yes
Alternate group : 1

and the other one:
General
Complete name : C:\sebas\analize\REIK_FT_OZUNA_WISIN_-_ME_NIEGO.mp4
Format : MPEG-4
Format profile : Base Media
Codec ID : isom (isom/iso2/mp41)
File size : 33.2 MiB
Duration : 3 min 39 s
Overall bit rate mode : Constant
Overall bit rate : 1 270 kb/s
Writing application : Lavf55.34.101

Video
ID : 1
Format : MPEG-4 Visual
Format profile : Simple@L1
Format settings, BVOP : No
Format settings, QPel : No
Format settings, GMC : No warppoints
Format settings, Matrix : Default (H.263)
Codec ID : mp4v-20
Duration : 3 min 27 s
Bit rate mode : Constant
Bit rate : 1 200 kb/s
Width : 640 pixels
Height : 480 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 23.976 (24000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Compression mode : Lossy
Bits/(Pixel*Frame) : 0.163
Stream size : 29.7 MiB (90%)
Writing library : Lavc55.52.102

Audio
ID : 2
Format : AAC LC
Format/Info : Advanced Audio Codec Low Complexity
Codec ID : mp4a-40-2
Duration : 3 min 39 s
Bit rate mode : Constant
Bit rate : 128 kb/s
Channel(s) : 2 channels
Channel layout : L R
Sampling rate : 44.1 kHz
Frame rate : 43.066 FPS (1024 SPF)
Compression mode : Lossy
Stream size : 3.35 MiB (10%)
Default : Yes
Alternate group : 1

For reference, i've uploaded the files here:
http://www.solidynepro.us/sebas/ASSASIN_-_AURA.mp4
http://www.solidynepro.us/sebas/REIK_FT_OZUNA_WISIN_-_ME_NIEGO.mp4

Can you confirm that the files are damaged or it's just a mpeg4 sub-format currently not recognized?
Thanks in advance

Sebastian Ledesma

clsid
16th February 2022, 23:27
First file hangs for 7 seconds because the audio track is 7 seconds longer than the video track. So the file is somewhat 'broken'.

Second file needs increased analyzeduration, otherwise it fails due to unknown resolution. So that file is also a bit broken. You can make it playable by remuxing it with MkvToolNix.

sebas_led
17th February 2022, 15:09
First file hangs for 7 seconds because the audio track is 7 seconds longer than the video track. So the file is somewhat 'broken'.

Second file needs increased analyzeduration, otherwise it fails due to unknown resolution. So that file is also a bit broken. You can make it playable by remuxing it with MkvToolNix.

Thanks!
I'm learning how to use MkvToolNix to repair those files.

bananenmann
22nd February 2022, 17:35
Hi,
MPC-HC is my favourite Mediaplayer and I love all it's features - especially in combination with MadVR. But I have one Problem, which remains even with the latest Version I've just installed:
If I have a *.MKV Video-File with a lot different audio-tracks the media player doesn't offer me to choose between all of them in the Audio Track selection:

For example I have some Movies with Dolby Digital Plus, Dolby Digital, Dolby True HD PLUS one DTS-HD MA Track (I muxed that together with MKVToolnix from different Sources). In my Example all the Dolby Tracks are shown, but the DTS-HD MA Track dissapeared. I did nothin wrong with MKVToolnix - I use this tool for many years. I've just selected ONE Audio Track as default etc.). VLC Player or PowerDVD show all Audio Tracks and I can choose between all of them and all are played without problem. I'm not sure, but I think it's maybe a Problem with the Lav Splitter?!

https://abload.de/thumb/screenshot2022-02-0924mkd6.png (https://abload.de/image.php?img=screenshot2022-02-0924mkd6.png)

Here the Mediainfo Output of the Video:

General
Unique ID : 20034899356123229208554096159581207675 (0xF1294CD792C45C1FE323C8F5C9EFC7B)
Complete name : W:\NVIDIA_SHIELD\BLURAY\FILME\Guardians of the Galaxy 2\Guardians of the Galaxy Vol.2 (2017).mkv
Format : Matroska
Format version : Version 4
File size : 27.5 GiB
Duration : 2 h 15 min
Overall bit rate mode : Variable
Overall bit rate : 29.0 Mb/s
Encoded date : UTC 2022-02-09 16:37:11
Writing application : mkvmerge v65.0.0 ('Too Much') 64-bit
Writing library : libebml v1.4.2 + libmatroska v1.6.4

Video
ID : 1
Format : HEVC
Format/Info : High Efficiency Video Coding
Format profile : Main 10@L5@High
HDR format : Dolby Vision, Version 1.0, dvhe.08.06, BL+RPU, HDR10 compatible / SMPTE ST 2086, HDR10 compatible
Codec ID : V_MPEGH/ISO/HEVC
Duration : 2 h 15 min
Bit rate : 16.6 Mb/s
Width : 3 840 pixels
Height : 2 160 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 23.976 (24000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 10 bits
Bits/(Pixel*Frame) : 0.083
Stream size : 15.7 GiB (57%)
Language : German
Default : Yes
Forced : No
Color range : Limited
Color primaries : BT.2020
Transfer characteristics : PQ
Matrix coefficients : BT.2020 non-constant
Mastering display color primaries : Display P3
Mastering display luminance : min: 0.0050 cd/m2, max: 4000 cd/m2

Audio #1
ID : 2
Format : E-AC-3
Format/Info : Enhanced AC-3
Commercial name : Dolby Digital Plus
Format profile : Blu-ray Disc
Codec ID : A_EAC3
Duration : 2 h 15 min
Bit rate mode : Constant
Bit rate : 1 024 kb/s
Channel(s) : 8 channels
Channel layout : L R C LFE Ls Rs Lb Rb
Sampling rate : 48.0 kHz
Frame rate : 31.250 FPS (1536 SPF)
Compression mode : Lossy
Delay relative to video : 21 ms
Stream size : 994 MiB (4%)
Title : Deutsch Dolby Digital Plus 7.1 (UHD Blu-ray)
Language : German
Service kind : Complete Main
Default : Yes
Forced : No

Audio #2
ID : 3
Format : DTS XLL
Format/Info : Digital Theater Systems
Commercial name : DTS-HD Master Audio
Codec ID : A_DTS
Duration : 2 h 15 min
Bit rate mode : Variable
Bit rate : 2 538 kb/s
Channel(s) : 8 channels
Channel layout : C L R LFE Lb Rb Lss Rss
Sampling rate : 48.0 kHz
Frame rate : 93.750 FPS (512 SPF)
Bit depth : 16 bits
Compression mode : Lossless
Delay relative to video : 5 ms
Stream size : 2.41 GiB (9%)
Title : DTS-HD MA 7.1 (by Asterixi)
Language : German
Default : No
Forced : No

Audio #3
ID : 4
Format : AC-3
Format/Info : Audio Coding 3
Commercial name : Dolby Digital
Codec ID : A_AC3
Duration : 2 h 15 min
Bit rate mode : Constant
Bit rate : 576 kb/s
Channel(s) : 6 channels
Channel layout : L R C LFE Ls Rs
Sampling rate : 48.0 kHz
Frame rate : 31.250 FPS (1536 SPF)
Compression mode : Lossy
Stream size : 559 MiB (2%)
Title : Deutsch Dolby Digital 5.1 (UHD Blu-ray)
Language : German
Service kind : Complete Main
Default : No
Forced : No

Audio #4
ID : 5
Format : MLP FBA 16-ch
Format/Info : Meridian Lossless Packing FBA with 16-channel presentation
Commercial name : Dolby TrueHD with Dolby Atmos
Codec ID : A_TRUEHD
Duration : 2 h 15 min
Bit rate mode : Variable
Bit rate : 7 509 kb/s
Maximum bit rate : 11.3 Mb/s
Channel(s) : 8 channels
Channel layout : L R C LFE Ls Rs Lb Rb
Sampling rate : 48.0 kHz
Frame rate : 1 200.000 FPS (40 SPF)
Compression mode : Lossless
Stream size : 7.12 GiB (26%)
Title : English TrueHD Atmos 7.1 (UHD Blu-ray)
Language : English
Default : No
Forced : No
Number of dynamic objects : 13
Bed channel count : 1 channel
Bed channel configuration : LFE

Audio #5
ID : 6
Format : AC-3
Format/Info : Audio Coding 3
Commercial name : Dolby Digital
Codec ID : A_AC3
Duration : 2 h 15 min
Bit rate mode : Constant
Bit rate : 640 kb/s
Channel(s) : 6 channels
Channel layout : L R C LFE Ls Rs
Sampling rate : 48.0 kHz
Frame rate : 31.250 FPS (1536 SPF)
Compression mode : Lossy
Stream size : 621 MiB (2%)
Title : English Dolby Digital 5.1 (UHD Blu-ray)
Language : English
Service kind : Complete Main
Default : No
Forced : No

Text #1
ID : 7
Format : UTF-8
Codec ID : S_TEXT/UTF8
Codec ID/Info : UTF-8 Plain Text
Duration : 2 h 6 min
Bit rate : 0 b/s
Count of elements : 6
Stream size : 73.0 Bytes (0%)
Title : Deutsch Forced (SRT)
Language : German
Default : Yes
Forced : Yes

Text #2
ID : 8
Format : VobSub
Codec ID : S_VOBSUB
Codec ID/Info : Picture based subtitle format used on DVDs
Duration : 2 h 6 min
Bit rate : 16 b/s
Count of elements : 6
Stream size : 15.6 KiB (0%)
Title : Deutsch Forced (VobSub)
Language : German
Default : No
Forced : Yes

Text #3
ID : 9
Format : PGS
Codec ID : S_HDMV/PGS
Codec ID/Info : Picture based subtitle format used on BDs/HD-DVDs
Duration : 2 h 6 min
Bit rate : 64 b/s
Count of elements : 12
Stream size : 60.2 KiB (0%)
Title : Deutsch Forced (PGS)
Language : German
Default : No
Forced : Yes

Text #4
ID : 10
Format : VobSub
Codec ID : S_VOBSUB
Codec ID/Info : Picture based subtitle format used on DVDs
Duration : 2 h 14 min
Bit rate : 7 729 b/s
Count of elements : 1535
Stream size : 7.45 MiB (0%)
Title : Deutsch (VobSub)
Language : German
Default : No
Forced : No

Text #5
ID : 11
Format : PGS
Codec ID : S_HDMV/PGS
Codec ID/Info : Picture based subtitle format used on BDs/HD-DVDs
Duration : 2 h 14 min
Bit rate : 38.5 kb/s
Count of elements : 3070
Stream size : 37.1 MiB (0%)
Title : Deutsch (PGS)
Language : German
Default : No
Forced : No

Text #6
ID : 12
Format : VobSub
Codec ID : S_VOBSUB
Codec ID/Info : Picture based subtitle format used on DVDs
Duration : 2 h 14 min
Bit rate : 8 871 b/s
Count of elements : 1973
Stream size : 8.56 MiB (0%)
Title : English SDH (VobSub)
Language : English
Default : No
Forced : No

Text #7
ID : 13
Format : PGS
Codec ID : S_HDMV/PGS
Codec ID/Info : Picture based subtitle format used on BDs/HD-DVDs
Duration : 2 h 14 min
Bit rate : 44.4 kb/s
Count of elements : 3946
Stream size : 42.8 MiB (0%)
Title : English SDH (PGS)
Language : English
Default : No
Forced : No

Menu
00:00:00.000 : en:King Cobra & Giant Sea Monkey
00:09:54.375 : en:Golden Morons
00:15:08.314 : en:Space Chase
00:22:12.279 : en:Not From Missouri
00:32:31.898 : en:Deepest, Darkest, Secrets
00:36:50.323 : en:Berhert Ambush
00:42:27.368 : en:Finding Meaning
00:48:01.660 : en:Taserface
00:53:17.101 : en:Celestial Catch
00:58:44.136 : en:Let's Agree To Never Discuss This
01:05:50.436 : en:Eclector Escape
01:11:10.631 : en:Sibling Rivalry
01:18:41.790 : en:Eternity
01:23:53.518 : en:Two Of A Kind
01:30:22.949 : en:Inflated Ego
01:39:34.375 : en:What A Day
01:47:04.408 : en:From The Heart
01:54:19.801 : en:A Father's Sacrifice
01:58:51.906 : en:The Colors Of Ogord
02:07:11.656 : en:End Credits

Sunspark
22nd February 2022, 17:54
In my Example all the Dolby Tracks are shown, but the DTS-HD MA Track dissapeared.

In the LAV Audio Decoder options, do you have DTS-HD checked in the bitstreaming section?

nevcairiel
22nd February 2022, 18:12
The only reason any audio track wouldn't be shown from a MKV file would be if its marked as Hidden. You should make sure that is not the case. If you muxed it yourself, you may have accidentally applied that flag.

bananenmann
22nd February 2022, 18:20
Yes. All Formats are checked for Bitstreaming. I already posted this in the MPC-HC Thread, but I was told, that this is an error of the LAV-Splitter. And that seems to be right: I forced MPC-HC to use Haali Media Splitter instead and suddenly ALL of my Audio Tracks appeared in the Audio Selection. Unfortunately Haali Media Splitter is too old for HEVC so I had no picture - only Sound. So this was just a Test to proove that nothing had gone wrong while Muxing. This Problem doesn't encounter with just one Video file - it encounters on all Videos with a lot of Audio Tracks with that different kind like my example.

Someone told me, that this might be because MKVToolnix changed the kind how tracks should be marked. So I marked ALL Audio Tracks as "Default" and tried to mux it again: But no effect: There are still missing some Audio Tracks...

bananenmann
22nd February 2022, 18:32
@nevcairiel
No, there is nothing marked as hidden. And as I said it's not only one File causing this Problems.

hmmm, I now muxed it with TS-Muxer (Nightly) to a *.mts File and now ALL Tracks are recognized by LAV-Splitter?! So there is a Problem with LAV-Splitter and MKV-Files or there is a BUG in MKVToolnix.... or there is something in MKVToolnix which I can't see?! But I'm not a Newbie with that tool. I use it for many many years?!

https://abload.de/thumb/screenshot2022-02-221ryjaq.png (https://abload.de/image.php?img=screenshot2022-02-221ryjaq.png)

nevcairiel
22nd February 2022, 19:19
Use the Header Editor in mkvmerge on your existing file, and check the missing track for "Track enabled". If its present and set to "No", then the audio will be skipped.
Nothing in your screenshot shows anything regarding that, you even selected the wrong track if DTS-HD is supposed to be missing.

Its the only reasonable explanation for a MKV audio track to not show - because thats what the MKV spec says should happen. Otherwise the only thing I can tell you is that I need a sample.

bananenmann
22nd February 2022, 23:07
No, the last Picture was another Video File. In that File I tried to set the DTS-HD Audio Track as the first and default track - as you can see it in my MKVToolnix Picture. MPC-HC offers me the DTS-HD Track as the default one (as it should be), then the second one: Dolby Digital Plus 7.1 Track is missing and the True-HD and the normal Dolby Digital Track are visible again.... My first Post was a different file: There I put the 7.1 Dolby Digital Plus Track as the default first track and the DTS-HD track as the second track. It seems that always the second Track is missing. There the DTS-HD Track was missing.

But you are Right, I did a mistake: I always thought that in the bottom window there has to be a green checkmark for the Element to be copied with. I didn't see that each track has to be separately aktivated in the right window (I don't mean "Standard Track" and even not "Forced Track" - but as you said the Track on it's own has to be enabled there as well. In my last Picture all elements have a green checkmark, but you can see that in the right window the 7.1 Dolby Ditgital Plus Track is NOT enabled. And that is exatly the one Audio Track which is missing in that file while playing it with MPC-HC.

A little bit confusing, because I always have ALL tracks in the right window disabled - only the default and forced tracks are enabled ... and everything worked. I could always choose between all tracks (Audio and Subtitle). But since I have such a lot Audio Tracks (more than two) in one file this behaviour happened. So sorry for disturbing you - it was my fault. Maybe it would be better in MKVToolnix when a copied, but disabled track is tried to be muxed in a MKV - that there is a warning Message or a red checkmark or something like this.

Have a nice evening ;)

nevcairiel
28th February 2022, 15:27
LAV Filters 0.76.1

LAV Splitter
- Changed: When requesting a HTTP URL, the URL itself is send as a referrer to increase compatibility
- Fixed: The priority of "Default" subtitle tracks in MKV files was wrong when a forced track was present

LAV Video
- Changed: Improved color reporting for DVD menus/subtitles
- Fixed: D3D11 surface clearing did not work properly on Intel GPUs

Download: Installer (both x86/x64) (https://files.1f0.de/lavf/LAVFilters-0.76.1.exe) -- Zips: 32-bit (https://files.1f0.de/lavf/LAVFilters-0.76.1.zip) & 64-bit (https://files.1f0.de/lavf/LAVFilters-0.76.1-x64.zip)

If you missed 0.76, the release notes are here (https://forum.doom9.org/showthread.php?p=1961924#post1961924)

Only a collection of small fixed on top of 0.76, before I dive into some bigger changes and these won't get out for quite a while.

clsid
28th February 2022, 17:37
Thanks!

Can you reveal anything about those changes that you are planning?

ryrynz
28th February 2022, 19:04
Yeah.. I miss those MadVR and LAV big dev periods. Plz share [emoji4]

wojak
2nd March 2022, 11:20
LAV Filters 0.76.1

LAV Splitter
- Changed: When requesting a HTTP URL, the URL itself is send as a referrer to increase compatibility
- Fixed: The priority of "Default" subtitle tracks in MKV files was wrong when a forced track was present

LAV Video
- Changed: Improved color reporting for DVD menus/subtitles
- Fixed: D3D11 surface clearing did not work properly on Intel GPUs

Download: Installer (both x86/x64) (https://files.1f0.de/lavf/LAVFilters-0.76.1.exe) -- Zips: 32-bit (https://files.1f0.de/lavf/LAVFilters-0.76.1.zip) & 64-bit (https://files.1f0.de/lavf/LAVFilters-0.76.1-x64.zip)

If you missed 0.76, the release notes are here (https://forum.doom9.org/showthread.php?p=1961924#post1961924)

Only a collection of small fixed on top of 0.76, before I dive into some bigger changes and these won't get out for quite a while.

Hi, @nevcairiel

I have a problem with bitstreaming DTSWAV files (in MPCHC).
The passthrough option for DTS in WAV files just does not work. It works in avi, m2ts and other video files but not in wav. There is no sound at all. The music palys only if I check "fallback to PCM" option.

Here is my discussion with clsid2 on github on that topic:
https://github.com/clsid2/mpc-hc/issues/1555

tiben20
12th March 2022, 05:49
Just a heads up for those who are interested. I managed to add direct3d 12 hardware decoding in lavfilters.
https://github.com/tiben20/LAVFilters
I based my work on the fork Steve Lhomme did on vlc.
So far most of h264,hevc, vp9, vc1 codecs works.
Of course since there is no d3d12 directshow renderer at the moment its kinda useless. I started today a fork to add d3d12 rendering in the mpc videorenderer from the mpc-be team.

I only did this because i love contributing to the open source community. I don't think the d3d11 hardware acceleration will be beat in a near future but at least its a first step into direct3d 12

huhn
12th March 2022, 12:44
i can't wait. maybe something in d3d12 works with amd cards!

clsid
12th March 2022, 14:00
Afaik the D3D12 stuff is basically just same as D3D11 but with a somewhat simplified API. So don't get your expectations up to high.

I suggest testing if your AMD issues also occur with the Movies&TV player from Windows.

kasper93
12th March 2022, 14:42
i can't wait. maybe something in d3d12 works with amd cards!

Wait a sec... What is not working on AMD cards?

Of course since there is no d3d12 directshow renderer at the moment its kinda useless.

If you implement cpu copyback (which is trivial to plug into old code) or D3D11/D3D12 interop so you can send surface to say madVR it will work fine at least as experimental decoder.

Anyway I don't think there is any gain of using D3D12 at this moment. It is just an API on top of the same hardware decoder. Maybe adding video processing (like deinterlacing) to LAV would be more fun? :)

huhn
12th March 2022, 15:00
Wait a sec... What is not working on AMD cards?

pretty much everything.
https://abload.de/img/goodonehcjnw.png
we are neem through this a couple of times on the decoder thread.
decoding is pretty much the only thing that kind of works as it should be.

clsid
12th March 2022, 15:21
A good place to get attention from AMD support staff is in the driver feedback topics on Reddit (https://old.reddit.com/r/Amd/comments/t0lldp/radeon_software_adrenalin_2223_release_notes/). They are active there, so better place than their own forums. Best moment to post is shortly after a new driver release.

tiben20
12th March 2022, 16:27
Afaik the D3D12 stuff is basically just same as D3D11 but with a somewhat simplified API. So don't get your expectations up to high.

I suggest testing if your AMD issues also occur with the Movies&TV player from Windows.
I would not say its simplified but i agree with there is no benefit in using it.
I only like the fact that lavfilters can do it all. I stopped coding in c++ in 2011, i was the one who started the prototype in xbmc and nevcairiel took over. He kinda added everything that is humanly possible in the filters since then. I wanted to start c++ again after this long long break so finding something that wasn't already there was a challenge so i did this :P

kasper93
12th March 2022, 16:31
pretty much everything.
https://abload.de/img/goodonehcjnw.png
we are neem through this a couple of times on the decoder thread.
decoding is pretty much the only thing that kind of works as it should be.
Oh, I thought we are talking decoding only. There are severe issues otherwise indeed.

A good place to get attention from AMD support staff is in the driver feedback topics on Reddit (https://old.reddit.com/r/Amd/comments/t0lldp/radeon_software_adrenalin_2223_release_notes/). They are active there, so better place than their own forums. Best moment to post is shortly after a new driver release.
Good luck. Unless you have a insider who can push tasks forward you will have hard time getting enough attention with such "minor" issue. And I say "minor", because it really looks like AMD doesn't care much about their video processing.

I tried few years back to get them to fix crashes (in Overwatch) which was caused by hardware decoding of exported 4k clips there. I tried support, so I was replying to same responses "have you tried latest drivers", I probably exchanged like 12 emails and never got past the first line "gtfo" support. I tried reddit and while I got even response, it is not like it would move forward. Eventually they fixed the issue few months after introducing it, but well I lost all interest in trying to report thing to them through "proper" channels.

It is clear that they have not enough resources in their "video team", I don't believe those issues with deinterlacing (or video levels) are not known to them. And probably there are hardware issues. Anyway sorry for rant.

I would not say its simplified but i agree with there is no benefit in using it.
I only like the fact that lavfilters can do it all. I stopped coding in c++ in 2011, i was the one who started the prototype in xbmc and nevcairiel took over. He kinda added everything that is humanly possible in the filters since then. I wanted to start c++ again after this long long break so finding something that wasn't already there was a challenge so i did this :P

Once it is implemented in ffmpeg, there is probably no reason not to implement it in LAV too. What is the status of those ffmpeg changes? Is someone working on upstreaming it (as I understand you copied the changes from some vlc fork), or it is dead?

nevcairiel
12th March 2022, 16:57
Once it is implemented in ffmpeg, there is probably no reason not to implement it in LAV too.

Maintenance burden, unless a clear benefit or use is demonstrated, "just because" is not much of a reason anymore. Entirely new hardware APIs are not just a single line in a table somewhere like codecs are.

If one were to look for a task in hardware acceleration, there is implementing AV1 filmgrain with hardware decoding for d3d11 (dxva2 was not extended by MS for this). Just needs a modern Intel GPU to do it, and I don't have one. :) (NVIDIA does it magically without needing to run the API for it, no clue about AMD)

kasper93
12th March 2022, 16:59
Maintenance burden, unless a clear benefit or use is demonstrated, "just because" is not much of a reason anymore. Entirely new hardware APIs are not just a single line in a table somewhere like codecs are.

That I agree...

clsid
12th March 2022, 17:52
@tiben20
If you want to implement something that involves both LAV and FFmpeg, then I would suggest: AC3 encode option for bitstreaming (over S/PDIF)

Which would do the following for audio formats for which bitstreaming isn't enabled or possible:
mix to 5.1, resample to 48kHz, convert to AC3

Of course, assuming nevcairiel would accept a patch for adding that.

tiben20
12th March 2022, 17:53
Maintenance burden, unless a clear benefit or use is demonstrated, "just because" is not much of a reason anymore. Entirely new hardware APIs are not just a single line in a table somewhere like codecs are.

If one were to look for a task in hardware acceleration, there is implementing AV1 filmgrain with hardware decoding for d3d11 (dxva2 was not extended by MS for this). Just needs a modern Intel GPU to do it, and I don't have one. :) (NVIDIA does it magically without needing to run the API for it, no clue about AMD)
I totally agree with you on that one. Specific hardware bugs would be a nightmare for no benefit. In this apis they dumped so much stuff on the developer side that was previously handle by the driver.
I will still keep working on it even if i know their no benefit.
@tiben20
If you want to implement something that involves both LAV and FFmpeg, then I would suggest: AC3 encode option for bitstreaming (over S/PDIF)

Which would do the following for audio formats for which bitstreaming isn't enabled or possible:
mix to 5.1, resample to 48kHz, convert to AC3

Of course, assuming nevcairiel would accept a patch for adding that.
My knowledge on the audio side is pretty close to none. I started c++ because i liked xbmc(kodi) and i wanted to be the first to integrate dxva to it which did. Ill stick on the video side :)

ryrynz
14th March 2022, 09:54
Ill stick on the video side :)

Opening Post legend in the forum, very cool.

mark0077
16th March 2022, 00:49
Guys I'm only noticing the bwdif de-interlacer now in LAV Video, that's really cool. I have always used LAV Video in software mode, and still do with my latest machine (5950x, RTX 3080). It sparked my interest in again looking to see what the best de-interlacer I could use is for the rare occasion I throw on some interlaced DVDs. What would you guys recommend that still do de-interlacing. Yadif/bwdif in lav filters, vs madVR de-interlacing (with some specific settings to make sure it uses motion adaptive deinterlacing by the gpu, like use of some form of hardware decoding instead of software?)

ryrynz
16th March 2022, 10:05
what the best de-interlacer I could use is for the rare occasion I throw on some interlaced DVDs.

I switch to CUVID and get the hardware to work, nothing beats it.
Would be nice to have a rule or option that did it automatically.

mark0077
16th March 2022, 19:41
I switch to CUVID and get the hardware to work, nothing beats it.
Would be nice to have a rule or option that did it automatically.

Oh yeah, I see it marked as old. Is it still as sort of bit perfect as software decoding would be, for progressive material that is? I would leave it on it for handiness sake if it was. Otherwise yeah itd be amazing if a different renderer could be chosen based on say if it was mpeg2, or better still, deinterlaced :) I guess that's the lowest priority feature request in history :)

mzso
18th March 2022, 18:37
Hi!

I had a longstanding issue of the screen going green with SmartDVB with SD channels. I just figured out it's because I had DX11 HW acceleration enabled for mpeg-2. It works normally with software decoding, and DXVA (with which deinterlacing doesn't work instead.)

Sunspark
18th March 2022, 19:19
I saw a news item about dAV1d 1.0.0 today, so I decided to check out AV1.

Sample test clips here: http://download.opencontent.netflix.com/?prefix=AV1/Chimera/

I don't think I like the look of AV1 in this test, something seems harsh and cold about it to me. On my dual-core Broadwell CPU, it does play at about 70% CPU usage in copy-back mode run through DXVA scaling so that's nice to see. Setting it to dxva2-native drops the cpu usage to about 35% which eliminates the CPU fan whine.

That said, I wonder if there is a bug? The filename in the clip says 23.97 as does the titles in it, but the PIN info for LAV video decoder says 25. Is it playing at the wrong FPS?

Sunspark
18th March 2022, 21:29
As a postscript to my previous post on AV1 observations, I believe there may also be an issue with DXVA2 copy-back video decoding. The observations for #24776 and this are made with LAV 76.1.

With a normal SDR H.264 video, I observed that colours looked more saturated and black levels slightly deeper compared to DXVA2 copy-back in the following modes: None, DXVA2 Native, Intel Quicksync. These 3 modes presented the same. With DXVA2 copy-back it did not look bad, but I observed that blacks seemed raised slightly and colours were not quite as saturated. This is a difference in presentation.

To add to this, with the AV1 test video in #24776, I observed that with the Intel Quicksync decoding mode, it did not require 70% CPU. It was functioning under the same conditions at 35-40%. The complaint I had about "harsh and cold" changed, "cold" was removed as colours looked more natural and not as much blue.

I believe there is a bug with DXVA2 copy-back decoding in 76.1 affecting both colour&black levels as well as CPU usage which does not occur with the other decoders.

Update: In the video decoder settings where it says "Hardware device to use", if I change it from having my Intel GPU listed, to "Automatic" this resolves the colour issue with DXVA2 copy-back. Curious.

lvqcl
18th March 2022, 23:31
What GPU do you use for h/w decoding of AV1?

clsid
18th March 2022, 23:43
The Intel QuickSync decoder in LAV is deprecated and does not support AV1 or HEVC. So selecting that essentially just gives software decoding.

Broadwell does not support AV1 at all either. It does not even have proper HEVC10 decoding.

huhn
21st March 2022, 03:19
I saw a news item about dAV1d 1.0.0 today, so I decided to check out AV1.

Sample test clips here: http://download.opencontent.netflix.com/?prefix=AV1/Chimera/

I don't think I like the look of AV1 in this test, something seems harsh and cold about it to me. On my dual-core Broadwell CPU, it does play at about 70% CPU usage in copy-back mode run through DXVA scaling so that's nice to see. Setting it to dxva2-native drops the cpu usage to about 35% which eliminates the CPU fan whine.

That said, I wonder if there is a bug? The filename in the clip says 23.97 as does the titles in it, but the PIN info for LAV video decoder says 25. Is it playing at the wrong FPS?

these are obu files they don't seem to have any frame rate what so ever.

and lavfilter likes to use 25 for files that don't have a frame rate like images.
changing that is most likely not worth the risk breaking anything.

tiben20
21st March 2022, 08:37
Here is the progress of the addition of d3d12 to lavfilters and mpcvideorenderer

What i done so far
Lavfilters
d3d12 rendering via hardware decoder is working and is stable
Reference frame are handled via the codec which was something added in d3d12
Added settings so you can desactivate d3d12 if you don't want to use them
Copyback is working but there absolutely no reason to use it.

Mpcvideorenderer
Autodetection of the input file to select the correct renderer
Settings are now independant per renderer
Bilinear bicubic lankzos upsampling are working still need to work on the downsampling
Rendering is stable i had some problems when switching video but its working great now
I wrote a complete pipeline to render custom geometry and font like d3d11 was doing before.
Color conversion are working as expected will need to test more sample but so far so good.

4 april 2022
Hardware and software rendering works
Scaling work really well
Subtitles are working
IMFVideoMixerBitmap works
Graphs is rendering without being cut by the scaling
19 april update
Upscale, downscale ,chromaupsampler, image doubler and post shaders are now dynamic script with options


Ill be happy to answer every question.
https://github.com/tiben20/VideoRenderer/commits/d3d12
https://github.com/tiben20/LAVFilters/commits/d3d12_decoder

huhn
21st March 2022, 11:11
Afaik the D3D12 stuff is basically just same as D3D11 but with a somewhat simplified API. So don't get your expectations up to high.

I suggest testing if your AMD issues also occur with the Movies&TV player from Windows.

good idea but it is microsoft...
https://abload.de/img/microsoftmsj2w.png
what a world we live in.
this is just wrong.

scaler and level are fine deint is broken.

tebasuna51
14th April 2022, 12:34
Bug in LAV filters (https://github.com/Nevcairiel/LAVFilters/issues/483) playing WAV's multichannel. More Info (https://forum.doom9.org/showthread.php?p=1966828#post1966828).

In LAVFilters-0.76.1\demuxer\Demuxers\LAVFStreamInfo.cpp there are:
else if ((mtype.subtype == MEDIASUBTYPE_PCM || mtype.subtype == MEDIASUBTYPE_IEEE_FLOAT) &&
avstream->codecpar->codec_tag != WAVE_FORMAT_EXTENSIBLE)
{
// Create raw PCM media type
mtype.pbFormat = (BYTE *)g_AudioHelper.CreateWFMTEX_RAW_PCM(avstream, &mtype.cbFormat, mtype.subtype,
&mtype.lSampleSize);
}
I suggest:
else if ((mtype.subtype == MEDIASUBTYPE_PCM || mtype.subtype == MEDIASUBTYPE_IEEE_FLOAT))
{
// Create raw PCM media type
mtype.pbFormat = (BYTE *)g_AudioHelper.CreateWFMTEX_RAW_PCM(avstream, &mtype.cbFormat, mtype.subtype,
&mtype.lSampleSize);
}
For what exclude PCM INT/FLOAT WAVE_FORMAT_EXTENSIBLE header by managed by CreateWFMTEX_RAW_PCM?
Only in this subrutine (LAVFilters-0.76.1\demuxer\Demuxers\LAVAudioHelper.cpp) is read the dwChannelMask:

dwChannelMask = (DWORD)avstream->codecpar->channel_layout;

Without dwChannelMask defined the default is assigned in LAVFilters-0.76.1\decoder\LAVAudio\Media.cpp:

static const scmap_t m_scmap_default[] = {
// FL FR FC LFe BL BR FLC FRC
{1, 0}, // Mono M1, 0
{2, 0}, // Stereo FL, FR
{3, SPEAKER_FRONT_LEFT|SPEAKER_FRONT_RIGHT|SPEAKER_FRONT_CENTER}, // 3/0 FL, FR, FC
{4, SPEAKER_FRONT_LEFT|SPEAKER_FRONT_RIGHT|SPEAKER_FRONT_CENTER|SPEAKER_LOW_FREQUENCY}, // 3/1 FL, FR, FC, Surround
{5, SPEAKER_FRONT_LEFT|SPEAKER_FRONT_RIGHT|SPEAKER_FRONT_CENTER|SPEAKER_BACK_LEFT|SPEAKER_BACK_RIGHT}, // 3/2 FL, FR, FC, BL, BR
{6, SPEAKER_FRONT_LEFT|SPEAKER_FRONT_RIGHT|SPEAKER_FRONT_CENTER|SPEAKER_LOW_FREQUENCY|SPEAKER_SIDE_LEFT|SPEAKER_SIDE_RIGHT}, // 3/2+LFe FL, FR, FC, BL, BR, LFe
{7, SPEAKER_FRONT_LEFT|SPEAKER_FRONT_RIGHT|SPEAKER_FRONT_CENTER|SPEAKER_LOW_FREQUENCY|SPEAKER_BACK_LEFT|SPEAKER_BACK_RIGHT|SPEAKER_BACK_CENTER}, // 3/4 FL, FR, FC, BL, Bls, Brs, BR
{8, SPEAKER_FRONT_LEFT|SPEAKER_FRONT_RIGHT|SPEAKER_FRONT_CENTER|SPEAKER_LOW_FREQUENCY|SPEAKER_SIDE_LEFT|SPEAKER_SIDE_RIGHT|SPEAKER_BACK_LEFT|SPEAKER_BACK_RIGHT},// 3/4+LFe FL, FR, FC, BL, Bls, Brs, BR, LFe
};
Where I suggest replace the defaults:
{4, SPEAKER_FRONT_LEFT|SPEAKER_FRONT_RIGHT|SPEAKER_SIDE_LEFT|SPEAKER_SIDE_RIGHT}, // 2/2 FL, FR, SL, SR
{5, SPEAKER_FRONT_LEFT|SPEAKER_FRONT_RIGHT|SPEAKER_FRONT_CENTER|SPEAKER_SIDE_LEFT|SPEAKER_SIDE_RIGHT}, // 3/2 FL, FR, FC, SL, SR
{6, SPEAKER_FRONT_LEFT|SPEAKER_FRONT_RIGHT|SPEAKER_FRONT_CENTER|SPEAKER_LOW_FREQUENCY|SPEAKER_SIDE_LEFT|SPEAKER_SIDE_RIGHT}, // 3/2+LFe FL, FR, FC, LFE, SL, SR
{7, SPEAKER_FRONT_LEFT|SPEAKER_FRONT_RIGHT|SPEAKER_FRONT_CENTER|SPEAKER_LOW_FREQUENCY|SPEAKER_SIDE_LEFT|SPEAKER_SIDE_RIGHT|SPEAKER_BACK_CENTER}, // 3/3+LFe FL, FR, FC, LFE, BC, SL, SR
{8, SPEAKER_FRONT_LEFT|SPEAKER_FRONT_RIGHT|SPEAKER_FRONT_CENTER|SPEAKER_LOW_FREQUENCY|SPEAKER_SIDE_LEFT|SPEAKER_SIDE_RIGHT|SPEAKER_BACK_LEFT|SPEAKER_BACK_RIGHT},// 3/4+LFe FL, FR, FC, LFE, BL, BR, SL, SR

nevcairiel
14th April 2022, 14:39
For what exclude PCM INT/FLOAT WAVE_FORMAT_EXTENSIBLE header by managed by CreateWFMTEX_RAW_PCM?


WAVE_FORMAT_EXTENSIBLE is handled just below, extracting information from the WAVEFORMATEXTENSIBLE header and re-using it as-is, instead of trying to re-create it.

tebasuna51
14th April 2022, 16:08
WAVE_FORMAT_EXTENSIBLE is handled just below, extracting information from the WAVEFORMATEXTENSIBLE header and re-using it as-is, instead of trying to re-create it.

else
{
WAVEFORMATEX *wvfmt = g_AudioHelper.CreateWVFMTEX(avstream, &mtype.cbFormat);

AudioHelper.CreateWVFMTEX never assign dwChannelMask

Like you can see that don't work at all (https://forum.doom9.org/showthread.php?p=1966828#post1966828).

nevcairiel
14th April 2022, 17:53
else
{
WAVEFORMATEX *wvfmt = g_AudioHelper.CreateWVFMTEX(avstream, &mtype.cbFormat);

AudioHelper.CreateWVFMTEX never assign dwChannelMask


CreateWVFMTEX doesn't even touch WAVEFORMATEXTENSIBLE at all (it only works on the much smaller WAVEFORMATEX), hence its logically incapable of ever touching that field - instead it copies the WAVEFORMATEXTENSIBLE extension from the container, and "assigns" it that way - as a result, it will have assigned that field.

But I don't think your file even runs through that code.


Like you can see that don't work at all (https://forum.doom9.org/showthread.php?p=1966828#post1966828).

Thats not the reason it doesn't work. In fact, you should check the generated media type by LAV Splitter, it clearly includes the dwChannelMask correctly already - its just not being used because you are using raw PCM with a decoder filter, which it wasn't designed for, instead of connecting it straight to the audio renderer, as I already pointed out in the other thread.

In any case I'm not going to explain my code any further. If you want to suggest changes, you should verify they actually fix your issue (by compiling and testing). Or just show some patience until I work on the next version and maybe consider your issue. Just because I haven't instantly fixed it doesn't mean I don't know whats going on. Its just a matter of time management.

clsid
14th April 2022, 18:27
Here is patch to ignore standard PCM:
https://github.com/clsid2/LAVFilters/commit/6142b012544c5021a75e8195e6ca6eeefd09aba3

tebasuna51
15th April 2022, 12:09
Here is patch to ignore standard PCM:
https://github.com/clsid2/LAVFilters/commit/6142b012544c5021a75e8195e6ca6eeefd09aba3

Thanks clsid, but cancel the use of internal LAV Filter make than mpc-hc (MPC-HC.1.9.20.56.x64) use the external DirectShow filter installed.

To work with this I need uninstall the external LAV Filters and install your old ffdshow filters, and I can't recommend that at all. I make this only for test (and work) but it is not a solution. Please revert to previous state, we need solve the problem in LAV Filters (external and internal)
...Or just show some patience until I work on the next version and maybe consider your issue. Just because I haven't instantly fixed it doesn't mean I don't know whats going on. Its just a matter of time management.
Of course, take your time. I only want to help found the solution.
Maybe I was wrong and for this I say "suggest".
Excuse me if I add some comments:

In fact, you should check the generated media type by LAV Splitter, it clearly includes the dwChannelMask correctly already - its just not being used because you are using raw PCM with a decoder filter, which it wasn't designed for, instead of connecting it straight to the audio renderer,...

Of course, and work fine connecting the Splitter to Render but GraphStudio and mpc-he (or mpc-be) insist in include the Audio Decoder between the Splitter and Render and I don't know for what the dwChannelMask read correctly by the splitter (in mpc-hc or GraphEdit):
Audio: PCM 48000Hz 4ch 3072kbps

AM_MEDIA_TYPE:
majortype: MEDIATYPE_Audio {73647561-0000-0010-8000-00AA00389B71}
subtype: MEDIASUBTYPE_PCM {00000001-0000-0010-8000-00AA00389B71}
formattype: FORMAT_WaveFormatEx {05589F81-C356-11CE-BF01-00AA0055595A}
bFixedSizeSamples: 1
bTemporalCompression: 0
lSampleSize: 8
cbFormat: 40

WAVEFORMATEX:
wFormatTag: 0xfffe
nChannels: 4
nSamplesPerSec: 48000
nAvgBytesPerSec: 384000
nBlockAlign: 8
wBitsPerSample: 16
cbSize: 22 (extra bytes)

WAVEFORMATEXTENSIBLE:
wValidBitsPerSample: 16
dwChannelMask: 0x00000603 OK
SubFormat: {00000001-0000-0010-8000-00AA00389B71} MEDIASUBTYPE_PCM

pbFormat:
0000: fe ff 04 00 80 bb 00 00 00 dc 05 00 08 00 10 00 þÿ..?»...Ü......
0010: 16 00 10 00 03 06 00 00 01 00 00 00 00 00 10 00 ................
0020: 80 00 00 aa 00 38 9b 71 ?..ª.8?q
is not traslated be the decoder to the output pin:
Filter : LAV Audio Decoder - CLSID : {E8E73B6B-4CB3-44A4-BE99-4F7BCB96E491}
Pin [OUT]
- Connected to:

CLSID: {18C16B08-6497-420E-AD14-22D21C2CEAB7}
Filter: Audio Switcher
Pin: 4i220.wav

- Connection media type:

Audio: PCM 48000Hz 4ch 3072kbps

AM_MEDIA_TYPE:
majortype: MEDIATYPE_Audio {73647561-0000-0010-8000-00AA00389B71}
subtype: MEDIASUBTYPE_PCM {00000001-0000-0010-8000-00AA00389B71}
formattype: FORMAT_WaveFormatEx {05589F81-C356-11CE-BF01-00AA0055595A}
bFixedSizeSamples: 1
bTemporalCompression: 0
lSampleSize: 8
cbFormat: 40

WAVEFORMATEX:
wFormatTag: 0xfffe
nChannels: 4
nSamplesPerSec: 48000
nAvgBytesPerSec: 384000
nBlockAlign: 8
wBitsPerSample: 16
cbSize: 22 (extra bytes)

WAVEFORMATEXTENSIBLE:
wValidBitsPerSample: 16
dwChannelMask: 0x0000000f WRONG
SubFormat: {00000001-0000-0010-8000-00AA00389B71}

pbFormat:
0000: fe ff 04 00 80 bb 00 00 00 dc 05 00 08 00 10 00 þÿ..?»...Ü......
0010: 16 00 10 00 0f 00 00 00 01 00 00 00 00 00 10 00 ................
For what the Audio Decoder show like input:
Filter : LAV Audio Decoder - CLSID : {E8E73B6B-4CB3-44A4-BE99-4F7BCB96E491} cbSize: 0 (extra bytes)
Pin [IN]
- Connected to: pbFormat:
0000: 00 00 01 00 01 00 04 00 80 bb 00 00 00 dc 05 00 ........?»...Ü..
CLSID: {B98D13E7-55DB-4385-A33D-09FD1BA26338} 0010: 08 00 10 00 00 00 00 00 ........
Filter: LAV Splitter Source (internal)
Pin: Audio

- Connection media type:

Audio

AM_MEDIA_TYPE:
majortype: MEDIATYPE_Audio {73647561-0000-0010-8000-00AA00389B71}
subtype: Unknown GUID Name {AFBC2343-3DCB-4047-9655-E1E62A61B1C5}
formattype: Unknown GUID Name {35189950-CAC9-4C8D-819D-B6FAEE15DD9D}
bFixedSizeSamples: 1
bTemporalCompression: 0
lSampleSize: 256000
cbFormat: 24

WAVEFORMATEXFFMPEG:
nCodecId: 0x10000

WAVEFORMATEX:
wFormatTag: 0x0001
nChannels: 4
nSamplesPerSec: 48000
nAvgBytesPerSec: 384000
nBlockAlign: 8
wBitsPerSample: 16
cbSize: 0 (extra bytes)

pbFormat:
0000: 00 00 01 00 01 00 04 00 80 bb 00 00 00 dc 05 00 ........?»...Ü..
0010: 08 00 10 00 00 00 00 00 ........
losing the dwChannelMask info.

Just for fun, seems than the LAV Splitter assign other default for 4 channels when the input file is a wav with simple header (without ChannelMask info):
Audio: PCM 48000Hz 4ch 3072kbps SIMPLE HEADER WITHOUT ChannelMask

AM_MEDIA_TYPE:
majortype: MEDIATYPE_Audio {73647561-0000-0010-8000-00AA00389B71}
subtype: MEDIASUBTYPE_PCM {00000001-0000-0010-8000-00AA00389B71}
formattype: FORMAT_WaveFormatEx {05589F81-C356-11CE-BF01-00AA0055595A}
bFixedSizeSamples: 1
bTemporalCompression: 0
lSampleSize: 8
cbFormat: 40

WAVEFORMATEX:
wFormatTag: 0xfffe
nChannels: 4
nSamplesPerSec: 48000
nAvgBytesPerSec: 384000
nBlockAlign: 8
wBitsPerSample: 16
cbSize: 22 (extra bytes)

WAVEFORMATEXTENSIBLE:
wValidBitsPerSample: 16
dwChannelMask: 0x00000107 OTHER DEFAULT (FL FR FC BC)
SubFormat: {00000001-0000-0010-8000-00AA00389B71}

clsid
15th April 2022, 13:21
As a temporary solution you can simply disable PCM on formats tab in LAV Audio Settings to prevent it from being used. You could also register the LAV build from MPC-HC to use as external copy for use with other apps.

max79
17th April 2022, 15:04
Hello,

@nevcairiel:
When switching audio tracks using the "IAMStreamSelect" interface on a live stream, it sometimes triggers an EC_COMPLETE event, which ruins playback.
I have setting-"Remove Audio Decoder on Audio Stream Switch" enabled in "LAV Splitter".

Any feedback would be appreciated.

Sunspark
23rd April 2022, 05:51
I have an observation of different behaviour between two video renderers using the same LAV decoding method and wish to understand how come it works for one but not the other.

When LAV is set for DXVA2 (native), both video renderers are in D3D9 Exclusive mode and a 10-bit video file is played the following occurs:

MadVR- Screen is split, colours are pink and green. I've always known that copy-back is required for this type of file to play back properly.
MPCVR- Plays back no problem, colours are normal, screen is not split. Looking at the filter states that the active decoder is dxva2n and not software.

Why does MadVR require copy-back to have proper colours, but MPCVR does not?

clsid
23rd April 2022, 12:36
This is the place to report MadVR bugs:
http://bugs.madshi.net/view_all_bug_page.php?project_id=4

sebas_led
29th April 2022, 18:11
Hi:

I'm interesed on issue #355 https://github.com/Nevcairiel/LAVFilters/issues/355
So as first step I've checked the code of LAV Splitter https://github.com/Nevcairiel/LAVFilters/blob/master/demuxer/LAVSplitter/LAVSplitter.cpp
but I've noticed that LAVSplitter::GetCurrentPosition returns E_NOTIMPL
I can get the elapsed time when playing a http stream, but I receive 0 when trying to get the current play position in rtmp streams.

So how the graph knows what it's the elapsed time?

TIA
Sebas

nevcairiel
30th April 2022, 07:09
The graph manager manages the current position, the source is not necessarily involved - in fact, the source cannot always effectively know, because it does not know how much data is being buffered downstream.
The reference clock should have the accurate current position.

sebas_led
2nd May 2022, 22:27
Thanks Nev!
I'm trying to know why I can't get the elasped time of an rtmp stream like this: rtmp://inliveserver.com:1935/14102/14102
I've tested with a second stream from other stream with the same result.
I've analyzed the stream with Wireshark and the timestamp seems to be valid (said that, I'm not an expert on rtmp).
I'm also reading the source at https://github.com/Nevcairiel/LAVFilters/blob/master/demuxer/Demuxers/LAVFDemuxer.cpp trying to understand a little more about the issue.

Balling
15th May 2022, 15:15
Afaik the D3D12 stuff is basically just same as D3D11 but with a somewhat simplified API. So don't get your expectations up to high.

I suggest testing if your AMD issues also occur with the Movies&TV player from Windows.

D3d11on12 is a good thing. VRR can be controlled.

kasper93
15th May 2022, 15:25
D3d11on12 is a good thing. VRR can be controlled.Why? Why this is relevant to this thread?

Balling
18th May 2022, 13:45
Why? Why this is relevant to this thread?

For VFR video... All video on phones... MacOS already does it with its Promotion. Windows too with mpv. But there is no way to perfectly control VRR with d3d11. D3d12 allows manipulating VRR not just accounting for frames rendering.

huhn
18th May 2022, 15:53
and what has the decoder to do with that?
you can use DXVA native decode and still render on a dx12 surface.
it has nothing todo here.

Balling
18th May 2022, 22:00
and what has the decoder to do with that?
you can use DXVA native decode and still render on a dx12 surface.
it has nothing todo here.

That is what we do in chrome, sure.

VipZ
3rd June 2022, 14:30
Hi Nev,

With the aim to build LAV with VS 2022, I have added the below code within 3 files, platform.props, libbluray.vcxproj and IntelQuickSyncDecoder.vcxproj

<PropertyGroup Label="Configuration" Condition="'$(VisualStudioVersion)' == '17.0'">
<PlatformToolset>v143</PlatformToolset>
<SpectreMitigation>false</SpectreMitigation>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>

Have successfully complied all binaries, is there any unknown issue foreseen with this or should this be all ok?

Thanks

nevcairiel
7th June 2022, 16:01
I haven't really messed with VS2022 yet, but that should be fine.

VipZ
7th June 2022, 19:29
Cool, thanks

tormento
10th June 2022, 12:04
I have tried with a simple search but had no results.

Can LAV Filters play AC-4?

el Filou
10th June 2022, 22:19
No because it's not supported yet in ffmpeg's open source decoders.

tormento
11th June 2022, 09:27
No because it's not supported yet in ffmpeg's open source decoders.
It seems that some support (https://trac.ffmpeg.org/ticket/8349) is there.

There are Kodi builds working with AC-4 already.

richardpl
11th June 2022, 09:40
That is all illegal, beware of getting sued by Dolby.

huhn
11th June 2022, 12:07
welcome to doom9 THE in-place of illegal DVD conversation.
we even have a decryption sub forum.

so what do i miss here is none opensource code direcly shared from dolby or something?

tormento
12th June 2022, 07:48
so what do i miss here is none opensource code direcly shared from dolby or something?
Dolby has a Github repository with source code for its plugins. :D

richardpl
12th June 2022, 09:59
THen just use their plugins an be happy user.

Sunspark
12th June 2022, 22:57
For LAV Splitter "Advanced" drop-down, I had to re-write the subtitle selector string because MPC-HC wasn't picking the right ones up with the old one I was using.

Sharing it here in case anyone wants it and uses English subtitles all the time as I do. The order of selection is left-to-right.

You can also set an audio language preference as well, but better to select the audio track manually depending on what you're watching.

eng@SDH eng|h eng@ass eng|n *|d

eng@SDH - All audio languages, use english subtitles for deaf&hearing impaired.
eng|h - Same as above, I don't recall seeing the hearing impaired flag in use, but including it anyway just in case, possibility it won't work in which case change to *|h if I encounter it.
eng@ass - Needed for a Japanese file that contained both ASS and PGS format subtitles in English with ASS being the preferred one.
eng|n - Needed for some files that have a default,forced english subtitle track that surprisingly contains no subs at all, this will select the English one with subs.
*|d - Needed for a Japanese file that has English subtitles, but won't select it with any of the above rules. eng|d did not work, needed to be *|d to work.

In regard to the SDH subtitle track, it's true it is sometimes unnecessary to see descriptions of sounds e.g. [papers rustling] and perhaps especially descriptions of the music, e.g. [despairing music] or whatever, it is needed because sometimes during a sequence where music is playing, this is the track that will contain the lyrics to the song that is being played (if present). The normal track does not contain song lyrics.

cremor
13th June 2022, 07:25
Where did you find that "lang@something" syntax? It's not documented in the readme file.

Sunspark
13th June 2022, 08:57
The @ character isn't documented, I saw it on a forum, but it does work. You can use it to match a word in the list of subtitle tracks. Very useful functionality.

Nevcariel: I found a performance issue. One file I have is one of those weird HEVC main 10 anime files. I have observed on my system comparing the stats with dxva2 copy-back vs software decoding, the cpu usage is the same for both, however with software decoding for this file the gpu load is identified as 8% vs 24% using dxva2 copy-back. The stats identify dxva2-cb as being active. This is a 3x difference in gpu load. If one uses software chroma/image scaling instead of dxva, then the differential is even greater. Do you know why the hardware decoder is so much worse than the software one in this example?

lvqcl
13th June 2022, 09:46
I suspect that the problem is in your system, not LAV.

el Filou
13th June 2022, 16:39
I have observed on my system comparing the stats with dxva2 copy-back vs software decoding, the cpu usage is the same for both, however with software decoding for this file the gpu load is identified as 8% vs 24% using dxva2 copy-back. If one uses software chroma/image scaling instead of dxva, then the differential is even greater.What GPU and renderer on what system?
DXVA copyback has inefficiencies: https://forum.doom9.org/showthread.php?t=176642
It's possible the time the GPU has to wait for the decoded frames to be transfered over the bus and back is counted as GPU active usage time, it depends on how the GPU driver decides to report this.
I find it very weird that decoding 10-bit H.265 would give the same CPU usage when using software and GPU decoding.
so what do i miss here is none opensource code direcly shared from dolby or something?richardpl is the author of that AC-4 code in his own ffmpeg fork that has reportedly been used in Kodi builds and other stuff and the licence is GPL. It's dated from 15 months ago but it hasn't been upstreamed into the main ffmpeg code, so maybe there's a legal problem? :confused:

Sunspark
13th June 2022, 18:59
I did some more testing.. there is an issue and it's partially CPU-related.

My CPU is a Broadwell, iGPU HD 6000.

"Broadwell will be implementing a hybrid H.265 decoder, allowing Broadwell to decode the next-generation video codec in hardware, but not with the same degree of power efficiency as H.264 today. In this hybrid setup Intel will be utilizing both portions of their fixed function video decoder and executing decoding steps on their shaders in order to offer complete H.265 decoding. The use of the shaders for part of the decoding process is less power efficient than doing everything in fixed function hardware but it’s better than the even less optimal CPU."

As currently implemented on Broadwell, using copy-back or software on HEVC will have the same CPU load, but GPU load is much lower with software decoding. Native does not have a lower GPU load, but does have a little lower CPU load. Using D3D11 does not change anything.

LAV work-around: uncheck HEVC in the list of codecs for HW decoding to ensure that HEVC is always software-decoded.

I tested MPC-BE's video decoder and left HEVC checked, no difference with the load issue. It's not the video renderer, because just now I was testing with mpcvr, and last night it was with madvr.

I wonder why using software decoding is better than hardware decoding? Could it be that Intel has done something where if it's software-decoded it actually does perform some invisible hardware acceleration to reduce the GPU load, but when it's using one of the hardware decoding codecs used by LAV, etc. it goes through a non-optimal path instead?

huhn
13th June 2022, 19:34
well you said it is a hybrid decoder which means it's as usual not that useful or plain bad.

and the GPU is higher in hardware decode here because it is not a asic hardware decoder but a hybrid decoder meaning is is using a lot of actual processing power of the GPU and CPU to do the task.
under certain situations a CPU can be plain better at this.
as you can see they have done a good job in optimising the HEVC software decode in ffmpeg.

what so ever there is no issue.

lvqcl
13th June 2022, 19:40
Could it be that Intel has done something where if it's software-decoded it actually does perform some invisible hardware acceleration to reduce the GPU load
LAV uses ffmpeg libraries to decode HEVC in software. I very doubt that Intel drivers hack into ffmpeg libs and alter some code in them.

I wonder why using software decoding is better than hardware decoding?
It's not hardware, it's hybrid and it suxx.

clsid
13th June 2022, 19:55
The reason software decoding has less GPU load is super simple to understand. It only has to copy the decoded data to the GPU once.

With copyback, the data first geta copied to GPU in compressed form, then copied back in uncompressed form, and then copied to GPU again.

Hybrid decoding of Broadwell is crap.

Sunspark
13th June 2022, 20:16
I just found it odd the results, I was under the impression that using DXVA2-Native or D3D11-Automatic would have better results with HEVC due to reduced traffic, but it only had a bit of CPU reduction and no reduction for GPU.

I accept that the situation for this CPU isn't going to change for this media type.

FFMPEG folks have done an impressive job.

Msarc
24th June 2022, 16:45
Noob question: with LAV video decoder already using dithering, is it better to disable dithering in video renderers (madVR / MPC VR)? Or do they apply to different things?

Sunspark
24th June 2022, 17:58
Noob question: with LAV video decoder already using dithering, is it better to disable dithering in video renderers (madVR / MPC VR)? Or do they apply to different things?

Different things. If the renderer has support for stuff like dithering, levels, etc. those are passed through and it is the renderer on the other end that sets the settings.

Those settings won't change anything with those two renderers. If you need to change dithering, levels, etc. in MadVR or MPCVR you have to do it on that side.

Msarc
24th June 2022, 19:53
Different things. If the renderer has support for stuff like dithering, levels, etc. those are passed through and it is the renderer on the other end that sets the settings.

Those settings won't change anything with those two renderers. If you need to change dithering, levels, etc. in MadVR or MPCVR you have to do it on that side.

Got it, thank you.

tormento
18th July 2022, 13:56
I have tried to decode a HEVC 4:4:4 file and, according to this (https://developer.nvidia.com/video-encode-and-decode-gpu-support-matrix-new), my card (1660 Super) should support it.

Anyway, trying to decode with Lav Filters, both in MPC-BE, as addin, and in MPC-HC, as integrated filter, makes them use avcodec software decoding.

The media file has this video properties:

Video
ID : 1
Format : HEVC
Format/Info : High Efficiency Video Coding
Format profile : Format Range@L5@High
Codec ID : V_MPEGH/ISO/HEVC
Duration : 1 h 49 min
Bit rate : 10.3 Mb/s
Width : 2 592 pixels
Height : 1 080 pixels
Display aspect ratio : 2.40:1
Frame rate mode : Constant
Frame rate : 23.976 (24000/1001) FPS
Chroma subsampling : 4:4:4
Bit depth : 10 bits
Bits/(Pixel*Frame) : 0.153
Stream size : 7.84 GiB (79%)
Writing library : x265 2.9+8-27d8424c799d:[Windows][MSVC 1900][64 bit] 10bit
Encoding settings : cpuid=1111039 / frame-threads=4 / numa-pools=16 / wpp / no-pmode / no-pme / no-psnr / no-ssim / log-level=2 / input-csp=3 / input-res=2592x1080 / interlace=0 / total-frames=0 / level-idc=0 / high-tier=1 / uhd-bd=0 / ref=4 / no-allow-non-conformance / no-repeat-headers / annexb / no-aud / no-hrd / info / hash=0 / no-temporal-layers / open-gop / min-keyint=23 / keyint=250 / gop-lookahead=0 / bframes=4 / b-adapt=2 / b-pyramid / bframe-bias=0 / rc-lookahead=25 / lookahead-slices=4 / scenecut=40 / radl=0 / no-intra-refresh / ctu=64 / min-cu-size=8 / rect / no-amp / max-tu-size=32 / tu-inter-depth=1 / tu-intra-depth=1 / limit-tu=0 / rdoq-level=2 / dynamic-rd=0.00 / no-ssim-rd / signhide / no-tskip / nr-intra=0 / nr-inter=0 / no-constrained-intra / strong-intra-smoothing / max-merge=3 / limit-refs=3 / limit-modes / me=3 / subme=3 / merange=57 / temporal-mvp / weightp / no-weightb / no-analyze-src-pics / deblock=0:0 / sao / no-sao-non-deblock / rd=4 / no-early-skip / rskip / no-fast-intra / no-tskip-fast / no-cu-lossless / no-b-intra / no-splitrd-skip / rdpenalty=0 / psy-rd=2.00 / psy-rdoq=1.00 / no-rd-refine / no-lossless / cbqpoffs=6 / crqpoffs=6 / rc=crf / crf=14.5 / qcomp=0.60 / qpstep=4 / stats-write=0 / stats-read=0 / vbv-maxrate=32000 / vbv-bufsize=15360 / vbv-init=0.9 / crf-max=0.0 / crf-min=0.0 / ipratio=1.40 / pbratio=1.30 / aq-mode=1 / aq-strength=1.00 / cutree / zone-count=0 / no-strict-cbr / qg-size=32 / no-rc-grain / qpmax=31 / qpmin=0 / no-const-vbv / sar=0 / overscan=0 / videoformat=5 / range=0 / colorprim=1 / transfer=2 / colormatrix=2 / chromaloc=0 / display-window=0 / max-cll=0,0 / min-luma=0 / max-luma=1023 / log2-max-poc-lsb=8 / vui-timing-info / vui-hrd-info / slices=1 / no-opt-qp-pps / no-opt-ref-list-length-pps / no-multi-pass-opt-rps / scenecut-bias=0.05 / no-opt-cu-delta-qp / no-aq-motion / no-hdr / no-hdr-opt / no-dhdr10-opt / no-idr-recovery-sei / analysis-reuse-level=5 / scale-factor=0 / refine-intra=0 / refine-inter=0 / refine-mv=0 / no-limit-sao / ctu-info=0 / no-lowpass-dct / refine-mv-type=0 / copy-pic=1 / max-ausize-factor=1.0 / no-dynamic-refine / no-single-sei
Default : Yes
Forced : No
Color range : Limited
Color primaries : BT.709

Am I doing something wrong?

Aleksoid1978
18th July 2022, 14:17
I have tried to decode a HEVC 4:4:4 file and, according to this (https://developer.nvidia.com/video-encode-and-decode-gpu-support-matrix-new), my card (1660 Super) should support it.

Anyway, trying to decode with Lav Filters, both in MPC-BE, as addin, and in MPC-HC, as integrated filter, makes them use avcodec software decoding.


It's support only in NVDEC, you can try it in internal MPC-BE video decoder.

tormento
18th July 2022, 14:29
It's support only in NVDEC, you can try it in internal MPC-BE video decoder.
Would be hard to add it in LAV?

el Filou
18th July 2022, 17:29
nevcairiel said a while back he had plans to update the internal NVIDIA decoder to use the newer version of their API, but no ETA obviously, and it wasn't clear if this would include support for formats that are decoded only through it and not through DXVA.
(Edit: Intel also supports formats that can be decoded only trough QuickSync and not through DXVA)

huhn
18th July 2022, 17:29
there is a * to it but the information for that is currently missing.
the information should show that this is for lossless only.
so it is not useful for general usage.
and it should not work with your file.

tormento
19th July 2022, 10:15
the information should show that this is for lossless only
Isn't that just for the encoding part only?

huhn
19th July 2022, 10:36
the encoding page is crystal clear.
and the encoding page doesn't use a *.

i could be utterly wrong like always.

nevcairiel
19th July 2022, 10:55
NVIDIA supports encoding 4:4:4 in normal as well as lossless, but decoding only 4:4:4 lossless.

I don't plan to support this in the current version of CUVID.

tormento
19th July 2022, 17:04
NVIDIA supports encoding 4:4:4 in normal as well as lossless, but decoding only 4:4:4 lossless.
https://i1.lensdump.com/i/tPc5Gb.png

Mmmm... that is not lossless.

huhn
19th July 2022, 17:33
good. the information was still present back in the days.
they may just forget to remove the *.

nice very niche upgrade.

nevcairiel
19th July 2022, 17:34
You can send it all sorts of bitstreams, and sometimes it might even work, but there is no guarantee that every 4:4:4 bitstream will work, hence we call it not supported.
HW decoders don't usually do a lot of checks. It relies on the software using them to do those checks.

Its not the first time this concept comes up. "It works for this one video I have" is not proof that it works for _every_ video using that encoding. Thats the tricky part about decoders, you have to support every single codec feature. An encoder has it easier - it gets to pick which features it implements.

Unless support is clearly documented, and with which hardware supports what as well, its just not worth the hassle for edge cases. Guaranteed correct decoding is more important then maybe faster decoding.

tormento
19th July 2022, 17:49
You can send it all sorts of bitstreams, and sometimes it might even work, but there is no guarantee that every 4:4:4 bitstream will work, hence we call it not supported.
Perhaps long time ago. Nowadays it's supported and working.

https://docs.nvidia.com/video-technologies/video-codec-sdk/nvdec-video-decoder-api-prog-guide/

nevcairiel
19th July 2022, 22:29
That link doesn't mention 4:4:4 HEVC at all. In fact it only lists main/main10/main12 support for HEVC in the feature matrix, which is limited to 4:2:0. So not sure what you were trying to show there.
If anything the support for HEVC 4:4:4 is very badly documented, and the only documentation I actually know of mention it special cases it to be lossless only. Hence I likely wouldn't care to offer it, even after the CUVID/NVDEC support was re-written. Badly documented niche features is how you get annoying bugs.

Besides all that, high-bandwidth copy-back decoding is also quickly bottlenecking on memory bandwidth, and finding a renderer willing to add support for native delivery of 4:4:4 formats is quite likely going to be rather challenging.

jmone
20th July 2022, 00:12
I for one would appreciate HEVC 10-BIT 4:4:4 hw decoding via NVDEC but I'm also happy to admit that it is a niche case that would be a nice to have rather that a must.

FWIW - I capture in AVC 4:2:2 10-Bit UHD Log (Sony FX6) and typically render out (Davinci Resolve) in HEVC UHD HDR 4:2:0 and it normally looks great. I have had some issues with poor chroma upscaling on high contrast edges with this format with some rendering combinations using nvidia HW accelerated rendering (https://yabb.jriver.com/interact/index.php?topic=120102.0).

My edge case is that I'd prefer to just render out a 4:4:4 version that I could use both for playback (but would need HW accelerated decoding) and keep as the "master" (as the 4:2:0 version is throwing away chroma detail from the original footage). Davinci Resolve supports both decoding and encoding of HW Acceleration of HEVC 4:4:4 using NVDEC, and for those interested here is a zip file (400MB) of a short sunrise clip rendered out in both UHD HDR 4:4:4 and 4:2:0. https://behome.dyndns.info/index.php/s/7BgTfkYSmYrrzsS

Aleksoid1978
20th July 2022, 05:40
NVDEC normal support HEVC 4:4:4 8/10/12bit.
If need - MPC VR support "needed" 4:4:4 format for "direct" copy from decoder.

tormento
20th July 2022, 08:23
That link doesn't mention 4:4:4 HEVC
Have yourself a "4:4:4" CTRL-F search.

tormento
20th July 2022, 08:25
NVDEC normal support HEVC 4:4:4 8/10/12bit.
I was planning to use HEVC lossless 4:4:4 as intermediate file for the most complex encodes, where my PC would struggle to do them in a single passage.

A fast preview player would be nice.

Anyway, with a lot of probability DGDecNV is about having 4:4:4 support. I will play the avs file.

nevcairiel
20th July 2022, 11:28
Have yourself a "4:4:4" CTRL-F search.

I don't think you really get it at all.

Its not about there being random mentions of 4:4:4 (without context, without further information which profiles are supported, for which codecs, etc), but the absolute lack of clear information what is actually supported. The feature matrix does not mention 4:4:4 at all, in fact it lists a bunch of profiles that are all 4:2:0. Some other feature pages list 4:4:4, some qualify that to lossless, some don't elaborate at all. Its a messy situation, and one I do not want anything to do with.

YGPMOLE
24th July 2022, 12:04
Hi!

I got 2 (very stupid?) questions: even when bitstreaming a multichannel track to an AVR receiver connected by HDMI, the OUT LAV Audio Decoder Pin Info shows a S/Pdif stereo connection; it's a normal behavior?

Second question: some of my Matroska files are opened by the internal MPC Matroska Source and Audio Decoder of MPC-BE instead of LAV Splitter Source and Audio Decoder (with what seems to be an audio filter for each language, instead of LAV Splitter Source + LAV Video Decoder + LAV Audio Decoder as usual): the only difference I noted is that this files are marked as AVC High Profile Level 4.1; this is the filter chain:

MPC-BE 1.6.3.0
Filters currently loaded:
- Default DirectSound Device
- madVR Renderer
- Audio Switcher
- LAV Video Decoder
- MPC Audio Decoder
- MPC Audio Decoder
- MPC Matroska Source

clsid
24th July 2022, 13:19
Yes, it is normal that you see such generic pin info in case of bitstreaming.

You need to set LAV Splitter as preferred source filter in MPC-BE options. Go to MPC-BE support topic if you need help, as this is not a problem with LAV Filters itself. Or switch to MPC-HC which uses LAV by default.

Yups
24th July 2022, 21:37
I have issues with AV1 videos encoded from Intel Arc A380, the AV1 videos stutter, even on a TGL-U device with Iris Xe hardware decoder.


Potplayer with integrated FFmpeg decoder no problem, runs fine. LAV 0.76.1 and 0.75.0 stuttering. I've tried with MPC Home Cinema and VLC player on two PCs with same result. Could someone check this out?


Sample can be downloaded from here (https://youtu.be/2xo0CIdXHFk): https://drive.google.com/file/d/1jRKkTGYVdYHN-KzVH6cM1k6JVITFzQxR/view

nevcairiel
24th July 2022, 22:25
Whatever encoded that file seems to have screwed up the timestamps. The timestamps move backwards and forwards as if the video had B-Frames, but AV1 does not have B-Frames.

Yups
24th July 2022, 22:59
Whatever encoded that file seems to have screwed up the timestamps. The timestamps move backwards and forwards as if the video had B-Frames, but AV1 does not have B-Frames.


It's from Intels Arc control panel (ingame recording). AV1 does not have b-frames? Interesting.

YGPMOLE
24th July 2022, 23:04
Yes, it is normal that you see such generic pin info in case of bitstreaming.

You need to set LAV Splitter as preferred source filter in MPC-BE options. Go to MPC-BE support topic if you need help, as this is not a problem with LAV Filters itself. Or switch to MPC-HC which uses LAV by default.

Thank you for the answers! Everything it's properly done in MPC-BE, and other files are correctly opened/splitted/decoded by LAV, so it just seemed strange to have DTS 5.1 input and S/PDIF 2.0 out when bitstreaming, but if you says it's OK so I'll take it for the normal behavior of the pin info.

Any idea why LAV Splitter is not able to open that file and MPC Matroska Source it's used instead? It appears a normal Matroska .H264/AVC file to me...

tormento
8th August 2022, 09:34
DGTools is out with a beta (https://www.rationalqm.us/board/viewtopic.php?f=8&t=1176), reading 444 flawlessly on nVidia cards. I have played those kind of files thru AVS on MPC-BE too.

I hope that it will encourage 444 support for LAV Filters.

clsid
18th August 2022, 16:40
There is no nightly (https://files.1f0.de/lavf/nightly/) build for latest LAV changes.

Can anyone confirm if AV1 hardware acceleration got broken after last ffmpeg update? You can use latest MPC-HC dev build to test, as that contains newest LAV build.

lvqcl
18th August 2022, 16:55
MPC-HC 1.9.22.34, LAVF 0.76.1.9-git - no HW acceleration for AV1.

nevcairiel
18th August 2022, 18:39
Should be fixed, ffmpeg didn't automatically enable a component it needs.

The nightlies should hopefully also build again, I rebuild the server recently that handles it.

gendalv
29th August 2022, 12:50
I thought installing this would make thumbnails show up for x265 10b .mkv files :/
In Codec Tweak Tool all things are selected for thumnails.
How to do it? Win11.

Klaus1189
29th August 2022, 16:51
I think I found new introduced typos: https://github.com/Nevcairiel/LAVFilters/commit/8e16215de51b5e15928512f877de9e4c4d074277

It is designed to offer the ability to take over the graph-building process from the player`s side.
It only exports one function which LAV Splitter will call when a stream change happens on the user`s requests

To be more precise, not simple typos but the Acute accent (https://en.wikipedia.org/wiki/Acute_accent) should not be used as Apostroph (https://de.wikipedia.org/wiki/Apostroph)
wrong:player`s
right: player's
wrong:user`s
right:user's

Klaus1189
29th August 2022, 16:58
I just corrected it here:
https://github.com/Nevcairiel/LAVFilters/pull/512

clsid
29th August 2022, 17:32
I thought installing this would make thumbnails show up for x265 10b .mkv files :/
In Codec Tweak Tool all things are selected for thumnails.
How to do it? Win11.No, LAV Filters is not used at all for thumbnails. You need to install Icaros (https://www.majorgeeks.com/files/details/icaros_beta.html).

LigH
30th August 2022, 09:49
Thanks, just last week I tried to remember its name... :o

filler56789
30th August 2022, 13:28
To be more precise, not simple typos but the Acute accent (https://en.wikipedia.org/wiki/Acute_accent) should not be used as Apostroph (https://de.wikipedia.org/wiki/Apostroph)
wrong:player`s
right: player's
wrong:user`s
right:user's

You meant GRAVE accent (https://en.wikipedia.org/wiki/Grave_accent) alright :)

But you are right, neither of them is a replacement for the apostroph.

Balling
4th September 2022, 08:18
I don't think you really get it at all.

Its not about there being random mentions of 4:4:4 (without context, without further information which profiles are supported, for which codecs, etc), but the absolute lack of clear information what is actually supported. The feature matrix does not mention 4:4:4 at all, in fact it lists a bunch of profiles that are all 4:2:0. Some other feature pages list 4:4:4, some qualify that to lossless, some don't elaborate at all. Its a messy situation, and one I do not want anything to do with.

I specifically wrote it all on wikipedia. For avc only 444 predictive can be lossless, high is not lossless. Nvidia does not support 10 bit avc anyway.

Balling
4th September 2022, 08:20
No point doing 4:4:4 when even Blu-ray is 4:2:0. All U R doing is WA$TING CPU & file size = LOL!!

Quote: "Blu-ray and UHD Blu-ray both store the video signal in the 4:2:0 format."



You will never get 444 Blu-rays (RGB Blu-ray more like it) if there is no support. Why do you think nvidia added lossless RGB and YCbCr 444 nvenc hevc? And, anyway, cameras from Panasonic, Leica and Nikon Z9 do lossless in some cases (Nikon) bayered N-RAW, true RAW, that is only supported by Red as it is covered by their patents (above 24p). Davinci uses lossless hevc decoder in nvidia. Does not use ffmpeg, cause 3 or 4 bugs are not present there.

Look at this nutjob samples, XAVC 444, maybe even lossless: https://trac.ffmpeg.org/ticket/9898#comment:13

Balling
4th September 2022, 08:28
So when atmos open source decoder? https://github.com/VoidXH/Cavern

Brownian motion: https://photos.app.goo.gl/biAubMWnT8AM18Xm6

Balling
4th September 2022, 15:16
' All the 'RAW' stuff is silly because if U simply set up the camera or whatever 2 save things in a natural-looking way with the 'correct gamma curve & saturation' & stuff in the first place, when U shoot, then U don't need 2 WA$TE all that data & 'extra resolution' trying 2 keep 'everything' instead of just what U will actually NOTICE! =)



About your black comments: eye is adapted to black outside. Try walking in the dark with your phone on. It is very not nice, but I do it often. Black is more prominant in the closed space. It is also scene referred: black just means camera 20 stops cannot quite get it. The N-RAW video that is truely patented by Red >24 fps and Red is suing Nikon for it: https://forum.grassvalley.com/forum/editors/editing-with-edius/572094-n-raw-from-z9-sample-download

Open it in Davinci. You will be shocked if you render it to BT.2020 PQ HDR. Believe me. Red is not suing them for nothing, 8256x4644x50fps.

max79
4th September 2022, 19:39
MPC-BE Menu > Play > Filters

It is probably using "File Source (URL)", which may be caching the whole file before playback starts.

You can edit this registry key to change the source filter:
HKEY_CLASSES_ROOT\ftp
LAV = {B98D13E7-55DB-4385-A33D-09FD1BA26338}

Hello,
is the any way starting to play such URLs in "LAVSplitterSource":
ftp ://MyPassword@SiteName.com/FolderName/FileName.mp3

At this moment works only URLs like this:
ftp ://SiteName.com/FolderName/FileName.mp3

filler56789
4th September 2022, 22:26
Hello,
is the any way starting to play such URLs in "LAVSplitterSource":
ftp ://MyPassword@SiteName.com/FolderName/FileName.mp3

AFAIR the "syntax" of that command is incorrect, or rather, incomplete;
try this one instead:

protocol://username:password@SiteName.domain/directory/filename.MP3

filler56789
4th September 2022, 22:43
<OFF-TOPIC>
Maybe a moderator should clean this thread AND the ffdshow topic too by deleting some posts AND doing some additional "moderator magick" as well :-/
</OFF-TOPIC>

max79
5th September 2022, 08:48
try this one instead:
protocol://username:password@SiteName.domain/directory/filename.MP3

This is it! Thank you very much for your help. Works!:goodpost:

tormento
6th September 2022, 21:49
No point doing 4:4:4 when even Blu-ray is 4:2:0. All U R doing is WA$TING CPU & file size = LOL!!
So many words, without even knowing the reason I asked 444 support for... kek...

tormento
6th September 2022, 21:50
Why do you think nvidia added lossless RGB and YCbCr 444 nvenc hevc?
I am actually using lossless HEVC as intermediate files, now that I have proper HW decoding in AVS too.

Let him throw his time. If only we could have a forum option to hide his posts.

Balling
24th September 2022, 13:12
So when atmos open source decoder? https://github.com/VoidXH/Cavern

Brownian motion: https://photos.app.goo.gl/biAubMWnT8AM18Xm6

Nev? Will it be in Lav? I opened and asked to fix 12 bugs in Cavern, I think it is more or less ready.

lvqcl
24th September 2022, 13:37
Will it be in ffmpeg?

Because LAV Filters use ffmpeg for decoding.

Balling
28th September 2022, 23:44
Will it be in ffmpeg?

Because LAV Filters use ffmpeg for decoding.

https://github.com/FFmpeg/FFmpeg/search?q=Hendrik+Leppkes&type=commits

https://github.com/FFmpeg/FFmpeg/search?q=Nevcairiel&type=commits

I am just saying.

flossy_cake
29th September 2022, 06:59
For LAV Video decoder, what do the "deinterlacing mode" and "field order" settings actually do?

I've thrown a ton of videos at various combination of those 2 settings and they never seem to actually do anything.

The only video file I have managed to see a difference with is a 1080p25 file that is incorrectly flagged as progressive and actually contains 1080i25 @ 1:1 cadence. With this particular file, DXVA deinterlacing won't work unless I set LAV to "deinterlacing mode: force" and "field order: top field first". This is with MadVR as the renderer, and MadVR set to enable DXVA deinterlacing via file tag [deint=video].

Am I correct in assuming that those 2 LAV deint settings just set some flags in the decoded video stream which the renderer or DXVA is looking at and making decisions based on those flags? i.e LAV doesn't actually modify the video frames in any way? (I have LAV's "software deint" disabled btw).

This seems relevant but doesn't really answer my question:

Let me explain how things are from the view point of a video renderer. The renderer must deal with a wide number of decoders and they all behave differently. Some decoders always set interlaced flags, others never set interlaced flags, again others set them sometimes and sometimes not, depending on user configuration (and the user doesn't always know what he's doing), or depending on the weather or the configuration of the planets. There are typically 2 things that I've seen decoders do:

(1) Either the decoder sets the interlaced flags to 0. If that happens, madVR doesn't know if that is supposed to mean "this file is progressive", or if the decoder is not in the mood to share information, because 0 is also the non-initialized value used by all decoders which never properly fill in these values (like CoreAVC).

(2) Or the decoder sets the flags to "AMINTERLACE_DisplayModeBobOrWeave". Again, this information is more or less useless, because by definition is means "the stream could be totally progressive, or totally interlaced, or a mixture of both". In other words, by setting "AMINTERLACE_DisplayModeBobOrWeave", the decoder pretty much says: "I've no idea whether this file is interlaced or progressive or whatever".

Even though all of the above is quite bad, madVR *still* tries to behave identical to VMR/EVR, which means that if the interlace flags are set to 0, madVR will by default not activate deinterlacing, and if the flags are set to "AMINTERLACE_DisplayModeBobOrWeave", madVR will by default activate deinterlacing, but only after the first interlaced video frame is received. I don't consider this behaviour really alright, but since VMR/EVR are doing it this way, I'm trying to have madVR behave identical.

There is one thing that makes madVR's behaviour different from VMR/EVR: While VMR/EVR always blindly trust the decoder (and thus will stumble when decoders don't set the flags correctly, or not at all), madVR gets itself access to the video bitstream to make its own analyzation of whether deinterlacing is needed or not. If the video bitstream clearly says whether deinterlacing is necessary or not, madVR will value this information higher than the rather non-specific flags described above. I believe this is a good thing, and I challenge anyone to argue otherwise.

If LAV wants to force deinterlacing to on/off, it's easy enough to do that with madVR. There are interlace flags available for that, described by Microsoft, which madVR properly honors. "AMINTERLACE_DisplayModeBobOnly" asks for the whole video stream (every frame) to be deinterlaced, so that would be the correct flag to set to force the renderer to turn deinterlacing on. And "AMINTERLACE_DisplayModeWeaveOnly" asks for the whole video stream to not be deinterlaced, so that would be a good flag to set to force the renderer to turn deinterlacing off. If LAV used these flags, madVR would obey. madVR has supported these flags from the first version deinterlacing was introduced.

nevcairiel
29th September 2022, 10:16
The settings just influence the metadata, indeed. Of course if LAV itself were to deinterlace, it would also obey them. madshi's stance to play fast and loose with the metadata provided by the decoder is not something I care for, and if i set the interlaced flag to 0, I would expect a renderer to act accordingly.

flossy_cake
1st October 2022, 04:44
Is there any chance of considering a filename tagging scheme similar to MadVR so we can turn LAV features on for certain files/folders. eg. [SoftDeint=bwdif], [FieldOrder=tff], [DeintMode=force]. I'd like to use software deint on some problematic files that don't work very well with DXVA deint and MadVR's ivtc. And maybe turn off DXVA2 decoding for certain files as well. Having to manually change the setting through the GUI every time we watch an episode of some show is kind of a dealbreaker.

nevcairiel
1st October 2022, 09:39
There are no plans for that. LAV is primarily designed to be used by player software, those can control the configuration, and in theory also support per-file overrides.

Manni
1st October 2022, 14:40
Is there any chance of considering a filename tagging scheme similar to MadVR so we can turn LAV features on for certain files/folders. eg. [SoftDeint=bwdif], [FieldOrder=tff], [DeintMode=force]. I'd like to use software deint on some problematic files that don't work very well with DXVA deint and MadVR's ivtc. And maybe turn off DXVA2 decoding for certain files as well. Having to manually change the setting through the GUI every time we watch an episode of some show is kind of a dealbreaker.

You can easily export LAV registry with each settings and put them (or a shortcut) on the desktop or call them from a batch file. This means that you only have to click on a file to swap settings. I had to do this to switch between audio passthrough and LPCM. Better than accessing LAV config each time.

flossy_cake
1st October 2022, 21:20
You can easily export LAV registry with each settings and put them (or a shortcut) on the desktop or call them from a batch file. This means that you only have to click on a file to swap settings. I had to do this to switch between audio passthrough and LPCM. Better than accessing LAV config each time.

Thank you, but the HTPC has to be usable by the average person in our household and they won't remember to click some batch file for certain shows. All they can do is open Kodi , browse for the file and then launch it (which opens with MPC-HC). Perhaps I could configure Kodi to launch batch files or something? But then every single file in the video library would have to be a batch file otherwise it would use whatever settings were applied by the last batch file.

Manni
1st October 2022, 22:51
Thank you, but the HTPC has to be usable by the average person in our household and they won't remember to click some batch file for certain shows. All they can do is open Kodi , browse for the file and then launch it (which opens with MPC-HC). Perhaps I could configure Kodi to launch batch files or something? But then every single file in the video library would have to be a batch file otherwise it would use whatever settings were applied by the last batch file.

I used MCE controller to assign a batch file to a button on my iPad control with iRule when I needed this, it worked well. Event Ghost works well too for this. Of course it's not ideal, but it's easier to ask the user to press on a button than to tell you go into LAV control panel and select the right option.

flossy_cake
1st October 2022, 23:12
I used MCE controller to assign a batch file to a button on my iPad control with iRule when I needed this, it worked well. Event Ghost works well too for this. Of course it's not ideal, but it's easier to ask the user to press on a button than to tell you go into LAV control panel and select the right option.

I really appreciate your suggestions, it's just that having to remember to manually intervene on certain files isn't practical enough.

I was thinking, if there was some way to apply LAV settings through the registry while LAV is running, it may be possible to implement a scripted solution which eg. detects when mpc-hc64.exe is running, gets the currently playing filename from mpc's window title, and then applies the custom LAV settings through registry. But I don't think those setting would apply until the next time LAV launches. Perhaps it could be scripted to re-launch MPC & LAV, but then Kodi will see MPC has closed and will exit back to its GUI. And the whole thing is just super convoluted.

edit: I've since learned that LAV's deinterlacing settings can be applied per-file by using an avisynth script, eg.


LoadPlugin("C:\Program Files (x86)\AviSynth+\plugins64\LSMASHSource.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth+\plugins64\BWDIF.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth+\plugins64\yadifmod2.dll")

file = "c:\myvideo.mkv"
audiotrack = -1 # -1 = first track

video = LWLibavVideoSource(source=file, cache=false)
IsInt(audiotrack) ? AudioDub(video, LWLibavAudioSource(source=file, stream_index=audiotrack, cache=false)) : video

BWDIF(field=-2)
# yadifmod2(mode=1)


# save as eg. myvideo.avs and open with MPC-HC

Thunderbolt8
5th October 2022, 11:54
for a TV broadcast with 5.1 AC3 track LAV shows the info "5.1(side)"

what does this "side" here mean?

huhn
5th October 2022, 12:22
there are 2 5.1 (maybe more i know 2) one where the "rear" speaker are "behind" you and one where they are to the "sides" like 7.1 missing the rear speakers.

this file is mastered for side speaker. it knows this form meta data 2 or 4 hexa values or something like that.

Thunderbolt8
5th October 2022, 16:05
hm is this a specialty of AC3, compared to DTS? because e.g. in DTS master suite theres only 1 configuration for 5.1 tracks (Ls, Rs)

nevcairiel
5th October 2022, 17:20
Both Dolby and DTS define a whole list of speaker positions and their naming.

These are the DTS names for channels, and their speaker position according to the DTS specification (degrees relative to your nose when looking at the screen)
Ls/Rs: Left/Right surround, 110 degrees
Lsr/Rsr: Left/Right surround rear, 150 degrees
Lss/Rss: Left/Right surround side, 90 degrees
Lw/Rw: Left/Right wide, 60 degrees

Typically, in 5.1 you'll find Ls/Rs being used (thats what the "side" layout in FFmpeg uses, its named after the WAVE specification which uses plain rear and side names), in older formats the Lsr/Rsr are used sometimes (thats the plain 5.1 in ffmpeg).
In 7.1, its typically both Ls/Rs and Lsr/Rsr, but that can vary.

Dolby defines the channel similarly, but not necessarily with equal angles etc.

Thunderbolt8
5th October 2022, 17:30
so the (side) Ls/Rs setup is the common one nowadays? and so the track is not a rather a-typical one? would it sound strange if your setup is rather rear/behind when you play this "side" track or would it sound as it is supposed to be?

huhn
5th October 2022, 18:48
if you want it to sound as it is intended you theoretical need to change the speaker setup in that case.

with bit streaming your AVR my even be remixing to move them ever so slightly if it knows your speaker position.

i suggest you to just ignore it. it's a spec that is hard to follow.
maybe there are now audio renderer where you can specify your setup but i don't know that.

even if your setup is "incorrect" it will not sound terrible.

tebasuna51
6th October 2022, 12:09
Standard channel layouts:
...
5.1 FL+FR+FC+LFE+BL+BR standard in XX Century (decoded from Ls-Rs in AC3,DTS,...)
5.1(side) FL+FR+FC+LFE+SL+SR standard in XXI Century (decoded from Ls-Rs in AC3,DTS,...)
...
Read also https://mediaarea.net/AudioChannelLayout to understand different names for channels

An AVR 5.1 send to Surround speakers (Ls-Rs 110-120º) both channels SL-SR 90º (Lss-Rss) and BL-BR 150º (Lb-Rb)

flossy_cake
23rd October 2022, 19:48
In LAV Video if I set Deinterlacing Mode to Auto, does this mean my selected Software deinterlacer will only be activated if the stream has interlace flags? And is this 100% reliable in terms of avoiding false positives -- i.e could some progressive sources be accidentally detected as interlaced and therefore have software deinterlacing applied to them which would needlessly degrade the progressive image?

el Filou
24th October 2022, 13:10
Yes; and no.
As the tooltip says, 'Auto' uses frame flags to decide.
If a progressive stream is incorrectly flagged as interlaced frames, it will be passed through the chosen software deinterlacer.

flossy_cake
1st November 2022, 09:34
Thanks.

Sorry if this is a silly question but is there an arg I can pass to LAV Splitter to tell it to select a particular subtitle track? I know I can pass it eg. "eng" to select the English track, but I have multiple English tracks, eg. track 2 is an English commentary track. Is there some arg I can pass to tell it "track 2"?

I have read the readme here (https://github.com/Nevcairiel/LAVFilters/blob/master/README.txt) but it doesn't seem to cover such a scenario.

In case you're wondering why don't I just use MPC-HC's built in subtitle selector or LAV Splitter's tray icon...the answer is that I'm calling LAV Splitter from Avisynth via DSS2() (http://avisynth.nl/index.php/DSS2mod#Syntax_and_Parameters) and I am trying to pass it arguments for subtitle track selection so that I don't have to manually set it every time I open the .avs file.

edit: code sample

video = dss2(sourcefile, subsm=2, lavs="l3 vc2 sm3 sl[] sa[eng] es0 ti1", lavf_path="C:\Program Files (x86)\K-Lite Codec Pack\Filters\LAV64")

audio = directshowsource(sourcefile, video=false, audio=true)

AudioDub(video, audio)

Sunspark
2nd November 2022, 04:24
The only way I know of is via using the @ operator.

eng@SDH eng@ass both work.. I don't have commentary tracks so I can't see how they're labelled on your side, but eng@commentary or whatever is in the square brackets should work.

flossy_cake
2nd November 2022, 11:35
The only way I know of is via using the @ operator.

eng@SDH eng@ass both work.. I don't have commentary tracks so I can't see how they're labelled on your side, but eng@commentary or whatever is in the square brackets should work.

Thank you, it works:

https://i.ibb.co/nDHhtJR/subs.png

flossy_cake
6th November 2022, 01:13
I was wondering about how LAV Video handles the "repeat flags" for "soft telecined" NTSC DVD MPEG2 streams.

From what I can tell the MPEG2 stream on the disc is stored as 24p but contains some "repeat flags" to tell the player when to repeat frames/fields to make it come out as 60hz 3:2 pattern.

This makes sense but how does LAV handle it exactly -- is it creating repeat FIELDS or FRAMES? Does it assume 60hz in its calculation for repeating these fields/frames?

I noticed when playing such material on 120hz display, I still have 3:2 judder even though 24 goes 5:5 into 120. From this I'm inferring that LAV Decoder must be assuming the repeat flags are intended for 60hz display -- is that codified in the MPEG2 spec or does LAV make the decision about the timing of the repeat flags?

edit: after some more testing it seems LAV uses the repeat flags to convert it to 60p. The LAV settings GUI doesn't seem to offer an option to not perform this conversion and just output it as 24p.

edit: a 60i option would be nice too as there are some edge cases where that can be beneficial.

nevcairiel
6th November 2022, 10:29
LAV does not repeat fields on its own. It forwards the metadata to the renderer, which can decide to repeat frames, or not to.

huhn
7th November 2022, 08:14
as far as i know the Microsoft decoder is outputting soft telecine as hard telecine and the lav is not so you have to disable the Microsoft decoder to get soft telecine.
and if i remember correctly the microsoft decoder is used by default when a normal dvd is loaded to make menus work.

nevcairiel
10th November 2022, 17:29
LAV Filters 0.77

LAV Splitter
- Fixed: Improved handling of multichannel PCM channel assignments
- Fixed: MP4 Keyframe information could be wrong

LAV Audio
- NEW: Support for audio with more then 8 channel, including automatic downmixing if required

Download: Installer (both x86/x64) (https://files.1f0.de/lavf/LAVFilters-0.77.exe) -- Zips: 32-bit (https://files.1f0.de/lavf/LAVFilters-0.77.zip) & 64-bit (https://files.1f0.de/lavf/LAVFilters-0.77-x64.zip)

Nothing much to say for this one. Lots of under-the-hood changes in FFmpeg, bugfixes, speedups, etc. dav1d was updated for faster AV1 decoding.

Thats it. Short and sweet.

Manni
10th November 2022, 18:26
Thanks for all your work :)

ryrynz
10th November 2022, 20:05
Stellar as always.

SeeMoreDigital
10th November 2022, 21:13
I wonder if someone can help...

I've managed to configure LAV Filters to parse every audio format with MPC-BE 1.6.4. except LPCM.wav files!

What do I need to do?

chros
11th November 2022, 11:40
Thanks Nev!

tebasuna51
11th November 2022, 11:57
LAV Filters 0.77
[CODE]
LAV Splitter
- Fixed: Improved handling of multichannel PCM channel assignments
...

Many thanks!

AYColumbia
14th November 2022, 03:34
Thanks very much. :)

Mercury_22
11th December 2022, 23:08
@Nev
Strange thing happens when playing a YouTube clip: audio ends 20s - 60s before video ends, which doesn't happen when using MPC-BE's internal splitter

clsid
11th December 2022, 23:41
Working fine here. So if it happens with all files/streams, the problem is at your end.

If problem only happens with certain files/stream, you need to give a link to an example.

Mercury_22
12th December 2022, 23:34
Working fine here. So if it happens with all files/streams, the problem is at your end.

If problem only happens with certain files/stream, you need to give a link to an example.

It seems that is only happening after pausing or / and seeking and only with mp4 (H.264/AVC) and mp4-av1 (AV01) but not with webM (vp9 profile 0)

Sample https://youtu.be/jhyY5e5grzE

clsid
13th December 2022, 16:30
Playing the AAC track of that video directly in the browser gives silence after the netflix logo sound. Same for the OPUS track. I see no issues or difference with LAV decoding. Same with BE as well.

supercoolman
3rd January 2023, 07:10
the latest LAV 0.77.1 is unable to decode BINK2 video despite ffmpeg seemed to have added (https://github.com/richardpl/FFmpeg/commit/7ab92509994dac1dc181cc5f99c45e3e80cd13bf) the support early last year. is it possible to port that support to LAV?

for example, using MPC-BE + LAV to play the BK2 files from Steam version of STEINS;GATE 0 for Windows doesn't output any video (KB2j) while audio plays without issue

richardpl
3rd January 2023, 11:01
Because you linked fork branch, and not real main branch of FFmpeg, thanks for telling me to remove that branch on github from existence.

clsid
3rd January 2023, 13:50
It is sad that such patches are not getting reviewed/approved by other FFmpeg devs. Maybe Hendrik is willing to do a review once he gets some time for it. Same of your AC4 patch.

LigH
4th January 2023, 18:41
And VVC is another "hot topic"...

ryrynz
7th January 2023, 07:57
I have a file with multiple audio streams in English and Japanese, when I switch to Japanese I get the AC3 192kb/s track rather than the Japanese 24bit PCM track, I have "prefer audio stream with the highest quality selected" both Japanese tracks are in Stereo (two channels) so based on that the PCM track should be favored correct?'
I'm using LAV 71.1.1 with MPC-BE (latest dev)

nevcairiel
7th January 2023, 08:45
LAVs stream selection parameters are only for the initial stream selection. If you swap afterwards during playback, you or your player are in full control.

ryrynz
7th January 2023, 09:29
Thanks. Would you be open to a switch or option for this selection to continue after inital stream selection? Or is this something that I aim at the player devs?

nevcairiel
7th January 2023, 11:45
There is really no interface to do anything like that on LAVs side. The only interface there is lets you pick the exact stream you want - if your player abstracts that away into a language choice, then thats on them to handle.

max79
8th January 2023, 20:01
AFAIR the "syntax" of that command is incorrect, or rather, incomplete;
try this one instead:

protocol://username:password@SiteName.domain/directory/filename.MP3

Hello,

may be you, or anybody else, know, why:confused: "LAV Splitter Source" (and VLC player also) can't playback URLs that contains Cyrillic symbols in its path?:

ftp://music:music@home.dimonius.ru/Music/Russian/Misc/Я_не_поняла.mp3

Any feedback would be appreciated.

Sunspark
8th January 2023, 23:01
I don't think it's the Cyrillic. It doesn't work on MPC-BE with its own decoders and the developers of that are Russian.

Speculating here, the problem might be with FTP chosen as the protocol.

max79
9th January 2023, 12:37
I don't think it's the Cyrillic.

I think you are wrong, because if you rename(these files are not hosted on the server, I renamed just for example) the file name like this:
ftp://music:music@home.dimonius.ru/Music/Russian/Misc/1234.mp3

or like this:
ftp://music:music@home.dimonius.ru/Music/Russian/Misc/file.mp3

it plays!

Sunspark
9th January 2023, 19:59
The renamed files just says "Failed to render the file". Try putting it on a http server instead as a test.

max79
9th January 2023, 22:06
The renamed files just says "Failed to render the file". Try putting it on a http server instead as a test.

http server is not my point. I got issues(only with files named using Cyrillic symbols) with FTP server. I told you, i'm renamed URLs just for example:cool:. This one plays fine:
ftp://music:music@home.dimonius.ru/Music/Russian/Misc/Irina_epifanova.mp3

LigH
9th January 2023, 22:46
Just a guess: Many FTP servers deliver unknown file types in ASCII mode by default. It may have to be configured to know that MP3 files must be delivered in binary mode.

filler56789
9th January 2023, 23:05
I had to use Waterfox for downloading one of the Cyrillic-filenamed MP3s...

MPC-BE plus LAV Splitter always returns "Failed to render the file".

F.W.I.W.....
the Cyrillic filenames are always converted to the STUPID "percent-encoded" strings :-/

Sunspark
10th January 2023, 06:12
This one plays fine:
ftp://music:music@home.dimonius.ru/Music/Russian/Misc/Irina_epifanova.mp3

This one does play. The ones named 1234.mp3 and file.mp3 did not render, but Irina does play. So this is enough to establish that FTP works for latin playback.

I was curious enough to dig further into it, and Cyrillic does work.. with https anyway.. copy and paste the below and see for yourself.

https://archive.org/download/ChicaBomb/ИРИНА ДУБЦОВА И ЛЮБОВЬ.mp3

So maybe unicode is supported for https, but not for ftp?

nevcairiel
10th January 2023, 11:34
This should be fixed in the next nightly, the server was requiring an additional call before it accepts the option to enable UTF8 (which is technically out of spec).
Do keep in mind that you need to pass in the "raw" UTF-8 string, and not a URL-encoded string (eg. not using the percent signs). URL encoding is not used for FTP, and LAV does not process the URLs, they are straight passed to the FTP server as-is.

max79
10th January 2023, 14:29
Cyrillic does work.. with https anyway..
Why:confused: are you misleading people by mixing discussions of two different protocols?:mad: I repeat, "LAV Splitter Source" has problems with ftp://-protocol with files named using Cyrillic symbols!

max79
10th January 2023, 14:33
This should be fixed in the next nightly, the server was requiring an additional call before it accepts the option to enable UTF8 (which is technically out of spec).
Do keep in mind that you need to pass in the "raw" UTF-8 string, and not a URL-encoded string (eg. not using the percent signs). URL encoding is not used for FTP, and LAV does not process the URLs, they are straight passed to the FTP server as-is.
Indeed good news:thanks: It's a pleasure to deal with a professional! I'm appreciate it :) I will be waiting final release.

Sunspark
10th January 2023, 21:33
Why:confused: are you misleading people by mixing discussions of two different protocols?:mad: I repeat, "LAV Splitter Source" has problems with ftp://-protocol with files named using Cyrillic symbols!

I am not misleading anyone. I am helping you. It's part of a process of troubleshooting elimination. It was necessary to prove that ftp works at all because the first two links you shared didn't work, only the 3rd link which came later worked. Then it was necessary to determine whether unicode worked with any other protocols. If it did, it made it possible to narrow down specifically that the issue is with FTP. If it didn't work then the issue wasn't specific to a protocol.

Saying that FTP doesn't work with unicode and leaving it at that won't get any attention paid to it. You need to help others help you by doing some of the work to rule out other things.

andybkma
16th January 2023, 10:42
Hi guys, just got a simple advice question... I noticed when playing/seeking a .ts file with has AVC & AAC inside using LAV for both splitter & audio/video decoding it is slow to play after seeking. MediaInfo says they are MPEG-TS files. If I "remux" the same file to a different container such as mp4 or mkv it plays great. Since I use Zoom Player I was easily able to change the splitter to use Haali instead of LAV under MPEG-TS but it's still slow. Any advice besides remuxing all the files? Just wondering why they are slow to play after seeking since normally everything else I use LAV for is so butter smooth :-)

nevcairiel
16th January 2023, 11:08
MPEG-TS is a broadcast/streaming format, its not designed for local file playback - as such it lacks information where to find the audio/video of the time you requested, so it will do the best it can to find it manually, but that can result in the delay you are seeing, depending on some factors.

If you want to keep those files for a longer time, remuxing them might be the best option.

andybkma
16th January 2023, 11:34
If you want to keep those files for a longer time, remuxing them might be the best option.

Thanks much, I knew there was a simple explanation :-)

ryrynz
31st January 2023, 08:44
Hi Nev, there are times I'd like to show English subtitles when English audio is playing usually to clarify something that was said.
Sometimes these files have multiple languages, I'm only ever interested in maybe or or two languages.

I'm not sure if there would be a better way, but I think that hiding all subtitles that I'm not interested in would be a nice feature and one way to solve it.
Alternatively is there a way to be able to select English subs as a default selection for English audio but not have it enabled?
That way whenever I want to enable subs I can get English first and don't have to scroll through a dozen or so languages or have to use the mouse which takes longer / breaks out of HDR.
Thanks

hubblec4
31st January 2023, 13:50
It seems to me more and more people ask for a Linking-System to link audio with subs.
Here is feature request for Matroska (https://github.com/ietf-wg-cellar/matroska-specification/issues/717)

I also like such a Link-System and I have used it for a long time with the Haali-Splitter which supports such a Link-System in a PERFECT way.

I don't know if nevcairiel are interested in to implement this fearture...

Sunspark
31st January 2023, 20:55
@ryrynz Setting default languages in the splitter is easy, but having subs on/off as a default setting surprisingly seems to be a feature that was overlooked in the player. There is a hotkey you can press to turn subs on and off, W, but you would have to do that every time if you don't want subs on every time.

SirMaster
6th February 2023, 22:39
Can anyone think of a way I can play a media file with MPC-HC or MPC-BE and be able to send the audio track out an HDMI bitstream while simultaneously decoding it to 8 channel PCM?

A player like MPC-BE has a dual audio output option, but it seems to only work if both outputs are bit-streaming or both are decoding.

Is there any software that can sort of masquerade as a sort of virtual output device that can accept bitstream audio and then itself decode it into 8 channel PCM?

Any ideas would be appreciated.

It seems like this should be technically possible, but I am not sure the software needed to make it happen even exists in a way that can be connected together.

Sunspark
7th February 2023, 08:16
I have never used it, but maybe something like OBS Studio that the streamers use for displaying gameplay while also broadcasting themselves in the same stream might have something.

Grimsdyke
21st February 2023, 17:42
Hi Nev, I do have a feature request/suggestion !

Please see this thread for reference.
https://forum.doom9.org/showthread.php?t=183390

Basically the problem is that if m2ts' with different audio formats (TrueHD, DTS, AC3, etc.) are parsed into one "program" according to the disc's mpls it is causing problems during playback.

I have tested MPC-BE/HC with both internal and external LAV-filters, MPV based players and also KODI.

Only VLC can switch between audio tracks without any issues !!

Suggestion:
Add a function to LAV so that the user can prevent that the m2ts' are parsed that way, by, maybe, removing content like label jingles, mpaa rating trailers from the mpls ?

If necessary we can continue via PM. I could also send you a disc to test, etc.

Sunspark
28th February 2023, 08:07
ffmpeg 6.0 has been released. Does LAV track master for ffmpeg or releases?

jkauff
28th February 2023, 09:43
ffmpeg 6.0 has been released. Does LAV track master for ffmpeg or releases?
Nev is one of the primary ffmpeg contributors. He certainly knows what's in the new release.

nevcairiel
28th February 2023, 09:53
LAV generally tracks git master, not releases. I update when i think it makes sense.

Cutterkin
7th March 2023, 20:28
Are the changes made to LAV Nightly Builds documented anywhere? I haven't been able to find a changelog.

I know the source code itself is available on Github but I am not capable of understanding the changes by looking at that. I'd guess many others aren't either.

Thanks!

VBB
7th March 2023, 23:53
You can see every change (commit) here: https://github.com/Nevcairiel/LAVFilters/commits/master

Oh, and Nev, I recently got back into WoW. Never realized how involved you were, or still are LOL. Thanks for the addons!

kedautinh12
8th March 2023, 00:00
How to got nightly build??

huhn
8th March 2023, 01:56
https://files.1f0.de/lavf/nightly/

kedautinh12
8th March 2023, 05:20
Thanks

guest
8th March 2023, 07:48
Thanks

Careful !! :D :D

kedautinh12
8th March 2023, 09:04
Don't worry, R***D*** still off :D

nevcairiel
8th March 2023, 11:17
LAV Filters 0.77.2

LAV Splitter
- NEW: Added identification for spatial/immersive audio extensions (Atmos, DTS:X)
- Changed: More reasonable rounding for odd aspect ratios, avoiding issues with some video pipelines
- Fixed: Improved compatibility with some FTP servers

LAV Audio
- Fixed: Restored the default channel layouts for 5.1 and 7.1 to the correct layout (accidentally changed in 0.77, causing some playback issues)
- Fixed: Some TrueHD files would not decode correctly
- Fixed: Clipping protection did not engage when using Integer output


Download: Installer (both x86/x64) (https://files.1f0.de/lavf/LAVFilters-0.77.2.exe) -- Zips: 32-bit (https://files.1f0.de/lavf/LAVFilters-0.77.2.zip) & 64-bit (https://files.1f0.de/lavf/LAVFilters-0.77.2-x64.zip)

This version resolves a regression caused by accidentally changing the default channel layouts for 5.1 and 7.1 in a refactor in 0.77, which caused playback issues with some audio devices - in particular when bitstreaming on Intel iGPUs.

Additionally, LAV Splitter is now capable of identifying spatial audio extensions, in particular Atmos in both EAC3 and TrueHD, as well as DTS:X.

A bigger update will be coming down in a few months, as I aim to at least do one big update per year, also to keep up with FFmpeg improvements, and bugfixes as needed.

filler56789
8th March 2023, 14:47
LAV Filters 0.77.2

LAV Splitter
- NEW: Added identification for spatial/immersive audio extensions (Atmos, DTS:X)
- Changed: More reasonable rounding for odd aspect ratios, avoiding issues with some video pipelines
- Fixed: Improved compatibility with some FTP servers

LAV Audio
- Fixed: Restored the default channel layouts for 5.1 and 7.1 to the correct layout (accidentally changed in 0.77, causing some playback issues)
- Fixed: Some TrueHD files would not decode correctly
- Fixed: Clipping protection did not engage when using Integer output


Many :thanks: for the endless😇 improvements and fixes. :)

jmone
8th March 2023, 21:22
Great work! Especially the ability to detect Atmos and DTS:X.

SamuriHL
8th March 2023, 22:20
The ability to detect Atmos and DTX:X is pretty awesome!

Manni
9th March 2023, 09:18
Thanks a lot for all your work, as always! :)

flossy_cake
11th March 2023, 00:43
Regarding LAV Audio, I was wondering if it might be possible in theory to implement something equivalent to Avisynth's Normalize (http://avisynth.nl/index.php/Normalize) filter?

Basically it works by scanning the entire audio track prior to playback (takes about 5 seconds for a 30 minute track) in order to find the frame with the loudest peak volume, before raising the volume til that peak touches maximum (0dB) , aka "peak normalization". This isn't compression and doesn't distort the audio in any way, it just sets the volume to its loudest position without clipping.

It's a bit of a messy solution, but I find the result is so pleasing, I'm no longer having to constantly reach for the volume control. It's something that I could see myself applying as a global setting to everything that I play.

The key to it working well is that it scans the entire audio track before playback, whereas "normalization" found in the your HDMI/audio device driver is a realtime normalization that constantly adjusts volume in real time and you can get "pumping" artefacts for example explosions or loud instruments can sound unusually quiet as you hear the normalizer kicking in, then gets louder again for quiet dialogue etc. I tried this and did not like it myself, even after tweaking those attack & decay parameters as best I could.

imo an ideal implementation would have these features:


Use multithreading when scanning the audio track(s) to decrease the scanning time


Store the peak level value in an external file to retrieve the next time that file is played, to avoid having to scan the file again.


Offer an option to immediately begin playing the audio while a background thread scans the audio track(s). When that thread is complete, then apply the normalization gradually over a number of seconds to make it less noticeable. Saves the user having to wait, although this may be a non-issue if multithreading optimisations can speed up the process. Alternatively, display some status text on screen: "Normalizing audio (10 seconds remaining)..." but that would probably need to be done through LAV Video and the two would have to talk to each other - not sure if that's possible.

Sunspark
11th March 2023, 05:15
I would love this feature because I currently use Realtek's Loudness Equalization and while it's not perfect it's better than nothing, but it's silly because I basically have 2 video players set up.. one is set up to use exclusive mode and I use that one for stereo streaming, and the other one is set up in shared mode and I use that one for 5.1 files. I use a different video renderer with each too. Works well.

You need to consider however the use case of streaming.. radio streams, youtube (especially if live), etc. none of that will be possible to pre-scan.

So then, what is the proposal? A toggle button in the player? We already know mpc-hc won't add it. mpc-be, maybe, maybe not. So basically, you'd have to do my two-player solution, where one of the players has lav in pre-scan mode and the other doesn't.

I think it's worth doing, but player support is going to be sub-optimal and will require setting up multiple configurations to avoid having to go into the settings every time to check or uncheck the option.

Also need to consider, would this equalization scanning take place before or after down-mixing 5.1 to stereo? I could see either scenario producing different output results.

jmone
11th March 2023, 08:23
Isn't this a Player Feature not a decoder, splitter, render thing? I'm pretty sure JRiver MC does this.

nevcairiel
11th March 2023, 09:34
This is not something I plan on doing. Pre-scanning the entire file does not fit into any of the concepts of LAV. If you are dealing with an entire video file, this takes far longer then a few seconds, especially if you are on a slow HDD.

flossy_cake
12th March 2023, 01:29
So then, what is the proposal? A toggle button in the player? We already know mpc-hc won't add it. mpc-be, maybe, maybe not. So basically, you'd have to do my two-player solution, where one of the players has lav in pre-scan mode and the other doesn't.

I was proposing it to be implemented at the audio decoder, eg. LAV audio. There are already options to "apply DRC on formats that support it", "normalize matrix", "clipping protection", and some other things like conversion to different sound channel layouts, audio delay etc. So I don't think this type of feature is outside the purview of the kinds of things an audio decoder normally does.

It's not a perfect solution though - some audio tracks can have a handful of brief loud sound effects that make very loud peaks that touches near 0db and so there is no headroom to gain volume. In practice it is most effective with TV shows with mostly dialogue and music.

flossy_cake
12th March 2023, 01:39
This is not something I plan on doing. Pre-scanning the entire file does not fit into any of the concepts of LAV. If you are dealing with an entire video file, this takes far longer then a few seconds, especially if you are on a slow HDD.

If you wanted to make it easier to implement, how about this: LAV Audio could simply read a gain value from a text file that the user creates. This offloads all the work onto the user to scan their entire library using their own tools. LAV would only have to read the gain value from the text file and apply it.

edit: for reference, a 90 minute movie takes me 10 seconds to scan using Avisynth's Normalize filter on an i5-4570 (4c/4t) @ 3.4Ghz

huhn
12th March 2023, 02:35
instead of asking a decoder to do that you should ask a audio renderer to do that.

an example would be to use gain from foobar not sure about the format but it should be open source and i'm pretty sure it can do that with mkv already.

flossy_cake
12th March 2023, 03:47
instead of asking a decoder to do that you should ask a audio renderer to do that.

That would be good too, but I don't know of any active authors who are at the cutting edge like nevcairiel is, let alone taking feature requests from users.

LAV Audio has a mixer so applying a gain amount from a text file should be relatively straightforward

https://i.lensdump.com/i/TpbHxx.png

I'm currently using Avisynth's Normalize and am happy with it except it doesn't have an option to save the normalisation amount to a txt file for next time the file is played, so I have to wait around 10 seconds every time I play a video (unlike Normalize2 (avisynth.nl/index.php/Normalize2) plugin which does offer that feature, but is 32-bit only).

I'm trying to figure out if there is an Avisynth debug tool to make Normalize (64-bit) output its calculated gain amount to a txt file, as this would allow me to automate the scanning of my library with ffmpeg command line like ffmpeg -i "c:\OutputNormalizedGainToTextFile.avs" -f null NUL

Sunspark
12th March 2023, 03:53
So basically, MPC-BE's audio renderer as the only currently maintained directshow renderer.

LAV has introduced in the past a feature because it wasn't too much trouble, made sense for the time, and is still technically outside of what a pure decoder does. Namely, the mixing option. It didn't originally have that.

Flossy's idea for the end-user to pre-scan is an interesting one. Subtitles after all are textfiles in the .srt format. I suppose the extension for this one could be called .dbe or .dbm. Should be technically possible to have a checkbox "Use pre-scan dB value if present". Then LAV doesn't have to do anything at all, just accept a value it is given and apply it to the mixer. The splitter already ingests external .srt files.

If one wanted to get really fancy with it, instead of a single number being presented, down the road it could have the option of timestamps for each scene, with a dB value for each.

flossy_cake
12th March 2023, 04:21
If one wanted to get really fancy with it, instead of a single number being presented, down the road it could have the option of timestamps for each scene, with a dB value for each.

Yeah, for those cases where dialogue is quiet and explosions are very loud. But then we're getting into compression territory which IS a distortion of the audio (albeit a subjectively desirable one).

Avisynth does actually have a programmable compressor ("compander" in SoxFilter (http://avisynth.nl/index.php/SoxFilter)) but it's currently broken, but it looks like pinterf might be working on fixing it - https://forum.doom9.org/showthread.php?p=1983841#post1983841

SoxFilter("compand 0.3,1.0 6:-90,-90,-70,-70,-60,-20,0,0")

# attack time: 0.3 seconds
# decay time: 1.0 seconds
# soft-knee amount for smoothing between curve points: 6db
# curve point 1: set -90db to -90db (no change)
# curve point 2: set -70db to -70db (no change)
# curve point 3: set -60db to -20db (40db gain)
# curve point 4: set 0db to 0db (no change)

Resulting curve looks something like this but with 6db of soft knee smoothing between each linear segment

https://i3.lensdump.com/i/Tpw6Zc.png

tebasuna51
12th March 2023, 13:04
If you wanted to make it easier to implement, how about this: LAV Audio could simply read a gain value from a text file that the user creates. This offloads all the work onto the user to scan their entire library using their own tools. LAV would only have to read the gain value from the text file and apply it.
Like each movie need a different gain the best option for you is recode the audio at your taste (than can be different for other users) and let LAV Audio do their job: decode the audio like it is.

Also remember than some audio can be passed passtrought (without change it) to TV or AVR decoders. The recode option is your best solution.

nevcairiel
12th March 2023, 17:12
Should be technically possible to have a checkbox "Use pre-scan dB value if present". Then LAV doesn't have to do anything at all, just accept a value it is given and apply it to the mixer.

And where does that single value come from? LAV getting a value and applying it is one thing, but having to find and read the value on disk somewhere is actually not how a decoder operates. It receives audio data on an input pin. It does not really care where its from. It does not read the file its from, nor does it necessarily know which file its from.

The player should really manage that file, and at that point it can also just offset the volume control of the audio renderer appropriately - don't even need a custom audio renderer, just one that has a volume control.


The splitter already ingests external .srt files.


It does not. That is a player feature and managed by them.

flossy_cake
13th March 2023, 01:57
And where does that single value come from?

The only way I can think of would be to match the filepath of the currently playing file to an entry in the database file. This appears to be how Kodi keeps track of what files you've played, and how MPC-HC knows the resume point for each media file. Ideally it would use a hash of the file as its unique ID to prevent collisions, but that is too slow to calculate on large media files, unless perhaps it was a hash of only the audio track, and the audio track is suitably small to keep processing time to a minimum (some audio tracks may be large). edit: or maybe just hash a practicably small number of data bytes from salted addresses inside the file.

Anyway, I remembered that Crendking made an Avisynth directshow plugin that could be used to automatically apply Normalize(0.98) globally to every file without any per-file user intervention, so I'll probably just use that instead.

I also made a script that automatically generates .avs files for all the media files in a top level folder (cloning the entire folder structure but with .avs files instead of media files) but it still requires quite a bit of intervention to ensure a compatible Avisynth source filter is used, and some manual scaling to correct for sources with nonsquare pixels, whereas Crendking's solution manages that automatically.

senseipiledrive2
28th March 2023, 11:37
I'd like some guidance to figure out if this an issue worth looking into or not. I am using the latest x64 version of lav 77.2 in combination with mpc-be. I use the default install options. All behavior and how the lav splitter, audio and video icons appear like normal when I open a file for playback.

**However, every time when I boot into Windows 11 (latest), I noticed in the task manager, under processes, there always seems to load a blue LAV filter icon with "Windows Host Process (Rundll32)" is written next to the icon. It uses 0 Cpu and 0.9MB of memory every time I look. It's the only rundll32 windows host process listed. Nothing seems to happen when I close it, files still open for playback like normal it appears. Is this normal? Should I disable it or just leave it be? I have ran SFC scannow and DISM restore with no change. Thanks all!

ryrynz
29th March 2023, 06:14
Should I disable it or just leave it be?

Sounds to me like it's related to some third party app that's installed on your system. I would think there's nothing wrong and you should leave it be, but if you have things installed on your PC you're not using uninstall them.

senseipiledrive2
29th March 2023, 07:21
I'm not sure how to figure out what put it there, but my guess was the LAV installer package. It does show a Blue LAV graphical icon next to the "Windows Host Process (Rundll32)." When I click open file location it just takes me to the system folder pointing me literally to just Rundll32, so maybe I'm not finding what installed it in the correct way. The only media player I have installed is MPC BE 1.6.6 x64 I use the latest nightly builds.

el Filou
29th March 2023, 11:29
This could happen if an application that loads with Windows uses videos and it then loads LAV Filter for them.
For example, Logitech Options does that on my HTPC when I open it because it embeds videos to show the different touchpad gestures, that it apprently uses DirectShow to render.
You could try SysInternals Process Explorer, which shows which app is the parent process.

glorp
29th March 2023, 17:10
The tray icons and their options are hosted by rundll32. Turn off the tray icon when LAV loads and you should see it disappear.

mzso
31st March 2023, 08:14
Hi!

I noticed that LAV icons disappear when I change DPI scaling percentage, and restart explorer. So I guess this is an issue with LAV?
Most tray icons do reappear, with Facebook's Messenger being the other exception I noticed.

I do this because I use my display both by sitting at the desk a from a couch from a greater distance. And without restarting explorer things appear wrong.

mzso
31st March 2023, 08:22
**However, every time when I boot into Windows 11 (latest), I noticed in the task manager, under processes, there always seems to load a blue LAV filter icon with "Windows Host Process (Rundll32)" is written next to the icon. It uses 0 Cpu and 0.9MB of memory every time I look. It's the only rundll32 windows host process listed. Nothing seems to happen when I close it, files still open for playback like normal it appears. Is this normal? Should I disable it or just leave it be? I have ran SFC scannow and DISM restore with no change. Thanks all!

Did you defrag your drive as well? As long as we're doing random things. :)

Anyway. Did you look the process in question via Process Explorer (https://learn.microsoft.com/en-us/sysinternals/downloads/process-explorer)?

With that you can look at various properties of a process (most useful would probably be the command line and the running threads) and see the parent processes.

el Filou
31st March 2023, 12:09
I noticed that LAV icons disappear when I change DPI scaling percentage, and restart explorer. So I guess this is an issue with LAV?Could be because there is a shell extension that displays thumbnails for video file formats not supported natively by Windows, and that extension uses DirectShow and therefore the tray icons appear when you browse a folder with those types of videos in it in thumbnail view, Explorer load LAV through that shell extension to generate the thumbnails?
I remember this happening a long long time ago under XP with Haali splitter.
Edit: Anyway, I don't think it's LAV's fault or that nev can do anything about it, it's probably the app's fault. My media players that properly stop/close the playback graph don't leave LAV icons in the tray.

nevcairiel
31st March 2023, 14:05
Tray Icons are not designed to be permanent. They only show up when a LAV component is loaded. And they should disappear when the component is unloaded properly. Some things kill it a bit aggressively though, especially shell extensions.

mzso
4th April 2023, 16:52
Tray Icons are not designed to be permanent. They only show up when a LAV component is loaded. And they should disappear when the component is unloaded properly. Some things kill it a bit aggressively though, especially shell extensions.

LAV is not unloaded though. Playback is not necessarily interrupted at all. But the tray icons do disappear.

@el Filou

It's not that. I mean the icons that appear during playback. They disappear even though they should continue to be present.

Sunspark
25th April 2023, 02:21
Hi Nev, I think I have found an issue which is current as of 0.77.2 on Intel.

h264, L3.1 file, hw acceleration does work with intel quicksync, does not work with dxva-cb or dxva-native (displays avcodec instead).
vp9 files, no acceleration.

LAV does support dxva acceleration of L3.0 files, just not the L3.1 one so I'm thinking it might be a bug. The L3.1 file is dxva2 accelerated with the MPC video decoder.

Not sure about vp9 files. In DXVA Checker it does list "VP9_VLD_Intel: DXVA2/D3D11, SD / HD / FHD / 4K". Not sure if the "_Intel" is something special, there are no other rows for VP9 present while other codecs have duplicate rows with and without the "_Intel" part.

nevcairiel
25th April 2023, 07:59
"Level" is a largely irrelevant property. There is likely some other property about that file that prevents hardware acceleration.

A blind guess would be that its "baseline" profile, which is not supported in hardware, only "constrained baseline" is supported.

Sunspark
25th April 2023, 09:17
Well, I've uploaded the file here so you can download it. Not a big file, 12 megs: h264l31 problematic file (https://www.dropbox.com/s/xzfz2flsf7ljsqr/luffy.mp4?dl=0)

I feel if it's hw-decodable with quicksync and mpc, it should also be w/ the dxva decoders.

nevcairiel
25th April 2023, 09:19
Like I suspected, its baseline profile. Baseline is _not_ hardware compatible. Any given file might work, but there is no guarantee that it would, depending on what features it uses. If anything, other decoders sending baseline to a hardware decoder are bugged, not LAV.

I prefer to have some files not use hardware and all be decoded correctly, rather then use hardware and get decoding errors.

Sunspark
26th April 2023, 08:32
Hi Nev, I have a question about D3D11 hw decoding.

With madVR, if I set it to use D3D11 (I am aware that it is a wrapper around D3D9), set LAV to use D3D11-Automatic and then observe that the GPU usage % is almost double that of DXVA2-CopyBack in one of the D3D9 presentation modes, is this due to the Intel video driver, decoder or the renderer? It's confusing because when I tried D3D11-CopyBack via selecting the device, the GPU usage % stayed at the same number that Automatic had. I thought it would be another doubling, but that wasn't the case, the number was the same. So it feels like madVR is running in copyback in d3d11 despite displaying "native" on the filter. Should I see a difference between Automatic and CopyBack with this renderer in D3D11?

Thanks.

el Filou
28th April 2023, 12:39
With discrete GPUs, native DXVA (= Automatic in LAV D3D11) puts less load on the system (in theory) than copyback as you don't have to pass decoded frames back and forth over the PCIe bus, but as this is an iGPU you're already using system RAM for everything, so the difference can be much less or even none.

The higher load in D3D11 LAV decode and/or D3D11 madVR presentation mode could be a quirk of the Intel driver.

Note that you don't necessarily have to use D3D11 presentation in madVR to use D3D11 decoding in LAV, they are independent.
Did you try D3D11 in LAV with D3D9 presentation in madVR?

Sunspark
28th April 2023, 22:28
Good suggestion to try. I tested that just now.. left presentation mode in D3D9 overlay and put the decoder into D3D11. As measured with gpu-z, GPU usage was 14-15%. With DXVA2-CopyBack it was 12-13%. So for me, the d3d9 copyback decoding is slightly more efficient than d3d11 native decoding. With D3D11 presentation on, the GPU usage w/ D3D11 decoding becomes 21-22%. Putting it into dxva2-native and leaving it in d3d9 overlay the same number results, 21-22%. DXVA2-Native with D3d9 Windowed makes it 24-25%. Flipping it around to D3D11-Windowed and DXVA2-Native makes it even worse, 28-29%.

This is a normal file, h.264 high L4.0 1920x1080. No image scaling being performed, just 2-tap chroma shader scaling.

If I try using mpcvr in d3d11 and the mpc decoder in d3d11, I get a peak of 12% gpu usage, same result if I use LAV as the decoder. Based on that, I'm thinking it's probably not that much the driver, and more so the renderer.

huhn
29th April 2023, 07:16
these number doesn't mean anythign without the frequency which can vary drastically on old intel iGPU.
25% can mean less GPU usage then 12% sounds odd but makes total sense if you think about it.

Sunspark
29th April 2023, 09:48
I have the gpu set for maximum performance, so it says 900 MHz for the GPU clock. It seldom goes to 950, will go a little lower if it starts to overheat, but otherwise stays at that fixed number all the time. These recorded percentages are all at the same fixed clock.

I think it likely comes down to non-optimized paths for the current OS. 0.92.17 is almost 5 years old and the presentation code paths predate Windows 10. The D3D11 wrapper was implemented in 0.88 before Windows 10 was RTM. madshi did say back then more than once that Windows 8.1 was the best version to be using.

j7n
6th July 2023, 06:55
Please add a master volume slider to Audio Mixing. To avoid clipping, the level of the downmix usually needs to be dropped only by 3 to 6 dB and not as much as Normalize Matrix would do, which assumes that all channels could fire in sync.

htnut
20th July 2023, 18:21
Question: I'm sure my issue is a "fringe case" but hopefully there is a solution.

I'm running JRiver MC and playing BD/UHD content launched from menus, bistreaming audio over HDMI. I presume it is the job of LAV to connect the exculsive WASAPI audio connection to the audio driver.

Without boring you with all the details of why...

If I pause playback, and another process "breaks" the audio connection to the audio driver - when I come back to resume playback I get no audio. I can "stop" and then endure the menus to "play" again (this reestablishes the audio connection). But, I would really love to find some process to cause the audio connection to re-establish without having to "stop" playback.

Is there some "behind the scenes" process I can perform to cause the filter to re-establish this "exclusive" audio stream?

Thank you!

e-t172
20th July 2023, 21:29
I presume it is the job of LAV to connect the exculsive WASAPI audio connection to the audio driver.

It is not. LAV is an audio decoder, not an audio renderer.

Presumably it's JRiver that's doing the audio rendering. It would be more appropriate to ask your question in a JRiver forum.

htnut
21st July 2023, 00:26
It is not. LAV is an audio decoder, not an audio renderer.

Presumably it's JRiver that's doing the audio rendering. It would be more appropriate to ask your question in a JRiver forum.

Thanks. I did start there, but the admins at JR aren't interested in my dilemma (I do admit it's a fringe case). They basically say to just deal with it, stop and restart through the menus.

I imagine/hope there's some workaround that I could do to cause the (audio renderer, apparently) to reconnect to the audio driver after an interruption.

Sunspark
21st July 2023, 17:03
Maybe you should try a different player.. I didn't test with a DVD, but I paused an audio stream in 1 player in exclusive mode and waited awhile and it did not release the audio lock.

htnut
21st July 2023, 20:47
Maybe you should try a different player.. I didn't test with a DVD, but I paused an audio stream in 1 player in exclusive mode and waited awhile and it did not release the audio lock.

No, it's not that it releases the lock, it's that another process I invoke breaks it. I'm hoping to find some way to "reconnect" that audio without having to stop and restart the player. It's in a dedicated Home Theater and trying to keep make the transition between what I'm doing smooth and consistent.

Sunspark
22nd July 2023, 04:19
That's not how exclusive mode works. There is no "another process breaks it". Your app is releasing the process.

Klaus1189
22nd July 2023, 08:32
I think so, too. MPC-BE has an option to release it when in idle (default is off)
https://drive.google.com/file/d/1Jjccf3Kbz2hVkCO07Y3Wt8PrtpcDs-3i/view?usp=sharing

Sunspark
22nd July 2023, 18:05
If switching the player is not an option, you can also use shared mode as well, then the focus loss won't be an issue. The sound will not be bad just because it is in shared mode and it has value in that it can enable other functionality in the soundcard options which won't be exposed/processed in exclusive.

Of the two players which I use regularly for different purposes, one I use in exclusive and the other I use in shared.

e-t172
22nd July 2023, 20:18
If switching the player is not an option, you can also use shared mode as well, then the focus loss won't be an issue. The sound will not be bad just because it is in shared mode and it has value in that it can enable other functionality in the soundcard options which won't be exposed/processed in exclusive.

I second this, but one caveat is you can't play Atmos that way - it has to be bitstreamed, which requires exclusive mode.

nevcairiel
23rd July 2023, 08:04
You can actually bitstream even through DirectSound, the windows built-in mixer does take care to deliver bitstream formats untouched, or mute them.

el Filou
23rd July 2023, 17:47
Even if you find a workaround I'd still ask the JRiver developers to fix that, because for example ReClock has no problem restarting the audio stream in exclusive mode if I pause playback and then play something else in another app.
(Edit: or maybe it's an issue with the audio driver?)

mzso
24th July 2023, 15:33
Hi!

I've been trying deinterlacing options. And I noticed that if I use LAV software options the video is noticeably less smooth compared to letting madVR deinterlace. But the latter delivers poor image quality. I'm quessing it uses some trashy built-in deinterlacing method of the radeon driver.

Furthermore watching the same channel on TV seems even smoother. Only this seems completely smooth.

I don't get frame drops or such, but even so the difference in smoothness is noticeable. I guess this is normal? Can I get better deinterlacing somehow? That both looks good temporally and image quality wise.

htnut
24th July 2023, 18:02
You can actually bitstream even through DirectSound, the windows built-in mixer does take care to deliver bitstream formats untouched, or mute them.

Thank you. Apologies I wasn't more clear in my original post... the process that "breaks" JR's exclusive hold is a script of my own that disables and immediately re-enables the audio driver. Then, my second application can play audio... but then I want to be able to resume JR (without having to "stop" playback and restart).

Shared mode would be excellent but JR's seetings seem to REQUIRE "use exclusive mode" or else Atmos won't bitstream.

Maybe the support I need from JR is to allow bitstreaming without exclusive mode? Their support page also states "If you disable exclusive.. you must use DSP mode to resample..."

https://wiki.jriver.com/index.php/Exclusive_Access

Thank you for your suggestions!

htnut
27th July 2023, 00:54
As a follow up here, this is a comment from a JRiver administrator (attached).

nevcairiel, if I understand your comment correctly, LAV should be able to bitstream (atmos) even without "exclusive" mode. Is there something we can tell the JRiver folks about that can cause MC to bitstream without exclusive mode?

Thanks again.

Sunspark
27th July 2023, 02:06
Attachments don't get approved here, link the image to a remote site instead.

jmone
27th July 2023, 07:58
@htnut, I don't know who that screen shot refers to from JRiver (as we can not see it) but.... if it is from Hendrik then you may not know that this is the same person as nevcairiel.

nevcairiel
27th July 2023, 08:55
The only option to use shared-mode bitstreaming is through DirectSound. Otherwise with your essentially forced driver reset, you will be on your own, thats not what a normal system ever does, sorry.

htnut
27th July 2023, 17:48
Ok, Thank you. I'll give up on trying to reset the audio exclusive stream without "restarting" playback.

But, in JRiver MC choosing a DirectSound device won't bitstream (no Atmos). So, either I have some configuration wrong or JRiver has something interfering with the ability to run "shared mode" (which is suggested in the adminstrator "awesome donkey" saying that "bistreaming requires exclusive mode").

Thanks again.

Sunspark
27th July 2023, 18:50
@htnut You should do more experimentation, for example, if your machine has an integrated GPU, test to see if the bitstreaming works with that instead of the card you're using now.

htnut
27th July 2023, 23:56
I did try on a different machine, but experience the same thing. If I set JRiver to bitstream over HDMI - it only works if "exclusive mode" is checked in JR.

And, consistent with this experience... when I asked JRiver I got that response posted above where I'm told "bitstreaming requires exclusive mode".

But here, I'm told bistreaming should work in shared mode.

So, it seems one of three things:

1. JRiver's reply is wrong - and I simply need to learn how to configure my machine correctly (or use some other hardware)

or

2. JRiver is correct - bitsreaming requires exlcusive mode to bitstream for some reason so I just need to deal with it. (but I sure trust nevcairiel stating that shared mode will [should!] bitstream over DirectSound)

or

3. JRiver does require exlcusive mode to bitstream BUT should not have to. If this is the case, I'm not aware how to ask them to correct this.

nevcairiel
28th July 2023, 01:38
WASAPI in shared mode is rather cursed. Its not that helpful. For WASAPI you should always want to use Exclusive.
DirectSound is always in shared mode and requires picking a different output device entirely.