On Mon, 1 Nov 2004, Steven M. Schultz wrote:


On Mon, 1 Nov 2004, Dik Takken wrote:

Just something you might want to know about the DCT/iDCT overflow thing
(you might know it already): I managed to trigger this overflow problem at
-q 2 too. So, for braindead encoding purposes, -q 3 is the limit. Maybe

For typical capture data (rather than computer generated imagery) -q 4 is the practical limit with 5 being the usual value used.

You mean that -q 4 can also trigger encoder bugs? I would like to get this one straight: Which q values can lead to encoding *errors*, not artifacts?


        It's a good idea to leave some variation between the Average and Peak
        rates.  Low values of -q end up (in addition to artifacting) creating
        CBR (Constant Bit Rate) streams with large spikes.

I think I set things up correctly now in my automatic (aka braindead) encoding script: It sets the target bitrate on 8000 and the q value on 8. Then, in a loop, it encodes the video using these settings and reads the peak a and average bitrate using mplex. When the peak rate does not exceed 8000 and the averate rate is less than 7000, it's assumed that it's safe to re-encode with q decreased by one. This continues until either the peak rate exceeds 8000 kbit, or the average bitrate exceeds 7000 kbit, or the q value gets below 3. It outputs the last known encoding that does not violate any of these requirements as the final result.


I guess this method is safe, because it does not push mpeg2enc into encoding really close to the b value, which leads to artifacts and spikes.


I have had success with -q 3 on some select material (computer generated animation) that I have recoded from HDTV to DVD but the usual value used is -q 4.

        Noisier material seems to benefit from higher values so for the
        SVCDs I'm redoing as 1/2 D1 DVDs a -q of 5 works well.

That makes sense, because noisy material will lead to a high average bitrate at relatively high q values. No need to push the bitrate up by decreasing q a lot. Clean material does not need many bits to get to the same quality, so you can push it quite a bit and trick it into spending bits on really small details, if any.


this could be mentioned in the BUGS section of the mpeg2enc man page.

Probably so. I think there is a mention about "values below 4 are extremes" in the 'howto'.

It sais I should only use those values when I know what I'm doing. Well, I didn't because it didn't say what would happen. :) Now I know. :D It does tell about the danger of artifacting, but it does not mention that it can lead to encoding errors.


Cheers,

Dik


------------------------------------------------------- This SF.Net email is sponsored by: Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux. http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click _______________________________________________ Mjpeg-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/mjpeg-users

Reply via email to