6 ms·
My favorite feature is "video-sync=display-resample". This gives you perfect frame pacing by synchronizing the video to vertical refresh and resampling the audi
by mrob 4y ago
My 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.
- neurostimulant 4y agoAmazing! I tried it with a 360p video and scaling the player window to 1080p and it's looking sharp. The original looks blurry when you scale the window to 1080p.
- nyanpasu64 4y agoOne of my least favorite features of VLC (tied with network stream interruptions killing the playback rather than reconnecting) is that VLC guesses your audio hardware's sampling rate itself (rather than using the hardware's self-reported rate), and resamples even audio-only files that match your hardware's self-reported rate. And every time you seek in a file, VLC's guess of the hardware sampling rate is thrown off, causing VLC to start pitch-shifting the sound just enough (usually just barely, but sometimes up to 1 semitone) for you to notice and start doubting your sanity, if the audio pitch actually changed or if you're hallucinating things. There's a long-running bug report at https://code.videolan.org/videolan/vlc/-/issues/14287 https://code.videolan.org/videolan/vlc/-/issues/14287. 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.
- vjerancrnjak 4y agoExactly the same thing happens with mpv if you shift the audio manually. I experienced that recently. After shifting, whenever I go forward or backward it gets out of sync + the performance decreases ( without the shift going forward or backwards is instant)
- 867-5309 4y agoI have experienced this with IPTV on Kodi, but I've only ever noticed it on the BBC News countdown tune, sining a semitone up and down. AFAIK that's using ffmpeg
- n4bz0r 4y ago> tied with network stream interruptions killing the playback rather than reconnecting 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.
- UnlockedSecrets 4y agoNice! Is there any similarly good filter out there for frame interpolation? I love smooth videos just havent had the time to look around too much.
- 5e92cb50239222b 4y agoHave you tried the built-in one? 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.
- UnlockedSecrets 4y agoUnfortunately this is not quite the same thing, It just plays around with how the existing frames are displayed instead of generating new ones based on the motion vectors in video files. It is best described by MPV's documentation at https://github.com/mpv-player/mpv/wiki/Interpolation https://github.com/mpv-player/mpv/wiki/Interpolation
- tricot 4y agoI use this one: https://www.svp-team.com/ https://www.svp-team.com/
- loeg 4y agoHow much does it have to adjust playback speed to get frames to an even multiple of refresh rate? Like 2%, or 20? This feature isn't for me -- I'm a big fan of the +/- 10% playback speed '['/']' buttons -- but it sounds neat.
- mrob 4y agoBy default, it only makes very small changes. See the "video-sync-max-video-change" setting.
- KennyBlanken 4y agoThe display sync resampling is amazing. 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.
- astrange 4y agoComputer monitors (60fps) can’t play anime at a constant framerate (24fps). Computer monitors aren’t TVs.
- KennyBlanken 4y agoComputer monitors are not all 60hz, and I cited anime as one example; TV and movies also have jerky playback. 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.
- astrange 4y ago> Computer monitors are not all 60hz, and I cited anime as one example; TV and movies also have jerky playback. 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?
- wodenokoto 4y ago> My favorite feature is "video-sync=display-resample". This gives you perfect frame pacing by synchronizing the video to vertical refresh … Does that mean video in 23.976 frames per second will be sped up and play at 30?
- ac29 4y agoNo.
- mrob 4y agoYou can force it to do that if you really want to, but by default it will speed it up to 24.00fps and play it alternating between 2 and 3 screen refreshes for each frame (i.e. 3:2 pulldown without the interlacing).
- wodenokoto 4y agoI have no idea why I wrote 30, when I was thinking 24. Thank you for the answering the question I didn’t manage to pose!
- account42 4y agoIs there any way to make it work with adaptive refresh to play the video at exactly its native speed and adjust the display refresh rate instead? Or should that just work automatically?
- mrob 4y agoVRR support for MPV is disabled by default in /usr/share/drirc.d/00-mesa-defaults.conf. I am not sure why, because it works for me if enabled. Just fullscreen MPV and it will change the display refresh rate. This requires VRR enabled in both Xorg and your monitor's settings. I have not tried this with Wayland.
- FrostKiwi 4y agoNo, I forget what the exact limit is, but it does change the speed more than ~0.5%. So going from 59.97 to 60 or vice versa, but not 24 to 30 or 50 to 60. 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.
- willis936 4y agoIn my experience with Reclock's interface: it does track CPU clock drift.
- zbuf 4y agoAgree here. mpv plays for hours without a single frame upset. 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.
- matheusmoreira 4y agoDoes mpv's resampling have anything to do with RetroArch's dynamic rate control? I remember reading something to that effect years ago. https://github.com/libretro/docs/blob/master/archive/ratecontrol.pdf https://github.com/libretro/docs/blob/master/archive/ratecon...
- mrob 4y agoYes, it's essentially the same thing.
- cypress66 4y agoI have a freesync 165hz display. What is the best mpv setting? In theory it should be possible to perfectly show video on my monitor without any stretching or pacing problems.
- shmerl 4y agoShouldn't display adaptive sync work better for syncing to video framerate though? Trying to resample the video to display refresh rate instead sounds like a worse approach.
- mrob 4y agoIf VRR works well with your hardware then it is probably a better option. You can edit /usr/share/drirc.d/00-mesa-defaults.conf to enable VRR with MPV.
- shmerl 4y agoYeah, I noticed that mpv already uses it in the KDE Wayland session somehow, disregarding Mesa settings. Also, wasn't there some new VESA standard specifically for video (as an addition to regular adaptive sync)? MediaSync? https://www.adaptivesync.org https://www.adaptivesync.org Not sure what it's supposed to mean though.