WordPress database error: [Table 'flavor8_wordpress.wp_categories' doesn't exist]
SELECT cat_ID FROM wp_categories WHERE category_nicename = 'culture/copyleft/open-source'

Open Source | Flavor 8
Browsing:  Culture » Copyleft » Open Source

I’m lazy, so I scripted the moving parts from the howto that I wrote which described how to build a dvd from youtube videos.

The script is easy as pie to use.

Ingredients

Recipe

Initial setup

  • Make the script executable (chmod +x youtube2dvd)
  • Edit the script, and change the first line to point to the location at which you saved youtube-dl.py, i.e.
    
    YOUTUBE=~/scripts/youtube-dl.py
    

Using the script

  • Create a text file which lists, one per line, the youtube videos that you want to be on your DVD, e.g.
    
    http://youtube.com/watch?v=m2W5MjMGa14
    http://youtube.com/watch?v=IznjjbPtNiA
    
    

    If you want, you can supply titles that’ll be used in the dvd menu, e.g.

    
    http://youtube.com/watch?v=m2W5MjMGa14 Witching Hour
    http://youtube.com/watch?v=IznjjbPtNiA
    

    Note that you do not have to supply a title for every video. Punctuation may screw things up.

  • Save the text file, and run the script, e.g.
    youtube2dvd mylist
  • You’re done. The DVD structure is now awaiting you.

Please post problems, suggestions & improvements to the script to the comments section.



Related Comments (4)

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 352×240 $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.



Related Comments (2)

The latest version of Tovid is out, and along with it comes a new script, todisc. What can I say except fucking awesome. It combines the makemenu, makexml and makedvd steps that I described in my last howto on tovid, generates animated thumbnails, and allows for cool extras like video backgrounds (I thought that makemenu could do that, but apparently not.) Note that you still have to convert your videos to dvd or vcd format before proceeding.

Syntax is braindead simple (which is handy for the digg users who complained about having to use complicated CLI commands on the previous howto ;)):

todisc -dvd -ntsc -files file1.mpg file2.mpg file3.mpg -titles “My title 1″ “My title 2″ “My title 3″ -bgvideo mybgmenu.dvd -bgaudio mybgsong.wav -menu-title “My Excellent DVD” -out my_excellent_dvd

It will churn for a minute and pop up a preview of how your dvd menu is going to look, and then ask you if you wish to continue. (The preview title/thumbnail ordering is off; however, it renders fine.)

Once you’re happy with the preview, type “yes” at the prompt, and it will go off and create the dvd for you. Take a walk, come back, burn the dvd using k3b, and be happy.



Related Comments (4)

[UPDATE - check out my newer howto on this subject]

Sure, you’ve been able to do this by fiddling around with arcane stuff for ages. But now it’s EASY.

Tovid is the tool to use — download it here, and install it. There is a UI, which I haven’t played with; the command line options are so straightforward, though, that it is worth getting familiar with them.

  1. Prepare the content.
    • Gather your clips. Let’s assume you have 3 short videos you’re going to put on the dvd, and that you want a menu.
    • Convert them to dvd format, if necessary; e.g. tovid -ntsc -dvd -in myclip1.mpg -out myclip1-dvd. (If you’re in Europe, use -pal insteal of -ntsc.) See the wiki for more examples. On my AMD64/3400, conversion takes about 5 minutes for a 4 minute video.
  2. Build the menu.
    • First, find an image or a video you’d like to be the menu backdrop. For the purposes of this howto, let’s assume you go with an image named sally.jpg.
    • Next, invoke the makemenu command, e.g.: makemenu -ntsc -dvd -align left -textcolor “#FFF” -highlightcolor “#FF0″ -selectcolor “#F00″ -font “Helvetica” “Sally Jumping” “Sally Singing” “Sally Running” -background sally.jpg -out “Main_menu”. (This is going to make 3 menu options on the left hand side of the screen. Order is important here; match up the order of the options above with the order of the clips you supply in the next step.)
  3. Now, build the xml metadata that’s needed to author the dvd, e.g.: makexml -menu Main_menu.mpg myclip1-dvd.mpg myclip2-dvd.mpg myclip3-dvd.mpg sally
  4. Finally, run the command to build the dvd filesystem, e.g.: makedvd sally.xml (This will create the directory structures that you can burn directly as a video dvd project using, e.g. k3b.)


Related Comments (9)

Oh, happy days.

Link



Related Leave a Comment