Jump to content

Download Media — Download video and audio from web pages


Recommended Posts

1 hour ago, vitor said:

Welcome @hollaneer,

 

That version no longer exists. The workflow depends on other tools that evolve constantly so the last Alfred 4 version may not even work correctly anymore and the current instructions and configuration no longer apply. Plus, some of the Alfred 5 additions (including the Gallery) help with installing and managing those tools which greatly helps with setup and support. You can try the latest available old version but please keep in mind it won’t get fixes.

How quick! Thanks a lot for the response, it is clear now.

Link to comment
  • 3 weeks later...

Hello, Vitor.
I have a problem with this workflow, can you check it? I've googled with your other comments but it doesn't work out.

 

[16:21:53.677] Download Media[Script Filter] Queuing argument ''
[16:21:54.084] Download Media[Script Filter] Script with argv '' finished
[16:21:54.088] Download Media[Script Filter] {"items":[{"subtitle":"Add to WatchList (⌥): true 𐄁 Full Playlist (⌘): false","valid":true,"variables":{"media_type":"video","add_to_watchlist":true,"full_playlist":false},"mods":{"cmd":{"subtitle":"Add to WatchList (⌥): true 𐄁 Full Playlist (⌘): true","variables":{"media_type":"video","Add_to_watchlist":true,"full_playlist":true}},"alt":{"subtitle":"Add to WatchList (⌥): false 𐄁 Full Playlist (⌘): false","variables":{"media_type":"video","add_to_watchlist":false,"full_playlist":false}},"cmd+alt":{"subtitle":"Add to WatchList (⌥): false 𐄁 Full Playlist (⌘): true","variables":{"media_type":"video","add_to_watchlist":false,"full_playlist":true}}},"uid":"Download video tab","title":"yt-dlp.exe Tutorial Win10 2023. (Starts at 1:35) - YouTube","arg":"https://www.youtube.com/watch?v=7QPbfKDOkO4"}]}
[16:21:54.555] Download Media[Script Filter] Processing complete
[16:21:54.557] Download Media[Script Filter] Passing output 'https://www.youtube.com/watch?v=7QPbfKDOkO4' to Run Script
[16:22:01.168] ERROR: Download Media[Run Script] WARNING: [youtube] 7QPbfKDOkO4: Native nsig extraction failed: Trying with PhantomJS
         n = wwhNDfT7wH-ZV2 ; player = https://www.youtube.com/s/player/59acb1f3/player_ias.vflset/en_US/base.js
ERROR: [youtube] 7QPbfKDOkO4: Unable to extract uploader id; please report this issue on https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using  yt-dlp -U

Edited by Ryan Lee
Link to comment
  • 1 month later...

It stopped working for me, any idea what's wrong here?

 

[20:21:44.656] Download Media[Script Filter] Queuing argument ''
[20:21:45.036] Download Media[Script Filter] Script with argv '' finished
[20:21:45.042] STDERR: Download Media[Script Filter] /Volumes/Pluto/Backup/Alfred/Alfred.alfredpreferences/workflows/user.workflow.E7275E5A-5585-4F11-B3AE-433C45683FF0/get_title_and_url.js: execution error: Error: Error: You need a supported browser as your frontmost app (-2700)
[20:21:45.045] Download Media[Script Filter] {"items":[{"subtitle":"Add to WatchList (⌥): false 𐄁 Full Playlist (⌘): false","valid":true,"variables":{"media_type":"video","add_to_watchlist":false,"full_playlist":false},"mods":{"cmd":{"subtitle":"Add to WatchList (⌥): false 𐄁 Full Playlist (⌘): true","variables":{"media_type":"video","Add_to_watchlist":false,"full_playlist":true}},"alt":{"subtitle":"Add to WatchList (⌥): true 𐄁 Full Playlist (⌘): false","variables":{"media_type":"video","add_to_watchlist":true,"full_playlist":false}},"cmd+alt":{"subtitle":"Add to WatchList (⌥): true 𐄁 Full Playlist (⌘): true","variables":{"media_type":"video","add_to_watchlist":true,"full_playlist":true}}},"uid":"Download video clipboard","title":"https://www.youtube.com/watch?v=n3FrFQNRj9w","arg":"https://www.youtube.com/watch?v=n3FrFQNRj9w"}]}
[20:21:46.579] Download Media[Script Filter] Processing complete
[20:21:46.588] Download Media[Script Filter] Passing output 'https://www.youtube.com/watch?v=n3FrFQNRj9w' to Run Script
[20:21:46.743] ERROR: Download Media[Run Script] /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/open3.rb:213:in `spawn': no implicit conversion of nil into String (TypeError)
	from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/open3.rb:213:in `popen_run'
	from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/open3.rb:159:in `popen2'
	from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/open3.rb:342:in `capture2'
	from /Volumes/Pluto/Backup/Alfred/Alfred.alfredpreferences/workflows/user.workflow.E7275E5A-5585-4F11-B3AE-433C45683FF0/downmedia_functions.rb:153:in `download_url'
	from /Users/snake/Library/Caches/com.runningwithcrayons.Alfred/Workflow Scripts/634C4360-0391-4ABD-A46A-E5961D1196A2:5:in `<main>'
