Jump to content

Download Media — Download video and audio from web pages


Recommended Posts

8 minutes ago, vitor said:

@roccitman What about notifications? And dvp?

Yeah, just this in dvp...

 

[11:45:14.654] Logging Started...
[11:45:17.472] DownVid[Script Filter] Queuing argument ''
[11:45:17.600] DownVid[Script Filter] Queuing argument ''
[11:45:17.784] DownVid[Script Filter] Script with argv '' finished
[11:45:17.787] DownVid[Script Filter] {"rerun":1,"items":[{"title":"DownVid Progress","subtitle":"ffmpeg There re't y subtites t embe / WATCH - Kellyanne Conway asks White House reporter to reveal his ethnicity.f136.mp4","valid":false,"mods":

It keeps repeating. And no notifications.

 

[Btw, Alfred 4.0.3, macOS Mojave, Safari 12.1.1, and downvid 1.22.9]

 

 

EDITED TO ADD: Just updated to the latest version of the workflow. Things are working better now!

Edited by roccitman
updated to latest version of WF!
Link to comment
9 minutes ago, vitor said:

 

From the dvp report and the lack of notifications, my bet was the download was stuck.

 

Hmm, I get the beginning notification now, but then just this in the dvp

 

[12:11:39.096] Logging Started...
[12:11:50.228] DownVid[Script Filter] Queuing argument ''
[12:11:53.232] DownVid[Script Filter] Script with argv '' finished
[12:11:53.236] DownVid[Script Filter] {"items":[{"uid":"dv","title":"Download Video","subtitle":"Downloads the video to Downloads","arg":"https://www.youtube.com/watch?v=Nmdy_8ovit0 video watchlist_false playlist_false","mods":{"cmd":{"subtitle":"Download full playlist","arg":"https://www.youtube.com/watch?v=Nmdy_8ovit0 video watchlist_false playlist_true"}}},{"uid":"da","title":"Download Audio","subtitle":"Downloads the audio to Downloads","arg":"https://www.youtube.com/watch?v=Nmdy_8ovit0 audio watchlist_false playlist_false","mods":{"cmd":{"subtitle":"Download full playlist","arg":"https://www.youtube.com/watch?v=Nmdy_8ovit0 audio watchlist_false playlist_true"}}}]}
[12:11:55.174] DownVid[Script Filter] Processing complete
[12:11:55.179] DownVid[Script Filter] Passing output 'https://www.youtube.com/watch?v=Nmdy_8ovit0 video watchlist_false playlist_false' to Run Script
[12:12:25.262] DownVid[Script Filter] Queuing argument ''
[12:12:25.466] DownVid[Script Filter] Queuing argument ''
[12:12:25.664] DownVid[Script Filter] Script with argv '' finished
[12:12:25.669] DownVid[Script Filter] {"rerun":1,"items":[{"title":"DownVid Progress","subtitle":"Getting download info…"}]}
[12:12:26.666] DownVid[Script Filter] Queuing argument ''
[12:12:26.835] DownVid[Script Filter] Script with argv '' finished
[12:12:26.841] DownVid[Script Filter] {"rerun":1,"items":[{"title":"DownVid Progress","subtitle":"Getting download info…"}]}
[12:12:27.836] DownVid[Script Filter] Queuing argument ''
[12:12:28.031] DownVid[Script Filter] Script with argv '' finished
[12:12:28.040] DownVid[Script Filter] {"rerun":1,"items":[{"title":"DownVid Progress","subtitle":"Getting download info…"}]}
[12:12:29.033] DownVid[Script Filter] Queuing argument ''
[12:12:29.203] DownVid[Script Filter] Script with argv '' finished
[12:12:29.212] DownVid[Script Filter] {"rerun":1,"items":[{"title":"DownVid Progress","subtitle":"Getting download info…"}]}
[12:12:30.205] DownVid[Script Filter] Queuing argument ''
[12:12:30.380] DownVid[Script Filter] Script with argv '' finished
[12:12:30.394] DownVid[Script Filter] {"rerun":1,"items":[{"title":"DownVid Progress","subtitle":"Getting download info…"}]}
[12:12:31.382] DownVid[Script Filter] Queuing argument ''
[12:12:31.552] DownVid[Script Filter] Script with argv '' finished
[12:12:31.562] DownVid[Script Filter] {"rerun":1,"items":[{"title":"DownVid Progress","subtitle":"Getting download info…"}]}
[12:12:32.558] DownVid[Script Filter] Queuing argument ''
[12:12:32.734] DownVid[Script Filter] Script with argv '' finished
[12:12:32.750] DownVid[Script Filter] {"rerun":1,"items":[{"title":"DownVid Progress","subtitle":"Getting download info…"}]}
[12:12:33.130] DownVid[Script Filter] Processing complete

 

Link to comment
  • 2 weeks later...

Thank you for the earlier suggestions to fix the workflow for me.

Unfortunately the workflow does not work at all now for me 😞

I have in the meantime updated to Alfred4 and have installed the latest the version of the workflow.

The workflow does not do anything 😞
After having started the workflow on a youtube page and then checking the download progress after a while the only message I see is "there is no download in progress"

Is there anything I do wrong?

Here is a YouTube example link where the download does not work for me:

 

Link to comment
4 hours ago, s95hc8 said:

The workflow does not do anything

 

Don’t say “does not do anything”. That gives zero information to debug your problem. Instead, describe your steps and what happened — which is unlikely to be “nothing”, there’s almost always something, just not what you expected.

 

4 hours ago, s95hc8 said:

After having started the workflow on a youtube page

 

How did you start the Workflow? What command did you use? You can’t “start the Workflow on a Youtube page” because that’s not how it works. You need to copy URL to the clipboard and then call the Workflow. That’s explained in the first lines of the README.

 

4 hours ago, s95hc8 said:

after a while the only message I see is "there is no download in progress"

 

What do you mean, “after a while”? It’s normal for that message to appear after a download ends.


For me to be able to help you, I’ll need detailed steps and the debugger output (set to “All Information”).

Link to comment

steps:

1) open youtube page

2) CMD+L3) CMD+C
4) open Alfred
5) type "DV"
6) select "Download Video"
7) hit "Enter"
😎Nothing happens
9) type "DV"
10) select "DownVid Progress"
11) message is "No download in progress"

