Insert URLs provided by YouTubeDL #2
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Currenty Playlist2Podcasts downloads all media files, but maybe is the list very LOONG and uses much resources.
My idea is to use the media url (given by YouTubeDL) and insert it in the feeds without downloading every file.
I don't know how to implement it using the Youtube-dl Python api, but it offers
youtube-dl --jsonthat gives the media urls.There will be options in the future to control how many videos should be downloaded and converted to audio only.
Somthing like the n most recent, or only the first (or last) n videos in a playlist.
Anyway, I've literally only just started working on this and all I have is a proof of concept that works to a degree... :)
Using media urls provided by youtube-dl is trivial. But the main point for my own use is that I don't want the video part but only the audio part. My latest work in progress version is using the opus audio codec that allegedly sounds the best while (in my experience) is still smaller than the audio provided by Youtube.
Anyway... Interesting thought of trying to use a direct youtube link... I'll have a look if that's feasable and may provided an option in the future if I feel it makes sense.
Had good look at the media url provided and I don't think using the media url given by Youtube will work well. Youtube seems to be creating temporary URLs with expiry times that will not work about 6 hours after they've been generated by Youtube.
Below is a sample URL I got from Youtube that initially worked OK but now, a few hours later will no longer work.
If you have a look you can see that the URL contains an
expireparameter with the number being some kind of time (I think seconds since 1-1-1970; see Epoch Converter for an explanation.I'll close this issue / idea now.
However feel free to re-open / comment some more if you have anything to add.