{"id":28,"date":"2004-02-28T11:27:00","date_gmt":"2004-02-28T16:27:00","guid":{"rendered":"http:\/\/www.familytidings.com\/blog\/?p=28"},"modified":"2004-02-28T11:27:00","modified_gmt":"2004-02-28T16:27:00","slug":"automated-dvd-creation","status":"publish","type":"post","link":"https:\/\/www.familytidings.com\/blog\/?p=28","title":{"rendered":"Automated DVD Creation"},"content":{"rendered":"<p>Tried <a href=\"http:\/\/www.wershofen.de\/downloads\/dvdwizard.tar.gz\">dvdwizard<\/a>.  This is written for PAL, so it has to be modified for NTSC.  Here are the changes necessary:<br \/>\n<\/p>\n<ul>\n<\/p>\n<li>Change references to the PAL size of <code>720x576<\/code> to NTSC, which is <code>720x480<\/code><br \/>\n<\/p>\n<li>Change the frame rate parameter of the ppm2y4m commands from <code>-F 25:1<\/code> to <code>-F 30000:1001<\/code><br \/>\n<\/p>\n<li>Change the default for the variable <code>tvsize<\/code> from <coded>635&#215;535<\/code> to <code>635x439<\/code><br \/>\n<\/p>\n<li>Change the expression <code>let offsetY=(576-$tvY)\/2+1<\/code> to <code>let offsetY=(<b>480<\/b>-$tvY)\/2+1<\/code><br \/>\n<\/ul>\n<p>Of course, I ran into other trouble, too.  dvdwizard complained thusly:<br \/>\n<br \/><code>**ERROR: [ppmtoy4m] Bad Raw PPM magic!<br \/>\n<br \/>**ERROR: [mpeg2enc] Could not read YUV4MPEG2 header: system error (failed read\/write)!<\/code><\/p>\n<p>The mpeg2enc error was caused by te ppmtoy4m error.  The former is piped into the latter.  So the problem was with ppmtoy4m.<\/p>\n<p>It seems there are <a href=\"http:\/\/netghost.narod.ru\/gff\/graphics\/summary\/pbm.htm\">several formats of PNM<\/a> (portable anymap) files, including PPM (portable pixmap&#8211;color), PGM (portable greymap) and PBM (portable bitmap&#8211;monochrome).  These are simple formats, and each has its own &#8220;magic number&#8221; at the start of the file which identifies which format it is.  There are two variants of each format, ASCII and binary.  The headers for these are:<br \/>\n<\/p>\n<dl compact>\n<\/p>\n<dt>P1<\/dt>\n<dd>ASCII PBM (monchrome)<\/dd>\n<p><\/p>\n<dt>P2<\/dt>\n<dd>ASCII PGM (greyscale)<\/dd>\n<p><\/p>\n<dt>P3<\/dt>\n<dd>ASCII PPM (color)<\/dd>\n<p><\/p>\n<dt>P4<\/dt>\n<dd>binary PBM (monchrome)<\/dd>\n<p><\/p>\n<dt>P5<\/dt>\n<dd>binary PGM (greyscale)<\/dd>\n<p><\/p>\n<dt>P6<\/dt>\n<dd>binary PPM (color)<\/dd>\n<p><\/dl>\n<p>The files being generated by convert had a header of P3, but ppm2y4m wanted P6.  So, how to make convert output binary instead of ASCII?  If I converted from PPM to PNG and back, that seemed to work.  But then, while trying to diagnose problems with the VMGM menu, I started seeing P5 headers.  This was my own fault.  Instead of a picture background, I used a solid grey so as to make button locations stand out.  Convert assumed I wanted a PGM instead of a PPM.  Oops.<\/p>\n<p>Another problem was that the <code>convert -trim<\/code> command failed saying the geometry was zero-sized.  I switched to a resize command (<code>convert -resize<\/code>) instead.  <\/p>\n<p>The last problem was with mogrify.  For some reason, it complained it couldn&#8217;t create files.  I switched from mogrify to convert.  The only difference between these programs is that mogrify modifies the given file and convert puts it changes in a different file.  So whereever mogrify was used, I made this kind of change:  <code>mogrify -<i>option<\/i> $maskPic2<\/code> to <code>convert -<i>option<\/i> $maskPic2 png:${maskPic2}-tmp; mv ${maskPic2}-tmp $maskPic2<\/code>.  The <code>png:<\/code> prefix to the temporary file name is required because convert uses the file suffix to determine the format.  Since I&#8217;m creating a file ending in <code>-tmp<\/code>, I have to specify the format with the prefix.  Most of the changes are to PNG files, but a few are PPM.  Yeah, this is the cowardly way to fix it, but grandma&#8217;s 96<sup>th<\/sup> birthday is less than a month away and I gotta get these disks done.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Tried dvdwizard. This is written for PAL, so it has to be modified for NTSC. Here are the changes necessary: Change references to the PAL size of 720&#215;576 to NTSC, which is 720&#215;480 Change the frame rate parameter of the ppm2y4m commands from -F 25:1 to -F 30000:1001 Change the default for the variable tvsize [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-28","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.familytidings.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/28","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.familytidings.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.familytidings.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.familytidings.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.familytidings.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=28"}],"version-history":[{"count":0,"href":"https:\/\/www.familytidings.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/28\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.familytidings.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=28"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.familytidings.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=28"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.familytidings.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=28"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}