Log in

View Full Version : MadVR and LAV possible Bug


onur
7th December 2019, 17:02
Playing specific files from specific resume pos is not working.
(i think when pos is short bevor keyframe everything is ok).

LAV starting from 0.71.0 is not working.
newest mpc-hc has integrated LAV 0.70.2 which is working.
EVR Renderer is working with all versions of LAV.

you can also test with mpc-be with following setup:
mpc-be player - with prefered external filter (LAV Splitter Source and LAV Video Decoder)
(load file with resume pos 01:04)

First we need a Stopped Graph, with this test file:
https://drive.google.com/file/d/12T5jjOuCUKzfylkc_wT86iWpHT637GRw/view
or
https://drive.google.com/uc?export=download&id=1PFk0HyHuFZebrNTUbctI83souI_aGTEb


Filter Graph with LAV Source and LAV Decoder and MadVR Renderer.

when we start file playing with resume pos the screens is black.

not working:
REFERENCE_TIME rtResume=640000000;
pMSeek->SetPositions(&rtResume, AM_SEEKING_AbsolutePositioning, NULL, AM_SEEKING_NoPositioning);
pMC->Run();

not working:
REFERENCE_TIME rtResume=640000000;
pMSeek->SetPositions(&rtResume, AM_SEEKING_AbsolutePositioning, NULL, AM_SEEKING_NoPositioning);
pMC->Pause();
pMC->Run();

working:
REFERENCE_TIME rtResume=640000000;
//first seek to keyframe
hr = pMSeek->SetPositions(&rtResume, AM_SEEKING_SeekToKeyFrame, NULL, AM_SEEKING_NoPositioning);
pMC->Pause();

//wait until Ready
__int64 endclock = GetTickCount64() + 2000;
OAFilterState pfs;
while (pMC->GetState(10, &pfs) == VFW_S_STATE_INTERMEDIATE || pfs != State_Paused)
{
Sleep(10);
if (GetTickCount64() > endclock)
break;
}

//now seek to Real Pos
hr = pMSeek->SetPositions(&rtResume, AM_SEEKING_AbsolutePositioning, NULL, AM_SEEKING_NoPositioning);


regards, onur

ashlar42
8th December 2019, 19:57
I use madVR in Kodi DS Player. And I use LAV Filters with it, as well.

Never had a problem in resuming files from where I left them.

Asmodian
9th December 2019, 01:49
Same with Zoom Player, no issues resuming from the last location with LAV + madVR.

onur
9th December 2019, 12:55
you must use the testfile in atachement, and the exact resume pos.
i can reporduce the problem with mpc-pe and with my own code every time.

nevcairiel
9th December 2019, 14:10
TS files are not always perfectly seekable, its just the nature of the format - its designed for broadcast and streaming. If you need flawless seeking, remux to MP4 or MKV.

onur
9th December 2019, 20:22
@nevcairiel
have you tried my setup - or do you just want to tell me live with the problem.

TS and Live is my main application, and the file is a public Test Demo.
no Problem with EVR, C-EVR
no Problem with older LAV Codec and MadVr.
other players maybe dont have a prob (maybe they always start to render at the begining of a file, and then resume to position, but thats not smooth).

I have also a lot of mkv files with that problem (but these files are not pulbic downloadable).

plesae test my posted setup.
regards, onur