Provide original bitrate to ffmpeg
This commit is contained in:
parent
91357cba80
commit
9223a333f0
@ -12,6 +12,9 @@ const FREQ = 48000;
|
||||
const FRAMERATE = parseFloat(
|
||||
(await $`mediainfo --Output="Video;%FrameRate%" ${video}`).stdout
|
||||
);
|
||||
const BITRATE = parseFloat(
|
||||
(await $`mediainfo --Inform="Video;%BitRate/String%" ${video}`).stdout
|
||||
);
|
||||
|
||||
const labels_contents = (await $`awk '{print $3, $4, $5}' < ${labels}`).stdout;
|
||||
|
||||
@ -182,4 +185,4 @@ ${audio_filter}
|
||||
${ns.map((n) => `[copy${n}t][copy${n}ta]`).join(" ")}
|
||||
concat=n=${pieces.length}:v=1:a=1 [out_video] [out_audio]`;
|
||||
|
||||
await $`ffmpeg -i ${video} -b:v 20000k -filter_complex ${filter} -map '[out_video]' -map '[out_audio]' ${`${video}.cut-complex.mp4`}`;
|
||||
await $`ffmpeg -i ${video} -b:v ${BITRATE}M -filter_complex ${filter} -map '[out_video]' -map '[out_audio]' ${`${video}.cut-complex.mp4`}`;
|
||||
|
Loading…
Reference in New Issue
Block a user