Closed nstanger closed 8 years ago
Comment by nstanger Friday Jul 15, 2016 at 03:21 GMT
The concat filter seems to work (see https://trac.ffmpeg.org/wiki/Concatenate):
ffmpeg -y -i temp_INFO321_2016-07-13_00_a.mp4 -i temp_INFO321_2016-07-13_00_b.mp4 -i temp_INFO321_2016-07-13_01_a.mp4 -filter_complex '[0:v] [0:a] [1:v] [1:a] [2:v] [2:a] concat=n=3:v=1:a=1 [v] [a]' -map "[a]" -map "[v]" test_filter.mp4
It supports different codecs on the input, but does re-encode everything, which may be an issue, especially if Otago Capture re-encodes it again. Audio seems fine but small/thin text may be a problem.
Comment by nstanger Sunday Jul 17, 2016 at 22:18 GMT
Enhanced version that includes adjusting the audio volume:
ffmpeg -y -i temp_INFO321_2016-07-13_00_a.mp4 -i temp_INFO321_2016-07-13_00_b.mp4 -i temp_INFO321_2016-07-13_01_a.mp4 -filter_complex '[0:a] volume=volume=+1dB [a0]; [1:a] volume=volume=+1dB [a0j]; [2:a] volume=volume=+1dB [a1]; [0:v] [a0] [1:v] [a0j] [2:v] [a1] concat=n=3:v=1:a=1 [v] [a]' -c:a pcm_s16le -ac 1 -c:v h264 -map "[a]" -map "[v]" test_filter.mov
Comment by nstanger Sunday Jul 17, 2016 at 22:19 GMT
Otago Capture does re-encode the video and audio, but scales down the size, which mitigates some of the visual issues anyway.
Comment by nstanger Monday Jul 18, 2016 at 02:17 GMT
Otago Capture supports .mov
as an input format. That means we can upload a file with uncompressed audio, which means that the only re-encoding event for audio will be when Otago Capture processes it. Not much we can do about the video, but the issues there are less obvious anyway.
Issue by nstanger Friday Jul 15, 2016 at 03:17 GMT Originally opened as https://github.com/Otago-InfoSci-Database/Tools/issues/5
The temporary files are generated OK, but don’t concatenate correctly. ffmpeg spews “non-monotonous DTS” warning, and the output file only correctly captures the first scene. The rest are garbled and somehow spread over another 20 minutes or so, instead of perhaps 30 seconds.