Mpg2-MKV & Chapters Output causes artefacts at each Chapter Point in VLC Player

Shackles

New member
Dunno whats wrong here but each time you directly save to Mpg2 MKV Including chapters (each10 minutes here ) i have heavy Artefatcs /Pixelations
in Playback on the PC using VLC .

The Pixelations appear at Minute 10, 20 ,30 , 40 and so on ....
They do not appear in MPC Home Cinema Player and also not with the WDTV Live HD Media Player.

Its a really nice Feature to directly save to Mpg2 MKV but i wonder if this Type of output contains errors since VLC messes up here ?
If you loadup the Mpg2 MKV in Videoredo the Timecode is entirely off. If you use the Scene slider and chose a scene the Frame Overview is not showing the correct scene.
Once you then click at a Frame the Overview is full of pixelations in the Preview Window.
This is happening with and also without chapters.

Video Sources i used are Standard PAL 720x576 TV Movies which are all flawless in making DVDs or simple Mpg2 Output, no Stream Errors ..

Note:
MakeMKV Freeware does not produce the Pixelations at each Chapter mark once i do make a Mpg2-MKV with this external Tool.B
But its double work to first output to DVD and the do a Mpg2-MKV. I would luv to skip that step.
I was testing it to figure out if the Errors are entirely appearing in this type of Mpg2-MKV.

The Preview / Frame Problem is also appearing in Videoredo with those Mpg2-MKVs done by MakeMKV.
 
Last edited:

Dan203

Senior Developer
Staff member
Again if you output the same file without the chapters does it fix the problem?

As for the time codes.... The time codes in MKV don't have the same resolution* as other formats, which can cause some rounding errors. We try to compensate for it, but it's not perfect so you may notice some minor discontinuity in the displayed time codes and some minor playback glitches.

Dan

* MKV uses milliseconds, which means there are only 1000 ticks per second. Most other formats use PTS which have 90,000 ticks per second.
 

Shackles

New member
There are no pixelations if i am not using chapters.
But it doesnt makes sense to directly save to mkv without chapters.
Then i can skip it and use Mpg2 Output :)
 

Dan203

Senior Developer
Staff member
OK I did some testing it it appears that VLC needs the chapters to be on I frames or it causes this pixelation. Not sure why. The chapters do not effect the video. They are simply markers in the stream telling the player where it can seek. It should ignore them during normal play back, and it should read to the next I frame if you use one that is not on an I frame.

In any case you can work around this problem if you want. First of click View->Set Thumbnail Parameters and change the Frame Type Display option to anything other then None. (I like Upper Left) This will make it so you can see the frame types in the thumbnail window. Now go to Tools->Options->Chapters and turn off the automatic chapter logic and turn on the "At Scene Markers" option instead. Now open your file, make your edits, then go into preview mode. Now manually seek to every 10 minute mark but pick the nearest I frame to that mark rather then exactly at 10 minutes. Then press the A key to add a scene marker.

With the chapters on I frame VLC seems to play past them with no problems.

Dan
 

Shackles

New member
Thx a lot Dan.
Nice Workaround :)
I am happy its just a I FRame chapter issue and its not messing the whole Video.
Its really only messing with VLC.
 

Dan203

Senior Developer
Staff member
Oh one small flaw in my workaround... If you recode the video it wont work because there is no guarantee that the I frames in the recoded video will be in the same position. Unfortunately there is no way for us to position the chapters on I frames automatically as they are written at the start of output before we get any video frames.

Dan
 

Shackles

New member
Thx for the Infos.

If i load up a 10 mins auto chaptered Videoredo MKV which has pixelations at each chapter marks
in MakeMKV Freeware it shows the MKV has perhaps 10 Chapters.
If i then resave this to a MKV without any encoding as usual... the resulting MKV has the same chapters and no more pixelations at the chapter points which are still at 10 Mins.
So where is the magic trick here the freeware does compared to Videoredo that it works then with VLC ?

If i open a Resulting MKV which had I Frames in Vredo i see that the Makemkv tool automatically searched the I Frames in this Video and replaced the before exactly 10 mins chapters done before with the correct "I framed" Positions.
Usually it would have been at

Minute 10:00

Afterwards its at <ChapterTimeStart>00:09:59.920000000</ChapterTimeStart>

Ill attach the with MKV Cleaver extracted XML's if that would help or being interesting for you.

The XML looks different


MakeMKvs

<ChapterUID>2419269281478866144</ChapterUID>

<ChapterTimeStart>00:09:59.920000000</ChapterTimeStart>

<ChapterFlagHidden>0</ChapterFlagHidden>

<ChapterFlagEnabled>1</ChapterFlagEnabled>

<ChapterDisplay>

<ChapterString>Chapter 02</ChapterString>

<ChapterLanguage>eng</ChapterLanguage>

</ChapterDisplay>

</ChapterAtom>

<ChapterAtom>


Videoredo TV Suites


<ChapterUID>1</ChapterUID>

<ChapterTimeStart>00:10:00.000000000</ChapterTimeStart>

<ChapterTimeEnd>00:20:00.000000000</ChapterTimeEnd>

<ChapterFlagHidden>0</ChapterFlagHidden>

<ChapterFlagEnabled>1</ChapterFlagEnabled>

<ChapterDisplay>

<ChapterString>Chapter 2</ChapterString>

<ChapterLanguage>und</ChapterLanguage>

</ChapterDisplay>

</ChapterAtom>

<ChapterAtom>


If you say Vredo cant search for I Frame Positions in Videos automatically to add chapters there will never be a way auto fix this in future releases?


So far the WDTV Live and also the MPlayer Home PC Player do not error with that non I Frames MKV Chapters.
There are people arguing about that Bug in the VLC Forums since months as i noticed today.
So it really seems a VLC Only Problem.
If there is no force to add chapters at I Frames in MKV i am fine with how it is now and if VLC has a Major Bug here with a Force of I Frames Chaptering whatever ;)
 

Attachments

Last edited:

Dan203

Senior Developer
Staff member
If you say Vredo cant search for I Frame Positions in Videos automatically to add chapters there will never be a way auto fix this in future releases?
That is correct. The MKV muxer we use (FFmpeg) writes the chapters at the very start of the muxing process before it has even received one frame of video. So there is no way for us to know at that point whether the chapter falls on an I frame or not. The only way to do it would be a two pass process where we scanned the video on the first pass, then adjusted the chapters for the second output pass. However this would be extremely slow, especially if we were recoding since we'd have to do the full recode on the first pass to verify the frame type of the recoded stream.

Dan
 
Top Bottom