13 ms·
Mpv – A free, open source, and cross-platform media player
- abdusco 4y agoOne of the best features of mpv that I miss sorely on other players, (notably PotPlayer[0] on Windows) is that it has first class scripting support. You 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.
- ranger_danger 4y agoStill no crossfade support though, unfortunately.
- ksdnjweusdnkl21 4y agoWriting scripts for mpv is really fun. I would recommend it for anyone especially for people who are learning programming. There is a lot of room for innovation and creativity. The development feedback loop is quick, interactive and visual.
- disk0 4y agoFor anyone already acquainted with emmylua/vscode-lua I'd recommend using my type declarations for mpv—need to push some commits for recent changes but it's completely functional https://github.com/disco0/mpv-types-lua https://github.com/disco0/mpv-types-lua
- pltnr 4y agoJust curious why Lua is frequently used as plugin script? I would like to use an already familiar one like Python instead of to learn a new one.
- pimeys 4y agoIt is very easy to embed to C/C++ codebase, much faster than almost any other scripting languages (luajit) and adds a minimal amount to the binary size.
- nmz 4y agoMuch faster than C in some cases.
- capableweb 4y agoLua is so similar to Python that you could learn the basics in one afternoon since you already know Python. The official book is a great start: https://www.lua.org/pil/1.html https://www.lua.org/pil/1.html
- grumbel 4y agoLUA is essentially build as a plugin language. It's simple and well behaved, very easy to spawn when you need it and throw it away when you are done with it. It can also be isolated, if you don't want to give people access to file-io functions for example, you just don't load them into the interpreter and everything works as expected. 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 https://www.lua.org/pil/24.1.html
- jamhan 4y agoAs an example, the MMORPG "Elder Scrolls Online" [1], uses Lua as the interface and plugin ("addons") language. This allows feature-rich, very useful UI modifications such as "Bandits User Interface" [2] [1] https://www.elderscrollsonline.com/ https://www.elderscrollsonline.com/ [2] https://www.esoui.com/downloads/info1643-BanditsUserInterface.html https://www.esoui.com/downloads/info1643-BanditsUserInterfac...
- nmz 4y agoPython is familiar because you already know it. Lua is much easier to learn than python. Also, you can look for a python transpiler to lua, or any that you like. Take your pick. https://github.com/hengestone/lua-languages https://github.com/hengestone/lua-languages
- mrtweetyhack 4y ago
- eqtn 4y agoiina - for macos (based on mpv) https://github.com/iina/iina https://github.com/iina/iina
- soderfoo 4y agoiina is great -- wish it had cross platform support because it is one of the best mpv implementations I have seen.
- thebitstick 4y agoCelluloid (formerly GNOME MPV) for Linux is simple but pretty great imho
- mrehler 4y agoSome time around 2016 or so, shortly after getting my first Mac, I started using this. It became my default audio/video player in less than a day.
- assbuttbuttass 4y agoOne of my favorite features of mpv, it integrates with yt-dlp to play youtube videos just given the URL! mpv 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'
- capableweb 4y agoWorth noting, yt-dlp doesn't just handle YouTube (as the name and your comment might imply) but basically any multimedia on the web. Another example: 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.md https://github.com/yt-dlp/yt-dlp/blob/master/supportedsites....
- account42 4y agoI use this in combination with https://addons.mozilla.org/en-US/firefox/addon/send-to-mpv-player/ https://addons.mozilla.org/en-US/firefox/addon/send-to-mpv-p... as my pimary way to play video content on the web. It's nice having everything play in a consistent player with consistent controls as well as tons of useful features.
- neurostimulant 4y agoAnd with `--vo=tct` argument, you can watch youtube videos directly on your terminal! No GUI necessary! mpv --vo=tct "https://youtube.com/watch?v=dQw4w9WgXcQ"
- monetus 4y agoThis has always worked much more smoothly than vlc for me on raspberry pis
- anfractuosity 4y agoI really like mpv and use it on my laptop, but I thought the package in the raspberry pi os repo didn't support acceleration? Which is why I've been using vlc for videos (e.g. hevc 4k videos).
- NazakiAid 4y agoA problem I had with MPV was that turning it up past 100% had very obvious distortion whereas VLC didn't have this when at the same volume so unfortunately, I am stuck with VLC on Linux unless I figure out whats wrong.
- MichaelCollins 4y agoI don't know how VLC does it, but the asoftclip ffmpeg filter probably does what you want.
- NazakiAid 4y agoThanks, will give that a go
- antihero 4y agoYou realise how gain works, right? If it’s above 100% it will clip because there isn’t infinite headroom
- loeg 4y agoSure, but something else seems to be going on: > whereas VLC didn't have this when at the same volume
- noisem4ker 4y agoSoft limiting, as opposed to clipping, avoids audible distortion.
- Sunspark 4y agoI have never understood why this player doesn't have a GUI where settings can be adjusted. It only has a bare-bones window. Command-line has it's place, but I don't think poring over man pages to find the command-line switch to change an algo or whatever is called for is the correct interface for a video player. A video player is an interface for the human. Command-lines are better for things that need to interface with a computer.
- antihero 4y agoIf you want a GUI try IINA it is built on top of mpv and is polished.
- imbnwa 4y agoThat's what I use
- howeyc 4y agompv is not for you. I think it's perfect.
- WhyNotHugo 4y ago> I have never understood why this player doesn't have a GUI where settings can be adjusted. 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.
- thanatos519 4y agodouble-click? So you /do/ use a GUI! I type 'mpv filename' in my terminal. I don't need a fancy GUI to choose my files.
- 4y ago
- lambic 4y agoI've always used mplayer for command line video playback. How does mpv compare to that?
- MikusR 4y agoIt is mplayer but better.
- msmenardi 4y agoYou can use --vo=tct if you're on console. Also I heard MPV has Sixel support now, but I couldn't get it working when I tried.
- MichaelCollins 4y agoI'm sorry if this is obvious, but did you double-check your mpv was built with Sixel support? `mpv --vo=help` will list the video outputs your build of mpv supports; sixel should be listed there if your mpv was built with it, but I suspect most distros package mpv without sixel support.
- Hamuko 4y agompv is the successor to mplayer2, which was the successor of mplayer.
- loeg 4y agoTo a first degree approximation, it's the actively-developed fork of mplayer.
- mrob 4y agoMy favorite feature is "video-sync=display-resample". This gives you perfect frame pacing by synchronizing the video to vertical refresh and resampling the audio to match. If you set your refresh rate to an integer multiple of the frame rate, every frame will be shown for the exact same time. The audio resampling compensates for very small discrepancies between speeds by imperceptibly changing the audio speed. It's similar to the proprietary DirectShow filter "ReClock", but AFAIK ReClock does not dynamically adjust the speed to compensate for clock drift like MPV does, in which case you could theoretically still get imperfect frame pacing. (I haven't actually used ReClock so I could be mistaken here.) 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 https://github.com/igv/FSRCNN-TensorFlow/releases SD video can look surprisingly good after upscaling with this.
- capableweb 4y ago> Also great is MPV's support for arbitrary OpenGL shaders. This can include very complicated shaders, e.g. real-time neural network upscaling: 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.
- leeoniya 4y agocheck this out: https://github.com/TianZerL/ACNetGLSL https://github.com/TianZerL/ACNetGLSL
- neurostimulant 4y agoWow this one produces even sharper images. Thanks!
- mrob 4y agoFor line art, try "FSRCNNX_x2_16-0-4-1_anime_enhance.glsl": https://github.com/HelpSeeker/FSRCNN-TensorFlow/releases/tag/1.1_distort https://github.com/HelpSeeker/FSRCNN-TensorFlow/releases/tag... Or if you don't want noise reduction, try "FSRCNNX_x2_8-0-4-1_LineArt.glsl": https://github.com/igv/FSRCNN-TensorFlow/releases https://github.com/igv/FSRCNN-TensorFlow/releases (in checkpoints_params.7z) Both are IMO sharper and more accurate than ACNet.
- adamrezich 4y agoI've been using mpv for the last couple of years as my main media player simply because it was the best one I could find that supports ReShade, because I'm a weirdo who likes fuzzy CRT shaders on my 90s television rips (and other things too)
- cogman10 4y agoMeta: While these are good tools, what's going on here? Seems like a number of these older opensource projects have hit the HN frontpage today.
- Teknoman117 4y agoOne of my favorite things about Mpv is that it's basically a clear cut example on how to use the FFmpeg api. It's written in a way that's fairly straightforward to follow, and was rather instrumental in me understanding the hardware acceleration API of FFmpeg.
- zekica 4y agoYes, that's true. I even contributed one feature to mpv. It was easy to port some features regarding VAAPI post processing - extra deinterlace modes and correctly handling bottom field first videos that Kodi had, but mpv didn't at the time.
- symlinkk 4y agoHas no one made a library that abstracts away the complexity of the ffmpeg api?
- yboris 4y agoMy favorite is the Media Player Classic Black Edition (MPC-BE) https://sourceforge.net/projects/mpcbe/ https://sourceforge.net/projects/mpcbe/ & https://github.com/Aleksoid1978/MPC-BE https://github.com/Aleksoid1978/MPC-BE I love the (optionally) minimal UI it has.
- hoseja 4y agoI don't love that a russian makes it.
- yewenjie 4y agoI love mpv. It is my default media player in both Linux and Android.
- leeoniya 4y agodon't forget to enable hardware accelerated decoding. 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_acceleration https://wiki.archlinux.org/title/mpv#Hardware_video_accelera...
- whyoh 4y agoI disabled hardware acceleration, it was on by default. I think seeking is faster with it off and I believe there was another advantage, which I don't remember now. I find that CPU usage is negligible, but YMMV.
- kiwijamo 4y agoOn older hardware it makes a huge difference. Also very useful if you are on a battery, in my experience it can be the difference between 2 hours or 6 hours of battery life. I think it's off by default because hardware acceleration sometimes introduces visual artifacts but these are so minor I would prefer the extra 4 hours of battery life and not giving a hot laptop. YMMV and indeed it may not be noticeable on newer hardware and maybe not an issue if there are no batteries.
- cercatrova 4y agoMPV is great for setting upscaling filters like Anime4k or Nvidia Image Scaling. All you have to do is add a glsl file to the shaders folder and voilà, you get a crisp, clean image on the other side. I often watch 1080p to upscaled 4k shows and anime through this method.
- kennywinker 4y agoCan anyone who’s used both explain the differences / advantages of this over vlc?
- capableweb 4y agoOne very neat feature, mpv can play videos (with sound) directly in your terminal (no extra windows needed): mpv --vo=tct 'https://www.instagram.com/p/CfZK86fozXa/'
- anthk 4y agoIt sucks, it uses too much CPU. DRM/KMS it's MUCH better.
- metadat 4y agoFor one thing, VLC on macOS has become so unreliable it's more or less unusable. Randomly won't play valid video streams, slow or completely broken seeking, and even intermittently crashes. 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. https://iina.io/ https://iina.io/ MPV is the only video player I'm aware of which is available for every common desktop platform and works consistently across them.
- kennywinker 4y agoOdd, I would have described VLC on mac as “bulletproof”. Are you maybe on an M1 mac?
- MichaelCollins 4y agompv has better support for playing videos from the web. You can paste a youtube link into vlc's "Open Network Stream..." dialogue, but because VLC doesn't use yt-dlp for this it often doesn't work at all (it presently doesn't work for me) and works with fewer websites than mpv. 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.)
- skitter 4y agoMpv has an interesting commit message that rants about the insanity of C locales: https://github.com/mpv-player/mpv/commit/1e70e82baa91 https://github.com/mpv-player/mpv/commit/1e70e82baa91
- capableweb 4y ago"Interesting" indeed: > 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.
- deleted 4y ago[deleted]
- raintrees 4y agoI did not really think I was the only one who gets frustrated, but wow - My rants are not quite that inventive/descriptive...
- schleck8 4y agoThe guy who made this commit has this in his Github bio: > 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.
- deleted 4y ago[deleted]
- Snetry 4y agoDont trust the current wm4 github account. The original account was deleted and someone made one with the same name.
- 4y ago
- goombacloud 4y agoIt's the go-to player for watching a video with two subtitles, quite essential if you happen to watch a movie with someone and both need different subs.
- Hamuko 4y agoI'm glad that Plex is using mpv these days. Makes it a lot nicer to use on my Apple TV, since you can basically throw anything at it without the need for transcoding.
- Sin2x 4y agoHaruna is a nice front-end of it for Qt
- guessmyname 4y agoI have the impression that the “Ten Thousand” [1] effect has increased quite significantly in the last couple of months. 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. [1] https://xkcd.com/1053/ https://xkcd.com/1053/ [2] https://news.ycombinator.com/item?id=32113825 https://news.ycombinator.com/item?id=32113825 [3] https://news.ycombinator.com/item?id=31986851 https://news.ycombinator.com/item?id=31986851
- badocr 4y agoIt's the reddit effect. As reddit's popularity keep increasing for the past 5 years or so, HN links posted on the platform get that much more attention. Specially true for indians, pakistanis and chinese.
- yourad_io 4y agoThen again I always come into these threads for the comments, even (/especially) when I know the software bring discussed. There is usually interesting discussion, info and tips - like in this thread.
- 5e92cb50239222b 4y agompv also does fine as a simple image viewer. Bind image mime types to /usr/bin/mpv, and you're golden. If you want a slideshow, run `mpv /path/to/image/dir`.
- joveian 4y agoI prefer feh normally but I did for some reason prefer it for viewing the hourly weather (US specific but maybe similar is available elsewhere). I bind a key to 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/ 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/ 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'\' https://tgftp.nws.noaa.gov/data/forecasts/zone/or/orz006.txt...' | sed '\'':a; /^[[:space:]]*$/ { $d; N; ba; }'\'''
- rob_c 4y agoHave you never used anything other than a DVD or Windows media player? This is ancient! It's very good, but frankly, why is this news to anyone?
- yourad_io 4y agoBut still relevant and sparked interesting discussion
- ur-whale 4y agompv is what powers smplayer, my absolute favorite movie player app (sooo much better than vlc). 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.
- agumonkey 4y agoA superb piece of software.
- deleted 4y ago[deleted]
- Thaxll 4y agoProblem with MPV is that they don't provide any compiled binaries.
- hocuspocus 4y agoIs that such a big issue when binary packages are available from pretty much every package manager out there?
- Thaxll 4y agoThey are all not official and don't inspire confidence.
- yakubin 4y agoMy favourite feature of mpv is small but neat: going frame-by-frame forwards and backwards with the keys "." and ",". VLC can step forwards, but not backwards, which frustrated me a fair bit, because I like first stepping really fast forwards to go into the general vicinity of the frame I wanted to catch, necessarily overshooting the target a bit and then backing off a bit and narrowing down the frame with greater precision. VLC didn't allow me to do that, overshooting meant I needed to do the whole thing all over again; but mpv got me covered.
- nyanpasu64 4y agoAnd worse yet, on VLC, often after single-stepping enough times, the video player or decoder stops advancing on pressing e. Resuming playback will either take a while to start playing or stop the file altogether.
- jjcon 4y agoI love mpv - it works much better on my Linux laptop than vlc for some reason, (I think wayland related).
- nonbirithm 4y agoI was surprised to learn that mpv doesn't support the Raspberry Pi, and the maintainers don't seem interested in supporting it[0] even though VLC works fine. [0] https://github.com/mpv-player/mpv/issues/7492#issuecomment-997409233 https://github.com/mpv-player/mpv/issues/7492#issuecomment-9...
- litoE 4y agoThere's omxplayer as a command line video player for the Raspberry Pi.
- shmerl 4y agoI use it for most media playback, except some like MIDI that aren't supported.
- philgeorge 4y agoStill waiting for them to build an Apple Silicon build. Great player though.
- thebitstick 4y agoWould highly recommend IINA. macOS native video player that uses mpv as a backend. 100% free and open source. https://github.com/iina/iina https://github.com/iina/iina
- michaelmrose 4y agoIf you use jellyfin jellyfin-mpv-shim lets you play streams in mpv without worrying about transcoding. https://github.com/jellyfin/jellyfin-mpv-shim 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 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. https://github.com/mpv-player/mpv/blob/master/TOOLS/umpv https://github.com/mpv-player/mpv/blob/master/TOOLS/umpv
- peter_d_sherman 4y agoSource Code: https://github.com/mpv-player/mpv https://github.com/mpv-player/mpv
- sylware 4y agonyanmp, a brutal suckless-like x11/vulkan/alsa linux open-source video player based on ffmpeg: https://rocketgit.com/user/sylware/nyanmp/source https://rocketgit.com/user/sylware/nyanmp/source (grin)
- ripdog 4y agoCurious as to what the advantages of this are over mpv?
- ognyankulev 4y agoLicense (AGPLv3) doesn't make sense for a video player. It only scares any use in corporate environment.
- MichaelCollins 4y agoMakes sense to me. Software for common people, but not for corporations or people with an abnormal legal paranoia. WTFPL is probably also good for this, lawyers seem to hate it but normal people are free to use it without worry. 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.
- MichaelCollins 4y agoIf the idea is radical minimalism, what advantage does nyanmp have over ffplay?