1113 points · by Bluestein · 2y ago · 559 comments
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.
The standard library in Zig, Go, Rust, and many others is miles ahead of the C standard library or posix api. That is reason enough to use them.
Legacy compatibility has value.
It's not just that C is "inadequate" - C and its standard library provide no assistance in that task. As the mpv author explains in profane detail in the linked commit message, POSIX locales are an active hindrance, not a useful form of "legacy compatibility".
25 years ago, Spolsky wrote an article called “everything you wanted to know about Unicode and character sets”. Those of you who only lived in the post Unicode/UTF world might find that one informative as wel.
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.
What a legend.
As for weirdness of C standard, I guess it is because they wanted to make it compatible with obscure proprietary platforms which might not even exist anymore.
This was a great read
“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.”
I get him though. It's one of those writings from a foul mood. There was probably more going on in his life than some trouble dealing with locales.
No, he observes that software devs as a group, and as a culture tend to produce worse results than incredibly-distracted and certainly-fatally-intoxicated simians banging on typewriters.
It's a bit of hyperbole, but the overall state of software is absolutely dire.
> ...the Chinese, listeners of bland music...
In some-to-much of the world, it's pretty well-known that a lot of cheap crap (much of which has historically been made in China) is very shoddily made and fairly quickly finds its way to the landfill. One shouldn't confuse criticism of shoddily-made products for criticism of the citizens of the country of origin of said products.
I'd also expect the referenced (certainly entirely-hypothetical) CD to be something that ends up getting thrown into the dumpster in huge numbers because store inventory managers expect it to be WAY more popular than it actually ends up being. Also, see above about not getting confused about what the target of the insult is. ;)
> There was probably more going on in his life than some trouble dealing with locales.
shrug Not everyone chooses to write in sterile $DAYJOB-approved language when explaining in detail the root of their frustration with the absolutely bullshit garbage pile they have to build upon for their non-corporate side project.
Now its on every device, even on my android tablet. Its perfect. Minimalistic, sane defaults, fast and just works.
It can even play natively over ssh. Its awesome
> mpv sftp://mit@nyx/home/mit/Work/merged.mp4
Recently I needed a hotkey to rotate a video (which seems not like any player can easily do this; for mpv it was a 'r cycle_values video-rotate "90" "180" "270" "0"' in the in input.conf)
mpv <yt link>1. Although `yt-dlp` consistently is able to download videos at link speed (even when the said link is in multi-gig range!), streaming the video through `mpv` will not work as well and some videos would buffer every couple chunks. But that was in the past…
2. With recent changes to how videos are served and "protected", I'm still able to download them with recent versions of `yt-dlp`, but streaming a `yt-dlp` generated playlist will reliably fail to work (this is true for the newpipe android app too.)
3. Even back when streaming youtube worked, closed captions and other such features would not work by default.
I download videos first, nowadays. And then play them with mpv anyway.
https://interfacinglinux.com/2024/01/10/hardware-acceleratio...
vo=gpu-next
gpu-api=vulkan
hwdec=vulkan
gpu-context=waylandvk
You can replace hwdec=vulkan with hwdec=vaapi if Vulkan video doesn't work.See also some details here: https://github.com/mpv-player/mpv/discussions/13909
https://github.com/mpv-player/mpv/blob/a3baf94ab9f3b43a8027d...
Would be appropriate to have true/false/auto instead of auto==true though, so auto wouldn't use it unless it confirmed to be working.
Meanwhile on Linux you gotta configure every app one at a time because sane defaults and auto configuration weren't invented here.
streamlink and mpv on a fanless Minix z100 running Ubuntu was a nigh-on perfect Olympics experience.
https://www.minix.com.hk/products/z100-0db-fanless-n100-mini...
Neither me nor my significant other are native English speakers, but we have different native languages. I'm comfortable enough with English, but like having English subtitles since I have a hard time with some dialects and occasionally just miss a word or two due to noisy audio. My SO likes having subtitles in their native language.
Being able to have multiple subtitles makes it possible for both of us to get the experience we like, at the cost of a little screen real estate. Well worth it.
If there is no black bar, you could get one of those long narrow LCDs off AliExpress, set up the driver, add it as an X display with the right positioning... and then drag the mpv window across that and the TV. Should work. Those little LCDs are just silly expensive though...
Additionally, https://subdl.com/ with https://github.com/alexanderwink/subdl is a great resource for finding and downloading subtitles from the comand line.
This may also be due to legal issues / restrictions in the contract they had with that content's right holders or subtitles providers.
AFAIK, the video you are being served is always based by the geolocation and what video was licensed for that. E.g. in a French version of a movie, text in the movie may have been localized into french inside the video. Additionaly there might be additional/missing scenes in the localized version to get the desired age ratings in that market.
The audio is then synced to that version of the video. That means that e.g. the French audio produced for the US video is not 1:1 the same audio as the French audio for the German video.
So that takes it beyond a licensing issue, and would mean additional effort to produce compatible audio tracks for content that they may only have streaming rights for temporarily. For content native to the streaming service they usually put that effort in.
Things may have changed since then, but when I first encountered the project several years ago it seemed like the thing that made this project stand out compared to other player projects was a big emphasis on correctness and accurate playback. There have files I’ve encountered that for example VLC will play with quirks (color reproduction is not quite right, etc) that mpv plays perfectly.
This has long since been the case, even back in the MPlayer days in the early 2000s.
I'm not really sure why this is the case though, because I believe both largely rely on the same libraries for many codecs.
In that environment, playing at all without constantly dropping out or buffering is the goal, which is more achievable when fudging accuracy/correctness (which wouldn’t have been possible anyway).
Not sure how true that is though, it’s not something I’ve ever verified.
Given how VLC is basically bulletproof and will play absolutely anything thrown at it - it's great to hear that mpv is up there ...
Sad to hear.-
PS. On a tangent, rethorically - baring bugs and security - at one point is (if ever) software "finished"?
"We built this search engine. It works. The infrastructure has team enough to run it. But we have this huge payroll of people."
So "improvements" and "features" (and constant UI and UX changes) ...
... "enshittification" ensues.-
When is "good enough" ... good enough?
Playing HDR and Dolby Vision encoded movies has been solved a long time ago in mpv, but they usually need the option shown above, which may not be the default on your system.
There are plenty of additional options in mpv that provide a finer control of how HDR colors are handled.
While playing a movie with mpv, press "I", so that mpv will display the information it has about the color space supported by your display and the color space used in the movie, which will allow you to verify if they are correct.
"I" shows: Primaries: bt.2020. Colormatrix: bt.2020-ncl. Levels: full. If that means anything.
- Seeds of Might/JySzE's base `mpv.conf`[1]
- uosc, a feature-rich but still minimalist UI[2]
- thumbfast, a fast thumbnailer to be used with uosc or another custom UI[3]
- Eisa01's SmartSkip, which allows to skip intros & more (audio-based)[4]
[1] Windows: https://gist.github.com/JySzE/db4149cad726b3b6955dca8d47a197..., macOS: https://gist.github.com/JySzE/34ee131da3974811a9469e1e3b7d4d... [2] https://github.com/tomasklaen/uosc [3] https://github.com/po5/thumbfast [4] https://github.com/Eisa01/mpv-scripts#smartskip
To reliably be able to find intros/credits, you need to some non-local analysis - basically, you need to look for common chunks of audio across episodes in a season or entire show.
I wrote a CLI tool that can do this, albeit it’s not really “finished” and probably will never be. My initial goal was to use it to develop a Jellyfin plugin, but then I discovered that there was already such a plugin :)
Its continued excellence is one of the reasons why I will probably remain a pirate for life. Streaming services spend millions on their players and don't come close.
Other services are strictly premium, paid affairs. Still not as good as mpv.
You can also introduce hotkeys for functionalities I have never seen in another player.
I use this (input.conf) sometimes to normalize the brightness and colors of a scene I'm watching (may not work when using hardware decoding):
n vf toggle normalize=smoothing=100
Or rotate a video: Ctrl+r no-osd cycle-values video-rotate "90" "180" "270" "0"
[1] <https://github.com/occivink/mpv-scripts>[1]: https://gist.github.com/madeindjs/f33225cf4d8fdc9f61e0fe3ebe...
People also don't realize that mpv not only has the ability to stream youtube videos but you can also search youtube on the CLI using mpv `mpv ytdl://ytsearch:query`
it can also play videos directly in the terminal using ascii, sixel or kitty image protocol (which is by far the highest quality)
Increíble. Consider putting this up somewhere folks can find it.-
> it can also play videos directly in the terminal using ascii
Beats Star Wars over telnet :)
Also I'm using it to stream from Gerbera and to sync progress seamlessly between phone and PC.
F1 af toggle "acompressor=ratio=4,loudnorm"
F2 vf toggle "bwdif"
First one is an alright dynamic range compressor (makes the loud parts quieter and quieter parts loud). Second is a deinterlace at default settings. These are standard ffmpeg filters and mpv let's you turn these on in real time.- Loudness Normalization: "lavfi=[loudnorm=i=-14.0:lra=13.0:tp=-1.0]"
- Loudness Normalization + Mild Tinnitus Filter: "lavfi=[loudnorm=i=-14.0:lra=13.0:tp=-1.0,equalizer=f=6000:width_type=o:w=2:g=-20]"
- Mild Tinnitus Filter: "equalizer=f=6000:width_type=o:w=2:g=-20"
- Aggressive Tinnitus Filter: "equalizer=f=4000:width_type=q:w=1:g=-30,equalizer=f=6000:width_type=q:w=1:g=-30,equalizer=f=8000:width_type=q:w=1:g=-30"
- Bass Reduction: "bass=f=210:g=-17.7"
- Alternative Loudness Normalization: "loudnorm=linear=no"
- Dynamic Audio Normalization: "dynaudnorm=s=0"
- None: ""
F1 cycle-values af "lavfi=[loudnorm=i=-14.0:lra=13.0:tp=-1.0]" "lavfi=[loudnorm=i=-14.0:lra=13.0:tp=-1.0,equalizer=f=6000:width_type=o:w=2:g=-20]" "equalizer=f=6000:width_type=o:w=2:g=-20" "equalizer=f=4000:width_type=q:w=1:g=-30,equalizer=f=6000:width_type=q:w=1:g=-30,equalizer=f=8000:width_type=q:w=1:g=-30" "bass=f=210:g=-17.7" "loudnorm=linear=no" "dynaudnorm=s=0" ""
https://reddit.com/r/mpv/comments/xf8p9t/movie_volume_compre...
F1 af toggle "loudnorm=I=-14:LRA=1:tp=-1:linear=false:dual_mono=true"
The I=-14 is the target 'volume', which makes it as loud as YouTube and Spotify, setting it to -23 will be much quieter, but gives you more dynamic range. LRA=1 goes from 1-50, with 1 being the most compressing which is probably what you want in this case. TP=-1 sets the limiter to -1dB, which is plenty of clipping threshold because loudnorm calls the resampler for 192kHz before working in dynamic mode. Linear=false because we use dynamic mode here and cannot even use linear mode. Dual_mono=true makes -14 as loud for mono as stereo sources.Since loudnorm adjusts volumes and sets limits for you, you can forego mpv's audio downmixing if your target is stereo and simply put all your channels together before bringing them to loudnorm:
F1 af toggle "pan=stereo|c0=FC+LFE+FL+BL+SL|c1=FC+LFE+FR+BR+SR,loudnorm=I=-14:LRA=1:tp=-1:linear=false:dual_mono=true"What I haven't seen mentioned is that it has 1- or 2-key keyboard shortcuts for almost everything, down to adjusting audio/video delay, subtitle size and offset, etc etc.
Once you've had the experience of adjusting the video just how you like it in 5 seconds with a series of keypresses without having to pause or disrupt the playback, you'll never want to go back.
Basically all other players seemed to produce choppy videos ( including regular dvd players ) but mplayer didn’t ( and there was no motion interpolation). A friend of mine told me that mplayer was very accurate ( ie each frame lasted exactly the same duration), unlike most players on the market at the time and this explained the ‘smooth’ feeling.
Is this smoothness advantage still the case ? Would anyone know why it felt like that years ago ?
This art of quick seeking sort of got lost in time as the distance between UX people and people who understand H.264/265/etc in detail grew.
On Apple TV: At best it takes like 500 ms. At worst (the Max app), like 6000 ms.
MPlayer 20 years ago: 17 ms.
There are situations where a player could time things so badly an entire frame has to be skipped, but that shouldn't happen often. And it should basically never happen on a regular DVD player. Any variations smaller than that disappear; whether a frame is ready 15ms before the deadline or 1ms before the deadline has no impact on the output.
I used both over the year and there are still things that are really annoying in mpv:
- you can't render on a Chromecast
- opening a file that does not work does nothing, you don't know what's happening, is the file corrupted, is the codec not supported ??
- the no ui idea is nice for opening a single file, but then you go to the rabbithole of millions of settings / config to do anything more complicated, playlists? ( why can't I drag and drop on the window )
- it's hard to compile, so it's up to you to find up to date version on your distro
You could open the console to see errors. https://mpv.io/manual/master/#console
>- the no ui idea is nice for opening a single file, but then you go to the rabbithole of millions of settings / config to do anything more complicated, playlists? ( why can't I drag and drop on the window )
I cannot relate to that. "ad-hoc" playlists or even adding more files while some are already playing works fine for me on macOS. There's a chance the built-in UI differs between operating systems, not sure.
>- it's hard to compile, so it's up to you to find up to date version on your distro
I consider that hardly the fault of the mpv project. Other than that, there are usually third-party providers for mpv binaries.
You can always just open files with a CLI if you want to see the error messages.
What do you mean can't drag and drop on a window? That's literally how you add subtitles or open a file if you opened mpv from the shortcut, rather than by opening a file.
Adding a file does not enqueued them, it just open it and play it right away.
I have opened detailed issues on IINA which describe a bug, how to reproduce, and the correct behaviour (according to their own docs), and they’ve just sat there unacknowledged for years.
IINA’s issue count is twice as big as mpv’s, despite being a UI covering a single OS. Personally I don’t think it’s worth it over vanilla mpv, which I’ve recommended even to non-technical users who like it.
I went into a rabbit hole recently playing iPhone-recorded Dolby hdr videos and tweaking all the various mpv settings but nothing really looked the same as in Photos. Iina is closer but also not exactly the same as the native players.
https://developer.apple.com/documentation/technotes/tn3145-h...
Streamlink, for watching live streams without a web browser:
Syncplay, for remote movie parties:
Bonus trivia: Plex Media Player uses mpv as the video player
We're using inexpensive industrial mini-PCs, Alpine Linux, and MPV as a custom digital signage solution at my company, and centrally managing them via Ansible.
I'm using these: https://www.amazon.com/MeLE-Fanless-Computer-Ethernet-PCG02/.... Works great with Linux, and has a very customizable BIOS.
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 it on a modern machine.
For the scrolling you can bind smoething like a .1s seek to the wheel
Right seek 5 # In seconds; these are limited by keyframes
Left seek -5
Shift+Right seek 2 exact # Smaller non-keyframe-limited, seeks with shift
Shift+Left seek -2 exact
Obviously, this is slower. Sometimes much slower (depending on the file).Anecdotally, I’d change that “sometimes” to “often”. After years of using `exact` I finally stopped. It always felt that the wait was longer than going to the previous keyframe and rewatching the bit. Now if I could only find the perfect timing to go back, though.
That said, I have replaced most of my "exact seeks" with "sub-seek"; in input.conf:
Alt+Right sub-seek 1 # Go to next/previous sub (within demuxer-readahead-secs)
Alt+d sub-seek 1
Alt+Left sub-seek -1
Alt+a sub-seek -1
And then in mpv.conf: demuxer-readahead-secs=120 # sub-seek only works within this cache
demuxer-hysteresis-secs=60 # Fill cache only if lower than this; saves battery
This allows me to fairly quickly skip past stuff that's not too interesting, while still actually following the gist of what's going on.I think it's also bound by default, but I'm not sure what that is from the top of my head. You'll definitely need to set that cache as it's only 2 seconds or so by default.
[1] https://github.com/mpv-player/mpv-examples/blob/master/libmp...
I'm not sure what's the benefit of that is though.
Drawback: MPV will be forced to run at screen V-Sync, draining battery faster. If your screen is 60hz, but the video is 29.97hz, MPV will re-draw the screen at 60hz, instead of just 29.97hz, doubling GPU load.
Drawback: MPV will be forced to run at screen V-Sync, draining battery faster. If your screen is 60hz, but the video is 29.97hz, MPV will re-draw the screen at 60hz, instead of just 29.97hz, doubling GPU load.
Drawback: MPV will be forced to run at screen V-Sync, draining battery faster. If your screen is 60hz, but the video is 29.97hz, MPV will re-draw the screen at 60hz, instead of just 29.97hz, doubling GPU load.
Highly recommended.
I'll just add this here but if you want this kind of transcoding for the entire system rather than just mpv you can use dcaenc with its virtual 6 channel input encoding everything to DTS. I send the encoded audio to the AVR using a cheap TI PCM27XX sound card with optical output.
Additionally, mpv has a powerful script system. One of my favorite scripts is fast foward through intro, which is crucial for watching a tv show. https://github.com/rui-ddc/skip-intro. Another nice script is https://github.com/familyfriendlymikey/mpv-cut, which enables creating clips in mpv. There are a ton of other useful scripts, and its not difficult to create a custom script yourself using lua.
Mpv automatically resuming is also nice for watching tv shows or movies. Only problem is that if you shutdown mpv through killing the window then automatically resuming from history gets messed up.
I think it's worth it, but to get the most out of it, you'll need to customize it to your liking (tweaking the OSC, the keyboard shortcuts... you can do many things, but it requires some reading/searching).
All that said, VLC is not always my video player of choice. On Windows, I typically prefer PotPlayer and MPC-BE. On MacOS - IINA. On Android - MX Player Pro. But I always keep it installed on all those platforms because I know that I can fall back to it reliably at a moment's notice and it will simply work.
Additionally, with regard to MPV, where I think it makes the most sense is for the highly discerning user who wants to tweak the rendering of video in a specific way. I think anime fans really like it a lot (I'd imagine they upscale or improve the image quality in very subjective, specific ways, though I didn't investigate this in detail). The other good use case is when you have somewhat limited hardware and you want the most efficient video player application. That is perfectly valid, I suppose, but I think for most people, whatever hardware they're playing a video file on is likely more than capable of running with a more 'unoptimized' video player app such as VLC.
99% of the time I use it, I just want to play a local video file or watch a web radio stream. I don't want to create a playlist or browse my computer using a built-in media library, yet both are front and center in VLC.
And has done this, for a long time, since times when other players struggled.
Maybe it's not the "Best" - it is still the goodest.
[1] https://github.com/clsid2/mpc-hc/ [2] https://github.com/Aleksoid1978/MPC-BE
Of course, if you really want to be a purist you could use ffplay.
Mpv does not have that issue and converts 4k HDR to SDR in real-time and shows a colorful image.
[libarchive] This appears to be a multi-volume archive.
[libarchive] Support is not very good due to libarchive limitations.
[libarchive] There are known cases of libarchive crashing mpv on these.
[libarchive] This is also an excessively inefficient and stupid way to distribute
[libarchive] media files. People creating them should rethink this.
script-opts=ytdl_hook-ytdl_path=yt-dlp
[1] https://github.com/yt-dlp/yt-dlpPass the option —vo=drm and it works flawlessly with free drivers for AMD, Intel or Nvidia.
image-display-duration=inf autofit-larger=100%x100%
But one thing that confused me seeing that homepage is that it shows a player UI screenshot, but it says " mpv is a free (as in freedom) media player for the command line", isn't just for the command line right? I assume you can install it as an app and it has an UI like VLC. (I'm on the phone rn will check it on my PC later).
% mpv file.mp4
That's what they mean.It doesn't really have things such as "File → Open" like VLC has. At least not out of the box, but it's scriptable with Lua and there are scripts and even entire "alternative frontends" that can do this.
It can also be remote controlled via a socket; I built an audio player like this; works pretty well.
In general, if you want a "Windows-like" or "macOS-like" experience then VLC is pretty good. If you want a more "unix-beardy" experience then mpv is pretty good.
Sure the possibility to tweak the UI is limitless, but at least there are minimum usable UI, like gvim (Windows, Linux) or macvim (macOS) which are easy to install.
Huh, it does for me (in the menu bar) on macOS! I guess that's platform-specific then?
If you set it as your default video player it will work as you expect.
If you don't want to set it as your default video player you can probably do something like "Right Click -> Open with..." and choose MPV.
[1]: https://github.com/mpv-player/mpv/blob/master/etc/mpv.deskto...
MPV does not do this, so over the years I began to use it as my daily driver.
Those good old days. [/ dream]
I have like 3 things trying to be audio device on my linux (of which the graphics card is the most unwanted one and sometimes it randomly manages to take over despite me not changing any settings) and the list of audio modules that show up is simply enormous (pulseaudio, pipewire, alsa, ...), some of those make VLC stutter, others don't. It's a mess but at least pipewire works better than puseaudio in my case...
This should let you play a VIDEO_TS folder, ISO, or an actual disc… with the caveat that you need to figure out the coordinates of the menu yourself by using an external tool.
That's funny, for me that's exactly the best GUI out of the box. I actually did some tinkering to reduce the GUI parts even more, and added more keyboard shortcuts.
. and , on keyboard go frame-to-frame, you can also up and downspeed with [ and ]
It runs on a Pi 4. PHP assembles playlists with a Dolby ad, a vintage dancing hot dog ad, trailers, and the feature. It runs mpv through proc_open.
It monitors the progress and controls mpv through a socket to know when to dim or raise the lights, open or close the curtain, etc.
This is great.-
Particularly the vintage dancing hot dog ad, mind you :)
[1] https://news.ycombinator.com/item?id=41278203 [2] https://news.ycombinator.com/item?id=41277818
https://github.com/clsid2/mpc-hc
Plus there is also mpc-be which is actively developed and pretty much the same.
I also often use oversample, for video game footage and whatnot where I want all the pixels to be not blurry.
> this feature is algorithmically impossible
> You're just looking at one specific video, not the general problem.
> is not generally possible.
As a fellow multimedia dev, man, who cares? Sometimes we forget that software ought to be useful, not hypothetical ideals of truth. Just implement the feature for those codecs that support it and which probably are in the 98% percentile of what users actually use, regardless of the damned "general case".
Or accept and announce shamelessly that you don't have either the knowledge or the development resources to tackle such a complex feature. But excuses about not being possible for absolutely every possible codec in a completely generic way is just denying that the world is just a chaotic and dirty place where things are not ideal nor perfect. Just give your users a real-world solution (or rejection).
VLC is what it is today because the authors understood video standards enough to make the _right_ abstractions that could generalize to ~every video format ever. That is no easy task. Video container standards are utterly perverse, and seem to delight in stomping over even the most innocent intuitions about what you would expect to find in a stream of bits that purports to contain "video". They often refuse to make even basic promises, like "the first frame's timestamp starts at 0" or "every parcel of data has a timestamp". Seemingly reasonable ideas that a neophyte might propose, like "suppose we store the video's framerate-" must be immediately interrupted with "you FOOL, there IS no framerate, nothing can be certain, this video might not even have frames, it might in fact be an interactive gift basket experience merely PRETENDING to be an mp4-". That's just the nature of the beast.
A playback architecture that can wrangle all of that cruelty into a consistent experience was hard won. Of course they're not eager to throw new features into the mix that will pollute that mental model, and suddenly introduce thousands of codec-vs-player-feature checks that were heretofore ruled out in principle. At a certain point, the architecture is sacred, and it's the only thing making VLC maintainable. If a feature doesn't work for everything, it doesn't work.
On fact, with all due respect, I never understood why VLC was so widely praised. It is the only player to stutter for me on Windows, to get lost in its settings page, to have a terrible playlist implementation that's forced upon you, doesn't handle corrupted media as well as others, etc. mpv on the other hand does one thing and does it very well.
I'll skip ranting about VLC for Android TV this time
VLC's poor performance in seeking backwards in general, not just by frame, is a big part of why it's no longer my media player of choice. Which is fine! As an OSS project there's no real reason to care about the number of users as long as enough people are involved to sustain the project, and making the developer experience pleasant is more important than making the user experience pleasant on that front. It just means it's not as good a tool for some users as others, like mpv.
No, it hasn't. The only reason I use mpv instead of VLC is because of the frame step feature. Everyone else has proven that it is possible and practical to do.
Never let the perfect be the enemy of the good. If people don't use your product, it doesn't matter how right and pure of vision you are.
VLC used to be the dominant video player for this reason, but then everything has crystallized around h.264 (and h.265) which made the breadth of codec support not as important anymore, making VLC slowly losing relevance because they aren't focused on user experience enough.
It's also not like only some very nieche professional-only formats will have the required indexes. No, 99.99% of videos support accurate-enough seeking because that's something most people expect to be able to do with their video files.
You are also making it sound like VLC is the only player that has managed to support a wide range of formats when there are countless of ffmpeg-based players that manage to do that, like the subject of this post.
VLC is the least common denominator of video players. Its UI is asinine and the two primary reasons for its popularity are its iconic logo and multi-OS compatibility.
I admit you're probably right on the topic of stepping backwards by one frame, but I wouldn't be so quick to shower VLC with broad praise like that.
I don't know how they get away with that though. In the coding work that I do, I'm constantly dealing with rules that have exceptions on top of exceptions. I just need to special-case some things, because the alternative is not delivering what the business needs.
In your job, you have to special-case some things because the alternative is not delivering what the boss wants. Regardless of the problems this may cause, or how much tech debt it generates - those are (in the end) business decisions, and while you can make a case to the boss that implementing the special case feature is going to cause huge problems, it's the boss's call as to whether it gets implemented.
In an open-source project the maintainer is the boss. If the maintainer thinks that the feature is going to cause problems, they're totally free to say "no, I'm not going to implement that feature". And, ofc, because it's FOSS, the user is totally free to fork it, or submit a PR for the feature, or whatever.
> just got here from a Google search. I gotta say the replies from Remi sound defensively toxic. I'm not here to program the app, I'm just here to find a simple feature and/or request it.
I think Remi sounds curt rather than toxic. There's no automatic right for anyone to go to a FOSS project and request a feature and have it implemented. The maintainer is perfectly within their rights to just say "no". It's their project, their code, their time, and they're free to do/not do anything they like with it.
What are you even saying about the choas of the world?! Every dev knows how work is. You are just describing every other software job. Somehow it sounds like you are boasting how matured you are just because you do what your client asks/needs. Even then, many business/software make a concious choice to support or not support something based on some guidance. The guidance could be some core principles or just some product managers whim.
It's highly likely that VLC developers chose not to support the feature for the very reason(s) that's described in the post. It's a concious choice they made. I don't see anything wrong in that. They definitely are not some school kids with some daddy issues to hide behind some code. They clearly have answered all the questions from a technical stand point.
It's also not consistently applied. VLC will happily let you jump around in the videos, so his claim that the only way to do it is to play the video as fast as possible from the start of the video just doesn't jive with what is already there.
I've long since come to the understanding that if I want software that are useful, I must go and pay for it. Commercial software exist to make money, and to make money they must be useful.
If I want software that are hypothetical ideals of truth, I go and shitpost at the nearest neckbeard communion. Free-beer software exist to satisfy a man's desire to display his voluminous beard, everything else is tertiary.
Where is that commercial kernel that works over a wide spectrum of architectures and system sizes?
Where is that commercial compiler that works on many architectures?
Where is that commercial packet capture software that people a paying for to get work done?
Where is that commercial emulator that can run your operating system on a very different machine in countless combinations.
The list could go on and on...
Even if it were free, wouldn't you want to do something nice (like give them money) for the person(s) who made the useful thing for you?
I see Rémi Denis-Courmont's arrogant attitude and disrespect for users and developers hasn't improved in all these years. And neither has VLC's spectacularly awful UI. Coincidence, or cause and effect?
https://news.ycombinator.com/item?id=13573499
DonHopkins on Feb 5, 2017 | parent | context | favorite | on: Nullsoft: The death of the last maverick tech comp...
VLC's UI sucks so terribly, it's like they went WAY out of their way to make it sucks on purpose, and stubbornly refuse to acknowledge that there are any problems or ever consider fixing them. One example of many [1]:
Type CMD-E (on Mac, or whatever the equivalent is on Windows) to get the video effects window.
Select "Geometry". Now check "Magnification/Zoom".
Notice how you get a picture-in-picture in the upper left corner, with a white rectangle showing the zoomed area, that you can move around by clicking. But if you press and hold, it also drags the entire windows (on a Mac -- I haven't tried on Windows -- VLC's UI and behavior on Mac and Windows diverges widely so I won't try to predict what happens).
Now look underneath the picture-in-picture and notices some ugly upper case pixelated text that says "VLC ZOOM HIDE". See how it's jaggy and rendered at the resolution of the movie you're playing itself, not at screen in a full resolution overlay with readable text?
Now look at the triangle with a jaggy curved hypotenuse below the jaggy words. That is the zoom "slider" (which also drags the window when you drag the mouse, so it's more like a clicker than a slider). See how it gets narrower and narrower in a succession of jaggy stair-step chunks, until it's merely one jaggy pixel wide? Well guess what: the TARGET AREA also gets narrow to match the width of the slider, so it's almost impossible to click on the bottom of the slider, to select the larger zoom sizes! Since the zoom slider is not very tall and its pixels fat and jaggy, you don't have fine grained access to very many zoom sizes at all, either. The zoom pixel steps are much bigger than screen pixels, depending on the video resolution!
What possible purpose could that serve? Why would any user guess that the lower narrow part of the slider represents a wider zoom showing a bigger rectangle over the picture-in-picture, while the top wider part of the slider represents a tighter zoom showing a smaller rectangle over the picture-in-picture? And what slider have you ever used that gets narrower from top to bottom, with a jaggy curve, and an impossibly narrow hard to click target area at the bottom?
This single facet of VLC's terrible UI deserves to be front and center in the User Interface Hall of Shame [2] -- it's even worse than Apple's infamous schizophrenically skeuomorphic QuickTime 4.0 player [3], from 1999! The latest version of VLC in 2017 is still much worse than the shameful QuickTime player was 18 years ago!
Who could have possibly gone so far out of their way to design and implement such a terrible user interface on purpose, then smugly brushed off and ignored 16 years of bug reports and cries for help on the VLC message boards, without harboring a malicious contempt for their users?
That's not even the worst of it. Now check "Transform" and pick one of the transforms like "Rotate by 90 degrees". Guess what? The magnification interface itself is rotated 90 degrees, because it's drawn on the video before it's rotated, so now it appears at the top right of the screen, rotated 90 degrees itself.
And guess what else? The mouse clicks are not even transformed properly, so clicking on the magnification interfaces does NOTHING, rendering it completely useless! Depending on the aspect ratio of the video, you can't even click in the upper left corner where it USED to be and SHOULD still be to operate it, because it is clipped off the right edge of the window.
Are those ugly cosmetic and impossible usability problems not bad enough for you? Then make a playlist with one item. Select "Repeat" mode. Play the movie. Now go to the finder and remove, rename or move the movie you're playing, or just unplug the USB stick containing the video. Not an uncommon occurrence, right? Now VLC will hang up, consuming 100% of the CPU time, often times seizing up the entire Mac, turning on the fan, locking out all user input, and forcing you to reboot! This happens to me all the time.
These bugs have been around for years. The more you fiddle around with it, testing out the edge cases and trying to combine various poorly designed and implemented features, the more bugs you find.
File a bug report, they say. People report these problems again and again. The developers just ignore them and brush them off. I've tried reporting these and other bugs, describing them in meticulous detail, which is frustrating because once I start writing step-by-step instructions to reproduce one problem, I keep finding more and more problems, each worse than the last, and then they just brush me off and ignore my bug reports too.
VLC's user interface is maliciously terrible in so many ways, the developers are careless and arrogant towards their users, and there's no hope of the developers ever changing their ways, acknowledging the problems, and improving it. Instead of improving usability for everyone, they're more interested in adding yet another obscure anime decoder feature so they can watch their AMV cartoon porn [4] [5].
[1] http://imgur.com/gallery/g0acV
[2] http://hallofshame.gp.co.at/index.php
[3] http://hallofshame.gp.co.at/qtime.htm
[4] https://www.videolan.org/vlc/releases/2.1.5.html
FOR ANIME FANS
New 6.1 downmixer to 5.1 and Stereo from MKV/Flac 6.1. Correct YUV->RGB color matrix in the OpenGL shaders. Improved MKV support for seeking, and resiliancy. Editions support in MKV. Better subtitles and metadata support from MKV. Various ASS subtitles improvements.
[5] https://myanimelist.net/forum/?topicid=208770
Now, if you are an AMV (Anime Music Video) creator and want to edit the video directly, the MKV is your best friend since it's a lossless video-content container due to the fact that you will find yourself adding effects to the video frames/audio. In this case you will want to lose as little as possible in your video, so MKV compression best suits.
TOPIC ANSWER: The reason why MKV is popular for anime is because of it's noted lossless compression. Anime show creators most likely notice this fact and use it to contain their video frames and audio tracks for maximum quality. - it has nothing to do with HD.
derefr on Feb 5, 2017 [–]
> Instead of improving usability for everyone, they're more interested in adding yet another obscure anime decoder feature so they can watch their AMV cartoon porn Mind you, FOSS is contributed to by people scratching their own itch. It's not so much that VLC has a lot of otaku developers; it's that a lot of people who watch (or subtitle) "AMV cartoon porn" see a problem with, or missing feature in, VLC, and think "I'm a programmer; I can fix that", and dash off one-off patches.
DonHopkins on Feb 6, 2017 | parent | next [–]
It just puzzles me that out of eight bullet points summarizing the new features in VLC 2.1.5, one of them was "FOR ANIME FANS" and none of them were "FOR USABILITY". It's the contempt and dismissal that the developers show to usability bug reports when they brush them off and ignore them, which bewilders and frustrates me. Go read some of the discussion group postings and bug reports over the many years, and you will see what I mean. It's a deeply entrenched pattern of behavior.
majkinetor on Feb 6, 2017 | parent | prev [–]
Its very hard to contribute patch to foss tool in general. There is no substitution for agile development team.
DonHopkins on Feb 6, 2017 | root | parent [–]
Oh I certainly wanted to contribute to the VLC project and integrate it into my own projects, but after having my concerns that I wrote up in great detail flippantly dismissed with such contempt, and seeing how the exact same thing happened to other users reporting legitimate longstanding bugs who were brushed off and ignored over so many years, I had no interest in contributing after that. It's fortunate that not every open source project suffers from such arrogant developers as VLC.
> I see Rémi Denis-Courmont's arrogant attitude and disrespect for users and developers hasn't improved in all these years.
That's out of context quote: https://news.ycombinator.com/item?id=41282178
The biggest reason anime people prefer mkv to mp4 is because mkv supports the ASS/SSA subtitle format, which is favored by the anime subbing community for its extremely versatile formatting options. For instance, it is common for subbers to cover up signs containing Japanese text with translated subtitle text, tracked to the video, styled and transformed to appear virtually seamless. Less relevant but still important to some people, mkv supports a plethera of old (and very lossy) video codecs, which is sometimes relevant when it comes to repackaging old encodes of hard to find media. Being able to copy in the old video codec without transcoding preserves what little quality there is while allowing you to package it with modern subtitles. Mkv also has superior support for chapters, metadata, etc.
But I get it, you hate anime and think weebs are pervs. I thought you were a man who values tolerance highly, but whatever man. It has little bearing on technical matters. Incidentally, anime people generally favor mpv above VLC, because the ASS/SSA support is a lot better in mpv (mpv uses it for rendering the psuedo-GUI.)
As for the bugs and UX issues in VLC, I assume that your claims are more accurate than your understanding of media containers, but VLC is nevertheless the best video player to recommend to nontechnical users you might find yourself playing tech support for. They won't tinker with it and therefore won't discover most of the issues you're talking about. What they'll get out of it is a media player that plays whatever file they throw at it, without feeling the need to run sketchy "codec packs" they found god knows where on the internet.
It doesn't let the audio clip/exceed safe volumes and always applies some sort of a limiter, even if it's disabled everywhere in the settings. Try using an EQ on a bass-heavy track and see that it's limited.
Try jumping back multiple times in a song at its beginning, and it will play in lower pitch.
I thought VLC was awesome while growing up, and at the time it probably was compared to Windows Media Player and such. I remember a common bit of praise was that it supported more types of video files. I haven't really run into anything mpv won't play (I even use it when an image I saved ends up as .html for some reason and then use the info screen to determine the real extension it should be so I can rename it), but also I'm guessing we've standardized more on codecs and containers these days which doesn't hurt.
No, it doesn’t. I had problems with it, which was tackled by basically every other players easily (e.g. seeking or simply playing anything).
No software person would find this praiseworthy. A million features = two million bugs, and indeed it shows.
Compared to what? Such a statement is meaningless without comparison.
But many players are able to do it for years.
with:
If it's so easy, why are you not doing it?
He's not just a butthole, he's a stereotypical open source developer butthole. On the other hand, if he worked for Microsoft, he'd be claiming that it takes a PhD to do it...
Nobody even offered to research how other players accomplish this. They just expect that because they believe it can be done someome should do the work for them.
At least Remi was actually andering questions on the forums.
This attitude towards open source maintainers is what's getting them all burned out.
The correct response would have been something like "it's more difficult to do and in some circumstances it will have very bad performance so we haven't done it yet".
This is classic "It's hard and I can't be bothered so I'll make up some technical reason why it's impossible". Programmers do this all the time and it's kind of annoying.
(And yes I understand video coding and I know why it's more difficult in some cases.)
Did they? Because I read a bunch of the thread and “happy” is he last word I’d use to describe the developer’s sentiment. All I see is “let’s see you provide a patch, and I don’t believe you will”.
Everything about it screams that if a patch were provided, they’d do anything in their power to find reasons for refusal.
Even if I cared about VLC, reading those replies guarantees I would never attempt to submit the patch.
Yes, you realistically cannot implement everything every user wants, but at the same time your software is meant to solve problems. Keeping direct communication with your users, and understanding what they find useful or not, should be the driving force of the design and features of your app.
FWIW, I've been on both sides of this discussion, as an OSS maintainer and user, and have experience with demanding users and arrogant and, yes, _lazy_ developers alike. Let's stop the narrative that users don't have the right to request features because they're not paying customers, and that this is driving developers to burn out. Communication is key to producing useful software regardless of its license. OSS development in particular is not just about throwing some code online and forgetting about it.
No he didn’t.
This says it all.
Have you tried to create a meaningful bug report (not feature request) that has not been previously reported and were rejected? If so your complaint is valid. I haven't so I don't know.
I think another sign of a projects long term decline is developers that are all too happy to expand the scope of the project. If that happens I just know that down the line the feature I started using the software because of is down prioritized due to the "need of supporting markdown in the email editor" when the software started as a MSN chat archiver.
So you probably shouldn't let anything that old sour your opinion on the current mpv.
(I don't belong to either side, just have been using the player since its inception.)
Not a week goes by without some random dude coming to my repos expecting I implement whatever they ask, or else be called a dick.
Particularly: you don’t have to use mpv if it doesn’t do what you want it to do, and don’t bust my ** because of it.
You also close issues without even trying to understand what they’re about?
https://github.com/mpv-player/mpv/issues/177#issuecomment-29...
https://github.com/mpv-player/mpv/issues/177#issuecomment-62...
> some random dude coming to my repos expecting I implement whatever they ask, or else be called a dick.
If that’s what you took from that discussion, I sincerely recommend you take a break. You may be experiencing burnout. It’s of course your choice to not implement something you don’t want in your project, but let’s not pretend everyone making a request, especially people who have shown research are dicks out to get you.
I tell you this as fellow open-source maintainer. I’ve learned over the years that if people opening issues are a frequent source of frustration, the first step is to investigate how I can make that less of an issue (e.g. using a GitHub template that forces a specific kind of action) and secondly realise that I need some distance and to relax. When you feel like everyone is an asshole, it’s probably just you.
By the way, that maintainer in particularly was known for lashing out at the smallest things and being rude unprovoked. Perhaps consider reading more of the history before calling them your soulmate.
[1] Some are quite nice and competent. Others are exceedingly rude and will e.g. jump on an issue that had thus far been entirely cordial just to, without provocation, insult users for using whatever OS they don’t like.
> It can be added in theory, but there would be certain problems. Like said earlier codec frame access is very problematic (I, P and B frames), because in worst case scenario you have to decode about 248 sequential Full HD H.264 frames before you can get previous image (so there will be major LAG).
Having used the 'previous frame' feature in mpv, I suspect this is exactly how it's implemented.
What's lovely is that it is indeed possible, but not trivial, and you can see Remi is sort of baiting to catch smart talented programmers to the project.
You can see the patience and long term horizon needed to lead a volunteer open source project. Time to study VLC more.
Thanks!
Wow. Talk about not understanding the user.
- Great example of letting perfect be the enemy of good.
- Hilarious example of a developer making claims of what users want while ignoring the users in front of him.
- Shows how CoCs can be and often end up being used in toxic ways.
Is Remi the sole active developer or why did no other dev chime in to defuse the discussion?
I'm all for open source projects sticking to their vision and standing up to unreasonable user demands but it really is in your own best interest as a developer to learn to communicate effectively - and keep an open mind for feature requests that sound unreasonable to you and first make sure if you understand what is being asked for.
I don’t see any reason it couldn’t be supported for a set of formats with reasonable encoding/decoding settings, and provide some error message for other formats if a user attempts to step back, e.g. reverse frame stepping unavailable for current video due to format/encoding/decoding settings.
I've literally never seen a video like that in my life, but I'd still expect it to work. Just decode everything starting from frame 1. My desktop can decode H265 at 1,666 fps. I can wait.
https://docs.nvidia.com/video-technologies/video-codec-sdk/1...
...you can't support the scrub bar efficiently either, so no one encodes video that way.
Typically to go to a frame you find the last IDR frame before it (and in reasonable encodings those are frequent enough) and decode forward until you get to the frame of interest. Doing that every time the user presses the single frame back button really doesn't seem that bad, and neither does holding onto some extra reference images for at least like 1080p frames. (8k video and such starts getting more expensive but maybe even then start doing all some references after the first press of the frame back button in this GOP or some such.)
It's of course work to do, and I'm not super motivated to send them that patch, and there's the question of it it would be merged and maintained indefinitely, but what folks are asking for is technically possible.
> I don’t see any reason it couldn’t be supported for a set of formats with reasonable encoding/decoding settings, and provide some error message for other formats if a user attempts to step back, e.g. reverse frame stepping unavailable for current video due to format/encoding/decoding settings.
Yeah, this. That's likely more or less what they already do with the scrub bar.
He’s technically simply wrong (I have worked on media decoding code, hell I’m working on a related project today). His player supports seeking back by 10 seconds or whatnot, but he insists that somehow to implement precise seeking to the previous frame, you need to seek from the very beginning of the video, no two ways about it:
> There is not a slight technical difficulty. On a logical level, this feature is algorithmically impossible, except for the extreme: You can decode all frames up to the previous one. But this would be far too slow for anything except really short videos.
It’s obvious bullshit, if you encounter one of those pathological videos (that don’t really exist except in his mind or in some test suites) you just give up after a reasonable amount of time, same as how you give up if you can’t seek back ~10s in a reasonable amount of time.
And players do give up seeking all the time already, not just on these hypothetical one-I-frame-per-hour videos, but real world videos with messed up pts/dts with no reasonable way to go back a short interval.
In fairness to him, he offers the posters an opportunity to propose a technical solution and responds to all the posts that do it. It is interesting that nobody in the thread went to check in the code of mpv, smplayer, etc. to see how it's done there. Surely this would be the best response to his request for technical suggestions?
Maybe because these users just can't code?
Maybe. As those posts have (allegedly) been deleted, it is now impossible to say. It seems probable though. I do find it interesting that he didn't delete the post, spewing actual verbal abuse at the people who dared to propose possible solutions in good faith.
> It is interesting that nobody in the thread went to check in the code of mpv, smplayer, etc. to see how it's done there. Surely this would be the best response to his request for technical suggestions
He has flatly ignored and refused to address, that these other players can do this at all. He makes only mention of "video editors". Well, and YouTube -- cherry picking the easiest case to attack (on grounds of single file format).
At the end of the day, what he needs is an algorithm, which can then be applied against the VLC codebase. For example:
* track timestamp of latest keyframe
* track nframes since latest keyframe
* optionally, keep some sort of unique id to positively identify this keyframe
- now, scrub back to last keyframe (if time accounting is sloppy for this format, overscrub by some amount, the run forward to the keyframe. If overscrubbing is significant, this is where you could compare the keyframe against the reference, to ensure you aren't way far back and needing to run forward further)
- okay, you've found your keyframe; advance (nframes - 1)
- profit
If he comes back and says "that's not fully general", that's true --- but the people asking for this don't care if it's fully general; it's suitable for common use cases and that's what they want. Let it work where it will work. Give up where it won't.
If he comes back and says "sure, that could work, but I don't have time, send a patch", well, okay, that's understandable.
What's actually happening is he's coming back and saying that won't work at all, that it won't support the majority of cases, will take too much compute, etc. and that's just flat out not true. You can do it selectively for the common cases. He might not want to, but that's different from can't.
Like, consider a scenario where you're playing back realtime video over a network connection. You won't necessarily be able to seek forward in that scenario -- you might not have enough video buffered, or hell, the connection could be plain interrupted. Imagine if they just didn't implement forward seek because the solution could not be fully generalized...
And who is going to spend time coding such a thing up, knowing that it is likely to be rejected as "not fully general"?
The only time I saw him being unpleasant in the thread is when people ignored his explanations and acted very entitled. Correct me if I'm wrong on anything here, but VLC is an independent free software project developed in no small part by volunteers; they have every right to choose their technical direction and compromises, and it seemed the people insulting them were in no position to demand anything from them.
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.
if the target frame were not an i frame, you'd have to dig up the preceding i frame and replay everything up to the target frame. pretty easy for random access, not so much for a monotonic stream of frames.
> If you think it is easy, VLC is open-source: you are welcome to provide the easy patch. Somehow, I won't be holding my breath.
> If it's so easy, why are you not doing it? Talk is cheap.
> I'll be waiting for your patch. Surely you're not as lazy and incompetent as the existing volunteer developers.
> And I don't take moral lesson from an hypocrit who feels like they can demand work from "toxic" volunteers and even state that they are not there to do any actual work.
There are so many (passive-)aggressive comments in that discussion. This is the primary reason why I never get involved with open source projects any more. The discussions are so toxic. I always wind up feeling terrible about myself after "trying to help" an open source project by reporting bugs or submitting patches to fix bugs.