[20:21:46.752] Download Media[Run Script] Processing complete
[20:21:46.754] Download Media[Run Script] Passing output '' to {{objectlink:B1F76879-4318-4A04-B58F-150347E9CC29}}

 

Link to comment
  • 4 weeks later...
  • 1 month later...

Not sure why but this seem to be working for me.

 

Specs:

Intel MBP, macOS 13.4.1

yt-dlp 2023.6.22

ffmpeg 6.0

workflow version 2023.2

 

[23:07:48.068] Download Media[Universal Action] Processing complete
[23:07:48.070] Download Media[Universal Action] Passing output 'https://www.youtube.com/watch?v=BlLk6BSyOjQ' to Arg and Vars
[23:07:48.077] Download Media[Arg and Vars] Processing complete
[23:07:48.078] Download Media[Arg and Vars] Passing output 'https://www.youtube.com/watch?v=BlLk6BSyOjQ' to Run Script
[23:07:49.316] ERROR: Download Media[Run Script] WARNING: [youtube] Unable to download webpage: <urlopen error [Errno 9] Bad file descriptor>
WARNING: [youtube] <urlopen error [Errno 9] Bad file descriptor>. Retrying (1/3)...
WARNING: [youtube] <urlopen error [Errno 9] Bad file descriptor>. Retrying (2/3)...
WARNING: [youtube] <urlopen error [Errno 9] Bad file descriptor>. Retrying (3/3)...
WARNING: [youtube] <urlopen error [Errno 9] Bad file descriptor>. Retrying (1/3)...
WARNING: [youtube] <urlopen error [Errno 9] Bad file descriptor>. Retrying (2/3)...
WARNING: [youtube] <urlopen error [Errno 9] Bad file descriptor>. Retrying (3/3)...
WARNING: [youtube] Unable to download API page: <urlopen error [Errno 9] Bad file descriptor> (caused by URLError(OSError(9, 'Bad file descriptor')))
WARNING: [youtube] Unable to download webpage: <urlopen error [Errno 9] Bad file descriptor>
WARNING: [youtube] <urlopen error [Errno 9] Bad file descriptor>. Retrying (1/3)...
WARNING: [youtube] <urlopen error [Errno 9] Bad file descriptor>. Retrying (2/3)...
WARNING: [youtube] <urlopen error [Errno 9] Bad file descriptor>. Retrying (3/3)...
WARNING: [youtube] Unable to download API page: <urlopen error [Errno 9] Bad file descriptor> (caused by URLError(OSError(9, 'Bad file descriptor')))
ERROR: [youtube] BlLk6BSyOjQ: Unable to download API page: <urlopen error [Errno 9] Bad file descriptor> (caused by URLError(OSError(9, 'Bad file descriptor')))

 

Edited by andy4222
Link to comment

I think it works now. Seems like my firewall was blocking googlevideo access to Alfred.

 

Anyway, is there way to configure this workflow at runtime to download specific video quality? Right now it downloads 720p for most vids although 1080p is available. It would be good to have the ability to decide when triggering this workflow what quality to download (or at least it prioritizes that quality)

Link to comment
  • 1 month later...
  • 4 weeks later...
1 minute ago, benboozle said:

First, thank you for creating DownMedia. Huge fan.

 

Thank you for the kind words.

 

3 minutes ago, benboozle said:

Any insight into why the video format it downloads to (mp4) can't be opened in QuickTime on my Mac (though it can in VLC player)

 

QuickTime doesn’t support a ton of codecs.

 

4 minutes ago, benboozle said:

and if there's a better setting?

 

See the yt-dlp documentation and change it in the Workflow’s Configuration.

Link to comment
  • 2 weeks later...

Help

 

