On Mon, 5 Jun 2006 03:32:04 +0000 (UTC) [EMAIL PROTECTED] (Frederick Bruckman) wrote:
> Hi, > > When I tried to play, on a Philips DVP642, video encoded with > transcode and Xvid 1.1, I got the same problem as this fellow: > > http://www.exit1.org/archive/dvdrip-users/2005-08/msg00080.html > > After much trial and error, I finally figured out that forcing > "--export_par 1" would make the hardware player happy. I think > I see why, too: it looks like "export_xvid4.c" is unconditionally > setting up the codec for "user supplied PAR" with dimensions of > 0:0. It seems that Xvid 1.0 fixed that up for you, but 1.1 gives > you exactly what you ask for -- apparently. (I say "apparently" > because I don't have any way of checking those bits in the video > frames, but I strongly suspect it's actually passing that through > into the file, and "mplayer" ignores it, but the hardware player > hates it.) That's a really interesting issue. I'm also pretty convinced of this explanation, too, it seems reasonnable. > So here's a patch against anonCVS. The "unrelated" items were > required to build against NetBSD 1.2. Do with it as you wish. > > > diff > -ru /m/source/misc/transcode/export/export_xvid4.c > /var/tmp/transcode/export/export_xvid4.c > --- /m/source/misc/transcode/export/export_xvid4.c 2006-06-04 > 21:08:41.000000000 -0500 > +++ /var/tmp/transcode/export/export_xvid4.c 2006-06-04 > 21:31:33.000000000 -0500 @@ -61,6 +61,7 @@ #include "aud_aux.h" #include > "libtc/libtc.h" #include "libtcvideo/tcvideo.h" > +#include "tc_defaults.h" > > #include "libtc/cfgfile.h" > > @@ -1056,15 +1057,16 @@ > x->quant_intra_matrix = xcfg->quant_intra_matrix; > x->quant_inter_matrix = xcfg->quant_inter_matrix; > > - /* pixel aspect ratio > - * transcode.c uses 0 for EXT instead of 15 */ > - if ((vob->ex_par==0) && > - (vob->ex_par_width==1) && (vob->ex_par_height==1)) > - vob->ex_par = 1; > - > - x->par = (vob->ex_par==0)? XVID_PAR_EXT: vob->ex_par; > - x->par_width = vob->ex_par_width; > - x->par_height = vob->ex_par_height; > + /* pixel aspect ratio */ > + if (vob->export_attributes & TC_EXPORT_ATTRIBUTE_PAR) { > + if (vob->ex_par == 0) { > + x->par = XVID_PAR_EXT; > + x->par_width = vob->ex_par_width; > + x->par_height = vob->ex_par_height; > + } else { > + x->par = vob->ex_par; > + } > + } > > return; > } That's almost fine except for the EXPORT_ATTRIBUTE check. The meaning of EXPORT_ATTRIBUTE is: "user selected export profile FOOBAR but it has also provided an explicit value for a given encoding parameter (say, keyframe interval). So, don't overwrite this parameter internally." The whole EXPORT_ATTRIBUTE thing it's supposed to go away with Old Module Style export modules when new one are ready, since new export profile code uses a brand new, (hopefully!) better and smarter approach. [...] > I also have a longer patch against 1.0.2 to use the Xvid 1.1 rate > controls. I won't post it here because it's not very interesting: > besides being out-of-date against CVS, it doesn't have the profile > support (yet), but I'd be happy to send it to anyone who wants to > work on it. I'm interested to this patch, but unfortunately I'm facing an issue on import layer (the infamous directory mode thing), so I can't work on this quickly. Feel free to post the patch above on this thread if you like. Just a more word regarding profile support for xvid: if you mean transcode's export_prof(ile) support, don't worry about it since profile handling is going to change deeply in (hopefully) near future. Thanks for your contribute! :) Best regards, -- Francesco Romani - Ikitt ['people always complain, no matther what you do'] IM contact: (email-me, I have antispam default deny!) icq://27-83-87-867 some known bugs: http://www.transcoding.org/cgi-bin/transcode?Bug_Showcase
