Skip to content

The Free Software Media System - Server Backend & API

Backport pull request #16341 from jellyfin/release-10.11.z

crimsonspecter0ebf6a6db6db
diff --git a/Jellyfin.Api/Controllers/DynamicHlsController.cs b/Jellyfin.Api/Controllers/DynamicHlsController.cs
index f80b36c390..acd5dd64ec 100644
--- a/Jellyfin.Api/Controllers/DynamicHlsController.cs
+++ b/Jellyfin.Api/Controllers/DynamicHlsController.cs
@@ -1403,8 +1403,8 @@ public class DynamicHlsController : BaseJellyfinApiController
double fps = state.TargetFramerate ?? 0.0f;
int segmentLength = state.SegmentLength * 1000;
- // If framerate is fractional (i.e. 23.976), we need to slightly adjust segment length
- if (Math.Abs(fps - Math.Floor(fps + 0.001f)) > 0.001)
+ // If video is transcoded and framerate is fractional (i.e. 23.976), we need to slightly adjust segment length
+ if (!EncodingHelper.IsCopyCodec(state.OutputVideoCodec) && Math.Abs(fps - Math.Floor(fps + 0.001f)) > 0.001)
{
double nearestIntFramerate = Math.Ceiling(fps);
segmentLength = (int)Math.Ceiling(segmentLength * (nearestIntFramerate / fps));