Here is the log:

Start of log:

[01:17:42.417] Logging Started...
[01:17:53.881] DownVid[Script Filter] Queuing argument ''
[01:17:54.130] DownVid[Script Filter] Script with argv '' finished
[01:17:54.134] DownVid[Script Filter] {"items":[{"uid":"dv","title":"Download Video","subtitle":"Downloads the video to ~/Desktop","arg":"https://www.youtube.com/watch?v=UzhZ-2NMpiw video watchlist_false playlist_false","mods":{"cmd":{"subtitle":"Download full playlist","arg":"https://www.youtube.com/watch?v=UzhZ-2NMpiw video watchlist_false playlist_true"}}},{"uid":"da","title":"Download Audio","subtitle":"Downloads the audio to ~/Desktop","arg":"https://www.youtube.com/watch?v=UzhZ-2NMpiw audio watchlist_false playlist_false","mods":{"cmd":{"subtitle":"Download full playlist","arg":"https://www.youtube.com/watch?v=UzhZ-2NMpiw audio watchlist_false playlist_true"}}}]}
[01:17:57.843] DownVid[Script Filter] Processing complete
[01:17:57.847] DownVid[Script Filter] Passing output 'https://www.youtube.com/watch?v=UzhZ-2NMpiw video watchlist_false playlist_false' to Run Script
[01:19:27.270] DownVid[Script Filter] Queuing argument ''
[01:19:27.472] DownVid[Script Filter] Script with argv '' finished
[01:19:27.479] DownVid[Script Filter] {"items":[{"uid":"dv","title":"Download Video","subtitle":"Downloads the video to ~/Desktop","arg":"[01:17:42.417] Logging Started...\n[01:17:53.881] DownVid[Script Filter] Queuing argument ''\n[01:17:54.130] DownVid[Script Filter] Script with argv '' finished\n[01:17:54.134] DownVid[Script Filter] {\"items\":[{\"uid\":\"dv\",\"title\":\"Download Video\",\"subtitle\":\"Downloads the video to ~/Desktop\",\"arg\":\"https://www.youtube.com/watch?v=UzhZ-2NMpiw video watchlist_false playlist_false\",\"mods\":{\"cmd\":{\"subtitle\":\"Download full playlist\",\"arg\":\"https://www.youtube.com/watch?v=UzhZ-2NMpiw video watchlist_false playlist_true\"}}},{\"uid\":\"da\",\"title\":\"Download Audio\",\"subtitle\":\"Downloads the audio to ~/Desktop\",\"arg\":\"https://www.youtube.com/watch?v=UzhZ-2NMpiw audio watchlist_false playlist_false\",\"mods\":{\"cmd\":{\"subtitle\":\"Download full playlist\",\"arg\":\"https://www.youtube.com/watch?v=UzhZ-2NMpiw audio watchlist_false playlist_true\"}}}]}\n[01:17:57.843] DownVid[Script Filter] Processing complete\n[01:17:57.847] DownVid[Script Filter] Passing output 'https://www.youtube.com/watch?v=UzhZ-2NMpiw video watchlist_false playlist_false' to Run Script video watchlist_false playlist_false","mods":{"cmd":{"subtitle":"Download full playlist","arg":"[01:17:42.417] Logging Started...\n[01:17:53.881] DownVid[Script Filter] Queuing argument ''\n[01:17:54.130] DownVid[Script Filter] Script with argv '' finished\n[01:17:54.134] DownVid[Script Filter] {\"items\":[{\"uid\":\"dv\",\"title\":\"Download Video\",\"subtitle\":\"Downloads the video to ~/Desktop\",\"arg\":\"https://www.youtube.com/watch?v=UzhZ-2NMpiw video watchlist_false playlist_false\",\"mods\":{\"cmd\":{\"subtitle\":\"Download full playlist\",\"arg\":\"https://www.youtube.com/watch?v=UzhZ-2NMpiw video watchlist_false playlist_true\"}}},{\"uid\":\"da\",\"title\":\"Download Audio\",\"subtitle\":\"Downloads the audio to ~/Desktop\",\"arg\":\"https://www.youtube.com/watch?v=UzhZ-2NMpiw audio watchlist_false playlist_false\",\"mods\":{\"cmd\":{\"subtitle\":\"Download full playlist\",\"arg\":\"https://www.youtube.com/watch?v=UzhZ-2NMpiw audio watchlist_false playlist_true\"}}}]}\n[01:17:57.843] DownVid[Script Filter] Processing complete\n[01:17:57.847] DownVid[Script Filter] Passing output 'https://www.youtube.com/watch?v=UzhZ-2NMpiw video watchlist_false playlist_false' to Run Script video watchlist_false playlist_true"}}},{"uid":"da","title":"Download Audio","subtitle":"Downloads the audio to ~/Desktop","arg":"[01:17:42.417] Logging Started...\n[01:17:53.881] DownVid[Script Filter] Queuing argument ''\n[01:17:54.130] DownVid[Script Filter] Script with argv '' finished\n[01:17:54.134] DownVid[Script Filter] {\"items\":[{\"uid\":\"dv\",\"title\":\"Download Video\",\"subtitle\":\"Downloads the video to ~/Desktop\",\"arg\":\"https://www.youtube.com/watch?v=UzhZ-2NMpiw video watchlist_false playlist_false\",\"mods\":{\"cmd\":{\"subtitle\":\"Download full playlist\",\"arg\":\"https://www.youtube.com/watch?v=UzhZ-2NMpiw video watchlist_false playlist_true\"}}},{\"uid\":\"da\",\"title\":\"Download Audio\",\"subtitle\":\"Downloads the audio to ~/Desktop\",\"arg\":\"https://www.youtube.com/watch?v=UzhZ-2NMpiw audio watchlist_false playlist_false\",\"mods\":{\"cmd\":{\"subtitle\":\"Download full playlist\",\"arg\":\"https://www.youtube.com/watch?v=UzhZ-2NMpiw audio watchlist_false playlist_true\"}}}]}\n[01:17:57.843] DownVid[Script Filter] Processing complete\n[01:17:57.847] DownVid[Script Filter] Passing output 'https://www.youtube.com/watch?v=UzhZ-2NMpiw video watchlist_false playlist_false' to Run Script audio watchlist_false playlist_false","mods":{"cmd":{"subtitle":"Download full playlist","arg":"[01:17:42.417] Logging Started...\n[01:17:53.881] DownVid[Script Filter] Queuing argument ''\n[01:17:54.130] DownVid[Script Filter] Script with argv '' finished\n[01:17:54.134] DownVid[Script Filter] {\"items\":[{\"uid\":\"dv\",\"title\":\"Download Video\",\"subtitle\":\"Downloads the video to ~/Desktop\",\"arg\":\"https://www.youtube.com/watch?v=UzhZ-2NMpiw video watchlist_false playlist_false\",\"mods\":{\"cmd\":{\"subtitle\":\"Download full playlist\",\"arg\":\"https://www.youtube.com/watch?v=UzhZ-2NMpiw video watchlist_false playlist_true\"}}},{\"uid\":\"da\",\"title\":\"Download Audio\",\"subtitle\":\"Downloads the audio to ~/Desktop\",\"arg\":\"https://www.youtube.com/watch?v=UzhZ-2NMpiw audio watchlist_false playlist_false\",\"mods\":{\"cmd\":{\"subtitle\":\"Download full playlist\",\"arg\":\"https://www.youtube.com/watch?v=UzhZ-2NMpiw audio watchlist_false playlist_true\"}}}]}\n[01:17:57.843] DownVid[Script Filter] Processing complete\n[01:17:57.847] DownVid[Script Filter] Passing output 'https://www.youtube.com/watch?v=UzhZ-2NMpiw video watchlist_false playlist_false' to Run Script audio watchlist_false playlist_true"}}}]}
[01:19:31.898] DownVid[Script Filter] Queuing argument ''
[01:19:32.066] DownVid[Script Filter] Script with argv '' finished
[01:19:32.089] DownVid[Script Filter] {"rerun":3,"variables":{"state":"stopped"},"items":[{"title":"DownVid Progress","subtitle":"Checking for downloads in queue…","valid":false}]}
[01:19:35.070] DownVid[Script Filter] Queuing argument ''
[01:19:35.217] DownVid[Script Filter] Script with argv '' finished
[01:19:35.238] DownVid[Script Filter] {"rerun":3,"items":[{"title":"DownVid Progress","subtitle":"No downloads in progress.","valid":false}]}
[01:19:38.220] DownVid[Script Filter] Queuing argument ''
[01:19:38.376] DownVid[Script Filter] Script with argv '' finished
[01:19:38.404] DownVid[Script Filter] {"rerun":3,"variables":{"state":"stopped"},"items":[{"title":"DownVid Progress","subtitle":"Checking for downloads in queue…","valid":false}]}
[01:19:41.381] DownVid[Script Filter] Queuing argument ''
[01:19:41.525] DownVid[Script Filter] Script with argv '' finished
[01:19:41.553] DownVid[Script Filter] {"rerun":3,"items":[{"title":"DownVid Progress","subtitle":"No downloads in progress.","valid":false}]}
[01:19:44.527] DownVid[Script Filter] Queuing argument ''
[01:19:44.673] DownVid[Script Filter] Script with argv '' finished
[01:19:44.704] DownVid[Script Filter] {"rerun":3,"variables":{"state":"stopped"},"items":[{"title":"DownVid Progress","subtitle":"Checking for downloads in queue…","valid":false}]}
[01:19:47.679] DownVid[Script Filter] Queuing argument ''
[01:19:47.839] DownVid[Script Filter] Script with argv '' finished
[01:19:47.872] DownVid[Script Filter] {"rerun":3,"items":[{"title":"DownVid Progress","subtitle":"No downloads in progress.","valid":false}]}
[01:21:01.109] ERROR: DownVid[Run Script] Could not download resource.
./downvid: line 8: sed: No such file or directory
./downvid: line 9: sed: No such file or directory
./downvid: line 13: awk: No such file or directory
./downvid: line 14: awk: No such file or directory
./downvid: line 15: awk: No such file or directory
./downvid: line 16: awk: No such file or directory
./downvid: line 46: youtube-dl: No such file or directory
./downvid: line 50: basename: No such file or directory
./Notificator.app/Contents/Resources/Scripts/notificator: line 8: basename: No such file or directory
./Notificator.app/Contents/Resources/Scripts/notificator: line 9: dirname: No such file or directory
./Notificator.app/Contents/Resources/Scripts/notificator: line 9: dirname: No such file or directory
./Notificator.app/Contents/Resources/Scripts/notificator: line 9: dirname: No such file or directory
./Notificator.app/Contents/Resources/Scripts/notificator: line 10: dirname: No such file or directory
./Notificator.app/Contents/Resources/Scripts/notificator: line 10: dirname: No such file or directory
./Notificator.app/Contents/Resources/Scripts/notificator: line 10: dirname: No such file or directory
./Notificator.app/Contents/Resources/Scripts/notificator: line 66: touch: No such file or directory
./Notificator.app/Contents/Resources/Scripts/notificator: line 67: osascript: No such file or directory
./Notificator.app/Contents/Resources/Scripts/notificator: line 68: /MacOS/applet: No such file or directory
[01:21:01.121] DownVid[Run Script] Processing complete
[01:21:01.122] DownVid[Run Script] Passing output '' to Run Script

