Compare commits

..

No commits in common. "1972a4043f87c216b08a27b12511d0527b378fa3" and "a6e89ee5ad3cf9557cf92bcdfbabbd77ae480bd2" have entirely different histories.

4 changed files with 8 additions and 10 deletions

View File

@ -2,9 +2,7 @@ import findLoudness, { SwapPoint } from "./find-loudness";
const graph_density = 8000; const graph_density = 8000;
const threshold_at_point = parseInt( const threshold_at_point = parseInt(process.env.demuxer_volume_threshold) || 1;
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;

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 final_output=~/Downloads/icdw5-viz.mp4
export framerate=25 export framerate=25
export timescale=25000 export timescale=25000
export demuxer_volume_threshold=15 #od 0 do 128 export demuxer_volume_threshold=30 #od 0 do 128
aresample=8000 # to bez zmian aresample=8000 # to bez zmian
mkdir -p out 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 processed_outro_path=$PWD/out/outro-processed.mp4
echo łączenie video z dźwiękiem: echo łączenie video z dźwiękiem:
ffmpeg -y -vaapi_device /dev/dri/renderD128 \ ffmpeg -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 -y -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 -y -i "$1" \ ffmpeg -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 -y -f concat -safe 0 -i out/demuxer-branding.txt -c:v copy -b:a 320k "$final_output" ffmpeg -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 echo dzielimy mp3 na dwa osobne wav
ffmpeg -y -i $input -map_channel 0.0.0 /tmp/left.wav -map_channel 0.0.1 /tmp/right.wav ffmpeg -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 -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/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 & ffmpeg -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