Topic: SVP 4 Mac audio-video desync issue

I purchased SVP 4 Mac few days ago and been trying to make it work for me but I'm having issues with audio-video desync in mpv. Anytime I seek forwards or backwards in the video, the A/V is synced perfectly but over time gets desynchronized no matter the options I tried.

The only configuration I changed in SVP 4 Control Panel is following:

  • Frame rate conversion fixed to 60 FPS

  • Quality slider moved all the way to the right towards quality, but tried lower quality as well with same results

  • Optimized for animation

  • Low artifacts masking

When it comes to hardware and software, I'm running SVP on this machine:

  • iMac (27-inch, Late 2012)

  • 3,4 GHz Intel Core i7

  • 8 GB 1600 MHz DDR3

  • NVIDIA GeForce GTX 680MX 2048 MB

  • macOS 10.12.2

  • /usr/local/Cellar/mpv/0.23.0_2 (61 files, 33.5M) * Built from source on 2017-01-10 at 23:22:21 with: --with-bundle --with-vapoursynth

  • /usr/local/Cellar/vapoursynth/35_1 (22 files, 2.8M) * Poured from bottle on 2017-01-10 at 22:19:31

  • /usr/local/Cellar/mvtools/HEAD-a2f5607_1 (4 files, 659.3K) * Built from source on 2017-01-10 at 22:19:30

So a fairly beefy machine that should be able to handle SVP – I mean, before purchasing SVP I was running custom Vapoursynth script without any issues and that one didn't use GPU acceleration (obviously). I should mention that this issue occurs not only with 1080p videos but also with 720p (neither of them are Hi10P). I obviously shouldn't link the video that was giving me hard time but let's say it was 720p rip of eighth episode of Kono Subarashii Sekai ni Shukufuku wo! and for some reason the filename also contained string “HorribleSubs”. Wink wink.

Finally, when it comes to mpv.conf, I started with minimalistic config file found on Wiki (input-ipc-server=/tmp/mpvsocket hwdec-codecs=all hwdec=auto-copy) all the way to this monstrosity:

input-ipc-server=/tmp/mpvsocket
hwdec-codecs=all
hwdec=auto-copy
vo=opengl
opengl-pbo
dscale=mitchell
correct-downscaling
sigmoid-upscaling
icc-profile-auto
icc-contrast=1000
tscale=catmull_rom
dither-depth=auto
blend-subtitles=yes
video-sync=display-resample
video-sync-max-video-change=10
autosync=30
border=no
osd-font='Helvetica Neue'
idle=yes
keep-open=always
ytdl-format=128+bestaudio/266+bestaudio/264+bestaudio/299+bestaudio/137+bestaudio/298+bestaudio/22/135+bestaudio/18/best
sub-codepage=cp1250
slang=enUS,en,eng,csCZ,cs
alang=jp,jpn,enUS,en,eng,csCZ,cs

At the end (starting with border=no) is my old configuration file, everything above that is something I found here on the forums and decided to try but to no avail. Tried different values for video-sync, nada.

Oh, one more thing: this is how the performance monitor looked like during playback and this is the last line in mpv's console after 3.5 minutes of playback: “(Paused) AV: 00:03:25 / 00:23:40 (14%) A-V: -0.000 DS: 1.000/0”. If I understand things correctly (not sure!), based on the A-V value mpv things audio and video are perfectly in sync when in reality, audio is delayed by roughly two seconds at this point!

If I can provide you with any other data necessary for debugging and solving this, please let me know. I really want to have this issue resolved, can't live without my 60 FPS videos anymore smile

Re: SVP 4 Mac audio-video desync issue

http://www.svp-team.com/forum/viewtopic … 884#p62884
http://www.svp-team.com/forum/viewtopic … 006#p63006

Your MVTools script most probably worked because you hardcoded the FPS. You could do this here as well.

Re: SVP 4 Mac audio-video desync issue

Aha! Thank you so much, I actually didn't hardcore the FPS into my MVTools script either, but then again the same script had the same issue on this particular video as well. Meaning I probably didn't have to purchase SVP at all, haha tongue Ah well, I'll keep my SVP license as I plan to sell my iMac in the near future and while my MVTools script has no chance of ever working on my MacBook Air, maybe SVP will yield better results.

Anyhow, the automatic fix from this particular post worked well for me. Thanks again! I didn't think it would be an issue with the media file, I just assumed my installation and configuration was wrong.

4 (edited by Cellane 14-01-2017 19:59:14)

Re: SVP 4 Mac audio-video desync issue

Gosh darn, now another issue popped up. mpv seems to be perfectly fine when playing videos in windowed mode but as soon as I switch to full screen, massive frame drops, stuttering and instant A-V desync happens after a second or two. If I had to guess the cause, it would be this: when I toggle the Stats Lua script to see the Display FPS, in windowed mode both the specified and estimated values are really close to 60 FPS. However, as soon as I go to full screen mode, the estimated value drops to 38-46 FPS while the specified still remains at 59.940. Could this be an issue? If so, how would I go about fixing it?

When looked at mpv manual, I see few interesting mentions. For example, “estimated-display-fps: Only available if display-sync mode (as selected by --video-sync) is active.” and “display-fps: On multi-monitor systems, there is a chance that the detected value is from the wrong monitor.”. Overriding display-fps in config file didn't help unfortunately and what's worse, turning video-sync off didn't help either. Tried to focus my search on the forums in this particular direction but didn't find anything relevant unfortunately.

Edit: aaand solved as well. Apparently something on my system doesn't play well with mpv-Change-OSD-Media-Title Lua script. The old “remove everything and start from scratch” method helped me this time smile

5 (edited by Faitheorg 27-04-2017 03:40:50)

Re: SVP 4 Mac audio-video desync issue

As for the  audio-video desync issue. I think you might as well use some kind of third-class video and audio converter. I also met similar problems months ago and format factory did help me a lot.

Re: SVP 4 Mac audio-video desync issue

Faitheorg wrote:

I think you might as well use some kind of third-class video and audio converter.

You don't even need to convert anything. In case of the wrong-FPS problem we are really just talking about a different number somewhere in the video's metadata. As metadata editors for various video containers are scarce, simply remuxing it will solve the problem as well (and is as fast as simply copying the file).