mpv-player / mpv

🎥 Command line video player
https://mpv.io
Other
28.22k stars 2.89k forks source link

Reddit Embeds: De-Synced Audio/Video on 360p. #9710

Closed MintMain21 closed 2 years ago

MintMain21 commented 2 years ago

Important Information

Provide following Information:

If you're not using git master or the latest release, update. Releases are listed here: https://github.com/mpv-player/mpv/releases

Reproduction steps

Step 1. Set either -S res:360 in yt-dlp.conf or --ytdl-raw-options=format-sort=res:360 in mpv.conf. When either option is set, mpv will deliberately prioritize playing 360p content on every site instead of the default "best" option. On virtually every site this works without problem, but on reddit, when videos are embedded from the site itself, this quality choice results in audio that's de-synced from the video. So, the audio start at 2 seconds when the video starts at 0 seconds. Example: https://www.reddit.com/r/marvelstudios/comments/s3c1q6/this_is_one_of_my_favorite_quotes_from_the_mcu/ This is exclusive to the 360p stream, as the audio/video is appropriately synced in the 720p variant (which is what is summoned by res:720, res:480, etc).

Expected behavior

Audio and Video should be appropriately synced, no matter the quality.

Actual behavior

audio/video is de-synced in the 360p stream. This is only when streaming with MPV's latest version distributed via flatpak.

Log file