End of log

Everything worked for some time with Alfred 3 and older workflow (with the steps as described above as I always have used them).
Sometime ago with Alfred 3 and workflow updates everything broke 😞
Updating to Alfred 4 and installing the latest workflow did not help 😞
 

Edited by s95hc8
Link to comment

Oh, are those errors coming from the workflow script? I thought it was sed and pals saying they couldn't find the files they were pointed at (and my old youtube-dl couldn't find the name of the video).

 

How on earth does the OS get borked like that?

Link to comment
7 hours ago, deanishe said:

I thought it was sed and pals saying they couldn't find the files they were pointed at

 

I may be wrong, but at least sed’s message should include the path, that being the case (sed: /some/path: No such file or directory).

 

7 hours ago, deanishe said:

How on earth does the OS get borked like that?

 

I don’t know, but two people experiencing it has me on alert that the error may not be where I think it is. I have an idea where the problem may be, but not the cause.

 

@jwz @s95hc8 If you open a terminal and try:

which sed
which awk
which youtube-dl

What are the results?

Link to comment
On 8/6/2019 at 6:42 PM, deanishe said:

Do tell…

 

_sharedresources exports the PATH inside the script it runs as /usr/local/bin:"${shared_resources_bin}":"${PATH}". In theory, if the original PATH was empty the new one would lack /usr/bin/, where sed and friends live, and possibly other important system paths. Which is why I suggested looking for the tools via which in a terminal.


