nstanger / process_podcast

Python script for processing and assembling a podcast from various input sources
0 stars 0 forks source link

[CLOSED] process_lectorial_capture: replace replaygain with dynaudnorm #6

Closed nstanger closed 8 years ago

nstanger commented 8 years ago

Issue by nstanger Wednesday Jul 20, 2016 at 05:37 GMT Originally opened as https://github.com/Otago-InfoSci-Database/Tools/issues/6


Much faster with more predictable effect, and similar level boost.

ffmpeg -y -i in.wav -af dynaudnorm=r=0.95:f=10 out.wav

Can probably insert this directly into the final scene concatenation stream (can’t do it during the initial segmentation, as we’re doing -c copy).

nstanger commented 8 years ago

Comment by nstanger Wednesday Jul 20, 2016 at 05:41 GMT


ffmpeg -y -i temp_INFO321_2016-07-20_00_a.mov -i temp_INFO321_2016-07-20_00_b.mov -i temp_INFO321_2016-07-20_01_a.mov -filter_complex '[0:a] dynaudnorm=r=0.95:f=10 [a0]; [1:a] dynaudnorm=r=0.95:f=10 [a0j]; [2:a] dynaudnorm=r=0.95:f=10 [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 "[v]" -map "[a]" INFO321_2016-07-20.mov

nstanger commented 8 years ago

Comment by nstanger Wednesday Jul 20, 2016 at 06:07 GMT


It might even be possible to do everything in one pass from the original source files, but it has to run through the entire video decoding frames to do so, which takes much longer than splitting and concatenating. Getting the final frame of the pre-joiner segments would be tricky as well.

ffmpeg -y -i Source/20160720_115657.wav -i Source/INFO321_2016-07-20.mov -filter_complex '[0:a] atrim=start=208:end=1622, dynaudnorm=r=0.95:f=10 [a0]; [0:a] atrim=start=3248:end=3259, dynaudnorm=r=0.95:f=10 [a1]; [1:v] trim=start=67.46:end=1481.46 [v0]; [1:v] trim=start=3107.46:end=3118.46 [v1]; [v0] [a0] [v1] [a1] concat=n=2:v=1:a=1 [v] [a]' -c:a pcm_s16le -ac 1 -c:v h264 -map "[v]" -map "[a]" INFO321_2016-07-20_onepass.mov

nstanger commented 8 years ago

Comment by nstanger Thursday Jul 21, 2016 at 21:49 GMT


OK, maybe not a single pass: the trim filter didn’t seem to work for the video, and the audio was incorrectly synced as a result.