[Libav-user] How to get AVCodec timebase ?

Ivan Kuchin ivan.kuchin at gmail.com
Sun May 28 06:07:13 EEST 2017


Hello experts,

   I'm building transcoder and sometimes avcodec_open2 returns
decoder.time_base = {0, 1} for src video, although "ffmpeg -i xxx" and
"ffprobe -show_stream " returns correct tbc and codec_time_base.

   Problem: in some cases codec_time_base != (AVRational) {1, framerate}
(in my case codec_time_base=1/60, but framerate=30).

   I'm aware about example transcode.c and I tested it and it is not
working too.

   Question: how can I get correct codec_time_base in API ?

JFYI: Ubuntu + 7:3.3.1-1~16.04.york0

Thanks a lot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20170527/5cba25e8/attachment.html>


More information about the Libav-user mailing list