But I see no reason why Alfred would be passing an empty PATH, and to only a few people. Either way, the problem would still lie outside the Workflow.


I could check what PATH Alfred uses and set it directly in _sharedresources, but I dislike that solution from a coding and future-proofing perspective.

Edited by vitor
Link to comment
11 hours ago, vitor said:

But I see no reason why Alfred would be passing an empty PATH, and to only a few people

 

And if that were the case, you'd think they'd be seeing a lot of problems with workflows.


I guess logging $PATH to the debugger when the workflow runs would tell us whether that is the problem. Wouldn't fix it, of course.

Link to comment
On 8/7/2019 at 12:00 AM, vitor said:

 

I may be wrong, but at least sed’s message should include the path, that being the case (sed: /some/path: No such file or directory).

 

 

I don’t know, but two people experiencing it has me on alert that the error may not be where I think it is. I have an idea where the problem may be, but not the cause.

 

@jwz @s95hc8 If you open a terminal and try:


which sed
which awk
which youtube-dl

What are the results?

This is the results I get from Terminal:

Screen Shot 2019-08-08 at 15.58.47 .jpg

Link to comment

I do not see any other issues with the OS other apps or the hardware.
This is my daily working machine I have in use since about half a year (before that I had another MacBook Pro).
I am on the latest Mac OS.

