[Xvid-devel] XVID encoding image with "run/ghost" distortions

Michael Militzer michael at xvid.org
Sat Jun 14 18:21:33 CEST 2014


Hi Rob,

Xvid is optimized for encoding natural video, not random 3D animations
with solid colors that may quickly change. That said, I think you should
try to disable B-frames (as the bidirectional prediction could lead to
ghosting effects for input of the nature you describe). Also, you need
to make sure that you have configured a high enough encoding quality
(e.g. by selecting the "constant quantizer" rate-control mode and setting
the quantization paramater to "2").

As to your other question: Note that "interleave" is not the same than
"interlace". "Interleave" simpy means that chunks of the audio and video
tracks are stored in an interleaved fashion in the AVI (so that seeking/
synchronized playback is easier) instead of simply concatenating the
audio/video tracks in their entirety. "interlace" refers to the video
track only and whether this is in frames or fields mode. So "interleave"
and "interlace" have nothing to do with each other.

Best regards,
Michael


Quoting Robin Colclough <rcc at sentel-advance.com>:

> After encoding, I´m seeing pixels that getting left behind when 3D
> animations occur in the frame, especially on object with solid colors.
>
> Images that are pure video, or photos don´t seem to blur/smudge, but solid
> color objects in the frame do.
>
> Can anyone give an idea what to check?
>
> The test system is encoding the frames in just 6 mS, so its not overloaded,
> and no error are reported.
>
> As to the AVI output, I used a tool to check them, and it says that the file
> has interleaved content, Audio and Video streams, but that the ISINTERLACED
> flag in the avi main header is not set.  But with Microsofts AVI API
> AVIFileWriteStream etc, I can find no way to set this flag.
>
> This is like pulling teeth!!
>
> -----Original Message-----
> From: xvid-devel-request at xvid.org
> Sent: Wednesday, June 11, 2014 12:00 PM
> To: xvid-devel at xvid.org
> Subject: Xvid-devel Digest, Vol 118, Issue 2
>
> Send Xvid-devel mailing list submissions to
> xvid-devel at xvid.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://list.xvid.org/mailman/listinfo/xvid-devel
> or, via email, send a message with subject or body 'help' to
> xvid-devel-request at xvid.org
>
> You can reach the person managing the list at
> xvid-devel-owner at xvid.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Xvid-devel digest..."
>
>
> Today's Topics:
>
>    1. Re: Xvid-devel Digest, Vol 118, Issue 1 (Robin Colclough)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Tue, 10 Jun 2014 20:58:12 +0200
> From: "Robin Colclough" <rcc at sentel-advance.com>
> Subject: Re: [Xvid-devel] Xvid-devel Digest, Vol 118, Issue 1
> To: <xvid-devel at xvid.org>
> Message-ID: <E07ABCF23AB94EFEBE35AD541A859A9B at UsuarioPC>
> Content-Type: text/plain; format=flowed; charset="iso-8859-1";
> reply-type=original
>
> Hi, and thanks for the replies which I?ve only just seen at the end of the
> email; not familiar with this format yet.
>
> I am using AVIStreamWrite to output the xvid encoded video and audio (lame
> mp3 encoder).
>
> I?m trying to synchronise 3D gpu frame drawing with the encoding process,
> and its been quite difficult to do in real-time but I?m almost there.
>
> The xvid encoder doesn?t always output a frame at each time slot, mainly
> because the GPU can?t process more complex 3D within real-time constraints.
>
> To handle this I now calculate the AVI write frame number using the elapsed
> time, using QueryPerformanceCounter().
>
> That seems to work, as the video file now tracks each frame to the correct
> time spot.
>
> The audio arrives every 2 seconds from the mp3 encoder, because the WAVE API
> makes calls every 2 seconds with the cached audio stream.
>
> The audio also records okay, BUT when I play the file its synced until I
> click the player timeline to move the play point, then the audio is just not
> synced anymore.
>
> Its not an XVID problem as such, but so far I?ve no idea why the audio
> stream doesn?t get set to the correct time.
>
> Thanks
> Rob
>
>
> -----Original Message-----
> From: xvid-devel-request at xvid.org
> Sent: Tuesday, June 03, 2014 12:00 PM
> To: xvid-devel at xvid.org
> Subject: Xvid-devel Digest, Vol 118, Issue 1
>
> Send Xvid-devel mailing list submissions to
> xvid-devel at xvid.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://list.xvid.org/mailman/listinfo/xvid-devel
> or, via email, send a message with subject or body 'help' to
> xvid-devel-request at xvid.org
>
> You can reach the person managing the list at
> xvid-devel-owner at xvid.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Xvid-devel digest..."
>
>
> Today's Topics:
>
>    1. I set FPS to 120, encode 240 frames, and the video plays back
>       over some 8-10 seconds (Robin Colclough)
>    2. Re: I set FPS to 120, encode 240 frames, and the video plays
>       back over some 8-10 seconds (Michael Militzer)
>    3. Re: I set FPS to 120, encode 240 frames, and the video plays
>       back over some 8-10 seconds (Elio Blanca)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Tue, 3 Jun 2014 10:33:23 +0200
> From: "Robin Colclough" <rcc at sentel-advance.com>
> Subject: [Xvid-devel] I set FPS to 120, encode 240 frames, and the
> video plays back over some 8-10 seconds
> To: <xvid-devel at xvid.org>
> Message-ID: <D088D7DB96234E9CA1626705FEA34CCF at UsuarioPC>
> Content-Type: text/plain; charset="iso-8859-1"
>
> I?m using the xvid encoder in non-realtime to encode frames, but its like
> xvid ignores the FPS I set, and records at the incoming speed.
>
> I set the FPS to 120, then encode 240 frames, i.e, 2 seconds of video, put
> the playback file is wrong, and runs at around the same speed I sent the
> frames in.
>
> Why would this happen?
>
> ------------------------------
>
> Message: 2
> Date: Tue, 03 Jun 2014 11:14:18 +0200
> From: Michael Militzer <michael at xvid.org>
> Subject: Re: [Xvid-devel] I set FPS to 120, encode 240 frames, and the
> video plays back over some 8-10 seconds
> To: xvid-devel at xvid.org
> Message-ID: <20140603111418.k50oat31cgw8ogws at www.lansco.de>
> Content-Type: text/plain; charset=ISO-8859-1; DelSp="Yes";
> format="flowed"
>
> Hi,
>
> the first questions are: Which program/API do you use to encode your file?
> And which program do you use to decode/playback?
>
> Note that framerate information is not only written by the encoder into the
> encoded bitstream but container formats (like AVI) have a framerate setting
> in their container headers as well. The framerate as written in the
> container usually precedes the framerate setting that the encoder wrote into
> the bitstream.
>
> In practice this means that if you e.g. write your video into AVI output
> but don't set the framerate of the AVI properly, you can specify whatever
> framerate you want in Xvid encoder settings but it will have no effect when
> playing the file (because the AVI framerate precedes).
>
> Best regards,
> Michael
>
>
> Quoting Robin Colclough <rcc at sentel-advance.com>:
>
>> I?m using the xvid encoder in non-realtime to encode frames, but its
>>  like xvid ignores the FPS I set, and records at the incoming speed.
>>
>> I set the FPS to 120, then encode 240 frames, i.e, 2 seconds of
>> video, put the playback file is wrong, and runs at around the same
>> speed I sent the frames in.
>>
>> Why would this happen?
>> _______________________________________________
>> Xvid-devel mailing list
>> Xvid-devel at xvid.org
>> http://list.xvid.org/mailman/listinfo/xvid-devel
>>
>>
>
>
>
>
>
>
> ------------------------------
>
> Message: 3
> Date: Tue, 03 Jun 2014 11:25:29 +0200
> From: Elio Blanca <eblanca76 at users.sourceforge.net>
> Subject: Re: [Xvid-devel] I set FPS to 120, encode 240 frames, and the
> video plays back over some 8-10 seconds
> To: xvid-devel at xvid.org
> Message-ID: <538D9489.1030601 at users.sourceforge.net>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Further, I would suggest some useful free tools that can tell you many
> details about the resulting
> stream, such as "mplayer" (it is a command line tool, better results with
> `mplayer -identify
> video_stream_name'), "avidemux" and "media player classic - home cinema",
> any of them can report
> which frame rate has been set in the container header in order to clarify
> where the error lies.
>
>
>
>
> Il 03/06/2014 11:14, Michael Militzer ha scritto:
>> Hi,
>>
>> the first questions are: Which program/API do you use to encode your file?
>> And which program do you use to decode/playback?
>>
>> Note that framerate information is not only written by the encoder into
>> the
>> encoded bitstream but container formats (like AVI) have a framerate
>> setting
>> in their container headers as well. The framerate as written in the
>> container usually precedes the framerate setting that the encoder wrote
>> into
>> the bitstream.
>>
>> In practice this means that if you e.g. write your video into AVI output
>> but don't set the framerate of the AVI properly, you can specify whatever
>> framerate you want in Xvid encoder settings but it will have no effect
>> when
>> playing the file (because the AVI framerate precedes).
>>
>> Best regards,
>> Michael
>>
>>
>> Quoting Robin Colclough <rcc at sentel-advance.com>:
>>
>>> I?m using the xvid encoder in non-realtime to encode frames, but its
>>>   like xvid ignores the FPS I set, and records at the incoming speed.
>>>
>>> I set the FPS to 120, then encode 240 frames, i.e, 2 seconds of
>>> video, put the playback file is wrong, and runs at around the same
>>> speed I sent the frames in.
>>>
>>> Why would this happen?
>>> _______________________________________________
>>> Xvid-devel mailing list
>>> Xvid-devel at xvid.org
>>> http://list.xvid.org/mailman/listinfo/xvid-devel
>>>
>>>
>>
>>
>>
>>
>> _______________________________________________
>> Xvid-devel mailing list
>> Xvid-devel at xvid.org
>> http://list.xvid.org/mailman/listinfo/xvid-devel
>>
>
>
> ------------------------------
>
> _______________________________________________
> Xvid-devel mailing list
> Xvid-devel at xvid.org
> http://list.xvid.org/mailman/listinfo/xvid-devel
>
>
> End of Xvid-devel Digest, Vol 118, Issue 1
> ******************************************
>
>
>
> ------------------------------
>
> _______________________________________________
> Xvid-devel mailing list
> Xvid-devel at xvid.org
> http://list.xvid.org/mailman/listinfo/xvid-devel
>
>
> End of Xvid-devel Digest, Vol 118, Issue 2
> ******************************************
>
> _______________________________________________
> Xvid-devel mailing list
> Xvid-devel at xvid.org
> http://list.xvid.org/mailman/listinfo/xvid-devel
>
>






More information about the Xvid-devel mailing list