[FFmpeg-user] wrap to mxf - stream order

Georg Korger georgk66 at gmail.com
Thu Apr 3 17:06:15 CEST 2014


Hi everybody!

I try to wrap an mxf File with 8 mono audio channels to one
with the same video content and a stereo audio track from the first two
mono tracks:

ffmpeg -y -i input.mxf -c:v copy -filter_complex amerge c:\temp\test.mxf

The syntax seems to be o.k. but i get the following output:

******* START
ffmpeg version N-59396-g4156df5 Copyright (c) 2000-2013 the FFmpeg
developers
  built on Dec 27 2013 22:01:59 with gcc 4.8.2 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-av
isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls
--enab
le-iconv --enable-libass --enable-libbluray --enable-libcaca
--enable-libfreetyp
e --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame
--ena
ble-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg
--enable-l
ibopus --enable-librtmp --enable-libschroedinger --enable-libsoxr
--enable-libsp
eex --enable-libtheora --enable-libtwolame --enable-libvidstab
--enable-libvo-aa
cenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx
--enable-libwavp
ack --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
  libavutil      52. 59.100 / 52. 59.100
  libavcodec     55. 46.100 / 55. 46.100
  libavformat    55. 22.100 / 55. 22.100
  libavdevice    55.  5.102 / 55.  5.102
  libavfilter     4.  0.103 /  4.  0.103
  libswscale      2.  5.101 /  2.  5.101
  libswresample   0. 17.104 /  0. 17.104
  libpostproc    52.  3.100 / 52.  3.100
Guessed Channel Layout for  Input Stream #0.1 : mono
Guessed Channel Layout for  Input Stream #0.2 : mono
Guessed Channel Layout for  Input Stream #0.3 : mono
Guessed Channel Layout for  Input Stream #0.4 : mono
Guessed Channel Layout for  Input Stream #0.5 : mono
Guessed Channel Layout for  Input Stream #0.6 : mono
Guessed Channel Layout for  Input Stream #0.7 : mono
Guessed Channel Layout for  Input Stream #0.8 : mono
Input #0, mxf, from 'input.mxf':
  Metadata:
    uid             : 0003475a-c6f9-4ca0-931f-8259f117faf6
    generation_uid  : 0000475a-c6f9-4ca0-931f-8259f117faf6
    company_name    : Hamburg Pro Media GmbH
    product_name    : MXF4mac GC Export FCP
    product_version : 1.5.1
    product_uid     : 00000000-0000-0000-0000-000000000000
    modification_date: 2014-03-31 14:07:23
    timecode        : 10:00:00:00
  Duration: 00:03:59.84, start: 0.000000, bitrate: 59993 kb/s
    Stream #0:0: Video: mpeg2video (4:2:2), yuv422p(tv, bt709), 1920x1080
[SAR 1
:1 DAR 16:9], max. 50000 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc
    Stream #0:1: Audio: pcm_s24le, 48000 Hz, mono, s32, 1152 kb/s
    Stream #0:2: Audio: pcm_s24le, 48000 Hz, mono, s32, 1152 kb/s
    Stream #0:3: Audio: pcm_s24le, 48000 Hz, mono, s32, 1152 kb/s
    Stream #0:4: Audio: pcm_s24le, 48000 Hz, mono, s32, 1152 kb/s
    Stream #0:5: Audio: pcm_s24le, 48000 Hz, mono, s32, 1152 kb/s
    Stream #0:6: Audio: pcm_s24le, 48000 Hz, mono, s32, 1152 kb/s
    Stream #0:7: Audio: pcm_s24le, 48000 Hz, mono, s32, 1152 kb/s
    Stream #0:8: Audio: pcm_s24le, 48000 Hz, mono, s32, 1152 kb/s
[Parsed_amerge_0 @ 033383a0] No channel layout for input 1
[Parsed_amerge_0 @ 033383a0] Input channel layouts overlap: output layout
will b
e determined by the number of distinct input channels
[mxf @ 0340d360] there must be exactly one video stream and it must be the
first
 one
Output #0, mxf, to 'c:\temp\test.mxf':
  Metadata:
    uid             : 0003475a-c6f9-4ca0-931f-8259f117faf6
    generation_uid  : 0000475a-c6f9-4ca0-931f-8259f117faf6
    company_name    : Hamburg Pro Media GmbH
    product_name    : MXF4mac GC Export FCP
    product_version : 1.5.1
    product_uid     : 00000000-0000-0000-0000-000000000000
    modification_date: 2014-03-31 14:07:23
    timecode        : 10:00:00:00
    encoder         : Lavf55.22.100
    Stream #0:0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
(default)
    Stream #0:1: Video: mpeg2video, yuv422p, 1920x1080 [SAR 1:1 DAR 16:9],
q=2-3
1, max. 50000 kb/s, 25 fps, 90k tbn, 25 tbc
Stream mapping:
  Stream #0:1 (pcm_s24le) -> amerge:in0
  Stream #0:2 (pcm_s24le) -> amerge:in1
  amerge -> Stream #0:0 (pcm_s16le)
  Stream #0:0 -> #0:1 (copy)
