<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
Hello, <div><br class="webkit-block-placeholder"></div><div>Since december I quite heavily use the mytharchive to burn on DVDs shows recorded with my DVB-T cards.</div><div>The mythburn.py script is really a clever thing, but I had 3 problems with it.</div><div><br class="webkit-block-placeholder"></div><div>1- Some channels broadcast one 5.1 (ac3) soundtrack as well as various 2.0 (mp2). By setting 2 preferred languages in the DB, and with the magic in mytharchive, I got DVDs with french language in both 5.1 and 2.0 soundtracks, which is enough for me (don't need other languages).</div><div>However my DVD reader doesn't like mp2 soundtracks, so the 2.0 track was not readable. Hence the idea to use the "force ac3 re-encoding" setting. But this had the side effect to remove the 5.1 ac3 soundtrack from the DVD.</div><div>It turned out that mythburn.py did extract 5.1 and 2.0 sound from the recording, but while re-encodig the 2.0 in ac3, it was overwriting the already-in-ac3 5.1 soundtrack.</div><div>The "work" directory before re-encoding contains  stream0.ac3 and stream0.mp2, and others.</div><div>After re-encoding only one "stream0.ac3" file stays. It's stream0.mp2 re-encoded !</div><div><br class="webkit-block-placeholder"></div><div>Here is a patch to prevent this (unfortunately I wasn't able to figure if this can be fixed at mythreplex level):</div><div><div><div><font class="Apple-style-span" face="Courier">@@ -2800,6 +2800,12 @@</font></div><div><font class="Apple-style-span" face="Courier"> </font></div><div><font class="Apple-style-span" face="Courier"> def processAudio(folder):</font></div><div><font class="Apple-style-span" face="Courier">     """encode audio to ac3 for better compression and compatability with NTSC players"""</font></div><div><font class="Apple-style-span" face="Courier">+    </font></div><div><font class="Apple-style-span" face="Courier">+    # check if we have "two audio track 1"...</font></div><div><font class="Apple-style-span" face="Courier">+    if doesFileExist(os.path.join(folder,'stream0.ac3'))==True and doesFileExist(os.path.join(folder,'stream0.mp2'))==True:</font></div><div><font class="Apple-style-span" face="Courier">+        write( "Two audio tracks labelled #1 are in the way,")</font></div><div><font class="Apple-style-span" face="Courier">+        write( "Keeping ac3 audio track as #1, moving mp2 audio track as #2.")</font></div><div><font class="Apple-style-span" face="Courier">+        os.rename(os.path.join(folder, 'stream0.mp2'), os.path.join(folder, 'stream1.mp2'))</font></div><div><font class="Apple-style-span" face="Courier"> </font></div><div><font class="Apple-style-span" face="Courier">     # process track 1</font></div><div><font class="Apple-style-span" face="Courier">     if not encodetoac3 and doesFileExist(os.path.join(folder,'stream0.mp2')):</font></div><div><font class="Apple-style-span" face="Courier">@@ -2819,7 +2825,7 @@</font></div><div><font class="Apple-style-span" face="Courier">     # process track 2</font></div><div><font class="Apple-style-span" face="Courier">     if not encodetoac3 and doesFileExist(os.path.join(folder,'stream1.mp2')):</font></div><div><font class="Apple-style-span" face="Courier">         #don't re-encode to ac3 if the user doesn't want it</font></div><div><font class="Apple-style-span" face="Courier">-        write( "Audio track 1 is in mp2 format - NOT re-encoding to ac3")</font></div><div><font class="Apple-style-span" face="Courier">+        write( "Audio track 2 is in mp2 format - NOT re-encoding to ac3")</font></div><div><font class="Apple-style-span" face="Courier">     elif doesFileExist(os.path.join(folder,'stream1.mp2'))==True:</font></div><div><font class="Apple-style-span" face="Courier">         write( "Audio track 2 is in mp2 format - re-encoding to ac3")</font></div><div><font class="Apple-style-span" face="Courier">         encodeAudio("ac3",os.path.join(folder,'stream1.mp2'), os.path.join(folder,'stream1.ac3'),True)</font></div><div><br class="webkit-block-placeholder"></div><div>I can provide a plain diff file if someone is interested.</div><div><br class="webkit-block-placeholder"></div><div>2- When just burned, the DVDs work fine in the player. Some days after, it takes several minutes for the player to detect the discs, sometime they even get ejected. Go figure. I noticed mythburn.py used an unknown growisofs option: -dvd-video. I couldn't find this option in the growisofs man page, but I found one similar: -dvd-compat. Now the progress.log file often ends with "Input/output error" but the dvd plays fine. Even when cold ;-). May be the media I'm using is badly handled by my burner ?</div><div>Patch:</div><div><div><font class="Apple-style-span" face="Courier">--- scripts/mythburn.py.orig    2008-01-26 16:57:35.000000000 +0100</font></div><div><font class="Apple-style-span" face="Courier">+++ scripts/mythburn.py 2008-02-11 17:08:59.230964961 +0100</font></div><div><font class="Apple-style-span" face="Courier">@@ -1520,10 +1520,10 @@</font></div><div><font class="Apple-style-span" face="Courier"> </font></div><div><font class="Apple-style-span" face="Courier">     if mediatype == DVD_RW and erasedvdrw == True:</font></div><div><font class="Apple-style-span" face="Courier">         command = path_growisofs[0] + " -use-the-force-luke -Z " + dvddrivepath + \</font></div><div><font class="Apple-style-span" face="Courier">-                  " -dvd-video -V 'MythTV BurnDVD' " + os.path.join(getTempPath(),'dvd')</font></div><div><font class="Apple-style-span" face="Courier">+                  " -dvd-compat -V 'MythTV BurnDVD' " + os.path.join(getTempPath(),'dvd')</font></div><div><font class="Apple-style-span" face="Courier">     else:</font></div><div><font class="Apple-style-span" face="Courier">         command = path_growisofs[0] + " -Z " + dvddrivepath + \</font></div><div><font class="Apple-style-span" face="Courier">-                  " -dvd-video -V 'MythTV BurnDVD' " + os.path.join(getTempPath(),'dvd')</font></div><div><font class="Apple-style-span" face="Courier">+                  " -dvd-compat -V 'MythTV BurnDVD' " + os.path.join(getTempPath(),'dvd')</font></div><div><font class="Apple-style-span" face="Courier"> </font></div><div><font class="Apple-style-span" face="Courier">     if os.system(command) != 0:</font></div><div><font class="Apple-style-span" face="Courier">         write("ERROR: Retrying to start growisofs after reload.")</font></div><div><br class="webkit-block-placeholder"></div><div>Also, is -use-the-force-luke a joke ? I couldn't found it documented anywhere.</div><div><br class="webkit-block-placeholder"></div><div>3- This is the one I couldn't fix. For a few weeks now (mean after an update),  I can't get 5.1 sound on the DVDs anymore. I looked at progress.log and tracked down this to mytharchivehelper. It sounds like it is buggy at checking the soundtracks from recorded files:</div><div><br class="webkit-block-placeholder"></div><div><div><font class="Apple-style-span" face="Courier">mytharchivehelper -i /mnt/store/tv/1001_20080219204200.mpg streaminfo.xml 0</font></div><div><font class="Apple-style-span" face="Courier">2008-02-20 12:36:32.794 Opening /mnt/store/tv/1001_20080219204200.mpg</font></div><div><font class="Apple-style-span" face="Courier">0: start_time: 0.027 duration: 451.332</font></div><div><font class="Apple-style-span" face="Courier">1: start_time: 0.027 duration: 451.287</font></div><div><font class="Apple-style-span" face="Courier">stream: start_time: 0.300 duration: 5014.800 bitrate=4930 kb/s</font></div><div><font class="Apple-style-span" face="Courier">Input #0, mpeg, from '/mnt/store/tv/1001_20080219204200.mpg':</font></div><div><font class="Apple-style-span" face="Courier">  Duration: 01:23:34.8, start: 0.300111, bitrate: 4930 kb/s</font></div><div><font class="Apple-style-span" face="Courier">  Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 720x576, 15000 kb/s, 25.00 fps(r)</font></div><div><font class="Apple-style-span" face="Courier">  Stream #0.1[0x1c1]: Audio: mp2, 48000 Hz, stereo, 160 kb/s</font></div><div><font class="Apple-style-span" face="Courier">2008-02-20 12:36:32.998 duration = 5014</font></div><div><br class="webkit-block-placeholder"></div><div>Whereas the menu in mythTV show several tracks, including ac3 for this recording, and ffmpeg can detect all of them:</div><div><br class="webkit-block-placeholder"></div><div><div><font class="Apple-style-span" face="Courier">ffmpeg -i /mnt/store/tv/1001_20080219204200.mpg</font></div><div><font class="Apple-style-span" face="Courier">FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2007 Fabrice Bellard, et al.</font></div><div><font class="Apple-style-span" face="Courier">  configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --enable-static --enable-shared --cc=x86_64-pc-linux-gnu-gcc --disable-altivec --disable-debug --disable-audio-oss --disable-v4l --disable-v4l2 --disable-dv1394 --disable-network --disable-opts --enable-libmp3lame --enable-liba52 --enable-pthreads --enable-libxvid --enable-x11grab --enable-libfaad --enable-libfaac --enable-gpl --enable-pp --disable-strip</font></div><div><font class="Apple-style-span" face="Courier">  libavutil version: 49.4.0</font></div><div><font class="Apple-style-span" face="Courier">  libavcodec version: 51.40.4</font></div><div><font class="Apple-style-span" face="Courier">  libavformat version: 51.12.1</font></div><div><font class="Apple-style-span" face="Courier">  built on Dec 29 2007 21:59:36, gcc: 4.1.2 (Gentoo 4.1.2 p1.0.1)</font></div><div><font class="Apple-style-span" face="Courier">Input #0, mpeg, from '/mnt/store/tv/1001_20080219204200.mpg':</font></div><div><font class="Apple-style-span" face="Courier">  Duration: 01:23:34.9, start: 0.300111, bitrate: 4930 kb/s</font></div><div><font class="Apple-style-span" face="Courier">  Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 720x576, 15000 kb/s, 25.00 fps(r)</font></div><div><font class="Apple-style-span" face="Courier">  Stream #0.1[0x1c1]: Audio: mp2, 48000 Hz, stereo, 160 kb/s</font></div><div><font class="Apple-style-span" face="Courier">  Stream #0.2[0x1c0]: Audio: mp2, 48000 Hz, stereo, 192 kb/s</font></div><div><font class="Apple-style-span" face="Courier">  Stream #0.3[0x1c2]: Audio: mp2, 48000 Hz, mono, 64 kb/s</font></div><div><font class="Apple-style-span" face="Courier">  Stream #0.4[0x80]: Audio: liba52, 48000 Hz, 5:1, 384 kb/s</font></div><div><br class="webkit-block-placeholder"></div><div>4- I just realized that after encoding the recordings to remove the ads (I use lossless encoding) they seem to lost the language tag (this is another, untouched recording):</div><div><div><font class="Apple-style-span" face="Courier">2008-02-20 15:34:12.325 Opening /mnt/store/tv/1002_20080220115200.mpg</font></div><div><font class="Apple-style-span" face="Courier">0: start_time: 3085.920 duration: 70.135</font></div><div><font class="Apple-style-span" face="Courier">1: start_time: 3085.883 duration: 70.127</font></div><div><font class="Apple-style-span" face="Courier">2: start_time: 3086.052 duration: 70.159</font></div><div><font class="Apple-style-span" face="Courier">stream: start_time: 34287.590 duration: 781.422 bitrate=3888 kb/s</font></div><div><font class="Apple-style-span" face="Courier">Input #0, mpegts, from '/mnt/store/tv/1002_20080220115200.mpg':</font></div><div><font class="Apple-style-span" face="Courier">  Duration: 00:13:01.4, start: 34287.590456, bitrate: 3888 kb/s</font></div><div><font class="Apple-style-span" face="Courier">  Stream #0.0[0x78]: Video: mpeg2video, yuv420p, 720x576, 15000 kb/s, 25.00 fps(r)</font></div><div><font class="Apple-style-span" face="Courier">  Stream #0.1[0x82](fra): Audio: mp2, 48000 Hz, stereo, 192 kb/s</font></div><div><font class="Apple-style-span" face="Courier">  Stream #0.2[0x8c](fra): Subtitle: dvbsub</font></div><div><font class="Apple-style-span" face="Courier">2008-02-20 15:34:12.539 duration = 781</font></div><div><br class="webkit-block-placeholder"></div><div>Here you can see (fra) for each soundtrack. Is it a known bug ?</div><div><br class="webkit-block-placeholder"></div><div><br class="webkit-block-placeholder"></div><div>Anyway, thanks for your unvaluable software !</div><div><br class="webkit-block-placeholder"></div><div>GoM</div></div></div></div></div></div></div></body></html>