ytdl_hook: can't play videos from Steam store page (no unique URLs)
Open
Nobody has claimed this yet.
scripting:ytdl-hook
- Dominant language
- C
- Stars
- 37k
- Forks
- 3.5k
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 22
Description
mpv Information
mpv v0.40.0-287-g194ce88ac Copyright © 2000-2025 mpv/MPlayer/mplayer2 projects
libplacebo version: v7.351.0
FFmpeg version: 7.1.1
FFmpeg library versions:
libavcodec 61.19.101
libavdevice 61.3.100
libavfilter 10.4.100
libavformat 61.7.100
libavutil 59.39.100
libswresample 5.3.100
libswscale 8.3.100
Other Information
- Linux version: Gentoo
- Kernel Version: 6.12.42
- GPU Model: Advanced Micro Devices, Inc. [AMD/ATI] [1002:7550]
- Mesa/GPU Driver Version: Mesa 25.3.0-devel (git-cc0dc4b566)
- Window Manager and Version: https://github.com/conformal/spectrwm/commit/5dcffa21804f9cebc857d2a6931c2bd6f7380139
- yt-dlp version: https://github.com/yt-dlp/yt-dlp/commit/526410b4af9c1ca73aa3503cdaf4d32e42308fd6
- Source of mpv: Official Gentoo ebuild.
- Latest known working version: N/A
- Issue started after the following happened:
After yt-dlp fixed steam urls (https://github.com/yt-dlp/yt-dlp/pull/14008)
I noticed some steam pages cause lau to crash.
Using yt-dlp to download the videos without mpv does work.
Reproduction Steps
\mpv --no-config --log-file=/tmp/output.txt https://store.steampowered.com/app/2581410/Stygian_Outer_Gods/
Expected Behavior
It should play the 5 videos on the page.
Actual Behavior
[ytdl_hook]
[ytdl_hook] stack traceback:
[ytdl_hook] @ytdl_hook.lua:1191: in function 'on_load_hook'
[ytdl_hook] @ytdl_hook.lua:1195: in function 'fn'
[ytdl_hook] mp.defaults:609: in function 'handler'
[ytdl_hook] mp.defaults:522: in function 'call_event_handlers'
[ytdl_hook] mp.defaults:564: in function 'dispatch_events'
[ytdl_hook] mp.defaults:515: in function <mp.defaults:514>
[ytdl_hook] [C]: at 0x558419f8a430
[ytdl_hook] [C]: at 0x558419f88850
[ytdl_hook] Lua error: @ytdl_hook.lua:1143: attempt to index local 'site' (a nil value)
client removed during hook handling
Failed to recognize file format.
Exiting... (Errors when loading file)
Log File
Sample Files
Two example links:
https://store.steampowered.com/app/2581410/Stygian_Outer_Gods/
https://store.steampowered.com/app/2108180/Swordhaven_Iron_Conspiracy/
I carefully read all instruction and confirm that I did the following:
- I tested with the latest mpv version to validate that the issue is not already fixed.
- I provided all required information including system and mpv version.
- I produced the log file with the exact same set of files, parameters, and conditions used in "Reproduction Steps", with the addition of
--log-file=output.txt. - I produced the log file while the behaviors described in "Actual Behavior" were actively observed.
- I attached the full, untruncated log file.
- I attached the backtrace in the case of a crash.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure with the two Steam store URLs and the provided mpv command, then inspect ytdl_hook.lua around lines 1143, 1191, and 1195 using output.txt for context. The fix is complete when these pages no longer trigger the nil-site Lua error and all five videos can be played.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua, python
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100