How To: Make a DVD From Youtube Videos (Using Linux)

Ingredients

Recipe

  • First, create a script that’ll download all the videos you want, e.g.
    
    mkdir youtubevids
    cd youtubevids
    ../youtube-dl.py http://youtube.com/watch?v=m2W5MjMGa14
    ../youtube-dl.py http://youtube.com/watch?v=TN6KYhIfSqw
    ../youtube-dl.py http://youtube.com/watch?v=DuMmSYSKuwA
    ../youtube-dl.py http://youtube.com/watch?v=HTdZzkb8n7E
    

    Make it executable (chmod +x getvids) and run it (./getvids). It’ll do its thing, and when it’s done, you’ll have a folder full of flv files. Flv is the Flash Video format; we need to convert these to MPGs before we can make a dvd out of them.

  • To convert them, use this handy script; as above, save it in a text file, make it executable, and run it. Note that it resizes the videos to 352×240, which is more or less the size they are on youtube (but more importantly is the resolution of “VCD on DVD”). There is really not much point in scaling them up, as the resolution sucks. Instead, let your DVD player do the scaling when you come to play your disc; that’s what it’s good at.
    
    
    1. !/bin/bash
    mkdir mpg for file in *.flv do output=`ls $file -1|cut -f1 -d"."` ffmpeg -i $file -ab 56 -r 25 -ar 22050 -b 500 -s 352x240 $output.mpg done mv *.mpg mpg cd mpg

    Let it do it’s thing; once it’s done, you’ll have a folder named mpg which contains the mpg versions of the videos.

  • Now we need to build the DVD structure. For this, we’re going to use tovidgui, which is one of the applications bundled with tovid. Run it, and follow these steps:
    • Click “Add Menu”
    • Click “Add Video(s)”
    • Browse to, and select all, your newly created MPGs
    • Click on one of the videos on the left pane
    • Under video options, choose “352×240 VCD on DVD”
    • Click “Use these settings for all videos”
    • Click the big “Encode” button at the top
    • Click Start encoding

    Let it do it’s thing. Once it’s done, it’ll give you a makedvd command to run, which in turn invokes dvdauthor. Run it. Dvdauthor will create the dvd structure, which you can then run (using kaffeine or gxine) or burn to dvd (using k3b, gnomebaker, etc, etc).

And that’s it. Of course, the titles on the dvd are going to suck, since you didn’t change them to anything. If you want to spend some time making your dvd look pretty, play around with the options in tovidgui, and you’ll be able to customize it to your heart’s desire.

Please post comments below if you have problems with the above recipe, and I will make adjustments as necessary.

Comments (4)

  1. David wrote::

    I was really struggling with audio problems and video quality. I was able to acheive much better quality using a simplier command:

    ffmpeg -i input.flv -target ntsc-dvd output.mpeg

    Wednesday, April 18, 2007 at 12:56 pm #
  2. paul wrote::

    i used nero vision to transcode the mpeg’s but the video is being displayed now in black and white and the audio doesn’t match the video, anybody can help?
    (when i play the mpeg’s in the computer they play fine)

    Saturday, June 16, 2007 at 9:56 am #
  3. Adam wrote::

    Does your youtube download script download the ‘high quality’ version of the video?
    This script seems older than the ‘high quality’ feature on youtube, how can this be updated?

    Monday, July 7, 2008 at 6:47 pm #
  4. wuelfhis wrote::

    Excelente hermano salvaste mi vida

    Friday, December 4, 2009 at 1:25 pm #