Tom Metro wrote: >>> If that fixes it, I'll revisit Roger's transcoding wrapper script. >> I could never get Roger's script to work correctly. After transcoding >> to mp3 the audio was always out of sync. It wasn't an mvpmc issue, as >> the transcoded file would play with the audio out of sync wherever it >> was played from. > > I'm not sure which transcoder I'll end up using. I tend to see better > quality from mencoder, but it runs into problems more often than ffmpeg. > Given that this is audio-only transcode, ffmepg will probably do the job > adequately.
I tried ffmpeg, but ran into: % ffmpeg -i 2061_20100406103000.mpg.bak -vcodec copy -acodec mp2 -ab '192' -ar 48000 -f mpeg 2061_20100406103000.mpg [...] Input #0, mpegts, from '2061_20100406103000.mpg.bak': Stream #0.0[0x840]: Video: mpeg2video, yuv420p, 704x480, 7000 kb/s, 29.97 fps(r) Stream #0.1[0x841](eng): Audio: 0x0000, 48000 Hz, stereo, 192 kb/s [...] Stream mapping: Stream #0.0 -> #0.0 Stream #0.1 -> #0.1 Unsupported codec (id=86020) for input stream #0.1 Apparently no AC3 decoder is available in my build. Rather than rebuilding, I tried mencoder: % mencoder -of mpeg -mpegopts format=dvd -ovc copy -oac twolame -twolameopts br=224 -o 2039_20100407200000.mpg 2039_20100407200000.mpg.bak and that worked. Audio sync appears a bit fragile. At the start of playback or after seeking it is likely to be off, but a jump back/forward or hitting the record button usually brings it back in sync. I wish I understood what was happening at a low-level that leads to this. It must relate to the way mencoder muxes the two streams. I'll have to experiment with mencoder options to see if MP3 does any better than MP2; whether audio bitrate makes a difference; whether -audio-delay helps (only works if the player pays attention to the delay time specified in the header); whether -audio-density or -audio-preload helps; and whether the "harddup video filter" documented here: http://www.mplayerhq.hu/DOCS/HTML/en/menc-feat-dvd-mpeg4.html#menc-feat-dvd-mpeg4-muxing-filter-issues helps (though that would mean modifying the video stream to inject duplicate frames). That page says: Without harddup, if MEncoder wants to duplicate a frame, it relies on the muxer to put a mark on the container so that the last frame will be displayed again to maintain sync while writing no actual frame. And: http://www.mplayerhq.hu/DOCS/HTML/en/menc-feat-vcd-dvd.html#menc-feat-vcd-dvd-a-v-sync In order to maintain audio/video synchronization throughout the encode, MEncoder has to drop or duplicate frames. This works rather well when muxing into an AVI file, but is almost guaranteed to fail to maintain A/V sync with other muxers such as MPEG. This is why it is necessary to append the harddup video filter at the end of the filter chain to avoid this kind of problem. I wonder if maybe the MVP's decoder (or mvpmc, if it extracts streams from the container) is not picking up those container markers and duplicating frames, resulting in more problematic sync on transcoded audio. Also, I didn't use the -noskip option, and I see a bunch of: Pos: 803.7s 23421f (22%) 115.38fps Trem: 11min 1030mb A-V:0.008 [2162:224] 1 duplicate frame(s)! Pos: 803.9s 23425f (22%) 115.38fps Trem: 11min 1030mb A-V:0.006 [2161:224] 1 duplicate frame(s)! This page: http://www.mplayerhq.hu/DOCS/HTML/en/menc-feat-dvd-mpeg4.html#menc-feat-dvd-mpeg4-av-sync suggests setting -mc 0 and -noskip to improve A/V sync, if your source material started with good sync. So there are a bunch of things to try, and already the video/audio is usable. (I also observed video framerate changes: Pos:1457.7s 42923f (40%) 112.52fps Trem: 9min 1029mb A-V:0.030 [2152:224] demux_mpg: 30000/1001fps NTSC content detected, switching framerate. Warning! FPS changed 23.976 -> 29.970 (-5.994005) [4] A-V:0.034 [2152:224] [...] Pos:1458.0s 42931f (40%) 112.49fps Trem: 9min 1029mb A-V:0.023 [2152:224] demux_mpg: 24000/1001fps progressive NTSC content detected, switching framerate. occurring periodically. I'm not sue if this is due to problems in the video stream, or an expected variation that occurs during some commercials.) I started a wiki page to cover digital TV related issues (sure, a bit late in the game, but might as well document my findings in case there are any other DTV stragglers still using mvpmc): http://mvpmc.wikispaces.com/Digital+TV I'll add documentation there on integrating the transcoding with MythTV. I added a note to the transcoding page and linked to the DTV page: http://mvpmc.wikispaces.com/transcoding And I added an HDHR page, which for now is mostly just a pointer (so it can easily be found in a search) to the DTV page: http://mvpmc.wikispaces.com/HDHomeRun+Digital+Tuner -Tom ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Mvpmc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mvpmc-users mvpmc wiki: http://mvpmc.wikispaces.com/
