fix video stream without extension in url
This commit is contained in:
parent
9a27cbab8c
commit
f476944d91
|
@ -4,6 +4,7 @@ using MediaBrowser.Controller.Configuration;
|
|||
using MediaBrowser.Controller.Dlna;
|
||||
using MediaBrowser.Controller.Dto;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Entities.Audio;
|
||||
using MediaBrowser.Controller.Library;
|
||||
using MediaBrowser.Controller.LiveTv;
|
||||
using MediaBrowser.Controller.MediaEncoding;
|
||||
|
@ -1089,15 +1090,13 @@ namespace MediaBrowser.Api.Playback
|
|||
{
|
||||
state.Dispose();
|
||||
|
||||
var outputFilePath = GetOutputFilePath(state);
|
||||
|
||||
try
|
||||
{
|
||||
Logger.Info("FFMpeg exited with code {0} for {1}", process.ExitCode, outputFilePath);
|
||||
Logger.Info("FFMpeg exited with code {0}", process.ExitCode);
|
||||
}
|
||||
catch
|
||||
{
|
||||
Logger.Info("FFMpeg exited with an error for {0}", outputFilePath);
|
||||
Logger.Info("FFMpeg exited with an error.");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1388,6 +1387,7 @@ namespace MediaBrowser.Api.Playback
|
|||
state.DeInterlace = true;
|
||||
state.InputVideoSync = "-1";
|
||||
state.InputAudioSync = "1";
|
||||
state.InputContainer = recording.Container;
|
||||
}
|
||||
else if (item is LiveTvChannel)
|
||||
{
|
||||
|
@ -1439,6 +1439,14 @@ namespace MediaBrowser.Api.Playback
|
|||
|
||||
state.DeInterlace = string.Equals(video.Container, "wtv", StringComparison.OrdinalIgnoreCase);
|
||||
state.InputTimestamp = video.Timestamp ?? TransportStreamTimestamp.None;
|
||||
|
||||
state.InputContainer = video.Container;
|
||||
}
|
||||
|
||||
var audio = item as Audio;
|
||||
if (audio != null)
|
||||
{
|
||||
state.InputContainer = audio.Container;
|
||||
}
|
||||
|
||||
state.RunTimeTicks = item.RunTimeTicks;
|
||||
|
@ -1484,14 +1492,13 @@ namespace MediaBrowser.Api.Playback
|
|||
|
||||
if (string.IsNullOrEmpty(container))
|
||||
{
|
||||
container = Path.GetExtension(GetOutputFilePath(state));
|
||||
container = request.Static ? state.InputContainer : Path.GetExtension(GetOutputFilePath(state));
|
||||
}
|
||||
|
||||
state.OutputContainer = (container ?? string.Empty).TrimStart('.');
|
||||
|
||||
ApplyDeviceProfileSettings(state);
|
||||
|
||||
state.OutputContainer = GetOutputFileExtension(state).TrimStart('.');
|
||||
state.OutputAudioBitrate = GetAudioBitrateParam(state.Request, state.AudioStream);
|
||||
state.OutputAudioSampleRate = request.AudioSampleRate;
|
||||
state.OutputAudioChannels = GetNumAudioChannelsParam(state.Request, state.AudioStream);
|
||||
|
|
|
@ -34,6 +34,8 @@ namespace MediaBrowser.Api.Playback
|
|||
/// <value>The log file stream.</value>
|
||||
public Stream LogFileStream { get; set; }
|
||||
|
||||
public string InputContainer { get; set; }
|
||||
|
||||
public MediaStream AudioStream { get; set; }
|
||||
public MediaStream VideoStream { get; set; }
|
||||
public MediaStream SubtitleStream { get; set; }
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
using MediaBrowser.Controller.Persistence;
|
||||
using MediaBrowser.Controller.Providers;
|
||||
using MediaBrowser.Controller.Resolvers;
|
||||
using MediaBrowser.Model.Dlna;
|
||||
using MediaBrowser.Model.Entities;
|
||||
using MediaBrowser.Model.MediaInfo;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
@ -12,7 +12,6 @@ using System.Linq;
|
|||
using System.Runtime.Serialization;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using MediaBrowser.Model.MediaInfo;
|
||||
|
||||
namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
|
|
|
@ -12,6 +12,8 @@ namespace MediaBrowser.Controller.LiveTv
|
|||
|
||||
string MediaType { get; }
|
||||
|
||||
string Container { get; }
|
||||
|
||||
RecordingInfo RecordingInfo { get; set; }
|
||||
|
||||
long? RunTimeTicks { get; set; }
|
||||
|
|
Loading…
Reference in New Issue
Block a user