[Libav-user] Why container and codec has different time base?
adrozdoff at gmail.com
Thu Nov 29 00:04:17 CET 2012
As I known some formats require specific timebases (like MPEGTS streams)
so, you can not manipulate with them. But you can manipulate with
CodecContext and can set time base that you need. For example, if FPS equal
to 25, you can set coder time base to 1/25 and simple increment PTS by 1
for every next frame.
If you known russian, you can read my note regard time-bases and PTS:
AVPacket PTS and DTS filelds readed from stream have a Stream time-base
AVFrame PTS field decoded from Packet have a Coder time-base
For encoding all same.
It is my opinion after reading ffmpeg docs and code so more detail info
from ffmpeg develop team welcomed
2012/11/29 Morduhaev, Igor (igorm at stats.com) <igorm at stats.com>
> I used ffmpeg to get video info. The output is
> Duration: 00:05:57.00, start: 0.000000, bitrate: 611 kb/s Stream
> #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 808x610, 609
> kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc
> The time base is used to somehow(this is also my another question)
> calculate when to decode and show the frame, right? So whose time base is
> used, container (12800) or codec (50)?
> The another question is why tbn=12800 and not 90000?
> Libav-user mailing list
> Libav-user at ffmpeg.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Libav-user