Skip to content

Commit b91c0c0

Browse files
committed
api/stream/types: specify subtitle format for containers other than mp4
1 parent 259a075 commit b91c0c0

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

api/src/stream/types.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,8 @@ const merge = async (streamInfo, res) => {
128128
if (streamInfo.subtitles) {
129129
args.push(
130130
'-i', streamInfo.subtitles,
131-
'-map', '2:s'
131+
'-map', '2:s',
132+
'-c:s', format === 'mp4' ? 'mov_text' : 'webvtt'
132133
);
133134
};
134135

@@ -147,10 +148,6 @@ const merge = async (streamInfo, res) => {
147148
}
148149
}
149150

150-
if (streamInfo.subtitles && format === "mp4") {
151-
args.push('-c:s', 'mov_text');
152-
}
153-
154151
if (streamInfo.metadata) {
155152
args = args.concat(convertMetadataToFFmpeg(streamInfo.metadata));
156153
}

0 commit comments

Comments
 (0)