Merging multichannel audio tracks from Mumble with ffmpeg -


we record talks through mumble , because mumble has nitfy multichannel feature i'd figured subtitles youtube uploading each track youtube separately for file in *; ffmpeg -loop 1 -r 2 -i "$img" -i "$file" -vf scale=-1:380 -c:v libx264 -preset slow -tune stillimage -crf 18 -c:a copy -shortest -pix_fmt yuv420p -threads 0 "$file".mkv; done can prepend eg. sed shell script nickname each speaker in automatic captions i.e. subtitles youtube. works charm.

but merging tracks ffmpeg gets tricky. use ffmpeg -i input1.ogg -input2.ogg -i input3.ogg -i input4.ogg -input5.ogg -filter_complex "[0:a][1:a][2:a][3:a][4:a] amerge=inputs=5[aout]" -map "[aout]" -ac 2 output.ogg

somehow ffmpeg shortens resulting audio track , don't yet have idea why. tried using longest first , last since including silent tracks made shorter mixdown. here warnings:

[parsed_amerge_0 @ 0x7f8b29f02d20] no channel layout input 1

[parsed_amerge_0 @ 0x7f8b29f02d20] input channel layouts overlap: output layout determined number of distinct input channels

but says

[parsed_amerge_0 @ 0x7f8b29f02d20] no channel layout input 1

even when change order of inputs.

allthough according mumble's documentation tracks should equal length vlc media info shows different track times. however tracks not out of sync cut off @ end.

i have no idea why ffmpeg mentions flac, files vorbis.

ffmpeg -i mumble-2017-09-09-16-33-18-149.210.187.155-chrisaiki2.ogg -i mumble-2017-09-09-16-33-18-149.210.187.155-recorder.ogg -i mumble-2017-09-09-16-33-18-149.210.187.155-steempowerpics.ogg -i mumble-2017-09-09-16-33-18-149.210.187.155-taconator.ogg -i mumble-2017-09-09-16-33-18-149.210.187.155-fuzzynewest.ogg -filter_complex "[0:a][1:a][2:a][3:a][4:a] amerge=inputs=5[aout]" -map "[aout]" -ac 2 output5.ogg

ffmpeg version 2.8.4 copyright (c) 2000-2015 ffmpeg developers   built apple llvm version 7.0.2 (clang-700.1.81)   configuration: --prefix=/usr/local/cellar/ffmpeg/2.8.4 --enable-shared --        enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-  avresample --cc=clang --host-cflags= --host-ldflags= --enable-opencl --enable-    libx264 --enable-libmp3lame --enable-libvo-aacenc --enable-libxvid --enable-vda   libavutil      54. 31.100 / 54. 31.100   libavcodec     56. 60.100 / 56. 60.100   libavformat    56. 40.101 / 56. 40.101   libavdevice    56.  4.100 / 56.  4.100   libavfilter     5. 40.101 /  5. 40.101   libavresample   2.  1.  0 /  2.  1.  0   libswscale      3.  1.101 /  3.  1.101   libswresample   1.  2.101 /  1.  2.101   libpostproc    53.  3.100 / 53.  3.100 input #0, ogg, 'mumble-2017-09-09-16-33-18-149.210.187.155-   chrisaiki2.ogg':   duration: 00:40:01.19, start: 0.000000, bitrate: 17 kb/s     stream #0:0: audio: vorbis, 48000 hz, mono, fltp, 86 kb/s     metadata:       encoder         : libsndfile       title           : chrisaiki2 input #1, ogg, 'mumble-2017-09-09-16-33-18-149.210.187.155-recorder.ogg':   duration: 00:33:57.88, start: 0.000000, bitrate: 1 kb/s     stream #1:0: audio: vorbis, 48000 hz, mono, fltp, 86 kb/s     metadata:       encoder         : libsndfile       title           : recorder input #2, ogg, 'mumble-2017-09-09-16-33-18-149.210.187.155-steempowerpics.ogg':   duration: 00:33:53.93, start: 0.000000, bitrate: 1 kb/s     stream #2:0: audio: vorbis, 48000 hz, mono, fltp, 86 kb/s     metadata:       encoder         : libsndfile       title           : steempowerpics input #3, ogg, 'mumble-2017-09-09-16-33-18-149.210.187.155-taconator.ogg':   duration: 00:35:36.37, start: 0.000000, bitrate: 6 kb/s     stream #3:0: audio: vorbis, 48000 hz, mono, fltp, 86 kb/s     metadata:       encoder         : libsndfile       title           : taconator input #4, ogg, 'mumble-2017-09-09-16-33-18-149.210.187.155-fuzzynewest.ogg':   duration: 00:41:53.23, start: 0.000000, bitrate: 30 kb/s     stream #4:0: audio: vorbis, 48000 hz, mono, fltp, 86 kb/s     metadata:       encoder         : libsndfile       title           : fuzzynewest file 'output5.ogg' exists. overwrite ? [y/n] y [parsed_amerge_0 @ 0x7f8b29f02d20] no channel layout input 1 [parsed_amerge_0 @ 0x7f8b29f02d20] input channel layouts overlap: output layout determined number of distinct input channels [flac @ 0x7f8b2b005600] encoding 24 bits-per-sample output #0, ogg, 'output5.ogg':   metadata:     encoder         : lavf56.40.101     stream #0:0: audio: flac, 48000 hz, stereo, s32 (24 bit), 128 kb/s (default)     metadata:       encoder         : lavc56.60.100 flac stream mapping:   stream #0:0 (vorbis) -> amerge:in0   stream #1:0 (vorbis) -> amerge:in1   stream #2:0 (vorbis) -> amerge:in2   stream #3:0 (vorbis) -> amerge:in3   stream #4:0 (vorbis) -> amerge:in4   amerge -> stream #0:0 (flac) press [q] stop, [?] size=  100900kb time=00:33:53.94 bitrate= 406.4kbits/s     video:0kb audio:100441kb subtitle:0kb other streams:0kb global headers:0kb muxing overhead: 0.457024% 

mumble multichannel talk on reddit

the amerge documentation states:

if inputs not have same duration, output stop shortest.

amix may better filter case.


Comments

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -