APPEND AUDIO TRACK

Questions and answers on how to get the most out of FFAStrans
Post Reply
backlight
Posts: 44
Joined: Wed Dec 12, 2018 8:33 am

APPEND AUDIO TRACK

Post by backlight »

Hi guys,
I need to create a new file with audio tracks added to it.
For example i have a PRORES file with 2 languages (4channels) and i need to create a new prores file with another language added...
a 6 channels audio file as result.
i tested some scripts but it will always replace the audio tracks!

HELP!
momocampo
Posts: 595
Joined: Thu Jun 08, 2017 12:36 pm
Location: France-Paris

Re: APPEND AUDIO TRACK

Post by momocampo »

Hello,
It seems quite easy to do. You have to create en custom ffmepg with a special map.
Something like that :
ffmpeg -i <sourceVideoFile> -i <sourceAudioFile1> -map 0 -map 1 -c copy <outputfile>
It will add the audio into the first file.
Beware, you have to check the map of the different files (do you have mono channel? or stereo etc)
Please tell us how are your audio stream ?
;)

Cheers.

Benjamin
backlight
Posts: 44
Joined: Wed Dec 12, 2018 8:33 am

Re: APPEND AUDIO TRACK

Post by backlight »

All mono channles…
The other problem is that I cannot create a simple multistream audio using channel mapper.
For 6ch it creates only a 5.1 one stream file! but it's wrong!
momocampo
Posts: 595
Joined: Thu Jun 08, 2017 12:36 pm
Location: France-Paris

Re: APPEND AUDIO TRACK

Post by momocampo »

But you wrote you want stereo streams each 2 channels no?
backlight
Posts: 44
Joined: Wed Dec 12, 2018 8:33 am

Re: APPEND AUDIO TRACK

Post by backlight »

no all mono!
momocampo
Posts: 595
Joined: Thu Jun 08, 2017 12:36 pm
Location: France-Paris

Re: APPEND AUDIO TRACK

Post by momocampo »

Hello,
Ok, your audio file that you want to add, does have 1 stream with 2 channels or 2 streams with each 1 mono channel?
I ask because if you have a stereo file with 1 stream with 2 channels, you should convert into 2 monos. Why ? Because otherwise you will have inside you final file v+a1+a2+a3+a4+a5(2channels) > not good
Better if will be v+a1+a2+a3+a4+a5+a6
So you need to convert the stereo into monos :
ffmpeg -i stereo.wav -map_channel 0.0.0 left.wav -map_channel 0.0.1 right.wav
Then, you can now assemble :
ffmpeg -i <sourceVideoFile> -i left.wav -i right.wav -map 0 -map 0:1 -map 0:2 -map 0:3 -map 0:4 -map 1:0 -map 2:0 -c copy <outputfile>
It could be ok but you need to integrate that in FFastrans.

Hope that help.
Cheers.
Benjamin
emcodem
Posts: 1811
Joined: Wed Sep 19, 2018 8:11 am

Re: APPEND AUDIO TRACK

Post by emcodem »

Hey,

there are many options how to do that, e.g. using the pan filter (in this example, i only take 2 channels out of the firt input file but you will get the idea):

Code: Select all

ffmpeg -i D:\10s.mov -i D:\out.wav -map 0 -map -0:a -filter_complex "[0:a]pan=mono|c0=c0[a0];[0:a]pan=mono|c0=c1[a1]" -map "[a0]" -map "[a1]"  -filter_complex "[1:a]pan=mono|c0=c0[a2];[1:a]pan=mono|c0=c1[a3]" -map "[a2]" -map "[a3]"  -ar 48000 -c:v prores d:\out.mov
To be honest, there are so many resources on the internet about how to use avisynth or ffmpeg to do such stuff... the default way to get ffmpeg help would be to use their mailing list:
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

Alternatively they provide very good answers on superuser:
https://superuser.com/

cheers,
emcodem
emcodem, wrapping since 2009 you got the rhyme?
backlight
Posts: 44
Joined: Wed Dec 12, 2018 8:33 am

Re: APPEND AUDIO TRACK

Post by backlight »

Thanks to all,
I will continue testing!
backlight
Posts: 44
Joined: Wed Dec 12, 2018 8:33 am

Re: APPEND AUDIO TRACK

Post by backlight »

Hi guys, thank you for your support... we are using FFASTRANS very well and all my job is going to automation.

What i need to know... is how to specify audio and video in FFASTRANS. If i submit two files, the batch process them one by one.

This could be a very important thing to do... the merge tracks!

I have tested all your codes and works very well... but i have to manually insert the name and path of the audio file.

Is possible to automate it inside FFASTRANS?

Thankssss
emcodem
Posts: 1811
Joined: Wed Sep 19, 2018 8:11 am

Re: APPEND AUDIO TRACK

Post by emcodem »

Hey backlight!

It could be helpful if you export and upload your current worfklow...

cheers,
emcodem
emcodem, wrapping since 2009 you got the rhyme?
Post Reply