[Libav-user] Reading timecode track info ... just getting started
Info || Non-Lethal Applications
info at non-lethal-applications.com
Wed Mar 19 16:18:04 CET 2014
I’m a total ffmpeg noob so please be a little bit patient.
Currently, I’m just overwhelmed by the tons of source code and I’m trying my best to work myself into it.
Until now I’ve been using Apple’s QuickTime library (I’m writing a Mac app) and I used it to read info from a given movie file.
These infos included codec names (converted from the FOURCCs) and also the timecode track info.
I have sample code here from the ffmpeg tutorial but I can’t seem to understand how to read the timecode track infos.
I’d just like to get the timecode track start TC and the frame rate of the TC track.
I am looping over the available streams and from av_dump_format I know that stream number 2 (zero indexed) is my TC track.
And this stream has the codec_type AVMEDIA_TYPE_DATA.
However, timecode_frame_start (which I found in the docs and sounded promising) always returns -1.
The timeBase is also somewhat weird as it should be 2398/100 but is 24/1 …
for(i=0; i<pFormatCtx->nb_streams; i++)
printf("Codec type: %i", pFormatCtx->streams[i]->codec->codec_type);
int64_t timeCode = pFormatCtx->streams[i]->codec->timecode_frame_start;
AVRational timeBase = pFormatCtx->streams[i]->codec->time_base;
I would appreciate any hint and maybe someone can tell me where to start delving into this huge project!
Thanks in advance!!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Libav-user