[FFmpeg-user] audio channel manipulation

Jim Shupert jshupert at theppsgroup.com
Mon Jan 21 23:10:56 EET 2019


On 1/21/2019 2:45 PM, Moritz Barsnick wrote:
> On Mon, Jan 21, 2019 at 14:01:52 -0500, Jim Shupert wrote:
>> if it is in 4 streams you can pick which to hear.
>>
>> My capture system captures 10bit unc mov video [0:0]  ( 4ch_test.mov )
>> and the 4 audio "tracks" are found in 1 stream as 4 channels [0:1.0 ,
>> 0:1.1, 0:1.2, 0:1.3 ]
> [...]
>
> Do you need the intermediate file 4s_b.avi? (I assume so, but your
> final file 4s_b.mp4 can be created in one step, if that is desired.)

Yes - both the ffv1 avi [ 4s_b.avi ] & the mp4 are the goal , the need.
the original   capture mov [ 4ch_test.mov ]  is very simply what I am 
"able" to make via my hardware
which is a blackmagic card running media express. That is I can capture 
all 4 "tracks"  but only & always into 1 stream with 4 channels
>
>> ---------------------------:: make the ffv1 avi from the 10b mov  capture .
>> 4s_b.avi
>>
>> ffmpeg -i 4ch_test.mov -vcodec ffv1 -level 3 -coder 1 -pix_fmt
>> yuv422p10le -aspect 4:3 -g 1 \
>>    -filter_complex "[0:a]pan=mono|c0=c0[a0]; [0:a]pan=mono|c0=c1[a1];
>> [0:a]pan=mono|c0=c2[a2]; [0:a]pan=mono|c0=c3[a3]" \
>>    -map 0:v -map "[a0]" -map "[a1]" -map "[a2]" -map "[a3]" -map 0:d -c
>> copy -c:a pcm_s24le -f avi 4s_b.avi
> Your filter
>    "[0:a]pan=mono|c0=c0[a0]; [0:a]pan=mono|c0=c1[a1]; [0:a]pan=mono|c0=c2[a2]; [0:a]pan=mono|c0=c3[a3]"
> is indeed a neat trick to separate your channels into streams. There's
> an easier way though: The "channelsplit" filter:
> https://ffmpeg.org/ffmpeg-filters.html#channelsplit
>
> The second filter ("[0:1] [0:2] amerge") is just fine for creating
> stereo from two separate channels.

ahhhh :: an   "an easier way"   wonderful -- in truth I often find there 
are many "ways" ... i tend to keep using "one" after I find it works.
Thank you...expanding my understanding is what i am after
>
>> https://trac.ffmpeg.org/wiki/AudioChannelManipulation
> Apparently, you read the section "stereo → 2 × mono files". My
> suggestion with the "channelsplit" is right below, in the section
> "stereo → 2 × mono streams". Actually, both filters will work either
> way, the examples are quite arbitrary, come to think of it.
>


will do -- thanks again

and-- if anyone else has anyThing else to offer ... i am still anxious 
to learn more
:)



More information about the ffmpeg-user mailing list