Page 1 of 1

MXF with two seperate Audio Streams

Posted: Sun Jun 05, 2016 3:07 pm
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

Re: MXF with two seperate Audio Streams

Posted: Sun Jun 05, 2016 4:28 pm
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

Re: MXF with two seperate Audio Streams

Posted: Mon Jun 06, 2016 9:13 am
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

Re: MXF with two seperate Audio Streams

Posted: Mon Jun 06, 2016 4:11 pm
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

Re: MXF with two seperate Audio Streams

Posted: Mon Jun 06, 2016 4:21 pm
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

Re: MXF with two seperate Audio Streams

Posted: Mon Jun 06, 2016 4:56 pm
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

Re: MXF with two seperate Audio Streams

Posted: Mon Jun 06, 2016 6:26 pm
by novalis
excellent, that works! Thank you very much!