low quality especially at color boundaries

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

low quality especially at color boundaries

Riley Berton
I am attempting to take a bunch of in memory RGB24 images and create a  
WMV2 video out of them.  I have gotten over the playback speed hurdle  
by using:

c->time_base.den = 1000;
c->time_base.num = 1;

Which allows me to use real millisecond based timestamps for each  
frame and that works well.

The problem I have now is quality of the output.  No matter how to  
attempt to tweak the bitrate or quantizer settings the quality is  
always about the same especially at close color boundaries (blockiness  
and artifacts around close color boundaries).  Here are the various  
settings I have tried in order to make a nice looking video out of my  
images:

  c->bit_rate

I have tried everything from 400kbps(400000) to 6500kbps leaving the  
quantizer stuff unset and have a huge difference in the file size, but  
little difference in the actual displayed quality.

        //c->flags |= CODEC_FLAG_QSCALE;
        //c->global_quality = st->quality = 30;

        //c->qmin = 30;
        //c->qmax = 31;
        //c->max_qdiff = 1;
        //c->cqp = 26;

Various quantizer settings which keep the file size relatively small  
but make not a big visible difference in the output quality...

Am I missing something obvious here??

Also note that I also tried MPEG4 with similar results so I doubt it  
is the codec.

riley

_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|

Re: low quality especially at color boundaries

Rich Felker
On Thu, Jan 10, 2008 at 03:56:42PM -0500, Riley Berton wrote:

> I am attempting to take a bunch of in memory RGB24 images and create a  
> WMV2 video out of them.  I have gotten over the playback speed hurdle  
> by using:
>
> c->time_base.den = 1000;
> c->time_base.num = 1;
>
> Which allows me to use real millisecond based timestamps for each  
> frame and that works well.
>
> The problem I have now is quality of the output.  No matter how to  
> attempt to tweak the bitrate or quantizer settings the quality is  
> always about the same especially at close color boundaries (blockiness  
> and artifacts around close color boundaries).  Here are the various  

It's probably that you're unhappy with 4:2:0 sampling. The only
available solutions are to use a codec that supports 4:2:2 (better but
still not perfect, and I doubt ffmpeg even supports encoding in 4:2:2
mode) such as MPEG-2 or upscaling to double the horizontal and
vertical resolution before encoding.

My guess is that your content is coming from computer screen capture
or vector art or some other sort of content with rigid boundaries. The
codecs you're using are fundamentally not intended for this sort of
artificial, "mathematically incorrect" content, but rather for data
sampled from the real world. So your results can only get so good...

Rich
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|

Re: low quality especially at color boundaries

Baptiste Coudurier
Hi,

Rich Felker wrote:
>
> [...]
>
> It's probably that you're unhappy with 4:2:0 sampling. The only
> available solutions are to use a codec that supports 4:2:2 (better but
> still not perfect, and I doubt ffmpeg even supports encoding in 4:2:2
> mode) such as MPEG-2 or upscaling to double the horizontal and
> vertical resolution before encoding.

FYI, since more than one year FFmpeg supports 4:2:2 MPEG-2 and MJPEG
encoding.

[...]

--
Baptiste COUDURIER                              GnuPG Key Id: 0x5C1ABAAA
SMARTJOG S.A.                                    http://www.smartjog.com
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
Phone: +33 1 49966312
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|

Re: low quality especially at color boundaries

Rich Felker
On Fri, Jan 11, 2008 at 10:57:09AM +0100, Baptiste Coudurier wrote:

> Hi,
>
> Rich Felker wrote:
> >
> > [...]
> >
> > It's probably that you're unhappy with 4:2:0 sampling. The only
> > available solutions are to use a codec that supports 4:2:2 (better but
> > still not perfect, and I doubt ffmpeg even supports encoding in 4:2:2
> > mode) such as MPEG-2 or upscaling to double the horizontal and
> > vertical resolution before encoding.
>
> FYI, since more than one year FFmpeg supports 4:2:2 MPEG-2 and MJPEG
> encoding.

Does it also support 4:4:4 jpeg?

Rich
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|

Re: low quality especially at color boundaries

Baptiste Coudurier
Rich Felker wrote:

> On Fri, Jan 11, 2008 at 10:57:09AM +0100, Baptiste Coudurier wrote:
>> Hi,
>>
>> Rich Felker wrote:
>>> [...]
>>>
>>> It's probably that you're unhappy with 4:2:0 sampling. The only
>>> available solutions are to use a codec that supports 4:2:2 (better but
>>> still not perfect, and I doubt ffmpeg even supports encoding in 4:2:2
>>> mode) such as MPEG-2 or upscaling to double the horizontal and
>>> vertical resolution before encoding.
>> FYI, since more than one year FFmpeg supports 4:2:2 MPEG-2 and MJPEG
>> encoding.
>
> Does it also support 4:4:4 jpeg?
>

Not yet, but it shouldn't be hard to add it.

--
Baptiste COUDURIER                              GnuPG Key Id: 0x5C1ABAAA
SMARTJOG S.A.                                    http://www.smartjog.com
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
Phone: +33 1 49966312
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user