Live data from Hacker News

Mpv – A free, open-source, and cross-platform media player

mpv.io

141–150 of 576 posts

Re: Mpv – A free, open-source, and cross-platform media player

#141
post #20

A fantastic mediaplayer, quite minimalistic and performant; it does what it's supposed to do! Also has a fantastic commit where the author rants about locales: https://github.com/mpv-player/mpv/commit/1e70e82baa9193f6f02... worth a read for some chuckles.

> Imagine they had done this for certain other things. Like errno, with all the brokenness of the locale API.

They did. See for example time functions like localtime (and localtime_r) and tzset. It is admittedly locale adjacent, since it depends on the locale. But the time zone is also global state, so it is impossible to get the time in a different timezone with standard apis in multi-threaded portable (for posix) c code.

Re: Mpv – A free, open-source, and cross-platform media player

#142

Earlier quoted context omitted.

i wonder why he's such an ass about it, and totally adamant that it's impossible when multiple players already do this fast. ego?

I think technically he’s correct (I haven’t worked on media decoding code, but I understand how common video encoding formats work). If you have a long video with only a single key frame at the beginning then to step back you would need to, starting from the beginning of the video, decode every frame up to the previous frame you wanted to jump to in order to apply frame deltas, also assuming you have some sort of fra…

Wouldn’t creating in-memory key frames for every nth frame resolve substantial computations on a frame-by-frame basis?

Re: Mpv – A free, open-source, and cross-platform media player

#143
post #100

Earlier quoted context omitted.

To do this well you need to keep the old frames around...or go back to the previous keyframe and re-render. That might be hard if your design is playback-optimized.

Just a ridiculous idea, could a reversed version of the video be kept around so that if you hit frame backwards it's frame forwards operation on the reversed video so you can show that frame, if you continue playback the head goes to the closest second of the forward video

This would require completely re-encoding the video or keeping all decoded frames around. This is what he referred to as the "unbounded memory" solutions.

Re: Mpv – A free, open-source, and cross-platform media player

#144
post #65

Can it do smooth scrubbing (i.e. scrolling the progress bar)? So many media players only show the key frames when scrubbing, making it a much less pleasant experience. Some mobile phones (Apple, Samsung) built-in media players seem to do it nicely, but I've never found a desktop media player that does it (VLC can't). Probably would require a lot of extra decoding behind the scenes to extract all the frames, but worth…

I don't believe the scrollwheel works to seek video, not sure, but MPV can go frame by frame. It's bound to the keyboard by default, but you can tweak your config and bind it to the scrollwheel.

By default, mpv has vertical-scroll bound to volume and horizontal-scroll bound to scrubbing.

Re: Mpv – A free, open-source, and cross-platform media player

#145

Earlier quoted context omitted.

That is... not a glowing endorsement. I've had more bugs and player failures from Plex than any other media software I've ever used.

Streaming or player errors? Plex has basically never failed to play any video I've ever given it, but a bad connection can totally ruin streaming. I wish they would implement pause and allow to buffer.

In my experience Plex has a serious problem with determining whether or not it's capable of playing a file back directly without converting. I regularly have to switch it to "convert automatically" to make a file play.

Re: Mpv – A free, open-source, and cross-platform media player

#146
post #121
post #115

Earlier quoted context omitted.

was the material purple-green by chance?

Yeah. I did try playing around with some of the colorspace options you can find googling, but nothing seemed to work.

Try this in your mpv.conf file

    no-config
    target-trc=pq
    target-prim=bt.2020
    vo=gpu-next
Wont be 100% accurate, but hopefully somewhat watchable

See also https://github.com/mpv-player/mpv/issues/10122

Re: Mpv – A free, open-source, and cross-platform media player

#148
post #100

Earlier quoted context omitted.

To do this well you need to keep the old frames around...or go back to the previous keyframe and re-render. That might be hard if your design is playback-optimized.

Re-rendering shouldn't be hard, it's just a specialized version of seeking. VLC has seeking. The claim that you would have to decode all previous frames in the entire video is... completely baffling to see coming from the dev. He's arguing a stupid technicality that a video might not have keyframes. That's not a reason to omit the feature entirely.

You misunderstand. The point is you have to go backwards to find a keyframe, then render forwards from that.

Going backwards might be hard because if you structured your code in certain ways you may not be able to go backwards efficiently. You can "seek", but how far back to you want to seek? A second? Two seconds? current-X frames?

key frames may be in a standard cadence, but they may not be. So again, how far back do you seek to go back one frame? And keyframes may be abstracted away from the player itself, since really, the codecs are the ones that deal with that stuff. For example, I believe mjpeg doesn't do frame differencing (I'm probably wrong about that).

The ideal implementation would save the last X frames then re-render once you go back like X/2 frames. But again, it depends.

Post reply on HN