[cplayer] Command line options: '--player-operation-mode=pseudo-gui' '-v' '-v' 'https://www.reddit.com/r/marvelstudios/comments/s3c1q6/this_is_one_of_my_favorite_quotes_from_the_mcu/' [cplayer] mpv 0.34.1 Copyright © 2000-2021 mpv/MPlayer/mplayer2 projects [cplayer] built on UNKNOWN [cplayer] FFmpeg library versions: [cplayer] libavutil 56.70.100 [cplayer] libavcodec 58.134.100 [cplayer] libavformat 58.76.100 [cplayer] libswscale 5.9.100 [cplayer] libavfilter 7.110.100 [cplayer] libswresample 3.9.100 [cplayer] FFmpeg version: 4.4 [cplayer] [cplayer] Configuration: waf configure --prefix=/app --enable-libmpv-shared --disable-build-date --disable-manpage-build --disable-alsa --enable-sdl2 --enable-libarchive --enable-dvbin --enable-cdda --enable-dvdnav --enable-shaderc --enable-vulkan [cplayer] List of enabled features: asm cdda cplayer cplugins cuda-hwaccel cuda-interop debug-build drm dvbin dvdnav egl egl-drm egl-helpers egl-x11 ffmpeg ffmpeg-aviocontext-bytes-read ffnvcodec gbm gbm.h gl gl-wayland glibc-thread-name glob glob-posix gpl iconv jack javascript jpeg lcms2 libarchive libass libavdevice libbluray libdl libm libmpv-shared libplacebo librt linux-fstatfs linux-input-event-codes lua luajit memfd_create optimize plain-gl posix posix-or-mingw pthreads pulse rubberband sdl2 sdl2-audio sdl2-gamepad sdl2-video shaderc shaderc-shared sixel stdatomic uchardet vaapi vaapi-drm vaapi-egl vaapi-vulkan vaapi-wayland vaapi-x-egl vaapi-x11 vapoursynth vdpau vector vt.h vulkan wayland wayland-protocols x11 xv zimg zlib [global] config path: '' -> '/home/michael/.var/app/io.mpv.Mpv/config/mpv' [global] user path: '~~home/' -> '/home/michael/.var/app/io.mpv.Mpv/config/mpv' [global] user path: '~~old_home/' -> '/home/michael/.mpv' [global] config path: 'encoding-profiles.conf' -/-> '/home/michael/.var/app/io.mpv.Mpv/config/mpv/encoding-profiles.conf' [global] config path: 'encoding-profiles.conf' -/-> '/home/michael/.mpv/encoding-profiles.conf' [global] config path: 'encoding-profiles.conf' -> '/app/etc/mpv/encoding-profiles.conf' [cplayer] Reading config file /app/etc/mpv/encoding-profiles.conf [cplayer] Applying profile 'default'... [global] config path: 'mpv.conf' -> '/home/michael/.var/app/io.mpv.Mpv/config/mpv/mpv.conf' [global] config path: 'config' -/-> '/home/michael/.var/app/io.mpv.Mpv/config/mpv/config' [global] config path: 'mpv.conf' -/-> '/home/michael/.mpv/mpv.conf' [global] config path: 'config' -/-> '/home/michael/.mpv/config' [global] config path: 'mpv.conf' -> '/app/etc/mpv/mpv.conf' [global] config path: 'config' -/-> '/app/etc/mpv/config' [cplayer] Reading config file /app/etc/mpv/mpv.conf [cplayer] Applying profile 'default'... [cplayer] Setting option 'screenshot-directory' = '~/Pictures/mpv' (flags = 4) [cplayer] Reading config file /home/michael/.var/app/io.mpv.Mpv/config/mpv/mpv.conf [cplayer] Applying profile 'default'... [cplayer] Setting option 'autofit-larger' = '60%x50%' (flags = 4) [cplayer] Setting option 'pause' = 'yes' (flags = 4) [cplayer] Setting option 'keep-open' = 'yes' (flags = 4) [cplayer] Setting option 'image-display-duration' = 'inf' (flags = 4) [cplayer] Setting option 'autofit-smaller' = '30%x40%' (flags = 4) [cplayer] Setting option 'ytdl-raw-options' = 'format-sort=res:360' (flags = 4) [cplayer] Setting option 'hwdec' = 'auto-safe' (flags = 4) [cplayer] Setting option 'player-operation-mode' = 'pseudo-gui' (flags = 8) [cplayer] Setting option 'v' = '' (flags = 8) [cplayer] Setting option 'v' = '' (flags = 8) [cplayer] Applying profile 'builtin-pseudo-gui'... [cplayer] Setting option 'terminal' = 'no' (flags = 260) [cplayer] Setting option 'force-window' = 'yes' (flags = 260) [cplayer] Setting option 'idle' = 'once' (flags = 260) [cplayer] Applying profile 'pseudo-gui'... [cplayer] Setting option 'player-operation-mode' = 'pseudo-gui' (flags = 4) [global] config path: 'input.conf' -> '/home/michael/.var/app/io.mpv.Mpv/config/mpv/input.conf' [global] config path: 'input.conf' -/-> '/home/michael/.mpv/input.conf' [global] config path: 'input.conf' -/-> '/app/etc/mpv/input.conf' [global] user path: '/home/michael/.var/app/io.mpv.Mpv/config/mpv/input.conf' -> '/home/michael/.var/app/io.mpv.Mpv/config/mpv/input.conf' [ifo_dvdnav] Opening /home/michael/.var/app/io.mpv.Mpv/config/mpv/input.conf [bdmv/bluray] Opening /home/michael/.var/app/io.mpv.Mpv/config/mpv/input.conf [file] Opening /home/michael/.var/app/io.mpv.Mpv/config/mpv/input.conf [file] resize stream to 131072 bytes, drop 0 bytes [file] Stream opened successfully. [input] Parsing input config file /home/michael/.var/app/io.mpv.Mpv/config/mpv/input.conf [input] Input config file /home/michael/.var/app/io.mpv.Mpv/config/mpv/input.conf parsed: 6 binds Cannot load libcuda.so.1

MintMain21 commented 2 years ago

Additional Info: If I set the default quality to something like 480, and then use the YouTube Formats Plugin to change to 360 mid vid, then the audio/video will be properly synced. The de-syncing only occurs when loading 360p by default.

Dudemanguy commented 2 years ago

Seems like it's just a problem with reddit and there's a reasonable workaround so closing.