[FFmpeg-user] more sound madness

Ted Park kumowoon1025 at gmail.com
Tue Mar 10 08:28:17 EET 2020


Hi,

> This looks promising, but I can’t grasp the filter_complex:
> If I break it down:
>> "[0:a]
> Use sound from input 0
> 
>> channelmap=map=0-0|1-1
> map channel 0 to output 0, channel 1 to output 1
> 
>> :channel_layout=0x60000000,
> I take it this is means the binary value, in this case 0 1 1 0 0 0 0 0 0 etc 
> But this is output? (It looks like ‘max 32 channels out, use 1 and 2, leave room to insert the sound from the video at 0? And the mapping auto inserts the tracks to the first available slots? (Or how it is called…))
> 
>> [1:a]join=inputs=2
> Use sound from input 1, start joining that, so total 2 streams input.
> 
>> :channel_layout=0x60020000,
> Now I’m totally lost. This states 0 1 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
> What am I supposed to see here? Start is the same, but then I’m lost...
> 
>> channelmap=map=0-0|1-1|2-2:
> This also confuses me. The order of the second and third mapping looks likes it comes from the 0 1 1 yadda at the beginning.
> But where is channel 0 from the second input mapped? Whatever I try, I always end up with channel 0...

The channels aren’t on every single bit field, but that’s basically it, I just wanted to try to minimize the variables to see if I could get the same thing to work, because arguments and filter parameters related to audio channels seem to vary (or maybe it’s a discrepancy in the docs)  From libavutil/channel_layout.h:
#define AV_CH_FRONT_LEFT             0x00000001
#define AV_CH_FRONT_RIGHT            0x00000002
#define AV_CH_FRONT_CENTER           0x00000004
#define AV_CH_LOW_FREQUENCY          0x00000008
#define AV_CH_BACK_LEFT              0x00000010
#define AV_CH_BACK_RIGHT             0x00000020
#define AV_CH_FRONT_LEFT_OF_CENTER   0x00000040
#define AV_CH_FRONT_RIGHT_OF_CENTER  0x00000080
#define AV_CH_BACK_CENTER            0x00000100
#define AV_CH_SIDE_LEFT              0x00000200
#define AV_CH_SIDE_RIGHT             0x00000400
#define AV_CH_TOP_CENTER             0x00000800
#define AV_CH_TOP_FRONT_LEFT         0x00001000
#define AV_CH_TOP_FRONT_CENTER       0x00002000
#define AV_CH_TOP_FRONT_RIGHT        0x00004000
#define AV_CH_TOP_BACK_LEFT          0x00008000
#define AV_CH_TOP_BACK_CENTER        0x00010000
#define AV_CH_TOP_BACK_RIGHT         0x00020000
#define AV_CH_STEREO_LEFT            0x20000000  ///< Stereo downmix.
#define AV_CH_STEREO_RIGHT           0x40000000  ///< See AV_CH_STEREO_LEFT.
#define AV_CH_WIDE_LEFT              0x0000000080000000ULL
#define AV_CH_WIDE_RIGHT             0x0000000100000000ULL
#define AV_CH_SURROUND_DIRECT_LEFT   0x0000000200000000ULL
#define AV_CH_SURROUND_DIRECT_RIGHT  0x0000000400000000ULL
#define AV_CH_LOW_FREQUENCY_2        0x0000000800000000ULL
I figured the hex notation was a way to leave little to be interpreted/resolved but apparently that wasn’t the issue. I used the channels labeled stereo mix and top back right thinking they were less likely to overlap, so 0x60020000 stands for 0x40000000|0x20000000|0x00020000.

What is the error you get with channel map? Or does it just set the channels to be silent or disable them with no warning again?

The multitrack file is actually labeled as the down mix on the first two channels, then the recorded tracks:
> Input #1, wav, from '/Volumes/Data/test/068.WAV':
>  Metadata:
>    comment         : sSPEED=025.000-ND 
>                    : sTAKE=068 
>                    : sUBITS=$00000000 
>                    : sSWVER=5.01.8149 
>                    : sSCENE=MixPre 
>                    : sFILENAME=MixPre-068.WAV 
>                    : sTAPE=200130 
>                    : sCIRCLED=FALSE 
>                    : sTRK1=MixL 
>                    : sTRK2=MixR 
>                    : sTRK3=Track 1 
>                    : sTRK4=Track 2 
>                    : sTRK5=Track 3 
>                    : sTRK6=Track 4 
>                    : sTRK7=Track 5 
>                    : sTRK8=Track 6 
>                    : sTRK9
>    encoded_by      : SoundDev: MixPre-10 II TJ0019225
>    originator_reference: USSDVTJ001922501520013072A000201
>    date            : 2020-01-30
>    creation_time   : 07:02:20
>    time_reference  : 2468718515
>    coding_history  : A=PCM,F=48000,W=24,M=multi,R=48000,T=10 Ch;Ambisonics=off 


Maybe you will get automatic channel detection working again if you don’t include the stereo and use the 8 channels.

Are some of the tracks actually sub-mixes bounced on the device? (Since you get tracks 8 and 9)

Regards,
Ted Park



More information about the ffmpeg-user mailing list