hubblec4 / mpvmatroska Goto Github PK
View Code? Open in Web Editor NEWmpvMatroska is a Lua script that turns mpv into a Matroska player.
mpvMatroska is a Lua script that turns mpv into a Matroska player.
If an m3u playlist containing the following files were opened by mpv with mpvMatroska and uosc onboard:
file-a.mkv
file-b.mkv
file-c.mkv
file-d.mkv
mpvMatroska causes an issue with displaying the title of the currently playing file. After the first file, it displays the title of the previous file played. If left to play through the playlist, uosc's playlist window would look like this:
file-a title
file-a title
file-b title
file-c title
If you manually select which file to play next, the title of the previous file will show on the file you selected. Let's say you choose to play a, c, b, d instead. The playlist window would look like this:
file-a title
file-c title
file-a title
file-b title
This also affects what's shown on the fullscreen title display, but not the windows titlebar. The latter will still show the title of the currently playing file properly.
There's an additional issue if input files with ordered chapters are in the playlist as the first file. The title of the first linked file will be displayed instead of the title of the input file in that case. Then, we get the issue previously discussed, and the playlist window looks like this:
Linked file-a title
input file-a title
file-b title
file-c title
I installed an extra copy of mpv with uosc but without mpvMatroska to test this and that one displays titles properly. This is definitely caused by mpvMatroska. Comparing the two, it looks like mpvMatroska is not handling the title display until a second file in a playlist is played, whereupon it passes the title of the previous file played instead of the current one. The title of the first file played is handled by uosc instead.
This is going to take some explaining.
I encode videos of shows. For some of these encodes, I like to replace the Opening and Ending credits of the show with the clean version without credits. I don't simply discard the credits though. Using ordered chapters placed in the Ending Credits video file, I can play the show with the credits if the episode, opening and ending video files are all in the same place.
I am currently in the middle of an encode project when I saw this problem. It shows up in two ways, one of which seems to be universal to all ordered chapter input files, the other only occurs with a handful, and I cannot figure out why it is specific to those.
For reference, the Ending Credits video is the input file with the ordered chapters and the Opening video and Episode video are linked files. The ordered chapters for these shows typically look like this:
Episode
Opening
Episode
Ending
Episode
I keep the credits in a subfolder, out of the way of the episodes. That means accessing the episode credits displays the video in the following sequence:
Opening
Ending
Since the episode video is absent. Because the Ending credits is the input file, I had expected the title in that file to be the video title. But it was the title of the Opening Credits that became the title of the ordered chapter video! This is the universal problem I was talking about. Every one of my ordered chapters seems to be like this. It's not a major problem since I hardly have reason to watch just the opening and ending like this. But it is replicable, well, should be, I hope, I think any linked files with the input chapter among the ordered chapters should show this problem.
That's more than can be said about the other problem. For a handful of input files, even if episode file is placed together with the opening and ending files, it is still the title of the opening credits file that is shown! This is usually a sign of a more serious problem. For some reason, mpvMatroska can't read the embedded fonts in the linked videos, only the ones in the opening credits file where it read the title, not even the ones in the input file. Normally, embedded fonts in any of the linked videos can be used in the entire video.
I can't figure why this only happens to a handful of videos. I have no idea how to reproduce it reliably. One weird thing I found it in the course of trying to bypass this is removing the cover image I put in the opening video causes the title and font problem to disappear. Actually, I had to remux the video without the image and let mkvtoolnix generate a new segment UID for the video to get that to happen. Sometimes, I can even put the image back into the video and the problem will stay gone. Or perhaps it's gone for one problem file and will reappear for another later on...
One more thing that may or may not be related to this, I notice that if the input files is among the linked videos forming the ordered chapters video, like my examples above, the title of the video with the first segment is used instead of the title of the input file. The title of the input file seems to be used only if the input file is not among the ordered chapters forming the video.
Finally, these problems do not appear if the input file is opened by MPC-HC instead. The title of the input file is used, all fonts in all linked files are accessed. MPV without mpvMatroska also seems to be able to access the fonts properly. But having more than one copy of mpv on my system seems to lead to strangness.
I hope that wasn't too confusing. I wish I could send you the videos, but I am not sure where I can put almost 2gb of files discretely.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.