[FFmpeg-user] Amerge trouble
Bouke / VideoToolShed
bouke at videotoolshed.com
Sat Nov 18 16:12:25 EET 2017
Hi guys,
Trying to do some audio patching from multiple input files, and output a QT or MXF with a poly soundtrack.
Now this turns out to be a hell of a job, I can’t grasp the logic on how the patching works.
Y\LTC_Convert\FF\ffmpeg -threads 1 -i V\!patch\test.mxf -ss 0.0000 -i V\!patch\snd.wav -map 0:0 -filter_complex "[1:a][0:a:2][1:a][0:a:1][0:a:3]amerge=inputs=5,pan=5c|c0=c9|c1=c1|c2=c8|c3=c0|c4=c2[a]" -map "[a]" -ca pcm_s24le -cv copy -timecode 01:00:00:00 -y V\!patch\active\test.mxf"
FFmpeg returns:
Stream mapping:
Stream #0:2 (pcm_s24le) -> amerge:in3
Stream #0:3 (pcm_s24le) -> amerge:in1
Stream #0:4 (pcm_s24le) -> amerge:in4
Stream #1:0 (pcm_s24le) -> amerge:in0
Stream #1:0 (pcm_s24le) -> amerge:in2
This looks all good, so the problem must be in how I define the pan, but for the life of me I can’t understand how the numbers work.
It seems (by other tests) that the input track up numbers based on what is already set, but it’s still erratic..
I would expect to get (output = from input file)
sndTrack 0 = snd.wav 2
sndTrack 1 = test.mxf 2
sndTrack 2 = snd.wav 1
sndTrack 3 = test.mxf 1
sndTrack 4 = test.mxf 3
but, the result has channels mapped as
sndTrack 0 = snd.wav 1
sndTrack 1 = snd.wav 2
sndTrack 2 = test.mxf 3
sndTrack 3 = snd.wav 1
sndTrack 4 = snd.wav 3
Isn’t there a simple way to set the patching? Or, where is my logic off?
thx,
Bouke
ffmpeg version 3.2.2 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 5.4.0 (GCC)
configuration: --enable-gpl --enable-version3 --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
libavutil 55. 34.100 / 55. 34.100
libavcodec 57. 64.101 / 57. 64.101
libavformat 57. 56.100 / 57. 56.100
libavdevice 57. 1.100 / 57. 1.100
libavfilter 6. 65.100 / 6. 65.100
libswscale 4. 2.100 / 4. 2.100
libswresample 2. 3.100 / 2. 3.100
libpostproc 54. 1.100 / 54. 1.100
Guessed Channel Layout for Input Stream #0.1 : mono
Guessed Channel Layout for Input Stream #0.2 : mono
Guessed Channel Layout for Input Stream #0.3 : mono
Guessed Channel Layout for Input Stream #0.4 : mono
Guessed Channel Layout for Input Stream #0.5 : mono
Guessed Channel Layout for Input Stream #0.6 : mono
Guessed Channel Layout for Input Stream #0.7 : mono
Guessed Channel Layout for Input Stream #0.8 : mono
Input #0, mxf, from 'V:\!patch\test.mxf':
Metadata:
uid : b8b5c18e-2490-6849-ad9f-7f99f053ff76
generation_uid : 30fcae45-66b3-8245-94b0-ad13bedb033d
company_name : AVID
product_name : TRMG
product_version : 3.01
product_uid : 00000000-0000-0000-0000-000000000000
modification_date: 2017-11-16T11:51:43.000000Z
material_package_umid: 0x060A2B340101010501010D131300000060373AAE025378409AB925C4319F6FB2
timecode : 01:00:00:00
Duration: 00:00:16.88, start: 0.000000, bitrate: 60691 kb/s
Stream #0:0: Video: mpeg2video (4:2:2), yuv422p(tv, bt709, top first), 1920x1080 [SAR 1:1 DAR 16:9], 50000 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc
Metadata:
file_package_umid: 0x060A2B340101010501010D1313000000CA47B58C572A8D458FF25B9B8DC8F42F
Stream #0:1: Audio: pcm_s24le, 48000 Hz, mono, s32 (24 bit), 1152 kb/s
Metadata:
file_package_umid: 0x060A2B340101010501010D1313000000CA47B58C572A8D458FF25B9B8DC8F42F
Stream #0:2: Audio: pcm_s24le, 48000 Hz, mono, s32 (24 bit), 1152 kb/s
Metadata:
file_package_umid: 0x060A2B340101010501010D1313000000CA47B58C572A8D458FF25B9B8DC8F42F
Stream #0:3: Audio: pcm_s24le, 48000 Hz, mono, s32 (24 bit), 1152 kb/s
Metadata:
file_package_umid: 0x060A2B340101010501010D1313000000CA47B58C572A8D458FF25B9B8DC8F42F
Stream #0:4: Audio: pcm_s24le, 48000 Hz, mono, s32 (24 bit), 1152 kb/s
Metadata:
file_package_umid: 0x060A2B340101010501010D1313000000CA47B58C572A8D458FF25B9B8DC8F42F
Stream #0:5: Audio: pcm_s24le, 48000 Hz, mono, s32 (24 bit), 1152 kb/s
Metadata:
file_package_umid: 0x060A2B340101010501010D1313000000CA47B58C572A8D458FF25B9B8DC8F42F
Stream #0:6: Audio: pcm_s24le, 48000 Hz, mono, s32 (24 bit), 1152 kb/s
Metadata:
file_package_umid: 0x060A2B340101010501010D1313000000CA47B58C572A8D458FF25B9B8DC8F42F
Stream #0:7: Audio: pcm_s24le, 48000 Hz, mono, s32 (24 bit), 1152 kb/s
Metadata:
file_package_umid: 0x060A2B340101010501010D1313000000CA47B58C572A8D458FF25B9B8DC8F42F
Stream #0:8: Audio: pcm_s24le, 48000 Hz, mono, s32 (24 bit), 1152 kb/s
Metadata:
file_package_umid: 0x060A2B340101010501010D1313000000CA47B58C572A8D458FF25B9B8DC8F42F
Guessed Channel Layout for Input Stream #1.0 : 7.1
Input #1, wav, from 'V:\!patch\snd.wav':
Metadata:
comment : snd.wav
encoded_by : Avid Media Composer 8.6.1
originator_reference: 000000000000002a5a0d7fad00b554c7
date : 2017-11-16
creation_time : 14-08-21
time_reference : 172800000
coding_history : PCM MODE:STEREO SAMPLE_RATE:48000 BITS_PER_SAMP:24
: DIGITIZE CARD:DeckLink Studio 2 & 1394 Audio & DirectSound Audio PERIPHERAL:DeckLink Studio 2 & Avid OHCI
:
Duration: 00:00:16.88, bitrate: 9216 kb/s
Stream #1:0: Audio: pcm_s24le ([1][0][0][0] / 0x0001), 48000 Hz, 7.1, s32 (24 bit), 9216 kb/s
[Parsed_amerge_0 @ 056ef9a0] No channel layout for input 1
[Parsed_amerge_0 @ 056ef9a0] Input channel layouts overlap: output layout will be determined by the number of distinct input channels
[Parsed_pan_1 @ 056efaa0] Pure channel mapping detected: 9 1 8 0 2
Output #0, mxf, to 'V:\!patch\patch.mxf':
Metadata:
uid : b8b5c18e-2490-6849-ad9f-7f99f053ff76
generation_uid : 30fcae45-66b3-8245-94b0-ad13bedb033d
company_name : AVID
product_name : TRMG
product_version : 3.01
product_uid : 00000000-0000-0000-0000-000000000000
modification_date: 2017-11-16T11:51:43.000000Z
material_package_umid: 0x060A2B340101010501010D131300000060373AAE025378409AB925C4319F6FB2
timecode : 01:00:00:00
encoder : Lavf57.56.100
Stream #0:0: Video: mpeg2video (4:2:2), yuv422p(tv, bt709, top first), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 50000 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc
Metadata:
file_package_umid: 0x060A2B340101010501010D1313000000CA47B58C572A8D458FF25B9B8DC8F42F
Stream #0:1: Audio: pcm_s24le, 48000 Hz, 5.0, s32, 5760 kb/s (default)
Metadata:
encoder : Lavc57.64.101 pcm_s24le
Stream mapping:
Stream #0:2 (pcm_s24le) -> amerge:in3
Stream #0:3 (pcm_s24le) -> amerge:in1
Stream #0:4 (pcm_s24le) -> amerge:in4
Stream #1:0 (pcm_s24le) -> amerge:in0
Stream #1:0 (pcm_s24le) -> amerge:in2
Stream #0:0 -> #0:0 (copy)
pan -> Stream #0:1 (pcm_s24le)
Press [q] to stop, [?] for help
frame= 56 fps=0.0 q=-1.0 size= 15712kB time=00:00:02.20 bitrate=58504.5kbits/s speed= 4.4x
frame= 107 fps=107 q=-1.0 size= 29091kB time=00:00:04.24 bitrate=56205.3kbits/s speed=4.23x
frame= 158 fps=105 q=-1.0 size= 42914kB time=00:00:06.28 bitrate=55979.1kbits/s speed=4.16x
frame= 187 fps= 93 q=-1.0 size= 50989kB time=00:00:07.44 bitrate=56142.9kbits/s speed=3.69x
frame= 238 fps= 95 q=-1.0 size= 64478kB time=00:00:09.48 bitrate=55717.8kbits/s speed=3.77x
frame= 286 fps= 95 q=-1.0 size= 78343kB time=00:00:11.40 bitrate=56296.7kbits/s speed=3.78x
frame= 334 fps= 95 q=-1.0 size= 91595kB time=00:00:13.32 bitrate=56332.4kbits/s speed=3.78x
frame= 384 fps= 95 q=-1.0 size= 105758kB time=00:00:15.32 bitrate=56551.3kbits/s speed=3.81x
frame= 422 fps= 96 q=-1.0 Lsize= 116527kB time=00:00:16.88 bitrate=56551.3kbits/s speed=3.84x
video:104154kB audio:11869kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.434182%
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20171118/fde485fe/attachment.sig>
More information about the ffmpeg-user
mailing list