[FFmpeg-user] more sound madness

Bouke / VideoToolShed bouke at videotoolshed.com
Sat Mar 7 17:19:24 EET 2020

> On 07 Mar 2020, at 14:38, Ted Park <kumowoon1025 at gmail.com> wrote:
> Hi,
>> command below seems simple enough, and works, except that the last two audio channels (those coming from the second input) are muted in the metadata.
>> (Meaning, the sound data is there, but QT atom has flagged them as ‘inactive’.)
>> What is the secret handshake to remap / patch / reroute / matrix / add / omit the sound channels of multiple input files to one new file?
>> (I can’t imagine I’m the only one doing this kind of stuff. And at this point I really don’t care if all the channels end up in one track, or in multiple, just to have them play in QT / Premiere and alike.)
> The reverse of “inactive” is “default” iirc, so they aren’t in alternate groups. The mov muxer seems to do that by default for me though.

Hi Ted,
Sorry, I have no clue what you mean here, could you please elaborate?

>> bouke at Boukes-iMac ~ % /Applications/ffmpeg  -i /Volumes/Data/test/C0092.MP4 -i /Volumes/Data/test/068.WAV -map 0:0 -map 0:a -map_channel 0.1.1:0.1  -map 1:a -map_channel 1.0.8:0.2 -map 1:a -map_channel 1.0.9:0.3  -c:a pcm_s24le -c:v copy -shortest /Volumes/Data/test/last2muted.mov -y
> I think it would help to do the channel mapping first just to separate the options
> % ffmpeg -i /Volumes/Data/test/C0092.MP4 -i /Volumes/Data/test/068.WAV -map 0:1 -map 1:0 -map 1:0 -map_channel 0.1.1:0.1 -map_channel 1.0.8:0.2 -map_channel 1.0.9:0.3 -c:a pcm_s24le -map 0:0 -c:v copy -shortest /Volumes/Data/test/last2muted.mov -y

Nope, moving the  does not make any difference.
Did you try this yourself? Does it work for you?

>> Stream mapping:
>> Stream #0:0 -> #0:0 (copy)
>> Stream #0:1 -> #0:1 (pcm_s16be (native) -> pcm_s24le (native))
>> Stream #1:0 -> #0:2 (pcm_s24le (native) -> pcm_s24le (native))
>> Stream #1:0 -> #0:3 (pcm_s24le (native) -> pcm_s24le (native))
>> Press [q] to stop, [?] for help
>> -map_channel is forwarded to lavfi similarly to -af pan=0x4|c0=c1.
>> [pan @ 0x7fb020e00a00] Pure channel mapping detected: 1
>> -map_channel is forwarded to lavfi similarly to -af pan=0x4|c0=c8.
>> [pan @ 0x7fb020d04740] Pure channel mapping detected: 8
>> -map_channel is forwarded to lavfi similarly to -af pan=0x4|c0=c9.
>> [pan @ 0x7fb020f1d200] Pure channel mapping detected: 9
> It shouldn’t matter if audio channels come before others.

trust me, it does matter. First input file gets the audio enabled, all other gets muted in metadata.

> Also I am kind of suspicious of this, I don’t know if using 4 channels is normal in this situation,

there is no ‘normal’ in my world, and the Mov format accepts virtually unlimited channels in virtual unlimited tracks in virtual unlimited combinations, so that ‘should’ not be an issue.

> or how the extra channels are mapped wrt gain. Exploding the multitrack recording into separate wave files first might make things simpler.

SImpler in what way?
Sorry, but merging two files ‘should’ be possible IMHO, and I’m fighting on doing this for a couple of days now, so ‘simple’ is not in my book anymore.


> Regards,
> Ted Park

> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".

More information about the ffmpeg-user mailing list