Could not write header for output file #0 (incorrect codec parameters ?):
Error
number -1 occurred
******* END


If i do not use the amerge Filter, it works and i get an output file with
one mono audio channel:

ffmpeg -y -i input.mxf -c:v copy c:\temp\test.mxf

******* START
ffmpeg version N-59396-g4156df5 Copyright (c) 2000-2013 the FFmpeg
developers
  built on Dec 27 2013 22:01:59 with gcc 4.8.2 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-av
isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls
--enab
le-iconv --enable-libass --enable-libbluray --enable-libcaca
--enable-libfreetyp
e --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame
--ena
ble-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg
--enable-l
ibopus --enable-librtmp --enable-libschroedinger --enable-libsoxr
--enable-libsp
eex --enable-libtheora --enable-libtwolame --enable-libvidstab
--enable-libvo-aa
cenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx
--enable-libwavp
ack --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
  libavutil      52. 59.100 / 52. 59.100
  libavcodec     55. 46.100 / 55. 46.100
  libavformat    55. 22.100 / 55. 22.100
  libavdevice    55.  5.102 / 55.  5.102
  libavfilter     4.  0.103 /  4.  0.103
  libswscale      2.  5.101 /  2.  5.101
  libswresample   0. 17.104 /  0. 17.104
  libpostproc    52.  3.100 / 52.  3.100
Guessed Channel Layout for  Input Stream #0.1 : mono
Guessed Channel Layout for  Input Stream #0.2 : mono
Guessed Channel Layout for  Input Stream #0.3 : mono
Guessed Channel Layout for  Input Stream #0.4 : mono
Guessed Channel Layout for  Input Stream #0.5 : mono
Guessed Channel Layout for  Input Stream #0.6 : mono
Guessed Channel Layout for  Input Stream #0.7 : mono
Guessed Channel Layout for  Input Stream #0.8 : mono
Input #0, mxf, from 'input.mxf':
  Metadata:
    uid             : 0003475a-c6f9-4ca0-931f-8259f117faf6
    generation_uid  : 0000475a-c6f9-4ca0-931f-8259f117faf6
    company_name    : Hamburg Pro Media GmbH
    product_name    : MXF4mac GC Export FCP
    product_version : 1.5.1
    product_uid     : 00000000-0000-0000-0000-000000000000
    modification_date: 2014-03-31 14:07:23
    timecode        : 10:00:00:00
  Duration: 00:03:59.84, start: 0.000000, bitrate: 59993 kb/s
    Stream #0:0: Video: mpeg2video (4:2:2), yuv422p(tv, bt709), 1920x1080
[SAR 1
:1 DAR 16:9], max. 50000 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc
    Stream #0:1: Audio: pcm_s24le, 48000 Hz, mono, s32, 1152 kb/s
    Stream #0:2: Audio: pcm_s24le, 48000 Hz, mono, s32, 1152 kb/s
    Stream #0:3: Audio: pcm_s24le, 48000 Hz, mono, s32, 1152 kb/s
    Stream #0:4: Audio: pcm_s24le, 48000 Hz, mono, s32, 1152 kb/s
    Stream #0:5: Audio: pcm_s24le, 48000 Hz, mono, s32, 1152 kb/s
    Stream #0:6: Audio: pcm_s24le, 48000 Hz, mono, s32, 1152 kb/s
    Stream #0:7: Audio: pcm_s24le, 48000 Hz, mono, s32, 1152 kb/s
    Stream #0:8: Audio: pcm_s24le, 48000 Hz, mono, s32, 1152 kb/s
Output #0, mxf, to 'c:\temp\test.mxf':
  Metadata:
    uid             : 0003475a-c6f9-4ca0-931f-8259f117faf6
    generation_uid  : 0000475a-c6f9-4ca0-931f-8259f117faf6
    company_name    : Hamburg Pro Media GmbH
    product_name    : MXF4mac GC Export FCP
    product_version : 1.5.1
    product_uid     : 00000000-0000-0000-0000-000000000000
    modification_date: 2014-03-31 14:07:23
    timecode        : 10:00:00:00
    encoder         : Lavf55.22.100
    Stream #0:0: Video: mpeg2video, yuv422p, 1920x1080 [SAR 1:1 DAR 16:9],
q=2-3
1, max. 50000 kb/s, 25 fps, 25 tbn, 25 tbc
    Stream #0:1: Audio: pcm_s16le, 48000 Hz, mono, s16, 768 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (pcm_s24le -> pcm_s16le)
Press [q] to stop, [?] for help
frame=   80 fps=0.0 q=-1.0 size=   19729kB time=00:00:03.20
bitrate=50505.7kbits
******* END

The difference is, that in the first case, the output of amerge will become
the
Stream #0:0 to the mxf wrapper, which seems not to be allowed!
In the second case video will become the Stream #0:0 and everything
seems to work.
I didn't find a way to change the streams in the mxf wrapper.
Can you help me in that case?

Thank you, Georg Korger


More information about the ffmpeg-user mailing list