From 139e9404c1e3f931571af05384fc83168fed4cfd Mon Sep 17 00:00:00 2001 From: simon Date: Wed, 15 Jan 2014 11:29:37 +1100 Subject: [PATCH 1/2] Add gen pts flags correct movies that have none or have bad pts values. Applied to all c/l --- MediaBrowser.Api/Playback/BaseStreamingService.cs | 2 +- MediaBrowser.Api/Playback/Hls/BaseHlsService.cs | 2 +- MediaBrowser.Api/Playback/Progressive/VideoService.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs index a39e4cf58..911475275 100644 --- a/MediaBrowser.Api/Playback/BaseStreamingService.cs +++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs @@ -365,7 +365,7 @@ namespace MediaBrowser.Api.Playback } } - return string.Format("-af \"{0}aresample={1}async=1{2}{3}\"", + return string.Format("-af \"{0}aresample={1}async=1000{2}{3}\"", adelay, audioSampleRate, diff --git a/MediaBrowser.Api/Playback/Hls/BaseHlsService.cs b/MediaBrowser.Api/Playback/Hls/BaseHlsService.cs index f244886dc..b2fb9c1eb 100644 --- a/MediaBrowser.Api/Playback/Hls/BaseHlsService.cs +++ b/MediaBrowser.Api/Playback/Hls/BaseHlsService.cs @@ -274,7 +274,7 @@ namespace MediaBrowser.Api.Playback.Hls var threads = GetNumberOfThreads(false); - var args = string.Format("{0}{1} {2} {3} -i {4}{5} -map_metadata -1 -threads {6} {7} {8} -sc_threshold 0 {9} -hls_time {10} -start_number 0 -hls_list_size 1440 \"{11}\"", + var args = string.Format("{0}{1} {2} {3} -fflags genpts -i {4}{5} -map_metadata -1 -threads {6} {7} {8} -sc_threshold 0 {9} -hls_time {10} -start_number 0 -hls_list_size 1440 \"{11}\"", itsOffset, probeSize, GetUserAgentParam(state.MediaPath), diff --git a/MediaBrowser.Api/Playback/Progressive/VideoService.cs b/MediaBrowser.Api/Playback/Progressive/VideoService.cs index f3ccaa244..b24c0a5da 100644 --- a/MediaBrowser.Api/Playback/Progressive/VideoService.cs +++ b/MediaBrowser.Api/Playback/Progressive/VideoService.cs @@ -106,7 +106,7 @@ namespace MediaBrowser.Api.Playback.Progressive var threads = GetNumberOfThreads(string.Equals(videoCodec, "libvpx", StringComparison.OrdinalIgnoreCase)); - return string.Format("{0} {1} {2} -i {3}{4}{5} {6} {7} -map_metadata -1 -threads {8} {9}{10} \"{11}\"", + return string.Format("{0} {1} {2} -fflags genpts -i {3}{4}{5} {6} {7} -map_metadata -1 -threads {8} {9}{10} \"{11}\"", probeSize, GetUserAgentParam(state.MediaPath), GetFastSeekCommandLineParameter(state.Request), From 92c10e78d9b05ffc4af175c17625a0a869b381c7 Mon Sep 17 00:00:00 2001 From: simon Date: Wed, 15 Jan 2014 11:32:29 +1100 Subject: [PATCH 2/2] revert async=1000 to async=1 (was inserted for testing live tv) --- MediaBrowser.Api/Playback/BaseStreamingService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs index 911475275..a39e4cf58 100644 --- a/MediaBrowser.Api/Playback/BaseStreamingService.cs +++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs @@ -365,7 +365,7 @@ namespace MediaBrowser.Api.Playback } } - return string.Format("-af \"{0}aresample={1}async=1000{2}{3}\"", + return string.Format("-af \"{0}aresample={1}async=1{2}{3}\"", adelay, audioSampleRate,