Opened 7 years ago

Last modified 4 years ago

#55533 closed defect

mpv @0.26: can't playback youtube playlist — at Version 1

Reported by: mrkapqa Owned by: Ionic (Mihai Moldovan)
Priority: Normal Milestone:
Component: ports Version: 2.4.2
Keywords: Cc:
Port: mpv

Description (last modified by ryandesign (Ryan Carsten Schmidt))

richs-Mac-mini:~ rich$ mpv --version
mpv 0.26.0 (C) 2000-2017 mpv/MPlayer/mplayer2 projects
 built on Sat Dec 16 21:56:17 CET 2017
ffmpeg library versions:
   libavutil       55.78.100
   libavcodec      57.107.100
   libavformat     57.83.100
   libswscale      4.8.100
   libavfilter     6.107.100
   libswresample   2.9.100
ffmpeg version: 3.4.1

built on yosemite 10.10 with youtube-dl installed with

sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl
sudo chmod a+rx /usr/local/bin/youtube-dl

can' playback youtube playlist

eg.

mpv https://www.youtube.com/watch?v=Vn7kB0f16jg&list=PL-2mqY82TEri1eOFZmhfwuLxX11V1TkcI

[1] 12138
richs-Mac-mini:~ rich$ Playing: https://www.youtube.com/watch?v=Vn7kB0f16jg
[ytdl_hook] 
[ytdl_hook] stack traceback:
[ytdl_hook] 	[C]: in function 'len'
[ytdl_hook] 	@ytdl_hook.lua:71: in function 'edl_escape'
[ytdl_hook] 	@ytdl_hook.lua:139: in function 'edl_track_joined'
[ytdl_hook] 	@ytdl_hook.lua:171: in function 'add_single_video'
[ytdl_hook] 	@ytdl_hook.lua:454: in function 'fn'
[ytdl_hook] 	mp.defaults:518: in function 'handler'
[ytdl_hook] 	mp.defaults:339: in function 'handler'
[ytdl_hook] 	mp.defaults:458: in function 'call_event_handlers'
[ytdl_hook] 	mp.defaults:495: in function 'dispatch_events'
[ytdl_hook] 	mp.defaults:451: in function <mp.defaults:450>
[ytdl_hook] 	[C]: in ?
[ytdl_hook] 	[C]: in ?
[ytdl_hook] Lua error: @ytdl_hook.lua:71: bad argument #1 to 'len' (string expected, got nil)
[ffmpeg] tls: IO Error: -9806
Failed to recognize file format.

Change History (1)

comment:1 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)
Keywords: mpv yosemite youtube-dl removed
Owner: set to Ionic
Status: newassigned
Summary: mpv(0.26@yosemite): can't playback youtube playlistmpv @0.26: can't playback youtube playlist
Type: enhancementdefect

I don't know if this is the entire reason why it fails for you, but it looks like you forgot to escape special characters from the shell. Specifically, the & in the URL is a special character to the shell: it means "run the preceding command in the background instead of the foreground." Which means that you ran the command mpv https://www.youtube.com/watch?v=Vn7kB0f16jg in the background (which, as shown in your output, was assigned the process id 12138), and the command list=PL-2mqY82TEri1eOFZmhfwuLxX11V1TkcI in the foreground, which isn't what you meant to do.

Enclose the URL in quotes so that the shell doesn't interpret the & in a special way:

mpv 'https://www.youtube.com/watch?v=Vn7kB0f16jg&list=PL-2mqY82TEri1eOFZmhfwuLxX11V1TkcI'

I also wanted to point out that we do have a port for youtube-dl, and that if you installed the mpv port, it already declares a dependency on the youtube-dl port, so you don't need to (and shouldn't) install youtube-dl manually in /usr/local since MacPorts already installed it for you in /opt/local.

Note: See TracTickets for help on using tickets.