<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Hey there,<div><br></div><div>I’m a total ffmpeg noob so please be a little bit patient.</div><div>Currently, I’m just overwhelmed by the tons of source code and I’m trying my best to work myself into it.</div><div><br></div><div>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.</div><div>These infos included codec names (converted from the FOURCCs) and also the timecode track info.</div><div><br></div><div>I have sample code here from the ffmpeg tutorial but I can’t seem to understand how to read the timecode track infos.</div><div>I’d just like to get the timecode track start TC and the frame rate of the TC track.</div><div>I am looping over the available streams and from av_dump_format I know that stream number 2 (zero indexed) is my TC track.</div><div>And this stream has the codec_type AVMEDIA_TYPE_DATA.</div><div><br></div><div>However, timecode_frame_start (which I found in the docs and sounded promising) always returns -1.</div><div>The timeBase is also somewhat weird as it should be 2398/100 but is 24/1 …</div><div><br></div><div><div style="margin: 0px; font-family: Menlo;"><span style="color: #bb2ca2">for</span>(i=<span style="color: #272ad8">0</span>; i<pFormatCtx-><span style="color: #4f8187">nb_streams</span>; i++)</div><div style="margin: 0px; font-family: Menlo;">{</div><div style="margin: 0px; font-family: Menlo;">    printf(<span style="color: #d12f1b">"Codec type: %i"</span>, pFormatCtx-><span style="color: #4f8187">streams</span>[i]-><span style="color: #4f8187">codec</span>-><span style="color: #4f8187">codec_type</span>);</div><p style="margin: 0px; font-family: Menlo; min-height: 14px;">            </p><div style="margin: 0px; font-family: Menlo;"><span style="color: #bb2ca2">    if</span>(pFormatCtx-><span style="color: #4f8187">streams</span>[i]-><span style="color: #4f8187">codec</span>-><span style="color: #4f8187">codec_type</span>==<span style="color: #31595d">AVMEDIA_TYPE_DATA</span>)</div><div style="margin: 0px; font-family: Menlo;">    {</div><div style="margin: 0px; font-family: Menlo;">        <span style="color: #703daa">int64_t</span> timeCode = pFormatCtx-><span style="color: #4f8187">streams</span>[i]-><span style="color: #4f8187">codec</span>-><span style="color: #4f8187">timecode_frame_start</span>;</div><div style="margin: 0px; font-family: Menlo;">        <span style="color: #4f8187">AVRational</span> timeBase = pFormatCtx-><span style="color: #4f8187">streams</span>[i]-><span style="color: #4f8187">codec</span>-><span style="color: #4f8187">time_base</span>;            </div><div style="margin: 0px; font-family: Menlo;">    }</div><div style="margin: 0px; font-family: Menlo;">}</div><div><br></div><div>I would appreciate any hint and maybe someone can tell me where to start delving into this huge project!</div><div>Thanks in advance!!</div><div><br></div><div>Best,</div><div><br></div><div>Flo</div></div></body></html>