int av_timecode_adjust_ntsc_framenum2(int framenum, int fps)
{ /* only works for multiples of NTSC 29.97 */ int drop_frames = 0; int d, m, frames_per_10mins;
uint32_t av_timecode_get_smpte_from_framenum(const AVTimecode *tc, int framenum)
{ unsigned fps = tc->fps; int drop = !!(tc->flags & AV_TIMECODE_FLAG_DROPFRAME); int hh, mm, ss, ff;
uint32_t av_timecode_get_smpte(AVRational rate, int drop, int hh, int mm, int ss, int ff)
{
uint32_t tc = 0;
/* For SMPTE 12-M timecodes, frame count is a special case if > 30 FPS.
See SMPTE ST 12-1:2014 Sec 12.1 for more info. */ if (av_cmp_q(rate, (AVRational) {30, 1}) == 1) { if (ff % 2 == 1) { if (av_cmp_q(rate, (AVRational) {50, 1}) == 0)
tc |= (1 << 7); else
tc |= (1 << 23);
}
ff /= 2;
}
hh = hh % 24;
mm = av_clip(mm, 0, 59);
ss = av_clip(ss, 0, 59);
ff = ff % 40;
ret = check_timecode(log_ctx, tc); if (ret < 0) return ret;
s = hh*3600LL + mm*60LL + ss; if (s != (int32_t)s) return AVERROR(EINVAL);
s = s * tc->fps + ff; if (s != (int32_t)s) return AVERROR(EINVAL);
tc->start = s;
if (tc->flags & AV_TIMECODE_FLAG_DROPFRAME) { /* adjust frame number */ int tmins = 60*hh + mm;
tc->start -= (tc->fps / 30 * 2) * (tmins - tmins/10);
} return0;
}
int av_timecode_init_from_string(AVTimecode *tc, AVRational rate, constchar *str, void *log_ctx)
{ char c; int hh, mm, ss, ff, flags;
if (sscanf(str, "%d:%d:%d%c%d", &hh, &mm, &ss, &c, &ff) != 5) {
av_log(log_ctx, AV_LOG_ERROR, "Unable to parse timecode, " "syntax: hh:mm:ss[:;.]ff\n"); return AVERROR_INVALIDDATA;
}
flags = c != ':' ? AV_TIMECODE_FLAG_DROPFRAME : 0; // drop if ';', '.', ...
return av_timecode_init_from_components(tc, rate, flags, hh, mm, ss, ff, log_ctx);
}
Messung V0.5 in Prozent
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.10Bemerkung:
(vorverarbeitet am 2026-09-28)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.