On Fri, 11 Feb 2005, David Madsen wrote:

I just grabbed this patch out of the gentoo portage tree.  It should
enable you to play the transcoded .nuv files.

If you are using Gentoo there is a +mythtv USE flag that will enable
this patch.

I am using this patch with  MPlayer 1.0_pre6

Boy, this is *awfully* close. I'm surprised that the patch still applies, but it certainly did. There are a few issues with it, however. I've got a transcoded (MPEG4) file I've been messing with.

- Playing works, but seeking has issues (can't find keyframes). It gets temporarily "macroblocked" when seeking, and I get messages like this while seeking in the .nuv file:
<snip>
[mpeg4 @ 0x8625f20]warning: first frame is no keyframe?% ??,?% 0 0
[mpeg4 @ 0x8625f20]warning: first frame is no keyframe?% ??,?% 0 0
A: 203.7 V: 203.9 A-V: -0.184 ct: -0.095 98/ 98 13% 0% 1.2% 0 0



- Copying to an AVI almost works with this command: mencoder test.nuv -oac copy -ovc copy -o test.avi -force-avi-aspect 1.33 ... but it spews out messages like this: <snip> Pos: 2.5s 71f ( 0%) 0fps Trem: 0min 108mb A-V:-0.067 [2435:128] 1 duplicate frame(s)! Pos: 2.9s 81f ( 0%) 0fps Trem: 0min 118mb A-V:-0.067 [2347:128] 1 duplicate frame(s)! <snip> ... and the resulting .avi file will play, but barf on a seek with this: <snip> [mpeg4 @ 0x8625f20]warning: first frame is no keyframe3% 0.8% 0 0 [mpeg4 @ 0x8625f20]ac-tex damaged at 24 16 [mpeg4 @ 0x8625f20]Error at MB: 520 [mpeg4 @ 0x8625f20]concealing 2147483647 errors A: 0.0 V: 601.6 A-V:-601.568 ct: -0.103 18030/18030 ??% ??% ??,?% 0 0 Exiting... (End of file)

It certainly looks like the keyframes are being called duplicate frames by mencoder and either not copied or not marked as keyframes. Looking through the headers and the patch, the datatype has apparently changed somewhat since the patch was created. The patch looks like this:
+/* for MythTV */
+typedef struct extendeddata
+{
+ int version; // yes, this is repeated from the file header
+ int video_fourcc; // video encoding method used
+ int audio_fourcc; // audio encoding method used
+ // generic data
+ int audio_sample_rate;
+ int audio_bits_per_sample;
+ int audio_channels;
+ // codec specific
+ // mp3lame
+ int audio_compression_ratio;
+ int audio_quality;
+ // rtjpeg
+ int rtjpeg_quality;
+ int rtjpeg_luma_filter;
+ int rtjpeg_chroma_filter;
+ // libavcodec
+ int lavc_bitrate;
+ int lavc_qmin;
+ int lavc_qmax;
+ int lavc_maxqdiff;
+ // unused for later -- total size of 128 integers.
+ // new fields must be added at the end, above this comment.
+ int expansion[113];


... but the format.h in mythtv-0.16 (which is what I recorded it with) looks like this:

typedef struct extendeddata
{
   int version;            // yes, this is repeated from the file header
   int video_fourcc;       // video encoding method used
   int audio_fourcc;       // audio encoding method used
   // generic data
   int audio_sample_rate;
   int audio_bits_per_sample;
   int audio_channels;
   // codec specific
   // mp3lame
   int audio_compression_ratio;
   int audio_quality;
   // rtjpeg
   int rtjpeg_quality;
   int rtjpeg_luma_filter;
   int rtjpeg_chroma_filter;
   // libavcodec
   int lavc_bitrate;
   int lavc_qmin;
   int lavc_qmax;
   int lavc_maxqdiff;
   // seek table offset
   long long seektable_offset;
   // key frame adjust offset
   long long keyframeadjust_offset;
   // unused for later -- total size of 128 integers.
   // new fields must be added at the end, above this comment.
   int expansion[109];
} MYTH_PACKED extendeddata;

Anyway, it looks like the patch will still apply to mplayer and play (albeit slightly broken with no keyframes). Copying the streams directly almost works as well, but the patch needs a bit more tweaking. I might see if I can tinker with it (or shove it off on someone who codes better than I).

-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

Reply via email to