{"id":974,"date":"2013-04-20T01:00:00","date_gmt":"2013-04-19T23:00:00","guid":{"rendered":"https:\/\/www.fussylogic.co.uk\/blog\/?p=974"},"modified":"2013-04-21T10:07:40","modified_gmt":"2013-04-21T09:07:40","slug":"burning-mpeg4-to-dvd-from-linux","status":"publish","type":"post","link":"https:\/\/www.fussylogic.co.uk\/blog\/?p=974","title":{"rendered":"Burning MPEG4 to DVD From Linux"},"content":{"rendered":"<p>(TODO: Find out how to get aspect ratio correct.)<\/p>\n<p>Sometimes you want to turn an MPEG4 (or anything else you might have) from, say, your digital camcorder into a DVD that is playable on a standard DVD player. It\u00e2\u20ac\u2122s not quite as simple as it should be, but it is a mechanical sequence.<\/p>\n<p>First we need to convert the arbitrarily encoded source video into DVD standard MPEG-2 video. <code>ffmpeg<\/code> (soon to be <code>avconv<\/code>) has a handy command line switch to handle all the details of DVD video for us.<\/p>\n<pre><code>$ ffmpeg -i YOUR_HOME_VIDEO.mp4 \\\n    -target pal-dvd \\\n    YOUR_HOME_VIDEO.mpg<\/code><\/pre>\n<p>DVD players need more than just a compatible video file; they need a whole filesystem (<code>VIDEO_TS<\/code>) with the video file(s) correctly named. <code>dvdauthor<\/code> can do this for us.<\/p>\n<pre><code>$ export VIDEO_FORMAT=PAL\n$ dvdauthor -o YOUR_HOME_VIDEO_DIR -t -f YOUR_HOME_VIDEO.mpg\n$ dvdauthor -o YOUR_HOME_VIDEO_DIR -T<\/code><\/pre>\n<p><code>-o<\/code> specifies the output directory. The first call here adds our MPEG as a title (you can repeat this for as many inputs as you like), then the second (or final) call creates the table of contents from those titles already added.<\/p>\n<p>Video DVDs are almost identical to data DVDs, with a specially arranged filesystem. Our <code>YOUR_HOME_VIDEO_DIR<\/code> directory is that specially arranged filesystem. However, video DVDs are special and need a bit more than just the files on the disc. We must tell our DVD burner to set the \u00e2\u20ac\u0153video\u00e2\u20ac\u009d flags so files are organised for optimised access by DVD players and to order the video files to a standard and pad as necessary.<\/p>\n<pre><code>$ growisofs -dvd-compat -speed=2 -Z \/dev\/dvdrw \\\n    -dvd-video YOUR_HOME_VIDEO_DIR\/<\/code><\/pre>\n<p>Note the <code>-dvd-video<\/code> flag; without this you\u00e2\u20ac\u2122ll just get a data DVD and despite having the video perfectly stored on disc, it will not play in a normal DVD player. The <code>-speed=2<\/code> is entirely at your discretion \u00e2\u20ac\u201c some combinations of media and player will be more or less successful depending on how fast the burn is performed. <code>-dvd-compat<\/code> will help with some older DVD players and <code>-Z<\/code> tells <code>growisofs<\/code> that this is a fresh DVD, not a continuation of a multisession disc.<\/p>\n<p>Done. You can now delete the intermediate MPEG2 file, <code>YOUR_HOME_VIDEO.mpg<\/code> and the filesystem staging directory, <code>YOUR_HOME_VIDEO_DIR\/<\/code>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>(TODO: Find out how to get aspect ratio correct.) Sometimes you want to turn an MPEG4 (or anything else you might have) from, say, your digital camcorder into a DVD that is playable on a standard DVD player. It\u00e2\u20ac\u2122s not quite as simple as it should be, but it is a mechanical sequence. First we\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.fussylogic.co.uk\/blog\/?p=974\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[60,61,6,59],"_links":{"self":[{"href":"https:\/\/www.fussylogic.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts\/974"}],"collection":[{"href":"https:\/\/www.fussylogic.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.fussylogic.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.fussylogic.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.fussylogic.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=974"}],"version-history":[{"count":3,"href":"https:\/\/www.fussylogic.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts\/974\/revisions"}],"predecessor-version":[{"id":1023,"href":"https:\/\/www.fussylogic.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts\/974\/revisions\/1023"}],"wp:attachment":[{"href":"https:\/\/www.fussylogic.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=974"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.fussylogic.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=974"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.fussylogic.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=974"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}