VideoHelp Forum



Support our site by donate $5 directly to us Thanks!!!

Try StreamFab Downloader and download streaming video from Netflix, Amazon!



+ Reply to Thread
Results 1 to 11 of 11
  1. 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
    Quote Quote  
  2. Sorry, should add that these are youtube sources
    Quote Quote  
  3. 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?
    Quote Quote  
  4. 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?
    Quote Quote  
  5. 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
    Quote Quote  
  6. set /p URL=enter URL:
    C:\Shortcuts\youtube-dl\youtube-dl.exe --add-metadata -x -f 140 -o "%(title)s.%(ext)s" "%URL%"
    Quote Quote  
  7. 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
    Quote Quote  
  8. -f 140 is audio-only, anyways, right? Try dropping the "-x".
    Quote Quote  
  9. 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
    Quote Quote  
  10. % 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.
    Quote Quote  
  11. Thanks Sneaker, works great
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!