From d8a8aae71dbdd3ca95cc4382d36cd71ee3c080bf Mon Sep 17 00:00:00 2001 From: Kuba Orlik Date: Sun, 16 Oct 2022 19:10:15 +0200 Subject: [PATCH] Add tb settings to enable concatenating with intro efficiently and without time hiccups https://video.stackexchange.com/questions/15468/non-monotonous-dts-on-concat-ffmpeg https://stackoverflow.com/questions/15931437/ffmpeg-how-to-control-fps-tbr-tbn-tbc-parameters --- .gitignore | 2 ++ generate.sh | 8 +++++--- out/keepme | 0 3 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 out/keepme diff --git a/.gitignore b/.gitignore index 980d584..4586756 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ /node_modules/ *.mp4 +out/* +!out/keepme diff --git a/generate.sh b/generate.sh index 17890d3..0d09938 100755 --- a/generate.sh +++ b/generate.sh @@ -6,7 +6,9 @@ # W katalogu z tym skryptem musisz mieć katalog "pics", w którym są pliki "left.png", "right.png", "none.png" i "both.png" # -input=/home/kuba/Downloads/odc24.mp3 # tutaj dajemy ścieżkę do pliku mp3 z Arkiem w jednym kanale i Kubą w drugim +input=/home/kuba/Downloads/odc36trim.mp3 # tutaj dajemy ścieżkę do pliku mp3 z Arkiem w jednym kanale i Kubą w drugim +framerate=25 +timescale=25000 aresample=8000 # to bez zmian @@ -29,9 +31,9 @@ mkdir -p out # używa demuxer.txt żeby skleić końcowe video z dźwiękiem: echo generowanie całości -ffmpeg -y -f concat -safe 0 -i out/demuxer.txt -r 30 -tune stillimage -vsync vfr -pix_fmt yuv420p out/video.mp4 +ffmpeg -y -f concat -safe 0 -i out/demuxer.txt -r $framerate -video_track_timescale $timescale -tune stillimage -vsync vfr -pix_fmt yuv420p out/video.mp4 # ^ daję safe 0 aby przyjmowało bezwzględne ścieżki echo łączenie video z dźwiękiem: -ffmpeg -i out/video.mp4 -i $input -ac 1 -tune stillimage out/video-and-audio.mp4 +ffmpeg -i out/video.mp4 -i $input -ac 1 -video_track_timescale $timescale -tune stillimage out/video-and-audio.mp4 diff --git a/out/keepme b/out/keepme new file mode 100644 index 0000000..e69de29