(Go: >> BACK << -|- >> HOME <<)

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

auto profile & ytdl-format= have race condition with try_ytdl_first=yes #13515

Open
test482 opened this issue Feb 19, 2024 · 0 comments
Open

Comments

@test482
Copy link
test482 commented Feb 19, 2024

Important Information

Provide following Information:

  • mpv version
extra/mpv 1:0.37.0-2 [installed]
    a free, open source, and cross-platform media player
  • Platform and Version

    Arch Linux

  • Possible screenshot or video of visual glitches

script-opts=ytdl_hook-try_ytdl_first=yes

script-opts=ytdl_hook-try_ytdl_first=no

Reproduction steps

$ la -T ~/.config/mpv/
drwxr-xr-x   - eliot 02-19 17:43 /home/eliot/.config/mpv
.rw-r--r-- 452 eliot 02-19 17:52 └── mpv.conf

$ cat mpv.conf
[default]
volume=60

# yt-dlp
script-opts=ytdl_hook-ytdl_path=yt-dlp
script-opts=ytdl_hook-try_ytdl_first=yes

[twitch-live]
profile-desc=twitch live videos
profile-cond=path:match("https://www.twitch.tv/")~=nil
profile-restore=copy
ytdl-format=bestvideo*[height<=?720]+bestaudio/best
# https://github.com/streamlink/streamlink-twitch-gui/wiki/Recommendations#player-configuration
loop-playlist=inf
loop-file=inf
cache=yes
demuxer-max-back-bytes=1800M

$ yt-dlp --list-formats 'https://www.twitch.tv/olofmeister'
[twitch:stream] Extracting URL: https://www.twitch.tv/olofmeister
[twitch:stream] olofmeister: Downloading stream GraphQL
[twitch:stream] olofmeister: Downloading stream access token GraphQL
[twitch:stream] 41905731864: Downloading m3u8 information
[info] Available formats for 41905731864:
ID               EXT RESOLUTION FPS │   TBR PROTO │ VCODEC      ACODEC      ABR
───────────────────────────────────────────────────────────────────────────────
audio_only       mp4 audio only     │ 1438k m3u8  │ audio only  mp4a.40.2 1438k
160p             mp4 284x160     30 │  230k m3u8  │ avc1.4D401F mp4a.40.2
360p             mp4 640x360     30 │  630k m3u8  │ avc1.4D401F mp4a.40.2
480p             mp4 852x480     30 │ 2770k m3u8  │ avc1.4D401F mp4a.40.2
720p             mp4 1280x720    30 │ 3715k m3u8  │ avc1.4D401F mp4a.40.2
720p60           mp4 1280x720    60 │ 4765k m3u8  │ avc1.4D401F mp4a.40.2
1080p60__source_ mp4 1920x1080   60 │ 3021k m3u8  │ avc1.64002A mp4a.40.2

$ mpv 'https://www.twitch.tv/olofmeister'

got 1080p 60fps video here.

$ # change `script-opts=ytdl_hook-try_ytdl_first=yes` to `no`

$ mpv 'https://www.twitch.tv/olofmeister'

got 720p 60fps video here.

Expected behavior

got 720p 60fps stream with auto profile and try_ytdl_first=yes.

Actual behavior

auto profile and try_ytdl_first=yes will compete, ytdl-format= option in twitch-live profile not working.

Log file

--msg-level=ytdl_hook=debug

ytdl-first-yes.log

ytdl-first-no.log

@test482 test482 changed the title auto profile & ytdl-format= have compete with try_ytdl_first=yes auto profile & ytdl-format= have race condition with try_ytdl_first=yes Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant