[Libav-user] Configuring mp4 muxer to not recalculate time_base to an absurd timescale value
Corey Taylor
corey.taylor.fl at gmail.com
Tue Jan 9 06:48:46 EET 2018
>
> if (st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) {
> <snip>
>
> if (mov->video_track_timescale) {
> track->timescale = mov->video_track_timescale;
> } else {
> track->timescale = st->time_base.den;
> while(track->timescale < 10000)
> track->timescale *= 2;
This seems to be gated by FF_MOV_FLAG_RTP_HINT.
if (mov->flags & FF_MOV_FLAG_RTP_HINT) {
/* Add hint tracks for each audio and video stream */
for (i = 0; i < s->nb_streams; i++) {
AVStream *st = s->streams[i];
if (st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO ||
st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO) {
mov->nb_streams++;
}
}
}
However, I can't seem to disable it. The original code did not pass
options to avformat_write_header() and didn't run into this.
Are the track hints supposed to be created by default?
More information about the Libav-user
mailing list