Compare commits

...

4 Commits

Author SHA1 Message Date
Kuba Orlik 1972a4043f fix types 2024-02-01 21:49:18 +01:00
Kuba Orlik ac2f1bd7ed Better default for volume 2023-12-28 14:33:21 +01:00
Kuba Orlik 168a4ba1df Even less asking for confirmation 2023-12-28 14:32:59 +01:00
Kuba Orlik 1947eeb785 Don't ask for confirmation on ffmpeg commands 2023-12-28 14:05:51 +01:00
4 changed files with 10 additions and 8 deletions

View File

@ -2,7 +2,9 @@ import findLoudness, { SwapPoint } from "./find-loudness";
const graph_density = 8000;
const threshold_at_point = parseInt(process.env.demuxer_volume_threshold) || 1;
const threshold_at_point = parseInt(
process.env.demuxer_volume_threshold || "1"
);
const inertia_s = 0.3;
const inertia_samples = inertia_s * graph_density;

View File

@ -13,7 +13,7 @@ export outro=~/projects/midline/podcast-visualizer/out/intro.mp4 # to samo na ko
export final_output=~/Downloads/icdw5-viz.mp4
export framerate=25
export timescale=25000
export demuxer_volume_threshold=30 #od 0 do 128
export demuxer_volume_threshold=15 #od 0 do 128
aresample=8000 # to bez zmian
mkdir -p out

View File

@ -2,7 +2,7 @@ processed_intro_path=$PWD/out/intro-processed.mp4
processed_outro_path=$PWD/out/outro-processed.mp4
echo łączenie video z dźwiękiem:
ffmpeg -vaapi_device /dev/dri/renderD128 \
ffmpeg -y -vaapi_device /dev/dri/renderD128 \
-i out/video.mp4 -i $input_mono \
-video_track_timescale $timescale \
-tune stillimage \
@ -16,7 +16,7 @@ ffmpeg -vaapi_device /dev/dri/renderD128 \
echo reencoding intro to enable fast concat...
function reencode_for_demux_compatibility() {
ffmpeg -i "$1" \
ffmpeg -y -i "$1" \
-pix_fmt yuv420p \
-r $framerate \
-video_track_timescale $timescale \
@ -41,4 +41,4 @@ echo "file $processed_outro_path" >>out/demuxer-branding.txt
cat out/demuxer-branding.txt
ffmpeg -f concat -safe 0 -i out/demuxer-branding.txt -c:v copy -b:a 320k "$final_output"
ffmpeg -y -f concat -safe 0 -i out/demuxer-branding.txt -c:v copy -b:a 320k "$final_output"

View File

@ -1,9 +1,9 @@
echo dzielimy mp3 na dwa osobne wav
ffmpeg -i $input -map_channel 0.0.0 /tmp/left.wav -map_channel 0.0.1 /tmp/right.wav
ffmpeg -y -i $input -map_channel 0.0.0 /tmp/left.wav -map_channel 0.0.1 /tmp/right.wav
echo na dwóch wątkach generujemy surowe pliki
ffmpeg -i /tmp/left.wav -ac 1 -filter:a aresample=$aresample -map 0:a -c:a pcm_u8 -f data - >/tmp/leftraw &
ffmpeg -i /tmp/right.wav -ac 1 -filter:a aresample=$aresample -map 0:a -c:a pcm_u8 -f data - >/tmp/rightraw &
ffmpeg -y -i /tmp/left.wav -ac 1 -filter:a aresample=$aresample -map 0:a -c:a pcm_u8 -f data - >/tmp/leftraw &
ffmpeg -y -i /tmp/right.wav -ac 1 -filter:a aresample=$aresample -map 0:a -c:a pcm_u8 -f data - >/tmp/rightraw &
# czekamy aż obydwa wątki się zakończą
wait