<div dir="ltr">Hi Corey,<div><br></div><div>I also ran into the same issue upon moving to the 3.4 release. In my application, I am muxing H264 Annex-B to mp4 from a custom AVIO input context to a file output context.</div><div><br></div><div>I set the time_base value in the output AVStream to 1/90000, then stepped through the code to write the header, some frames, and then the trailer. Watching the time_base value in the debugger as I stepped through, I noticed that the values change to the 1/15360 value after the invocation of av_write_header(), which matches your findings. I am currently working around the issue by rescaling each frame's PTS/DTS to the new 1/15360 timebase, rather than using the actual timebase associated with the stream produced by the camera.</div><div><br></div><div>Would love to find out if there is a proper way to address this.</div><div><br></div><div>Cheers,</div><div>Charles</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 8, 2018 at 8:48 PM, Corey Taylor <span dir="ltr"><<a href="mailto:corey.taylor.fl@gmail.com" target="_blank">corey.taylor.fl@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">><br>
>         if (st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) {<br>
>            <snip><br>
><br>
>            if (mov->video_track_timescale) {<br>
>                 track->timescale = mov->video_track_timescale;<br>
>             } else {<br>
>                 track->timescale = st->time_base.den;<br>
>                 while(track->timescale < 10000)<br>
>                     track->timescale *= 2;<br>
<br>
</span>This seems to be gated by FF_MOV_FLAG_RTP_HINT.<br>
<br>
    if (mov->flags & FF_MOV_FLAG_RTP_HINT) {<br>
        /* Add hint tracks for each audio and video stream */<br>
        for (i = 0; i < s->nb_streams; i++) {<br>
            AVStream *st = s->streams[i];<br>
<span class="">            if (st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO ||<br>
</span>                st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO) {<br>
                mov->nb_streams++;<br>
            }<br>
        }<br>
    }<br>
<br>
<br>
However, I can't seem to disable it.  The original code did not pass<br>
options to avformat_write_header() and didn't run into this.<br>
<br>
Are the track hints supposed to be created by default?<br>
<div class="HOEnZb"><div class="h5">______________________________<wbr>_________________<br>
Libav-user mailing list<br>
<a href="mailto:Libav-user@ffmpeg.org">Libav-user@ffmpeg.org</a><br>
<a href="http://ffmpeg.org/mailman/listinfo/libav-user" rel="noreferrer" target="_blank">http://ffmpeg.org/mailman/<wbr>listinfo/libav-user</a><br>
</div></div></blockquote></div><br></div>