[MacPorts] #55533: mpv @0.26: can't playback youtube playlist (was: mpv(0.26 at yosemite): can't playback youtube playlist)
MacPorts
noreply at macports.org
Sun Dec 17 00:12:07 UTC 2017
#55533: mpv @0.26: can't playback youtube playlist
----------------------+----------------------
Reporter: mrkapqa | Owner: Ionic
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.4.2
Resolution: | Keywords:
Port: mpv |
----------------------+----------------------
Changes (by ryandesign):
* status: new => assigned
* owner: => Ionic
* keywords: mpv yosemite youtube-dl =>
* type: enhancement => defect
Old description:
> 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.
New description:
{{{
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.
}}}
--
Comment:
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.
--
Ticket URL: <https://trac.macports.org/ticket/55533#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list