File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
server/src/main/java/xyz/e3ndr/athena/transcoding Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -94,11 +94,6 @@ public class Transcoder {
9494 command .add ("-map" , String .format ("0:%d" , streamId ));
9595 }
9696
97- // Include all subtitles that we support.
98- for (SubtitleStream subtitle : media .getFiles ().getStreams ().getSubtitles ()) {
99- command .add ("-map" , String .format ("0:%d" , subtitle .getId ()));
100- }
101-
10297 /* ---- Audio ---- */
10398 command .add (FFMpegArgs .a_getFF (desiredACodec ));
10499
@@ -107,7 +102,14 @@ public class Transcoder {
107102 }
108103
109104 /* ---- Subtitles ---- */
110- command .add (FFMpegArgs .s_getFF (desiredSCodec ));
105+ if (desiredContainer == ContainerFormat .MKV || desiredContainer == ContainerFormat .MP4 ) {
106+ // Include all subtitles that we support.
107+ for (SubtitleStream subtitle : media .getFiles ().getStreams ().getSubtitles ()) {
108+ command .add ("-map" , String .format ("0:%d" , subtitle .getId ()));
109+ }
110+
111+ command .add (FFMpegArgs .s_getFF (desiredSCodec ));
112+ }
111113
112114 /* ---- Video ---- */
113115 command .add (FFMpegArgs .v_getFF (desiredVCodec , desiredQuality ));
You can’t perform that action at this time.
0 commit comments