banding artefacts when encoding very subtle gradients
Hello all, I'm encoding a computer animation which has very subtle moving gradients, the color is nearly grey. I generate mpeg-2 files with low compression from piped .ppm images. During quiet moments in the animation, you see ugly banding artefacts. When there is more motion, I cannot see the banding any more. Are there any low-level settings I can change to increase quality? Right now, this is my command : PleinMuseum final.script | ffmpeg -f imagepipe -img pnm \ -i - -i bounce_0506.wav \ -target "pal-dvd" -aspect 4:3 -acodec mp2 -ab 128 \ -hq -b 8000 -maxrate 8000 -minrate 8000 -dc 10 PM-DV-p1.mpg I'm very interested in any tips to improve quality, but sadly I'm running out of time for the deadline... Thanks, Erwin Driessens www.xs4all.nl/~notnot
Hi On Tuesday 07 June 2005 15:15, notnot at xs4all.nl wrote:
Hello all,
I'm encoding a computer animation which has very subtle moving gradients, the color is nearly grey. I generate mpeg-2 files with low compression from piped .ppm images. During quiet moments in the animation, you see ugly banding artefacts. When there is more motion, I cannot see the banding any more. Are there any low-level settings I can change to increase quality? Right now, this is my command :
PleinMuseum final.script | ffmpeg -f imagepipe -img pnm \ -i - -i bounce_0506.wav \ -target "pal-dvd" -aspect 4:3 -acodec mp2 -ab 128 \ -hq -b 8000 -maxrate 8000 -minrate 8000 -dc 10 PM-DV-p1.mpg
I'm very interested in any tips to improve quality, but sadly I'm running out of time for the deadline...
does the banding also occur with lossless codecs / is in the original? if yes its obviously not ffmpegs fault, and trivial to fix, just add a tiny bit of noise you can also try NSSE as compare function and a constant qscale of 1 (dont forget -qmin 1 though) [...] -- Michael
During quiet moments in the animation, you see ugly banding artefacts. When there is more motion, I cannot see the banding any more. Are there any low-level settings I can change to increase quality? Right now, this is my command :
PleinMuseum final.script | ffmpeg -f imagepipe -img pnm \ -i - -i bounce_0506.wav \ -target "pal-dvd" -aspect 4:3 -acodec mp2 -ab 128 \ -hq -b 8000 -maxrate 8000 -minrate 8000 -dc 10 PM-DV-p1.mpg
I'm very interested in any tips to improve quality, but sadly I'm running out of time for the deadline...
does the banding also occur with lossless codecs / is in the original? if yes its obviously not ffmpegs fault, and trivial to fix, just add a tiny bit of noise
The banding is definately not in the original.
you can also try NSSE as compare function and a constant qscale of 1 (dont forget -qmin 1 though)
Hmm, I'm asked to produce constant bit rate files, and in the manual I see that -qscale is only for variable bit rate, right? I will try it anyway. Can I use NSSE with CBR encoding? Adding some noise is an interesting idea, which I would like to explore. Is it possible to do that using ffmpeg, or should I do that in my program that renders the frames? Thanks, Erwin www.xs4all.nl/~notnot
Hello Michael,
you can also try NSSE as compare function and a constant qscale of 1 (dont forget -qmin 1 though)
I see that there are various compare functions, which one(s) should I try to set to NSSE? Please give an example of the syntax to use. Thanks, Erwin www.xs4all.nl/~notnot
you can also try NSSE as compare function and a constant qscale of 1 (dont forget -qmin 1 though)
Ok, I've got slightly better results with this command : PleinMuseum final.script | ffmpeg -f imagepipe -img pnm \ -i - -i bounce_0506.wav \ -target "pal-dvd" -aspect 4:3 -acodec mp2 -ab 128 -qscale 1 -qmin 1 \ -cmp NSSE -hq -b 8000 -maxrate 8000 -minrate 8000 -dc 10 \ PM-DV-p1-try5.mpg The banding is still present, but the contour boundaries are smoother. It looks a little like a 6-bit color display of the 8-bit original. I hope this makes sense to you. I will now experiment with adding a little noise to all pixels, for each animation frame. Erwin www.xs4all.nl/~notnot
Hi On Tuesday 07 June 2005 20:27, notnot at xs4all.nl wrote:
you can also try NSSE as compare function and a constant qscale of 1 (dont forget -qmin 1 though)
Ok, I've got slightly better results with this command :
PleinMuseum final.script | ffmpeg -f imagepipe -img pnm \ -i - -i bounce_0506.wav \ -target "pal-dvd" -aspect 4:3 -acodec mp2 -ab 128 -qscale 1 -qmin 1 \ -cmp NSSE -hq -b 8000 -maxrate 8000 -minrate 8000 -dc 10 \
s/NSSE/10/ [...] -- Michael
participants (2)
-
michaelni@gmx.at -
notnot@xs4all.nl