Compare commits
4 Commits
a6e89ee5ad
...
1972a4043f
Author | SHA1 | Date | |
---|---|---|---|
1972a4043f | |||
ac2f1bd7ed | |||
168a4ba1df | |||
1947eeb785 |
@ -2,7 +2,9 @@ import findLoudness, { SwapPoint } from "./find-loudness";
|
|||||||
|
|
||||||
const graph_density = 8000;
|
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_s = 0.3;
|
||||||
const inertia_samples = inertia_s * graph_density;
|
const inertia_samples = inertia_s * graph_density;
|
||||||
|
@ -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 final_output=~/Downloads/icdw5-viz.mp4
|
||||||
export framerate=25
|
export framerate=25
|
||||||
export timescale=25000
|
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
|
aresample=8000 # to bez zmian
|
||||||
mkdir -p out
|
mkdir -p out
|
||||||
|
6
merge.sh
6
merge.sh
@ -2,7 +2,7 @@ processed_intro_path=$PWD/out/intro-processed.mp4
|
|||||||
processed_outro_path=$PWD/out/outro-processed.mp4
|
processed_outro_path=$PWD/out/outro-processed.mp4
|
||||||
|
|
||||||
echo łączenie video z dźwiękiem:
|
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 \
|
-i out/video.mp4 -i $input_mono \
|
||||||
-video_track_timescale $timescale \
|
-video_track_timescale $timescale \
|
||||||
-tune stillimage \
|
-tune stillimage \
|
||||||
@ -16,7 +16,7 @@ ffmpeg -vaapi_device /dev/dri/renderD128 \
|
|||||||
echo reencoding intro to enable fast concat...
|
echo reencoding intro to enable fast concat...
|
||||||
|
|
||||||
function reencode_for_demux_compatibility() {
|
function reencode_for_demux_compatibility() {
|
||||||
ffmpeg -i "$1" \
|
ffmpeg -y -i "$1" \
|
||||||
-pix_fmt yuv420p \
|
-pix_fmt yuv420p \
|
||||||
-r $framerate \
|
-r $framerate \
|
||||||
-video_track_timescale $timescale \
|
-video_track_timescale $timescale \
|
||||||
@ -41,4 +41,4 @@ echo "file $processed_outro_path" >>out/demuxer-branding.txt
|
|||||||
|
|
||||||
cat 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"
|
||||||
|
6
split.sh
6
split.sh
@ -1,9 +1,9 @@
|
|||||||
echo dzielimy mp3 na dwa osobne wav
|
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
|
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 -y -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/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ą
|
# czekamy aż obydwa wątki się zakończą
|
||||||
wait
|
wait
|
||||||
|
Loading…
Reference in New Issue
Block a user