Hi Igor,

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:
http://htrd.su/wiki/zhurnal/2012/11/23/ffmpeg_nemnogo_pro_time-base

Briefly:
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 (ig...@stats.com) <ig...@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@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user
>
>
_______________________________________________
Libav-user mailing list
Libav-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/libav-user

Reply via email to