Add video file parameter to ffprobe, add 20Mbps bitrate to ffmpeg
This commit is contained in:
parent
1f010daf52
commit
3fc5101e89
|
@ -127,7 +127,7 @@ const ns = range(pieces.length);
|
||||||
|
|
||||||
const sample_rate = parseInt(
|
const sample_rate = parseInt(
|
||||||
(
|
(
|
||||||
await $`ffprobe odc25proxy.mp4 2>&1 | grep 'Audio:' | grep --only-matching --extended-regexp '[0-9]+ Hz' | sed 's/ Hz//'`
|
await $`ffprobe ${args[0]} 2>&1 | grep 'Audio:' | grep --only-matching --extended-regexp '[0-9]+ Hz' | sed 's/ Hz//'`
|
||||||
).stdout
|
).stdout
|
||||||
); // in Hz
|
); // in Hz
|
||||||
|
|
||||||
|
@ -182,4 +182,4 @@ ${audio_filter}
|
||||||
${ns.map((n) => `[copy${n}t][copy${n}ta]`).join(" ")}
|
${ns.map((n) => `[copy${n}t][copy${n}ta]`).join(" ")}
|
||||||
concat=n=${pieces.length}:v=1:a=1 [out_video] [out_audio]`;
|
concat=n=${pieces.length}:v=1:a=1 [out_video] [out_audio]`;
|
||||||
|
|
||||||
await $`ffmpeg -i ${video} -filter_complex ${filter} -map '[out_video]' -map '[out_audio]' ${`${video}.cut-complex.mp4`}`;
|
await $`ffmpeg -i ${video} -b:v 20000k -filter_complex ${filter} -map '[out_video]' -map '[out_audio]' ${`${video}.cut-complex.mp4`}`;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user