From 302c246a4c357b93d173864e37399e2a28de290f Mon Sep 17 00:00:00 2001 From: Lucas van Lierop Date: Fri, 6 Oct 2017 09:22:49 +0200 Subject: [PATCH] Some attempts I've tried so far Let's find out what works and what doesn't and maybe wrap everything in a make file that can batch process all files. --- extract-left-audio.sh | 3 +++ join-audio-with-video.sh | 15 +++++++++++++++ join-files.sh | 2 ++ stereo-to-mono.sh | 3 +++ 4 files changed, 23 insertions(+) create mode 100644 extract-left-audio.sh create mode 100644 join-audio-with-video.sh create mode 100644 join-files.sh create mode 100644 stereo-to-mono.sh diff --git a/extract-left-audio.sh b/extract-left-audio.sh new file mode 100644 index 0000000..5f77181 --- /dev/null +++ b/extract-left-audio.sh @@ -0,0 +1,3 @@ +#!/bin/bash +FILENAME=$1 +ffmpeg -i ${FILENAME} -map_channel 0.1.0 ${FILENAME}.left.wav diff --git a/join-audio-with-video.sh b/join-audio-with-video.sh new file mode 100644 index 0000000..fcc7855 --- /dev/null +++ b/join-audio-with-video.sh @@ -0,0 +1,15 @@ +#!/bin/bash +# extract files? +#find . -type f -iname '*.VIDEOEXTENSION' -exec ffmpeg -i {} -vn -acodec copy {}.AUDIOEXTENSION \; + +ffmpeg \ + -i domcode16-main-track-7-ancilla.MTS \ + -i domcode16-main-track-7-ancilla.MTS.left.wav \ + -c:v copy \ + -map 0:v:0 \ + -map 1:a:0 \ + -vn \ + domcode16-main-track-7-ancilla-audio-fixed.MTS + + + diff --git a/join-files.sh b/join-files.sh new file mode 100644 index 0000000..af907b2 --- /dev/null +++ b/join-files.sh @@ -0,0 +1,2 @@ +#!/bin/bash +ffmpeg -i "concat:domcode16-main-track-7-ancilla.MTS|domcode16-main-track-7-ancilla-2.MTS" domcode16-main-track-7-ancilla-joined.MTS diff --git a/stereo-to-mono.sh b/stereo-to-mono.sh new file mode 100644 index 0000000..7a17e8b --- /dev/null +++ b/stereo-to-mono.sh @@ -0,0 +1,3 @@ +#!/bin/bash +#ffmpeg -i domcode16-main-track-7-ancilla.MTS -map_channel 0.0.0 domcode16-main-track-7-ancilla-mono.MTS +ffmpeg -i domcode16-main-track-7-ancilla.MTS -map_channel 0.1.0 -ac 1 -c:v copy domcode16-main-track-7-ancilla-mono.MTS