Mpv – A free, open source, and cross-platform media player
mpv.io
mpv.io
Also great is MPV's support for arbitrary OpenGL shaders. This can include very complicated shaders, e.g. real-time neural network upscaling:
https://github.com/igv/FSRCNN-TensorFlow/releases
SD video can look surprisingly good after upscaling with this.
I think PipeWire does something similar to synchronize multiple audio devices without a shared word clock, but I haven't tested how much its rate analyzer drifts when starting/stopping playback or in steady state.
So I'm not alone in hating this! How come this was never fixed?
I didn't want to switch from MX Player (Android), which worked quite well, for ages, but finally gave up because with MX Player you have to go look for some codecs.zip every (major?) update. (must be related to the licenses)
On top of VLC not being able to reconnect to the source, it also doesn't show the title of the video. So every time the stream dies I have to remember which episode I was on.
Holy shit, I had no idea about this (that mpv could load OpenGL shaders nor that there is shaders that do RT neural upscaling), literally blowing my mind.
Or if you don't want noise reduction, try "FSRCNNX_x2_8-0-4-1_LineArt.glsl": https://github.com/igv/FSRCNN-TensorFlow/releases (in checkpoints_params.7z)
Both are IMO sharper and more accurate than ACNet.
When I first experienced it, it made me realize how terrible VLC is; VLC can't play back video at a consistent framerate, and this is particularly noticeable in panning scenes in videos, especially anime.
People talk about VLC like it's a poster-child of open source, but really, I just see a bloated, crash-prone program that doesn't even do its primary function particularly well or efficiently.
Also, I find VLC is a safe recommendation for someone who just wants to casually play some video files. It's fairly user friendly, it runs on literally everything, and it supports most multimedia formats anyone could ever care about. I like and use MPV, but I use VLC on some Android TV devices because it's readily available and runs buttery smooth on crappy hardware.
It's true that VLC requires arcane knowledge of its architecture to configure all of its options, but basic operation still assumes you've read the fine manual.
VLC does the behavior described (jerky playback) on both a Mac with 60hz display that is several years old, and on a cutting edge PC that has a refresh rate more than five times the framerate of anime and supports variable refresh rate.
mpv plays anime butter-smooth on both systems.
I love it when I get a supremely condescending explanation that is also wrong.
The ones that are 60hz are 60hz, and that's not the reason monitors aren't TVs. They aren't TVs because they don't have one of 1. black frame insertion 2. 60->120fps motion interpolation, so you have persistence of vision issues. (aka motion blur, jerkiness, or both at once)
Movies are also 24fps, though of course they're different from animation because they have built in motion blur (same as if you recorded with 1/24 exposure time vs 1/1000).
mpv's video retiming works some of the time, but means it changes the pitch of audio which is sometimes unacceptable, same as old NTSC->PAL transfers.
…if your monitor has variable refresh rate why are you using retiming?
Most older LCD TVs do not have either black frame insertion or motion interpolation. BFI causes motion artifacts (trailing ghost images) if the frame rate of the video is less than the refresh rate. Motion interpolation also adds its own artifacts.
>mpv's video retiming works some of the time, but means it changes the pitch of audio
The best way to use it is to set custom monitor timings (e.g. with xrandr) so that the adjustment needed is too small to detect. There are various scripts to automate this, although I haven't personally tried any (I just change mode manually).
>if your monitor has variable refresh rate why are you using retiming?
I have a VRR monitor, but I still use retiming because it only has a 6 bit panel, and VRR makes temporal dithering artifacts ("frame rate control") visible.
Does that mean video in 23.976 frames per second will be sped up and play at 30?
Thank you for the answering the question I didn’t manage to pose!
But Yeah, I am in LOVE with this feature, even for 30fps footage on a 60fps screen. The more stable frame times make a huge difference.
https://github.com/libretro/docs/blob/master/archive/ratecon...
Also, wasn't there some new VESA standard specifically for video (as an addition to regular adaptive sync)?
MediaSync? https://www.adaptivesync.org
Not sure what it's supposed to mean though.
interpolation
tscale=oversample
It makes cheap animation (with low 'real' FPS) pretty smooth, and doesn't seem to affect other videos in any noticeable way.It is best described by MPV's documentation at https://github.com/mpv-player/mpv/wiki/Interpolation
The final icing on the cake is I use a small LUA hook to set the refresh rate of the projector to match the source material.
> All in all, I believe this proves that software developers as a whole and as a culture produce worse results than drug addicted butt fucked monkeys randomly hacking on typewriters while inhaling the fumes of a radioactive dumpster fire fueled by chinese platsic toys for children and Elton John/Justin Bieber crossover CDs for all eternity.
This the final paragraph after the author wrote a novel in the git commit message.
> Creator of @mpv-player. I was kicked out of the project, but all the backstabbers will pay for it in due time. GNOME is the plague.
"To justify this emotional outbreak potentially insulting to unknown persons, I will write a lot of text. Those not comfortable with toxic language should pretend this is a religious text."
I'm going to steal this.
if (mpa && mpa->locale)
freelocale(mpa->locale);
which are known to cause bugs fairly easily (see gotofail [0])[0] https://embeddedgurus.com/barr-code/2014/03/apples-gotofail-...
Edit: referencing anal sex and two musicians, one of whom is effeminate and the other gay(and famously popular among gay people), all as insults. The author is a mix of misogynistic and homophobic.
So if anything he respects and likes the famously gay person, so wouldn't characterize that as homophobic.
Won't speak to the anal sex reference because I haven't read the whole thing yet.
It sounds like you believe that only gay people have anal sex, and that only gay people enjoy the music of Elton John and Justin Beiber, is that correct?
Not going to lie, I laughed a little. But you're right.
mpv 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' mpv 'https://www.instagram.com/p/CfZK86fozXa/'
Or mpv 'https://twitter.com/thesalaam10/status/1547180911606767616'
And many more sites. Here is the full list of supported websites: https://github.com/yt-dlp/yt-dlp/blob/master/supportedsites.... mpv --vo=tct "https://youtube.com/watch?v=dQw4w9WgXcQ" mpv --no-video --vo=null --ytdl-format='bestaudio/best' 'https://www.youtube.com/watch?v=jfKfPfyJRdk'With --ytdl-format='bestaudio' there's no need to disable the video track or use the null vo.
mpv -vo=gpu --hwdec=vaapi --gpu-context=wayland https://www.twitch.tv/gorgcYou can write Lua/Javascript and bind it to a hotkey and run your own scripts, pass in current video, playback position, download subtitles etc.
[0]: I use mpv.net on Windows, too, but PotPlayer has better UX.
Most other language are not like that, they rely on global state and want to take full control your program. The interpreter also tends to be full of functions you can't get rid of, so they are impossible to secure. Even simple things like spawning two independent interpreters are often not supported. A language like Python really wants you to extend Python with modules, not extend your program with Python.
Long story short, writing a Lua interpreter is just a couple of lines of code: https://www.lua.org/pil/24.1.html
[1] https://www.elderscrollsonline.com/
[2] https://www.esoui.com/downloads/info1643-BanditsUserInterfac...
Also, you can look for a python transpiler to lua, or any that you like. Take your pick.
[0] https://github.com/mpv-player/mpv/issues/7492#issuecomment-9...
https://sourceforge.net/projects/mpcbe/ & https://github.com/Aleksoid1978/MPC-BE
I love the (optionally) minimal UI it has.
i found it to be off by default in many installations.
press "i" during playback to see if it's being utilized. or simply compare CPU usage before and after (should be drastic). also radeontop and intel_gpu_top will help in debugging / getting it working.
https://wiki.archlinux.org/title/mpv#Hardware_video_accelera...
https://github.com/jellyfin/jellyfin-mpv-shim
Other fun tricks
If you use jaro instead of xdg-open you can make video links automatically open in mpv while regular web links open in your browser of choice.
https://github.com/isamert/jaro
If you use elfeed its nice to watch video entries in mpv without a side trip to the browser. Stolen from Prot somewhere or other.
(defun prot/elfeed-mpv-dwim ()
"Play entry link with external `mpv' program.
When there is an audio enclosure (podcast), play just the audio.
Else spawn a video player at a resolution that accounts for the
current monitor's width."
(interactive)
(let\* ((entry (if (eq major-mode 'elfeed-show-mode)
elfeed-show-entry
(elfeed-search-selected :ignore-region)))
(link (elfeed-entry-link entry))
(enclosure (elt (car (elfeed-entry-enclosures entry)) 0)) ; fragile?
(audio "")
;; Here the display width checks if I am on the laptop
(height (if (<= (display-pixel-width ) 1366) 720 1080))
(video (format "--ytdl-format=bestvideo[height<=?%s]+bestaudio/best" height))
;; (buf (pop-to-buffer "*elfeed-mpv-output*"))
)
(run-hooks 'prot/elfeed-mpv-hook)
(if enclosure ; make this its own parametrised function
(progn
(start-process "f fuckoff audio-mpv" nil "mpv" enclosure)
(message (concat "Launching MPV for " (propertize enclosure 'face 'success))))
(start-process "f fuckoff video-mpv" nil "mpv" video link)
(message (concat "Launching MPV for " (propertize link 'face 'success))))))
At one point I wrote script to prompt for a name if passed more than one argument and create a playlist and remember the last n playlists and regular files opened so you could in turn pull up this list and narrow with rofi but as of late I'm just adding videos to jellyfin.Umpv is a script that emulates single instance mode whereby arguments are simply pushed to the existing players playlist instead of opening a new player.
A video player is an interface for the human. Command-lines are better for things that need to interface with a computer.
If you're confused that the programmers of media playing and manipulating software aren't interested in GUIs that plenty of other people have volunteered to write, I don't know what to tell you.
My favorite (really the only one I've used for many years) is smplayer. It gets everything about GUI right that VLC gets horribly wrong. Notably, its developers only work on a GUI, and don't develop mpv. It's cross-platform, too.
edit: https://en.wikipedia.org/wiki/Mpv_(media_player)#Interface_a...
I'll start by saying that `mpv` is likely not for you.
Personally, I see little value in such complex GUI. 99% of the times I double click on a video and I want it to play. I don't need a fancy wizard to customise any settings.
I just have tiny config file I created in 2016 and it still works today -- and the fact that it's a text file means it's just been part of my dotfiles all this time and carries over onto new systems.
> correct interface for a video player.
That 'correctness' is subjective. It isn't correct for you, but it is for me.
That said, there are plenty of video players with very robust GUIs. What's wrong with having one that is focused on people who want to use the command line?
I'm not into MPV, but as a MPlayer (http://www.mplayerhq.hu) user, I perfectly understand your point, however there's a reason some software still uses TUIs. Video players are different beasts compared to other apps; very often you end up changing one or more settings in a per video basis, which makes the text interface a lot more useable than having to look for that control to tweak among hundreds. Also, external interfaces can be added almost trivially; Mpv itself is embedded in a lot of GUI software without the user even noticing.
When I first started using MPlayer (ages ago, had to compile it every time, codecs back then had to be "imported" from Windows, etc.) I also thought the text interface was clumsy and old looking, then I familiarized with it, used it on a daily basis to transcode videos using the MEncoder companion encoding software, and after some time MPlayer became, and still is, my favorite video player under Linux.
> A video player is an interface for the human. Command-lines are better for things that need to interface with a computer.
I have memories of assistants learning Wordstar key sequences faster than many current geeks learn vi ones. It's wonderful how sometimes humans can adapt.
Just to clarify: I love well made GUIs; it's just that sometimes they're less necessary than we think.
Anyhow, I configured mine back when I switched to it (probably around 2013), and never had to touch it again. Doesn't seem like a huge problem.
Common flags and short descriptions of them can be found with `mpv --help` or `tldr mpv`
rsync is another example of a manpage I love. Very detailed means very useful. With a detailed manpage, I don't have to waste my time figuring out where the real manual is.
$ mpv --list-<options|properties>
Pipe to a grep-like program for keywords.
Have you ever had a look at how long the mpv settings documentation is?
I think it's perfect.
> whereas VLC didn't have this when at the same volume
I switched from VLC to mpv some years ago and never looked back. It's just better for opening random video/audio files, IMO.
I switched to IINA and haven't looked back, it's incredibly good for most cases. Unfortunate that it's Mac-only software; not a multi-platform capable solution.
MPV is the only video player I'm aware of which is available for every common desktop platform and works consistently across them.
Also mpv's json IPC interface is easier to use with better documentation than any of VLC's numerous remote control protocols (which aren't mentioned in the manpage, and have incomplete hand-wavy documentation spread across numerous poorly organized wiki pages.)
mpv --vo=tct 'https://www.instagram.com/p/CfZK86fozXa/'I have seen multiple submissions from different users pointing to homepages of software that is already very popular. I guess this is a sign that the current most active Hacker News users are also in the youngest age group, which makes all these programs look new.
Just the other day someone posted about the Vala programming language [2].
SpaceVIm [3], although, this was mostly a 2.0 release announcement.
I wonder if Hacker News administrators have considered creating a separate page for these submissions to keep the front page clean. Basically, put previously-submitted links into a “revival” page, and novelty links in the “new” page.
There is usually interesting discussion, info and tips - like in this thread.
mpv --no-terminal --no-osc --image-display-duration=inf --title=weather --x11-name=weather --wayland-app-id=weather
followed by the weather.gov url (the image link there with selected options goes to the current. I also have a kitty +kitten icat alias for viewing in the terminal, although for hourly weather I usually use mpv. Also small radar images that are available (0 = latest 9 = oldest, radar names shown on main radar.weather.gov page next to the circled checkmark):
https://radar.weather.gov/ridge/lite/
Those I look at via icat since I'll keep them around to see how things are moving if I don't head out right away. For longer term weather there is a text forcast:
https://tgftp.nws.noaa.gov/data/forecasts/zone/
Some of the files are confusingly similar but with subtle differences that I don't remember. I use:
alias tw='/bin/curl -s '\''https://tgftp.nws.noaa.gov/data/forecasts/zone/or/orz006.txt...' | sed '\'':a; /^[[:space:]]*$/ { $d; N; ba; }'\'''
(grin)
Imagine the motivation somebody might have for releasing their software under a noncommercial freeware license. AGPLv3 is not a noncommercial freeware license but it de facto filters big tech corps as a noncommercial license might, with the added bonus of allowing the use of any GPLv2-or-later code. Best of both worlds.
By itself, mpv isn't very user-friendly though, it needs to be wrapped up in a third-party GUI, then its power really shines.
It's very good, but frankly, why is this news to anyone?