diff options
| author | Nyanmisaka <nst799610810@gmail.com> | 2020-02-02 16:27:02 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-02-02 16:27:02 +0800 |
| commit | 7472ae5ca92f7051b674ebe7a276895c8a028f73 (patch) | |
| tree | 4963bcbb013bf7486a727eff5a737a852e54feee | |
| parent | 8eced835c0c03d955aaf7b357986a709aa1b3ffa (diff) | |
fix fps info issue when the video is h264.
Fixed an issue that when the media source is in H264 format and the frame rate info is not displayed due to missing space characters in ffmpeg log.
| -rw-r--r-- | MediaBrowser.Controller/MediaEncoding/JobLogger.cs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/MediaBrowser.Controller/MediaEncoding/JobLogger.cs b/MediaBrowser.Controller/MediaEncoding/JobLogger.cs index 171aedb0e..a1ae31ac5 100644 --- a/MediaBrowser.Controller/MediaEncoding/JobLogger.cs +++ b/MediaBrowser.Controller/MediaEncoding/JobLogger.cs @@ -90,6 +90,15 @@ namespace MediaBrowser.Controller.MediaEncoding framerate = val; } } + else if (part.Contains("fps=", StringComparison.OrdinalIgnoreCase)) + { + var rate = part.Split(new[] { '=' }, 2).Last(); + + if (float.TryParse(rate, NumberStyles.Any, _usCulture, out var val)) + { + framerate = val; + } + } else if (state.RunTimeTicks.HasValue && part.StartsWith("time=", StringComparison.OrdinalIgnoreCase)) { |
