mirror of
https://github.com/imputnet/cobalt.git
synced 2025-06-28 01:18:27 +00:00
api/stream/types: specify subtitle format for containers other than mp4
This commit is contained in:
parent
259a0758f1
commit
b91c0c0013
@ -128,7 +128,8 @@ const merge = async (streamInfo, res) => {
|
||||
if (streamInfo.subtitles) {
|
||||
args.push(
|
||||
'-i', streamInfo.subtitles,
|
||||
'-map', '2:s'
|
||||
'-map', '2:s',
|
||||
'-c:s', format === 'mp4' ? 'mov_text' : 'webvtt'
|
||||
);
|
||||
};
|
||||
|
||||
@ -147,10 +148,6 @@ const merge = async (streamInfo, res) => {
|
||||
}
|
||||
}
|
||||
|
||||
if (streamInfo.subtitles && format === "mp4") {
|
||||
args.push('-c:s', 'mov_text');
|
||||
}
|
||||
|
||||
if (streamInfo.metadata) {
|
||||
args = args.concat(convertMetadataToFFmpeg(streamInfo.metadata));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user