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

Thumbnailing failed on some youtube DASH videos #8

Closed
zaza42 opened this issue Dec 19, 2017 · 8 comments
Closed

Thumbnailing failed on some youtube DASH videos #8

zaza42 opened this issue Dec 19, 2017 · 8 comments

Comments

@zaza42
Copy link

zaza42 commented Dec 19, 2017

When mpv opens DASH and audio streams separately or only the DASH stream, thumbnailing is failed with this message:

$ mpv --ytdl-format=135 https://www.youtube.com/watch?v=oM36vTQOkP0
Playing: https://www.youtube.com/watch?v=oM36vTQOkP0
 (+) Video --vid=1 (*) (h264 642x480)
VO: [opengl] 642x480 yuv420p
V: 00:00:00 / 00:19:26 (0%) DS: 2.500/0 Cache:  4s
[mpv_thumbnail_script_client_osc] Creating /dev/shm/DC-1_runtime/cache/mpv_thumbnails/watchvoM36vTQOkP0-0 
V: 00:00:00 / 00:19:26 (0%) DS: 2.333/0 Cache:  4s
[mpv_thumbnail_script_server] Thumbnailing command failed! 
[mpv_thumbnail_script_server] init 
[mpv_thumbnail_script_server]  
[mpv_thumbnail_script_server] Debug log: /dev/shm/DC-1_runtime/cache/mpv_thumbnails/watchvoM36vTQOkP0-0/000000.bgra.log 
[mpv_thumbnail_script_server] Output file missing! /dev/shm/DC-1_runtime/cache/mpv_thumbnails/watchvoM36vTQOkP0-0/000000.bgra 

The log file is completely missing. When using --ytdl-format=18 the thumbnailing is ok.

Not all videos are failing, but I can't see the differences between them. For example this works:

$ mpv --ytdl-format=135 https://www.youtube.com/watch?v=7rG7wPCcxmw                                                                                                    
Playing: https://www.youtube.com/watch?v=7rG7wPCcxmw
 (+) Video --vid=1 (*) (h264 854x480 25.000fps)
 (+) Subs  --sid=1 --slang=en 'vtt' (webvtt) (external)
VO: [opengl] 854x480 yuv420p
V: 00:00:00 / 00:11:22 (0%) DS: 2.500/0 Cache:  9s+0KB
[mpv_thumbnail_script_client_osc] Creating /dev/shm/DC-1_runtime/cache/mpv_thumbnails/watchv7rG7wPCcxmw-0 
V: 00:00:08 / 00:11:22 (1%) DS: 2.400/1 Cache: 80s+21MB

@TheAMM
Copy link
Owner

TheAMM commented Dec 19, 2017

oM36vTQOkP0 creates an edl:// (a... virtual file which can join several sources together) way too long to pass in a command line argument. I get 145451 bytes of it. 7rG7wPCcxmw is reasonably sized.

@TheAMM
Copy link
Owner

TheAMM commented Dec 19, 2017

Hmh. I thought I could use a playlist to bypass the limit but mpv can only handle lines up to 8K characters long.
Sadly I'll have to allow mpv pass the original url through ytdl again. It'll really slow down the process, but eh.

@TheAMM
Copy link
Owner

TheAMM commented Dec 19, 2017

Fixed in 40cadfc.

@TheAMM TheAMM closed this as completed Dec 19, 2017
@zaza42
Copy link
Author

zaza42 commented Dec 20, 2017

Thx for the fast response again!

@zaza42
Copy link
Author

zaza42 commented Dec 20, 2017

Hmm... Have you looked at the -a parameter of youtube-dl?

       -a, --batch-file FILE
              File containing URLs to download ('-' for stdin)

You can pass the url from file or stdin, and it doesn't have length limit.

@TheAMM
Copy link
Owner

TheAMM commented Dec 20, 2017

The edl:// is not for youtube-dl, it's for mpv. I don't call ytdl itself ever, and even if stdin was the solution, it's not because it's a pain to try to pipe stuff in a cross-platform manner (because mpv doesn't open a shell).

The real solution is to have a script setup a pre-hook and let the script read the playlist with no character limits, but that's not a clean solution yet (workers should not pre-hook because there can be multiple, and the osc-client pre-hooking feels wrong and having a third script just to pre-hook the playlist is stupid).

@zaza42
Copy link
Author

zaza42 commented Dec 20, 2017

or you can make a patch for mpv, or ask for a feature/changing in code.

@TheAMM
Copy link
Owner

TheAMM commented Dec 20, 2017

150 kilobytes of a media path is ridiculous. It's not fair to expect mpv to parse playlist entries that long, and I have features I'd already want in that they're not really interested in - a patch to read up to and over 150 kilobyte lines would be scoffed at - there's just no reason to expect entries that long, especially so since this can be fixed with the hook script.
Plus then the functionality of the script would depend on the mpv version. Not all users have a cronjob for daily mpv-build sessions.

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

2 participants