[MPlayer-users] Re: spurious blockiness when transcoding high-bitrate mpeg2 to med-bitrate mpeg4
Simen Thoresen
simentt at dolphinics.no
Sat Jul 3 15:02:26 CEST 2004
> Il sab, 2004-07-03 alle 12:21, Simen Thoresen ha scritto:
>> Hi team,
>>
>> I've made a 16Mpbs mpeg2 grab of a 640x480 29.9fps Laserdisk, and now
>> want to transcode the 6G 'perfect' mpeg2 file to a more managable mpeg4
>> file for
>> sotrage. I'm transcoding using mencoder and lavc mpeg4, and the result is
>> imho very good (altho suggestions for improvement are appreciated). What
>> bugs me, is that on a few points in the mpeg4 stream, I get sudden bursts
>> of artifacts for a half a second or so. These do not coincide with
>> obvious damages in the original mpeg2-stream, nor do they occur in scenes
>> that are markedly different than what is being encoded without issue.
>>
>> So I'm wondering - what is causing this, and how do I avoid it?
>>
>> A few details more - re-encoding an excerpt of the original file with
>> generous lead-in and lead-out show the blockiness appearing differently
>> than from the original encode. Different excerpts cause differences in
>> the apparent blockiness, altho they always happen in the same scenes.
>> Re-encoding the same excerpts with only single-pass (default) encoding
>> also causes the blockiness to appear visually different, as does encoding
>> it with different (default) lavc:keyint settings.
>>
>> I'm using MEncoder 1.0pre3, built with gcc 2.95.3 on an Athlon XP box.
>>
>> The mencoder line I intended using, was
>>
>> mencoder partial.mpg -o partial.avi -mc 0 -ovc lavc -lavcopts
>> vcodec=mpeg4:vbitrate=1200:mbd=2:v4mv:keyint=132:vb_strategy=1:vpass=1
>> -oac mp3lame -lameopts preset=192 -vf pp=hb/vb/dr/al/lb
>>
>> mencoder partial.mpg -o partial.avi -mc 0 -ovc lavc -lavcopts
>> vcodec=mpeg4:vbitrate=1200:mbd=2:v4mv:keyint=132:vb_strategy=1:vpass=2
>> -oac
>> mp3lame -lameopts preset=192 -vf pp=hb/vb/dr/al/lb
>>
>> I can upload a 33M mpeg2 source-excerpt and a 4M mpeg4 transcoding of the
>> same excerpt if anyone wants to take a look.
>>
>> Anyone?
>>
>> Yours,
>> -S
>
> why all that post-processing? if the source is perfect you don't need
> any.
> Try to add a tiny amount of noise, sometimes it helps to remove blocks.
> Try also to encode with
> vcodec=mpeg4:vbitrate=1200:mbd=2:keyint=132:vqscale=2, and see if blocks
> are still there.
Hi Nico,
My grab is interlaced - I don't see this when I play it using tv-out, but I
would rather have my archived file be computer-playable as well. Appart from
deinterlacing, I have not given much thoughts to the filters. I guess hb, vb
and dr are useful for preventing the mpeg2-encoding-artifacts (even if not
noticeable) to be reencoded into mpeg4.
I tried to add vb_strategy=2 as you suggested, and the problem got less
noticeable, but did not disappear in my excerpt before I also removed the dr
and al filter (which did cause a few of the scenes to seem a bit overexposed).
Strangely, adding vb_strategy=2 and removing all filters increased the size
of the transcode from 16M to 75M, while readding the filters reduced it to
40M, and then removing the dr and al filters reduced it further to 32M. I
fear I'm messing something up, so I'll test this a bit more. My most recent
transcode was with the hb,vb and lb filters, and it did not show any of the
blocking I complained about.
I'll try 2-pass transcoding the whole thing again with reduced filters and
vb_strategy=2 added. Thank you for your help with this .-)
(I appologise if this post breaks any of the mail threading, I only
subscribe to the digests, and found this mail in the archive)
Yours,
-S
More information about the MPlayer-users
mailing list