Force a remux/transcode with external audio files
This commit is contained in:
parent
cb41dda5b3
commit
a7a7173cd5
|
@ -677,8 +677,8 @@ namespace MediaBrowser.Model.Dlna
|
|||
var videoStream = item.VideoStream;
|
||||
|
||||
// TODO: This doesn't account for situations where the device is able to handle the media's bitrate, but the connection isn't fast enough
|
||||
var directPlayEligibilityResult = IsEligibleForDirectPlay(item, GetBitrateForDirectPlayCheck(item, options, true) ?? 0, subtitleStream, options, PlayMethod.DirectPlay);
|
||||
var directStreamEligibilityResult = IsEligibleForDirectPlay(item, options.GetMaxBitrate(false) ?? 0, subtitleStream, options, PlayMethod.DirectStream);
|
||||
var directPlayEligibilityResult = IsEligibleForDirectPlay(item, GetBitrateForDirectPlayCheck(item, options, true) ?? 0, subtitleStream, audioStream, options, PlayMethod.DirectPlay);
|
||||
var directStreamEligibilityResult = IsEligibleForDirectPlay(item, options.GetMaxBitrate(false) ?? 0, subtitleStream, audioStream, options, PlayMethod.DirectStream);
|
||||
bool isEligibleForDirectPlay = options.EnableDirectPlay && (options.ForceDirectPlay || directPlayEligibilityResult.Item1);
|
||||
bool isEligibleForDirectStream = options.EnableDirectStream && (options.ForceDirectStream || directStreamEligibilityResult.Item1);
|
||||
|
||||
|
@ -1213,6 +1213,7 @@ namespace MediaBrowser.Model.Dlna
|
|||
MediaSourceInfo item,
|
||||
long maxBitrate,
|
||||
MediaStream subtitleStream,
|
||||
MediaStream audioStream,
|
||||
VideoOptions options,
|
||||
PlayMethod playMethod)
|
||||
{
|
||||
|
@ -1228,8 +1229,17 @@ namespace MediaBrowser.Model.Dlna
|
|||
}
|
||||
|
||||
bool result = IsAudioEligibleForDirectPlay(item, maxBitrate, playMethod);
|
||||
if (!result)
|
||||
{
|
||||
return (false, TranscodeReason.ContainerBitrateExceedsLimit);
|
||||
}
|
||||
|
||||
return (result, result ? null : TranscodeReason.ContainerBitrateExceedsLimit);
|
||||
if (audioStream.IsExternal)
|
||||
{
|
||||
return (false, TranscodeReason.AudioIsExternal);
|
||||
}
|
||||
|
||||
return (true, null);
|
||||
}
|
||||
|
||||
public static SubtitleProfile GetSubtitleProfile(
|
||||
|
|
|
@ -26,6 +26,7 @@ namespace MediaBrowser.Model.Session
|
|||
VideoProfileNotSupported = 19,
|
||||
AudioBitDepthNotSupported = 20,
|
||||
SubtitleCodecNotSupported = 21,
|
||||
DirectPlayError = 22
|
||||
DirectPlayError = 22,
|
||||
AudioIsExternal = 23
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user