{"id":208,"date":"2008-04-28T20:19:50","date_gmt":"2008-04-29T01:19:50","guid":{"rendered":"http:\/\/www.summet.com\/blog\/?p=208"},"modified":"2008-07-20T11:02:40","modified_gmt":"2008-07-20T16:02:40","slug":"mythtv-mythdvd-movie-ripping-problem","status":"publish","type":"post","link":"https:\/\/www.summet.com\/blog\/2008\/04\/28\/mythtv-mythdvd-movie-ripping-problem\/","title":{"rendered":"MythTV \/ MythDVD movie ripping \/ playback problem (Solved!)"},"content":{"rendered":"<p>I have used Myth to rip a large number of my DVD&#39;s to AVI files (using either the Excellent or Good setting).&nbsp; Now that I am starting to play back the movies, I have found something that is very troubling.<\/p>\n<p> On many of the movies, the first 95% of the movie (e.g. 1:13 min of a 1:26 movie) plays flawlessly. However, near the end of the movie, the audio and video starts to speed up and get jerky. (Audio\/video sync is also thrown off.)<!--more--><\/p>\n<p> I have copied the files to a different box and played them with totem and mplayer and was happy to find that the files appear to be just fine. (or maybe mplayer\/totem deal with them better?)<br \/> &nbsp;<br \/> It seems that the problem is with the mythv internal video player.<\/p>\n<p> After a random sample of movies, I&#39;d say that at least 50-70% (but not all!) of the movies have this problem. The problem survives reboots of the mythtv box. <\/p>\n<p>I am using Xvmc for HDTV playback (with no problems), (OSD is B&amp;W) but not for the internal video player. (OSD is in full color)<\/p>\n<p> Even if I ESC from the movie and then go back into it (the internal player resumes at the same spot) the problems continue as before. If I rewind the movie, it works correctly before the &quot;problem starting spot&quot; but when it hits that spot, the problems resume.<\/p>\n<p> I suspect it may be a problem that is caused by the MythTV ripping system, as I have re-encoded movies using mencoder that then play back correctly in the internal video player.<\/p>\n<p>I was able to solve this problem (which appears to be a problem in the index of the avi files generated by MythDVD) by using mencoder to re-create the index for all of my video files.<\/p>\n<p><em>&nbsp; mencoder -idx MOVIE_TO_FIX.avi -ovc copy -oac copy -o FIXED_OUTPUT.avi<\/em><\/p>\n<p>I created the following script to go through my video files and re-create the index (it takes about a minute per movie). The script will only process a movie one time (keeping track by creating a marker file in the hidden .fixed_list directory) so it&#39;s safe to run every time you rip new DVD&#39;s without repeating work needlessly:<\/p>\n<address> <\/address>\n<address>&nbsp;#!\/bin\/bash<\/p>\n<p> for movie in *<br \/> do<br \/> &nbsp;if [ -f &quot;.fixed_list\/$movie.fixed&quot; ]<br \/> &nbsp;then<br \/> &nbsp;&nbsp; echo &quot;$movie already fixed&quot;<br \/> &nbsp;else<br \/> &nbsp;&nbsp; echo &quot;Processing $movie&quot;<br \/> &nbsp;&nbsp; mencoder -idx &quot;$movie&quot; -ovc copy -oac copy -o temp_file.avi<br \/> &nbsp;&nbsp; mv temp_file.avi &quot;$movie&quot;<br \/> &nbsp;&nbsp; touch &quot;.fixed_list\/$movie.fixed&quot;<br \/> &nbsp;fi<br \/> done<\/p><\/address>\n<p>Movies with a problem generated the following message when re-creating the index:<\/p>\n<p>&nbsp;ODML: Starting new RIFF chunk at 1023MB.m:<\/p>\n<p>I&#39;m not sure what a new RIFF chunk is, but apparently the built in MythDVD encoder is not producing them correctly.&nbsp;<\/p>\n<p> &nbsp; &nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have used Myth to rip a large number of my DVD&#39;s to AVI files (using either the Excellent or Good setting).&nbsp; Now that I am starting to play back the movies, I have found something that is very troubling. &hellip; <a href=\"https:\/\/www.summet.com\/blog\/2008\/04\/28\/mythtv-mythdvd-movie-ripping-problem\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,13,2],"tags":[47,14,46],"class_list":["post-208","post","type-post","status-publish","format-standard","hentry","category-linux","category-projects","category-technology","tag-dvd","tag-mythtv","tag-playback"],"_links":{"self":[{"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/posts\/208","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/comments?post=208"}],"version-history":[{"count":0,"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/posts\/208\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/media?parent=208"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/categories?post=208"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/tags?post=208"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}