MXF with two seperate Audio Streams

Questions and answers on how to get the most out of FFAStrans
Post Reply
novalis
Posts: 19
Joined: Sun Jun 05, 2016 3:01 pm

MXF with two seperate Audio Streams

Post by novalis »

Hey there,

I'm exploring this great program at the moment and I'm trying to do an mpeg2-Stream wrapped in mxf with two seperate mono channels of pcm audio.
At the moment I have two problems: I wanted to have closed gop but whenever I use the -+cgop flag, I get an error (invalid file, could not process).
Also: I always get a stereo audio file instead of two monos or the above error again.

Could someone help me with that?
My current custom ffmpeg code is:

Code: Select all

-map 0:a:0 -map 0:a:1 -pix_fmt yuv422p -g 24 -bf 2 -flags +ilme+ildct -top 1 -b_strategy 0 
with audio: pcm_s16le and video: mpeg2video

Thanks and greetings
Lukas
admin
Site Admin
Posts: 1687
Joined: Sat Feb 08, 2014 10:39 pm

Re: MXF with two seperate Audio Streams

Post by admin »

Hi Lukas, thank you for using FFAStrans and welcome to the forum! :-)

Try this code:

-map 0:v -map 0:a:0 -map 0:a:1 -pix_fmt yuv422p -g 24 -bf 2 -flags +ilme+ildct+cgop -sc_threshold 1000000000 -top 1 -b_strategy 0

-steipal
novalis
Posts: 19
Joined: Sun Jun 05, 2016 3:01 pm

Re: MXF with two seperate Audio Streams

Post by novalis »

Hi,
thanks! That helps with closed gop, but as soon as I add -map 0:v -map 0:a:0 -map 0:a:1, it states "Invalid file! Could not process" - I tried with and without the A/V decoder and audio channel mapper

greetings
Lukas
admin
Site Admin
Posts: 1687
Joined: Sat Feb 08, 2014 10:39 pm

Re: MXF with two seperate Audio Streams

Post by admin »

I have tried the code in it works, but the code anticipates 2 streams of audio, not one stereo stream. Do you know your source has 2 audio streams?
The "A/V Media" decoder outputs a AviSynth script and it's allways only ONE audio track.

-steipal
novalis
Posts: 19
Joined: Sun Jun 05, 2016 3:01 pm

Re: MXF with two seperate Audio Streams

Post by novalis »

well, then there is the problem. The source has only one stereo stream. Is there a possibility to seperate the stereostream into two monos? I tried the -map_channel flag as stated in the ffmpeg-wiki but with the same result/error.
Thanks,
Lukas
admin
Site Admin
Posts: 1687
Joined: Sat Feb 08, 2014 10:39 pm

Re: MXF with two seperate Audio Streams

Post by admin »

Yeah, audio mapping in ffmpeg is a bitch! Try this:

-map 0:v -filter_complex "[0:1]pan=1c|c0=c0[left];[0:1]pan=1c|c0=c1[right]" -map "[left]" -map "[right]" -pix_fmt yuv422p -g 24 -bf 2 -flags +ilme+ildct+cgop -sc_threshold 1000000000 -top 1 -b_strategy 0

-steipal
novalis
Posts: 19
Joined: Sun Jun 05, 2016 3:01 pm

Re: MXF with two seperate Audio Streams

Post by novalis »

excellent, that works! Thank you very much!
Post Reply