mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-08-04 07:10:45 +00:00
Add support for external audio files
This commit is contained in:
parent
c677b4f6b7
commit
9978164438
5 changed files with 334 additions and 4 deletions
|
|
@ -678,6 +678,12 @@ namespace MediaBrowser.Controller.MediaEncoding
|
|||
arg.Append("-i ")
|
||||
.Append(GetInputPathArgument(state));
|
||||
|
||||
if (state.AudioStream.IsExternal)
|
||||
{
|
||||
arg.Append(" -i ")
|
||||
.Append(string.Format(CultureInfo.InvariantCulture, "file:\"{0}\"", state.AudioStream.Path));
|
||||
}
|
||||
|
||||
if (state.SubtitleStream != null
|
||||
&& state.SubtitleDeliveryMethod == SubtitleDeliveryMethod.Encode
|
||||
&& state.SubtitleStream.IsExternal && !state.SubtitleStream.IsTextSubtitleStream)
|
||||
|
|
@ -1999,10 +2005,17 @@ namespace MediaBrowser.Controller.MediaEncoding
|
|||
|
||||
if (state.AudioStream != null)
|
||||
{
|
||||
args += string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
" -map 0:{0}",
|
||||
state.AudioStream.Index);
|
||||
if (state.AudioStream.IsExternal)
|
||||
{
|
||||
args += " -map 1:a";
|
||||
}
|
||||
else
|
||||
{
|
||||
args += string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
" -map 0:{0}",
|
||||
state.AudioStream.Index);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue