Most likely due to changing A/V sync within the MPEG2 stream. It's a known problem without a known (bug-free) solution.I am writing some of my MythTV recordings to DVD and I get a-v sync drifts during the DVD recording, up to a second or two near the end of a two-hour recording (playing within myth is fine, though). I've noticed that many people have this problem, but all the solutions I've tried that people suggested haven't worked for me. For reference, I'm using a PVR-350, Myth 0.18, ivtv-0.2.0-rc3e, on a headless system running on a Celeron 566 with SuSE Linux 9.2.
The demuxing/remuxing is the root of the evil here. All *relative* sync information is lost in this process. It's fine if the sync doesn't change throughout the stream, but ivtv captures will sometimes glitch the sync.To burn to DVD, I have a script crafted after the mythtv docs ala the blurb at the end of http://mythtv.org/docs/mythtv-HOWTO-22.html. This involves splitting the audio and video streams with mpeg2desc, remultiplexing them with mplex, creating a dvd file structure with dvdauthor, and writing an iso file system directly to DVD with growisofs.
I think those "encoded stream types" in the ivtv are for the most part like the darkness knob on a toaster. It just makes you *think* you're in control.Basically, I've tried:
1) Changing the encoded stream type to "DVD Special 2" in Myth. Still have the sync issue.
> 2) Trying to re-encode using mencoder like the
That's not reencoding... just copying the stream and remuxing it on-the-fly.following:
mencoder <nuv file> -of mpeg -oac copy -ovc copy -o<new nuv file>
mencoder seems to do just fine, but when I do this, mpeg2desc or mplex complain that they don't understand the file format. 3) Trying to re-encode using ffmpeg, setting the output format to mpeg2video, making sure that audio bitrate is the same (384kpbs), and preserving the stream mappings. The command looks something like
ffmpeg -i <nuv file> -f mpegts -vcodec mpegvideo -ab384 -b 4500 -maxrate 6000 -bufsize 200 <new nuv file>
Again, does just fine, but mpeg2desc or mplex complain that they don't like the resulting file format.
...and a few other things, including using mpgtx to cut the file into segments or nuvexport (I get myriad complaints about formats or obscure errors). Regarding the file format complaints, I've looked for settings to try that won't make mplex or mpeg2desc barf, but I can't find any. The errors look like this:
INFO: [mplex] mplex version 1.6.2 (2.2.3 $Date: 2004/01/13 20:45:26 $) **ERROR: [mplex] File unrecogniseable! **ERROR: [mplex] File unrecogniseable! **ERROR: [mplex] Unrecogniseable file(s)... exiting.
In any case, it seems the initial problem comes from errors that are generated by the PVR350's encoder. So, it seems the right approach would be some tool that can re-encode the streams while preserving the stream format (and the sync!) and cleaning up the stream errors generated by the PVR. Keeping it playable on the PVR-350's output would be ideal, then I can try some user job in myth to do this to all the recordings automatically. (In fact, maybe take a couple Mbps out of the file in the process.)
Yeah, wouldn't that be great? So far, I haven't found it.
There are about 10 different major tools that I know of that can be used to manipulate MPEG2 streams. Some deal with some errors, some deal with others, but I haven't found any that do what's truly necessary.Is there a simple, idiot-proof way to do this? Since I'm running my myth system headless, something easily scriptable, and non-GUI is what I'm after. I really hope somebody who has solved this problem can show me the way.
Thanks!
-Cory
************************************************************************* * Cory Papenfuss * * Electrical Engineering candidate Ph.D. graduate student * * Virginia Polytechnic Institute and State University * *************************************************************************
_______________________________________________ mythtv-users mailing list [email protected] http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
