[FFmpeg-devel] [PATCH] simplify ipmovie pts calculation
Mike Melanson
mike
Sun Sep 28 11:23:09 CEST 2008
Reimar D?ffinger wrote:
> Hello,
> as mentioned here: http://multimedia.cx/eggs/baldur-in-bulk/ the ipmovie
> pts stuff is a bit of a mess.
> While fixing that will actually worsen the situation when encoding with
> bitrate without specifying a frame rate to x264 (since x264 will now not
> just assume 90000 fps but 1000000 fps), the previous code was needlessly
> complex.
> My change is untested though, and the cast to uint64_t when calculating
> frame_pts_inc is probably an unrelated change (actually I do not know
> for sure if not maybe the old code is correct, it did look odd though).
Thanks for taking an interest in this. I think perhaps a better solution
would be to not initialize the video stream until encountering a create
timer opcode in a video chunk. The timer opcode establishes the framerate.
The RoQ demuxer also needs to be revised similarly. I.e., don't
initialize an audio or video stream until encountering a corresponding
chunk while normally traversing the file. Currently, it takes the silly
approach of scanning ahead for a 1/2 second or so to find an audio
buffer in order to determine if it should initialize an audio stream
before playing anything.
--
-Mike Melanson
More information about the ffmpeg-devel
mailing list