I've got my encoder working now... and i put a proeprty page interface to allow the user to set a few encoding paramters to start off with... but changing the paramters doesn't seem to make barely any difference... These are the defaults i'm using... mTheoraInfo.target_bitrate=400000; mTheoraInfo.quality=30; mTheoraInfo.dropframes_p=0; mTheoraInfo.quick_p=1; mTheoraInfo.keyframe_auto_p=1; mTheoraInfo.keyframe_frequency=64; mTheoraInfo.keyframe_frequency_force=64; mTheoraInfo.keyframe_data_target_bitrate=mTheoraInfo.target_bitrate*1.5; mTheoraInfo.keyframe_auto_threshold=80; mTheoraInfo.keyframe_mindistance=8; mTheoraInfo.noise_sensitivity=1; And i'm letting the user set target_bitrate, quality and keyframe_frequency... The fields i don't understand are quick_p.... what does this do ? What implications does it have on the other parameters. Should freq_force be set equal to keyframe_freq ? or doesn't matter. What does dropframes_p and keyframe_auto_p and auto_threshold and noise sensitivity do ? And what are the valid ranges/values for these paramaters. Do any parameters invlaidate others ? Thanks, Zen.
illiminable wrote:> The fields i don't understand are quick_p.... what does this do ? What > implications does it have on the other parameters.IIRC quick_p=0 enables a "high-quality-mode" - much slower, quality is slightly better (expensive motion-estimation, I assume). quick_p=1 is what VP3 called "Quick Compress". Maik -- EN: Every mail bigger than 35 KByte will be deleted automatically from my mailbox. Please contact me before sending any attachments. DE: Jede Mail gr??er als 35 KByte wird automatisch aus meinem Postfach gel?scht. Bitte kontaktieren Sie mich, wenn Sie Anh??nge schicken wollen.
>>>>> "illiminable" == illiminable <ogg@illiminable.com> writes:> I've got my encoder working now... and i put a proeprty page interface > to allow the user to set a few encoding paramters to start off > with... but changing the paramters doesn't seem to make barely any > difference...> These are the defaults i'm using...> mTheoraInfo.keyframe_frequency=64; > mTheoraInfo.keyframe_frequency_force=64;Isn't a keyframe distance of 64 quite low? I mean, lavc's mpeg4 uses 240 (ca 10s) by default. AFAIR any keyframe distances where supposed to work with Theora, as the DCT is 100% integer and bit-accurately specified. David -- GnuPG public key: http://user.cs.tu-berlin.de/~dvdkhlng/dk.gpg Fingerprint: B17A DC95 D293 657B 4205 D016 7DEF 5323 C174 7D40
Forwarded... stupid thing ! ----- Original Message ----- From: "illiminable" <ogg@illiminable.com> To: "Maik Merten" <maikmerten@gmx.net> Sent: Saturday, July 03, 2004 9:08 PM Subject: Re: [Theora-dev] Encoding paramaters...> >illiminable wrote: > >> Do the frame size parameters in theora_info have to match the values in > >> yuv_buffer ? > >> > >> ie Is the idea that i can feed in a 800x600 video so the yuv valueswill> be > >> these and the values in theora_info aer say 320x240, and it will do the > >> frame shrinking internally ? > > > >I don`t know. > > > >(I would be pleasantly surprised if it would do automatic scaling... > >something like cropping seems more likely to me - if libtheora doesn`t > >explode). > > Nope... libtheora explodes :) > > >> Anyway... what i'm wondering is... does this multiple of 16 restriction > only > >> apply to the final frame sizes or also to the values in yuv_buffer... > hence > >> you have to pad it out. > > > > > >I *think* this restriction applies to both... > > >From encoder_example.c > <snip> > > >Seems like padding happens in the encoding-frontend, not in libtheora. > > Hmmm... so how is a decoder supposed to know what is padding ? I guessthat> does explain why a few mpg->theora movies i've tested have black bordering > :( > > Zen. > > > > -- > EN: Every mail bigger than 35 KByte will be deleted automatically from > my mailbox. Please contact me before sending any attachments. > DE: Jede Mail gr??er als 35 KByte wird automatisch aus meinem Postfach > gel?scht. Bitte kontaktieren Sie mich, wenn Sie Anh??nge schicken wollen. > _______________________________________________ > Theora-dev mailing list > Theora-dev@xiph.org > http://lists.xiph.org/mailman/listinfo/theora-dev > >
>>>>> "illiminable" == illiminable <ogg@illiminable.com> writes:> These are the defaults i'm using...> mTheoraInfo.target_bitrate=400000; mTheoraInfo.quality=30; > mTheoraInfo.dropframes_p=0; mTheoraInfo.quick_p=1; > mTheoraInfo.keyframe_auto_p=1; mTheoraInfo.keyframe_frequency=64; > mTheoraInfo.keyframe_frequency_force=64; > mTheoraInfo.keyframe_data_target_bitrate=mTheoraInfo.target_bitrate*1.5; > mTheoraInfo.keyframe_auto_threshold=80; > mTheoraInfo.keyframe_mindistance=8; mTheoraInfo.noise_sensitivity=1;There's another parameter, that's also not used in encoder_example: sharpness. I played around with it a litte (by hacking encoder_example.c) and it seems, that it's reverse. Valid values are 0, 1 and 2. If set to zero (the default), images are sharpest, but there are artifacts (ringing?) around sharp edges, which seems to be a problem for encoding high-quality anime (with lots of fine, sharp lines). I set this to `2' now, and the result for "Chihiro" looks much better. I get an artifact-free video with resolution 640x448 at quality `-v 5'. After some tests, the average bitrate seems to be less than 550 kbps. Wow. Note that I also set keyframe_frequency_force to 512. BTW from a look at `toplevel.c' it is somewhat unclear to me, how `keyframe_frequency' is interpreted, when `keyframe_auto_p' is 1. In that case `keyframe_frequency_force' is used for keyframe generation, and `keyframe_frequency' is only used for some kind of bitrate estimation. Note that for a given quality, high values of `sharpness' also make bitrate drop by quite some amount, so that for the same bitrate, an actually higher quality should be selected. David -- GnuPG public key: http://user.cs.tu-berlin.de/~dvdkhlng/dk.gpg Fingerprint: B17A DC95 D293 657B 4205 D016 7DEF 5323 C174 7D40