I really don't use other Alfred workflows. This is pretty much the only one (I liked how you can download Youtube videos and watch them later offline as the internet connection here really doesn't suit the streaming Youtube uses to be able to watch videos in proper quality).

Link to comment

Hello!

 

The script worked for many years but since a while I have the exact same problem as so others here, related to subs (or something failing because of them). 

 

"[11:55:42.931] DownVid[Script Filter] {"rerun":1,"items":[{"title":"DownVid Progress","subtitle":"ffmpeg There re't y subtites t embe / Making Gundam - The Inside Story (NHK World Documentary) (2019).f136.mp4","valid":false,"mods":{"ctrl":{"valid":true},"cmd":{"valid":true}}}]}"

 

This error is on loop at then end of the dl of any video (depending of the video, ofc... you get the point...)

 

This is from a new Mac Mini 2018, fresh brew install, iTerm2 & everthing are fine, I use 10 other workflows without issues. Updated to the latest workflow (1.22.10 ?)

 

Sed / awk & YT DL seems fine, command line do work.

dv.png.1c8fc8686add9e7f18f3c55fd254147f.png

 

and ~ ❯❯❯ youtube-dl --version
2019.08.02

 

I'm running out of ideas, If I can provide more information to help the debugging, please tell me what to send. Thanks again for that awesome script anyway.  I hope to fix it. :P

 

 

