From: Flole Date: Sun, 21 Feb 2021 01:52:07 +0000 (+0100) Subject: Attempt to fix nvenc encoding X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=00b35ec7803388eb08e4835a1df821283ddef4a9;p=thirdparty%2Ftvheadend.git Attempt to fix nvenc encoding --- diff --git a/src/transcoding/transcode/video.c b/src/transcoding/transcode/video.c index 50e6b2f67..d2840a2f3 100644 --- a/src/transcoding/transcode/video.c +++ b/src/transcoding/transcode/video.c @@ -171,7 +171,7 @@ tvh_video_context_open_encoder(TVHContext *self, AVDictionary **opts) self->iavctx->framerate = av_make_q(30, 1); } self->oavctx->framerate = self->iavctx->framerate; - self->oavctx->ticks_per_frame = self->iavctx->ticks_per_frame; + self->oavctx->ticks_per_frame = (90000 * self->iavctx->framerate.den) / self->iavctx->framerate.num; // We assume 90kHz as timebase which is mandatory for MPEG-TS ticks_per_frame = av_make_q(self->oavctx->ticks_per_frame, 1); self->oavctx->time_base = av_inv_q(av_mul_q( self->oavctx->framerate, ticks_per_frame));