[14:09:18.610] Download Media[Script Filter] Queuing argument ''
[14:09:19.672] Download Media[Script Filter] Script with argv '' finished
[14:09:19.679] Download Media[Script Filter] {"items":[{"subtitle":"Add to WatchList (⌥): true 𐄁 Full Playlist (⌘): false","valid":true,"variables":{"media_type":"video","add_to_watchlist":true,"full_playlist":false},"mods":{"cmd":{"subtitle":"Add to WatchList (⌥): true 𐄁 Full Playlist (⌘): true","variables":{"media_type":"video","Add_to_watchlist":true,"full_playlist":true}},"alt":{"subtitle":"Add to WatchList (⌥): false 𐄁 Full Playlist (⌘): false","variables":{"media_type":"video","add_to_watchlist":false,"full_playlist":false}},"cmd+alt":{"subtitle":"Add to WatchList (⌥): false 𐄁 Full Playlist (⌘): true","variables":{"media_type":"video","add_to_watchlist":false,"full_playlist":true}}},"uid":"Download video tab","title":"Kingdom of Heaven King Baldwin IV Sahara Edit - YouTube","arg":"https://www.youtube.com/watch?v=o51ICNmqJj8"},{"subtitle":"Add to WatchList (⌥): true 𐄁 Full Playlist (⌘): false","valid":true,"variables":{"media_type":"video","add_to_watchlist":true,"full_playlist":false},"mods":{"cmd":{"subtitle":"Add to WatchList (⌥): true 𐄁 Full Playlist (⌘): true","variables":{"media_type":"video","Add_to_watchlist":true,"full_playlist":true}},"alt":{"subtitle":"Add to WatchList (⌥): false 𐄁 Full Playlist (⌘): false","variables":{"media_type":"video","add_to_watchlist":false,"full_playlist":false}},"cmd+alt":{"subtitle":"Add to WatchList (⌥): false 𐄁 Full Playlist (⌘): true","variables":{"media_type":"video","add_to_watchlist":false,"full_playlist":true}}},"uid":"Download video clipboard","title":"https://www.youtube.com/watch?v=o51ICNmqJj8","arg":"https://www.youtube.com/watch?v=o51ICNmqJj8"}]}
[14:09:20.488] Download Media[Script Filter] Processing complete
[14:09:20.497] Download Media[Script Filter] Passing output 'https://www.youtube.com/watch?v=o51ICNmqJj8' to Run Script
[14:09:27.100] STDERR: Download Media[Run Script] 55:235: execution error: Alfred 5 got an error: Cannot find workflow with Id 'com.vitorgalvao.alfred.watchlist' (-2)
You do not have WatchList installed. Download it at https://github.com/vitorgalvao/alfred-workflows/tree/master/WatchList

Link to comment

So when I run this, the file gets downloaded, but in a weird way. I can't share it via WhatsApp, Photos Album, or Twitter, etc.

The Taylor video was downloaded using a website, and I could share it anywhere. The second video was downloaded via the workflow. (P.S. As you can notice, the video doesn't have an icon.)

 

image.png.91831b9ec84b77567fefa00f85a4d9fc.png

image.thumb.png.466cc939b8fb63a5a790fef15a6e43d7.png

Edited by Afoan
Link to comment

The issue is that the debugger didn’t show any problem. So when you ask for help and show a successful output, there’s no way to know that you expected anything different. Think of it like going to a mechanic or a doctor and saying “help”, then showing that nothing is wrong. Debugging software is kind of like that, if you have a specific need you need to voice it explicitly so we can assist.


The post right above yours links to documentation on how to change the output file format. That’s what you have to change if you have issues with sharing, and it pertains to yt-dlp’s settings. The workflow itself is working as expected. I can’t be specific on what settings you need to use, though, because I don’t have that issue. But online you can find a ton of posts on GitHub and Reddit which explain those in detail.

Link to comment

Stopped working completely. The video is not in Downloads.

 

[23:58:57.810] Logging Stopped.
[23:59:08.810] Logging Started...
[23:59:09.758] STDERR: Download Media[Run Script] 55:205: execution error: Alfred 5 got an error: Cannot find workflow with Id 'com.vitorgalvao.alfred.watchlist' (-2)
You do not have WatchList installed. Download it at https://github.com/vitorgalvao/alfred-workflows/tree/master/WatchList
[23:59:10.665] Download Media[Script Filter] Queuing argument ''
[23:59:11.018] Download Media[Script Filter] Script with argv '' finished
[23:59:11.023] STDERR: Download Media[Script Filter] /Users/abdulelahahmed/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.40C74967-B4D8-43B7-9A9A-24C9DCA69CBE/get_title_and_url.js: execution error: Error: Error: You need a supported browser as your frontmost app (-2700)
[23:59:11.023] Download Media[Script Filter] {"items":[{"subtitle":"Add to WatchList (⌥): true 𐄁 Full Playlist (⌘): false","valid":true,"variables":{"media_type":"video","add_to_watchlist":true,"full_playlist":false},"mods":{"cmd":{"subtitle":"Add to WatchList (⌥): true 𐄁 Full Playlist (⌘): true","variables":{"media_type":"video","Add_to_watchlist":true,"full_playlist":true}},"alt":{"subtitle":"Add to WatchList (⌥): false 𐄁 Full Playlist (⌘): false","variables":{"media_type":"video","add_to_watchlist":false,"full_playlist":false}},"cmd+alt":{"subtitle":"Add to WatchList (⌥): false 𐄁 Full Playlist (⌘): true","variables":{"media_type":"video","add_to_watchlist":false,"full_playlist":true}}},"uid":"Download video clipboard","title":"https://www.youtube.com/watch?v=Bu8MwTYqMGc","arg":"https://www.youtube.com/watch?v=Bu8MwTYqMGc"}]}
[23:59:11.524] Download Media[Script Filter] Processing complete
[23:59:11.525] Download Media[Script Filter] Passing output 'https://www.youtube.com/watch?v=Bu8MwTYqMGc' to Run Script
[23:59:18.106] STDERR: Download Media[Run Script] 55:205: execution error: Alfred 5 got an error: Cannot find workflow with Id 'com.vitorgalvao.alfred.watchlist' (-2)
You do not have WatchList installed. Download it at https://github.com/vitorgalvao/alfred-workflows/tree/master/WatchList

Link to comment

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...