EDIT: damn ok so it seems the variable for the path need to be the full path now. Somehow it was only "desktop" for me and stopped working. Full path is ok now.

 

I do still have a problem: the merge with audio "best" will only make mp4 while youtube-dl will make a mkv. I think I saw something about that, being a YTDL issue, but if you have more information to force mkv, please do tell.  :)

 

Have a good day!

Edited by Cafeine
Found the problem!
Link to comment
On 8/7/2019 at 12:00 AM, vitor said:

 

I may be wrong, but at least sed’s message should include the path, that being the case (sed: /some/path: No such file or directory).

 

 

I don’t know, but two people experiencing it has me on alert that the error may not be where I think it is. I have an idea where the problem may be, but not the cause.

 

@jwz @s95hc8 If you open a terminal and try:


which sed
which awk
which youtube-dl

What are the results?

Did the results I posted above help any to figure out any details?

Here is something else really strange - Today out of curiosity I used DV again on one short Youtube clip and it worked flawlessly again !!!

I did not do any changes to the OS - I may or may not have done an OS update if there were any since the issue occurred.
The only changes I have done to the Mac were installing Scrivener and a couple of updates to Rhino3D, that's it.

I am very confused.
Did DV do any autoupdate to a fixed version perhaps?

In any case I love the fact it works again … for now 😉

Link to comment

I was away for a few days, but I’m looking at this again.

 

On 8/13/2019 at 11:03 AM, Cafeine said:

the merge with audio "best" will only make mp4 while youtube-dl will make a mkv.

 

That’s on purpose and won’t be changed any time soon. There’s a discrepancy between what youtube-dl reports it will download and what it really does given best. I’ve decided on downloading “the best mp4” because in my tests it was a more common format and more useful on macOS (can be previewed with QuickLook). audio_format only affects audio-only downloads.

 

On 8/13/2019 at 11:03 AM, Cafeine said:

ok so it seems the variable for the path need to be the full path now. Somehow it was only "desktop" for me and stopped working. Full path is ok now.

 

That’s a good point. For everyone with an issue, do you have custom download_dir or watchlist_download_dir values (Workfow Environment Variables)? What are they? If you delete them, does the issue go away? Paths should be absolute or use ~ to represent the home directory (e.g. ~/Downloads). It may be worth to delete and redownload the Workflow but tell Alfred to not import the previous settings.

 

On 8/16/2019 at 2:12 AM, s95hc8 said:

Did DV do any autoupdate to a fixed version perhaps?

 

DownVid won’t auto-update without telling you, but the underlying youtube-dl might.


After this post, who still has an issue?

Link to comment
  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...