Log in

View Full Version : Matroska-Playback


hubblec4
8th June 2019, 13:49
Matroska-Playback (https://github.com/hubblec4/Matroska-Playback) is an overview of the players and their ability to use Matroska features.

Matroska is a container that offers the possibility to play a video alternatively.
This means, for example, that video content can be swapped or dropped, or additional video from other files can be used.

The video can be rotated.

Matroska even offers a menu option, which is not well supported yet.

There are test files for each Matroska feature.

Whenever I have some time, I try to add more players to the list. If you like you can also use the test files for your own favorite player and tell me how the results were.

lvqcl
8th June 2019, 14:23
Furthermore, other external DirectShow filters can be used, such as the Haali Splitter
Isn't it is dead already?

ChaosKing
8th June 2019, 14:35
thx for the test files. Now I can see all features in action.

hubblec4
8th June 2019, 15:56
Isn't it is dead already?

Dead, no. But not really used anymore. But I like Haali's TRACKSETEX and some of my mkv's use it.

ashlar42
12th June 2019, 14:38
Really interesting, hubblec4, thanks for sharing.

shae
14th June 2019, 00:10
I'm not sure of the official names of stuff I've used.

I'm guessing Basic Chapters (just marker points in the video), and Editions (alternate cuts).

Assuming rotation is just a flag, that's something I wanted to use recently but concluded that MKV doesn't support it, so I've reverted to MP4.

hubblec4
14th June 2019, 18:43
Really interesting, hubblec4, thanks for sharing.
Really interesting, hubblec4, thanks for sharing.
You are welcome.

I'm not sure of the official names of stuff I've used.

I'm guessing Basic Chapters (just marker points in the video), and Editions (alternate cuts).
Yes. Editions are mostly used for different movie versions. But you can use it for other things. For example: I have TNG as DVD and Blu-ray. And the Blu-ray-mkv's have an extra edition for the DVD chapters, because the markers are different to the Blu-ray.


Assuming rotation is just a flag, that's something I wanted to use recently but concluded that MKV doesn't support it, so I've reverted to MP4.

Matroska supports video rotation via the ProjectionPoseRoll element. It can be set/changed with mkvpropedit. But at present there is no player which support this flag.
Three players(from which I know) offers video rotation via Matroska Tags.

shae
17th June 2019, 12:31
How's the ProjectionPoseRoll element stored, versus tags?

Can either be in-place edited in all cases?

sneaker_ger
17th June 2019, 13:38
Elements like ProjectionPoseRoll can be edited with a single command for mkvpropedit or a few clicks in MKVToolNixGUI (Header Editor). Tags can be edited in-place as well but it's more complicated because you basically extract XML, parse/edit and then re-integrate it. MKVToolNix does the XML extraction and re-integration but the difficult XML editing is your own job. But hubblec4's chapterEditor offers help with editing tags. :)

v0lt
1st February 2021, 05:10
Support for the "ProjectionPoseRoll" element was added in MPC-BE 1.5.6.5997.

The wording of "ProjectionPoseRoll" is pretty confusing for the average user.
Matroska Element Specification (https://www.matroska.org/technical/elements.html)
ProjectionPoseRoll
Specifies a roll rotation to the projection. Value represents a counter-clockwise rotation, in degrees, around the forward vector.
Here is a picture for illustration.
https://jpegshare.net/thumbs/e2/85/e2855b24a5777953974a9ae3cd1d9470.jpg (https://jpegshare.net/e2/85/e2855b24a5777953974a9ae3cd1d9470.png.html)
The vector is directed forward, rotating counterclockwise relative to the vector. Accordingly, the picture that is in front of the observer rotates clockwise. Did I understand everything correctly?

Maybe there are some clear and proven MKV samples?

butterw2
1st February 2021, 13:45
Doesn't Mkv also have container level video crop parameters, which almost all software player ignore ?

Aleksoid1978
1st February 2021, 14:08
Doesn't Mkv also have container level video crop parameters, which almost all software player ignore ?

MPC-BE support video crop from matroska.

hubblec4
1st February 2021, 18:58
Support for the "ProjectionPoseRoll" element was added in MPC-BE 1.5.6.5997.

Many thanks for this info, and now MPC-BE the first player which support this flag. Great job!


The wording of "ProjectionPoseRoll" is pretty confusing for the average user.
Yes, I agree with you.


The vector is directed forward, rotating counterclockwise relative to the vector. Accordingly, the picture that is in front of the observer rotates clockwise. Did I understand everything correctly?

The rotation is applied to the z-axis.
Keep in mind the type of "ProjectionPoseRoll element" is Float and the value can be negative.
For a positive value the video rotates clockwise and with negative values counterclockwise.
The rotation result for the values -180 and 180 is equal. The frames are then upside down.

Rotation with the Matroska Tags works a bit different. Only positive Integer values can be used.
A value of 270 is the same as a value of -90 with the "ProjectionPoseRoll element"



Maybe there are some clear and proven MKV samples?

Only one sample mkv (https://github.com/hubblec4/Matroska-Playback/blob/master/files/Rotate/RotateProjectionPoseRoll.mkv) is there in the Matroska-Playback repo.


I keep in mind to update the Matroska-Playback repo and add more test files.

butterw2
2nd February 2021, 12:13
MPC-BE support video crop from matroska.

mpc-be 1.5.6 does crop according to the mkv cropping flag, but the issue is also whether the image has the right AR afterwards.

I tested cropping 1280x720p to 504x720 (388,0,388,0). It did work by also setting the mkv DAR flag.
Note that 504 is mod-8, which seems to matter here (mod-2 502 didn't provide the correct AR).

v0lt
2nd February 2021, 18:15
Only one sample mkv (https://github.com/hubblec4/Matroska-Playback/blob/master/files/Rotate/RotateProjectionPoseRoll.mkv) is there in the Matroska-Playback repo.
This sample is unfortunate. First, it rotates 180 degrees, which does not tell us about the direction of rotation. Secondly, after rotation, the picture becomes incorrectly oriented.
Rotation values +90 and -90, which make the video correct, would be more convenient for testing.

I tested cropping 1280x720p to 504x720 (388,0,388,0). It did work by also setting the mkv DAR flag.
Note that 504 is mod-8, which seems to matter here (mod-2 502 didn't provide the correct AR).
The value after cropping the frame should not be a multiple of 8. Just specify the resulting size in DisplayWidth and DisplayHeight.

hubblec4
2nd February 2021, 19:11
This sample is unfortunate. First, it rotates 180 degrees, which does not tell us about the direction of rotation. Secondly, after rotation, the picture becomes incorrectly oriented.
Rotation values +90 and -90, which make the video correct, would be more convenient for testing.

Yes, you are right. Thanks for this hint.

butterw2
2nd February 2021, 21:04
The value after cropping the frame should not be a multiple of 8. Just specify the resulting size in DisplayWidth and DisplayHeight.
I'm not sure what the issue with mod-2 was. Setting crop+DAR or DisplayWidth seems to work OK with mkvtoolnix GUI.

Mkv crop works with mpc-be. The remaining problem would be that some other software players (mpv, vlc), and also icaros thumbnails take into account the DAR modification but not the crop and as a result they display wrong AR.

hubblec4
3rd February 2021, 02:20
I have updated the Matroska-Playback repo with the new MPC-BE build and add some text and 2 new test files for the rotation (-90, +90).