Hi, I'm using youtube-dl to extract audio from various sources using:
C:\Users\me>C:\Shortcuts\youtube-dl\youtube-dl.exe --add-metadata -x -f 140 -o "%(title)s.%(ext)s" url here
This provides me an output file in m4a format with tags which is what I want. What I'm trying to do is download an entire playlist using the example above. This work using -citw but then I don't get the metadata or -f 140 which specifies to output the file as an m4a, see example below:
C:\Users\me>C:\Shortcuts\youtube-dl\youtube-dl.exe -citw url here
I'm trying to find a way to include the -citw parameter for a playlist url while also keeping --add-metadata and -f 140
Thanks
Support our site by donate $5 directly to us Thanks!!!
Try StreamFab Downloader and download streaming video from Netflix, Amazon!
Try StreamFab Downloader and download streaming video from Netflix, Amazon!
+ Reply to Thread
Results 1 to 11 of 11
-
-
I'm confused. The first example command should already do what you are trying to do if you enter a playlist url. Is this not working?
-
Yes it does work now, it turns out I was copying the wrong link and it was only downloading the initial video in the playlist.
I was initially right clicking on the playlist and selecting 'copy link' which is what was causing the problem, this was giving me a link such as https://www.youtube.com/watch?vxxxxxxxxx
The only workaround I have found for this is using the 'copy link' found on the YouTube mobile app which gives the link as https://www.youtube.com/playlist?list=xxxxxxxxxxxx, which is what youtube-dl seems to prefer.
Any ideas how I can obtain the playlist link in this correct format using my PC through either Edge or Chrome? -
I've now found a way to get the correct playlist link so I've sorted that problem.
Would anyone know a way to create either a batch file or script to call youtube-dl so I can be prompted to just enter the url rather than having to paste my command line in each time?
C:\Users\me>C:\Shortcuts\youtube-dl\youtube-dl.exe --add-metadata -x -f 140 -o "%(title)s.%(ext)s" url here
Thanks -
set /p URL=enter URL:
C:\Shortcuts\youtube-dl\youtube-dl.exe --add-metadata -x -f 140 -o "%(title)s.%(ext)s" "%URL%" -
I'm now getting the following error message
youtube-dl.exe: error: Cannot download a video and extract audio into the same file! Use "(ext)s.%(ext)s" instead of "(ext)s" as the output template -
Yes, it's an m4a audio stream.
I now get the following, it saves a file but not an m4a, instead it gives me an unknown file type
enter URL:https://www.youtube.com/watch?v=xxxxxxxxxx
[youtube] xxxxxxxxxx: Downloading webpage
[youtube] xxxxxxxxxx: Downloading video info webpage
[youtube] xxxxxxxxxx: Extracting video information
[youtube] xxxxxxxxxx: Downloading js player en_US-vfla6wgHS
[download] Destination: (ext)s
[download] 100% of 3.43MiB in 00:00
[ffmpeg] Correcting container in "(ext)s"
[ffmpeg] Adding metadata to '(ext)s'
ERROR: fileext)s.temp: Invalid argument
-
% needs to be escaped in batch file:
set /p URL=enter URL:
C:\Shortcuts\youtube-dl\youtube-dl.exe --add-metadata -f 140 -o "%%(title)s.%%(ext)s" "%URL%"
/edit:
That will work around the problem. But I believe it is also a youtube-dl bug.Last edited by sneaker; 21st Dec 2016 at 07:58.
Similar Threads
-
youtube-dl: Download Playlist to Specific Directory?
By Adithya in forum Video Streaming DownloadingReplies: 10Last Post: 1st Sep 2017, 13:04 -
Youtube playlist to M3U8 Playlist
By candita in forum Video Streaming DownloadingReplies: 2Last Post: 31st May 2017, 03:56 -
rip a Youtube playlist
By AlanHK in forum Video Streaming DownloadingReplies: 6Last Post: 21st Feb 2014, 07:40 -
MPC-HC and YouTube Playlist
By iNfRaIiI in forum Newbie / General discussionsReplies: 5Last Post: 17th Dec 2013, 20:24 -
YouTube Playlist Player - please test
By wiseant in forum Newbie / General discussionsReplies: 0Last Post: 19th Apr 2013, 19:35