VideoHelp Forum

Our website is made possible by displaying online advertisements to our visitors. Consider supporting us by disable your adblocker or Try ConvertXtoDVD and convert all your movies to DVD. Free trial ! :)
+ Reply to Thread
Results 1 to 12 of 12
Thread
  1. I like youtube-dl and want to download different formats of videos.

    To do this I use for example "-f 18,43" for downloading different streams.
    But how do I use output template to change the output filenames of each file?

    May you please help me?
    Quote Quote  
  2. Member nullacht's Avatar
    Join Date
    Jun 2013
    Location
    On The Run.
    Search PM
    Originally Posted by flashandpan007 View Post

    But how do I use output template to change the output filenames of each file?
    Example command line:

    Code:
    youtube-dl [options] [url] -o %(autonumber)s-%(title)s-%(format_id)s.%(ext)s
    Code:
    youtube-dl -F "https://www.youtube.com/watch?v=ydBjsZnHrwM"
    [youtube] ydBjsZnHrwM: Downloading webpage
    [youtube] ydBjsZnHrwM: Extracting video information
    [youtube] ydBjsZnHrwM: Downloading DASH manifest
    [info] Available formats for ydBjsZnHrwM:
    format code  extension  resolution note
    171          webm       audio only DASH audio  100k , audio@128k (44100Hz), 1016.25KiB
    140          m4a        audio only DASH audio  127k , m4a_dash container, aac  @128k (44100Hz), 1.31MiB
    141          m4a        audio only DASH audio  255k , m4a_dash container, aac  @256k (44100Hz), 2.63MiB
    278          webm       256x144    DASH video  100k , webm container, VP9, 12fps, video only, 866.29KiB
    160          mp4        256x144    DASH video  110k , 12fps, video only, 1.12MiB
    133          mp4        426x240    DASH video  250k , 24fps, video only, 2.53MiB
    242          webm       426x240    DASH video  261k , 24fps, video only, 1.83MiB
    243          webm       640x360    DASH video  477k , 24fps, video only, 3.28MiB
    134          mp4        640x360    DASH video  604k , 24fps, video only, 3.80MiB
    244          webm       854x480    DASH video  872k , 24fps, video only, 5.44MiB
    135          mp4        854x480    DASH video 1106k , 24fps, video only, 7.26MiB
    17           3gp        176x144
    36           3gp        320x240
    5            flv        400x240
    43           webm       640x360
    18           mp4        640x360    (best)
    Code:
    youtube-dl -f 18 "https://www.youtube.com/watch?v=ydBjsZnHrwM" -o %(autonumber)s-%(title)s-%(format_id)s.%(ext)s
    [youtube] ydBjsZnHrwM: Downloading webpage
    [youtube] ydBjsZnHrwM: Extracting video information
    [youtube] ydBjsZnHrwM: Downloading DASH manifest
    [download] Destination: 00001-Introducing the new Google Photos-18.mp4
    Filename:

    Code:
    00001-Introducing the new Google Photos-18.mp4
    Quote Quote  
  3. Member nullacht's Avatar
    Join Date
    Jun 2013
    Location
    On The Run.
    Search PM
    Code:
    youtube-dl -f 18,43 "https://www.youtube.com/watch?v=ydBjsZnHrwM" -o %(autonumber)s-%(title)s-%(format_id)s.%(ext)s
    [youtube] ydBjsZnHrwM: Downloading webpage
    [youtube] ydBjsZnHrwM: Extracting video information
    [youtube] ydBjsZnHrwM: Downloading DASH manifest
    [info] ydBjsZnHrwM: downloading video in 2 formats
    [download] Destination: 00001-Introducing the new Google Photos-18.mp4
    [download] 100% of 5.93MiB in 01:10
    [download] Destination: 00002-Introducing the new Google Photos-43.webm
    [download] 100% of 7.34MiB in 01:40
    Code:
    00001-Introducing the new Google Photos-18.mp4
    00002-Introducing the new Google Photos-43.webm
    Quote Quote  
  4. Is it possible to change the output filename with two or more files?
    The following doesn't work. I need something to separate the different output names.

    Code:
    youtube-dl -f 134/140 -o %(title)1.%(ext)s <here it needs a separator> %(title)2.%(ext)s https://www.youtube.com/watch?v=video
    Quote Quote  
  5. nobody?
    Quote Quote  
  6. I can't believe that ...
    Quote Quote  
  7. Originally Posted by flashandpan007 View Post
    Is it possible to change the output filename with two or more files?
    The following doesn't work. I need something to separate the different output names.

    Code:
    youtube-dl -f 134/140 -o %(title)1.%(ext)s <here it needs a separator> %(title)2.%(ext)s https://www.youtube.com/watch?v=video
    this code doesn't work for you?
    Code:
    youtube-dl -f 134,140 "https://www.youtube.com/watch?v=video" -o "%(title)s%(autonumber)s.%(ext)s"
    Quote Quote  
  8. it does work, but I want to specify the two filenames exactly. Is there a way to do this?
    Quote Quote  
  9. if the problem is the size of the number you can use --autonumber-size option

    Code:
    youtube-dl -f 134,140 "https://www.youtube.com/watch?v=video"  -o "%(title)s%(autonumber)s.%(ext)s" --autonumber-size "1"
    Quote Quote  
  10. Ok, thanks for that.
    But is there the possibility to put in two different filenames for the two files?
    Quote Quote  
  11. Originally Posted by flashandpan007 View Post
    Ok, thanks for that.
    But is there the possibility to put in two different filenames for the two files?
    maybe
    Code:
    youtube-dl -f 134 "https://www.youtube.com/watch?v=ydBjsZnHrwM"  -o "title1.%(ext)s" && youtube-dl -f 140 "https://www.youtube.com/watch?v=ydBjsZnHrwM"  -o "title2.%(ext)s"
    Quote Quote  
  12. Thank you
    So I have to put in the youtube-url two times. If you know a shorter version, please let me know.

    Nice.
    Quote Quote  



Similar Threads