mpv icon indicating copy to clipboard operation
mpv copied to clipboard

Video play becomes very lag when OSC shows up on OSX

Open hkenneth opened this issue 12 years ago • 11 comments

I'm using ChrisK's latest build on OSX 10.9.3. I use Nvidia Web Driver instead of the vanilla OSX driver. Video play becomes really lag when OSC shows up. I got the following in Terminal:

[stream] Video (+) --vid=1 (h264) [stream] Audio (+) --aid=1 --alang=eng () (dts) [stream] Subs (+) --sid=1 --slang=eng () (subrip) AO: [coreaudio] 48000Hz stereo 2ch float AV: 00:00:00 / 00:57:36 (0%) A-V: 0.000 VO: [opengl] 1280x720 => 1280x720 yuv420p AV: 00:00:05 / 00:57:36 (0%) A-V: 2.789 Late: 51

       *************************************************
       **** Audio/Video desynchronisation detected! ****
       *************************************************

This means either the audio or the video is played too slowly. Possible reasons, problems, workarounds:

  • Your system is simply too slow for this file. Transcode it to a lower bitrate file with tools like HandBrake.
  • Broken/buggy audio driver. Experiment with different values for --autosync, 30 is a good start. If you have PulseAudio, try --ao=alsa .
  • Slow video output. Try a different --vo driver (--vo=help for a list) or try --framedrop!
  • Playing a video file with --vo=opengl with higher FPS than the monitor. This is due to vsync limiting the framerate.
  • Playing from a slow network source. Download the file instead.
  • Try to find out whether audio/video/subs are causing this by experimenting with --no-video, --no-audio, or --no-sub.
  • If you swiched audio or video tracks, try seeking to force synchronization. If none of this helps you, file a bug report.

hkenneth avatar Jul 02 '14 22:07 hkenneth

very lag, such desync, wow

Anyway, I think we need a bit more info. We recently discovered that very odd characters in the file title (which is displayed at the top of the OSC) may cause lag.

Does this happen with all files or just specific ones? Anything odd in your config?

ChrisK2 avatar Jul 02 '14 22:07 ChrisK2

In fact, I found that no text is displayed in OSC. Neither does OSD show any text.

screen shot 2014-07-02 at 5 36 39 pm

hkenneth avatar Jul 02 '14 22:07 hkenneth

To my surprise, after I manually defined OSD font, the issue disappears. I guess it may link to the default OSD font settings?

sub-text-font = 'Myriad Pro' osd-font = 'Myriad Pro'

Instead I got following error in Terminal:

[osd/libass] Error opening font: '/Library/Fonts/MyriadPro-Regular.otf', 1 [osd/libass] Error opening font: '/Library/Fonts/MyriadPro-Regular.otf', 1

As showed above, same font is used for sub-text, but no error for sub.

hkenneth avatar Jul 02 '14 22:07 hkenneth

Is this with libass-ct or vanilla libass?

ghost avatar Jul 02 '14 22:07 ghost

I don't know which one ChrisK used

hkenneth avatar Jul 02 '14 22:07 hkenneth

libass-ct For me it just falls back to Arial though.

ChrisK2 avatar Jul 02 '14 22:07 ChrisK2

So I guess libass-ct doesn't handle fallback to font families correctly? (Or whatever generic names like Sans are called in fontconfig terminology.)

ghost avatar Jul 02 '14 22:07 ghost

Well, because I prefer Helvetica to Arial, I disabled Arial on OSX so that websites would use Helvetica instead... So basically no Arial in my system would be found. Could this be the reason for the issue? (I think Helvetica or Lucida Sans should be the default font family on OSX)

hkenneth avatar Jul 02 '14 23:07 hkenneth

Potentially. @pigoz should know.

ghost avatar Jul 02 '14 23:07 ghost

Potentially. @pigoz should know.

Yeah it is known. It's one of the merge blockers of the fonts branch. Thanks for ping though.

pigoz avatar Jul 03 '14 05:07 pigoz

Duplicate of: https://github.com/libass/libass/issues/186

ghost avatar Jul 18 '15 13:07 ghost