[theora] FFMEG2Threora Bug
charlie.mas at gmail.com
Fri Jun 13 01:50:16 PDT 2008
On Fri, Jun 13, 2008 at 12:05 AM, Conrad Parker <conrad at metadecks.org> wrote:
> 2008/6/13 Charles Mason <charlie.mas at gmail.com>:
>> Today I was transcoding a video using the latest release of
>> ffmpeg2theora and noticed some strange artifacts in the output video.
>> In areas which are very white small black marks appear. I was
>> transcoding the blender open movie "Big Buck Bunny" and its very
>> noticeable on the credits in particular. The source video was their
>> official 1080p .ogg download.
> You're transcoding from compressed Ogg Theora to compressed Ogg Theora?
Yeah, on the face of it sounds crazy I know. However may app needs to
be able to join a number of separate ogg files into a single logical
stream. Because the setup headers are missing from all but the first
stream, everything about the streams must be identical. For various
reasons I can't simply have multiple ogg streams in the output. Not
least the fact that most current Theora players will only play the
first stream, despite the spec allowing an unlimited number.
So for Theora that means the frame rate, target bit rate, and the
resolution all must be identical. For Vorbis streams the sample rate,
target bit rate and total channels all must be identical. Also because
each encoder implementation is able to produce different setup packets
(to allow improvements in the encoder) they all need to be encoded
with the same implementation of the encoder and likley the same
On the face of it this might seem like a lot of restrictions but for
my particular needs its fine. To make this process work the app has to
adjust the granualpos timestamps on each Theora / Vorbis packet. It
also has to adjust the end of each source ogg stream to make sure the
audio and video streams finish at exactly the same point in time, so
the next ones they are joined too don't become out of sync.
This means that the joining process can avoid rencoding the source
streams, which makes it much faster. Providing that is you can control
the original encoding parameters. I was only using Big Buck Bunny as a
test hence why I was rencoding it first using ffmpeg2theora to make it
match the needed parameters. So far the process I have described above
is working really well.
To try and reduce the loss of quality by starting with a compressed
source, I used the highest resolution source I could, hence why I went
from 1080p to 720p rather than using the official 720p download from
the movie's site.
Hope that clarifies my some what odd sounding problem.
More information about the theora