98
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
this post was submitted on 26 Nov 2026
98 points (99.0% liked)
Programmer Humor
34316 readers
1496 users here now
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Rules
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
- If the mod doesn't find it funny, you're banned. Ha-ha!... For real: do not use the community for "statements". There are other places for such content. Keep it chill and funny.
founded 3 years ago
MODERATORS
For anyone wondering, the message is about Presentation TimeStamps, you attach those to media (in this case video frames) to tell whatever reads it when said media should be displayed.
No PTS means MPV had to just assume that video frames are encoded sequentially and make up some plausable times to show the frames. It probably took the duration of the video and divided that by the number of frames in the video stream, getting the former either from the metadata in the container or the duration of one of the audio streams.
Sic. Who tf comes up with this shit. (Praising.)
If I were reading a video file and saw that happen, I might think, "yeah divide duration by total frame count for now, and complain to the publisher later", but really who put the time to debug the issue (probably reading out the manifest to stderr (and making a conversion script to make it human readable and usable) and manually going through it) and after finding out the problem, actually coding in the option for mpv to detect this itself and then checking the conditions for when "something" cane be made up and then making those things up in the corresponding way?
In writing it, they probably tested it on a file with this issue and debugged it. Error-handling. From then on, it probably has a unit test to ensure they can always work on that particular case.
I'm guessing quite a few encoders were doing it like this (or just 1 faulty encoder that was being used by too many people), for them to add this feature.