vitorgalvao / alfred-workflows

Collection of Alfred workflows
BSD 3-Clause "New" or "Revised" License
2.44k stars 167 forks source link

Short Films not working any more? #39

Closed gbstan closed 7 years ago

gbstan commented 7 years ago

Hi Vitor,

Recently I have noticed that short films is not working for me anymore. I have the latest version of short films and also the latest versions of youtube-dl and mpv from brew (brew directly, not brew cask).

When a short film is selected in Alfred mpv opens briefly and then closes. I have the impression that the issue comes from youtube-dl somehow not passing information properly to mpv internally. Note that when I execute on the command line:

open -a mpv youtube_address

this works perfectly.

Any idea how to fix this? Do you have the same issue with the latest versions of your installed brews (youtube-dl, mpv)?

Guy

gbstan commented 7 years ago

I have looked into this a bit more. When I copy the link of any of the short films from invoking shorts and pressing CTRL+ENTER, and then launch in a terminal mpv link_address, this is what I get:

mpv https://player.vimeo.com/video/150608819 Playing: https://player.vimeo.com/video/150608819 [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 [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) Failed to recognize file format.

Exiting... (Errors when loading file)

gbstan commented 7 years ago

Seems to be linked to this issue with youtube-dl for the moment: https://github.com/mpv-player/mpv/issues/4728#issuecomment-320725058

vitorgalvao commented 7 years ago

My setup is the same as yours, and I had noticed this problem before and also found that issue from mpv’s repo. As you’ve noticed, the issue is not related to the Workflow, so there’s not much I can do to fix it.

Videos from the website ShortFilms queries are mostly vimeo, and I also cannot get mpv {{vimeo_link}} to work, so we’ll need to wait for them to fix it, unfortunately. It’s a bit of a pain, since even the HEAD version of mpv seems to not have fixed it yet.

In the meantime what I’ve been doing is on the videos, to download with DownVid and then play with WatchList.

gbstan commented 7 years ago

Thank you Vitor!

vitorgalvao commented 7 years ago

Forgot to mention before: thank you for the detailed bug report!

gbstan commented 7 years ago

My pleasure. This is the least I can do to help figure out what the problem is.

gbstan commented 7 years ago

Looks like the new version of youtube-dl on brew released today has fixed the problem.

gbstan commented 7 years ago

Actually, it has solved some problems but not all: playlists in youtube now work but not vimeo videos typically used on short films.

gbstan commented 7 years ago

I have filed a bug report on the mpv channel of GitHub: https://github.com/mpv-player/mpv/issues/4827

mc4man commented 7 years ago

If you were to be using the latest youtube-dl there is no issue with mpv (- certainly any youtube-dl from 2017.08.23 on..

gbstan commented 7 years ago

I am actually using the very latest version of youtube-dl from brew (installed today) and I still have the issue!

gbstan commented 7 years ago

Just to be clear and complete, I have the latest version of youtube-dl installed: 2017.09.02

vitorgalvao commented 7 years ago

Fixed in https://github.com/mpv-player/mpv/commit/d280b3db930eadb49646eac2b523adee5ced58a3.