[FFmpeg-user] MXF with 8 audio channels to mp4 / h.264, matching audio channels

Harvey Pikelberger communque at gmail.com
Sat Sep 15 00:28:47 EEST 2018


I've got MXFs with 8 channels of audio
I'm trying to generate mp4/h.264 files with matching audio.

The code I tried -- for 4 channel sources to matching 4 channel mp4s -- which works fine for 4-audio-channel files but fails for these 8-audio-channel files.

Here's the code
ffmpeg -i Path/To/Source.mxf -map 0 -g 48 -c:v libx264 -profile:v baseline -crf 16 -c:a aac -b:a 256k -vf scale=1024:540 -pix_fmt yuv420p Path/To/Dest.mp4

The Source File Specs
MXF wrapper
Video: h.264 / MPEG 4 AVC / 4069x2178
Audio: PCM S24 LE (s24l)  for all 8 tracks

The Results:
ffmpeg version 4.0.1 Copyright (c) 2000-2018 the FFmpeg developers
  built with Apple LLVM version 9.1.0 (clang-902.0.39.2)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/4.0.1 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-gpl --enable-chromaprint --enable-ffplay --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopus --enable-librsvg --enable-librtmp --enable-librubberband --enable-libsnappy --enable-libsoxr --enable-libssh --enable-libtesseract --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzimg --enable-libzmq --enable-opencl --enable-videotoolbox --enable-openssl --enable-lzma --enable-libopenjpeg --disable-decoder=jpeg2000 --extra-cflags=-I/usr/local/Cellar/openjpeg/2.3.0/include/openjpeg-2.3 --enable-nonfree
  libavutil      56. 14.100 / 56. 14.100
  libavcodec     58. 18.100 / 58. 18.100
  libavformat    58. 12.100 / 58. 12.100
  libavdevice    58.  3.100 / 58.  3.100
  libavfilter     7. 16.100 /  7. 16.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  1.100 /  5.  1.100
  libswresample   3.  1.100 /  3.  1.100
  libpostproc    55.  1.100 / 55.  1.100
[mxf @ 0x7f9dc200ac00] decoding for stream 0 failed
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 '/Path/To/Source.mxf':
  Metadata:
    uid             : 8dd8673e-ec5c-11e5-8afc-080046a35958
    generation_uid  : 8dd86748-ec5c-11e5-9cdf-080046a35958
    company_name    : Sony
    product_name    : Mem 
    product_version : 2.00
    product_uid     : cede1104-8280-11de-8a39-08004678031c
    modification_date: 2016-03-17T16:23:16.000000Z
    material_package_umid: 0x060A2B340101010501010D4313000000F6ECCDAE647405C70800460202A35958
    timecode        : 09:58:59:12
  Duration: 00:25:12.84, start: 0.000000, bitrate: 240241 kb/s
    Stream #0:0: Video: h264 (High 4:2:2 Intra), yuv422p10le(progressive), 4096x2160 [SAR 1:1 DAR 256:135], 23.98 fps, 23.98 tbr, 23.98 tbn, 47.95 tbc
    Metadata:
      file_package_umid: 0x060A2B340101010501010D4313000000F7ECCDAE647405C70800460202A35958
    Stream #0:1: Audio: pcm_s24le, 48000 Hz, mono, s32 (24 bit), 1152 kb/s
    Metadata:
      file_package_umid: 0x060A2B340101010501010D4313000000F7ECCDAE647405C70800460202A35958
    Stream #0:2: Audio: pcm_s24le, 48000 Hz, mono, s32 (24 bit), 1152 kb/s
    Metadata:
      file_package_umid: 0x060A2B340101010501010D4313000000F7ECCDAE647405C70800460202A35958
    Stream #0:3: Audio: pcm_s24le, 48000 Hz, mono, s32 (24 bit), 1152 kb/s
    Metadata:
      file_package_umid: 0x060A2B340101010501010D4313000000F7ECCDAE647405C70800460202A35958
    Stream #0:4: Audio: pcm_s24le, 48000 Hz, mono, s32 (24 bit), 1152 kb/s
    Metadata:
      file_package_umid: 0x060A2B340101010501010D4313000000F7ECCDAE647405C70800460202A35958
    Stream #0:5: Audio: pcm_s24le, 48000 Hz, mono, s32 (24 bit), 1152 kb/s
    Metadata:
      file_package_umid: 0x060A2B340101010501010D4313000000F7ECCDAE647405C70800460202A35958
    Stream #0:6: Audio: pcm_s24le, 48000 Hz, mono, s32 (24 bit), 1152 kb/s
    Metadata:
      file_package_umid: 0x060A2B340101010501010D4313000000F7ECCDAE647405C70800460202A35958
    Stream #0:7: Audio: pcm_s24le, 48000 Hz, mono, s32 (24 bit), 1152 kb/s
    Metadata:
      file_package_umid: 0x060A2B340101010501010D4313000000F7ECCDAE647405C70800460202A35958
    Stream #0:8: Audio: pcm_s24le, 48000 Hz, mono, s32 (24 bit), 1152 kb/s
    Metadata:
      file_package_umid: 0x060A2B340101010501010D4313000000F7ECCDAE647405C70800460202A35958
    Stream #0:9: Data: none
    Metadata:
      file_package_umid: 0x060A2B340101010501010D4313000000F7ECCDAE647405C70800460202A35958
      data_type       : vbi_vanc_smpte_436M
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
  Stream #0:1 -> #0:1 (pcm_s24le (native) -> aac (native))
  Stream #0:2 -> #0:2 (pcm_s24le (native) -> aac (native))
  Stream #0:3 -> #0:3 (pcm_s24le (native) -> aac (native))
  Stream #0:4 -> #0:4 (pcm_s24le (native) -> aac (native))
  Stream #0:5 -> #0:5 (pcm_s24le (native) -> aac (native))
  Stream #0:6 -> #0:6 (pcm_s24le (native) -> aac (native))
  Stream #0:7 -> #0:7 (pcm_s24le (native) -> aac (native))
  Stream #0:8 -> #0:8 (pcm_s24le (native) -> aac (native))
  Stream #0:9 -> #0:9 (copy)
Press [q] to stop, [?] for help
[libx264 @ 0x7f9dc1093000] using SAR=1/1
[libx264 @ 0x7f9dc1093000] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x7f9dc1093000] profile Constrained Baseline, level 3.1
[libx264 @ 0x7f9dc1093000] 264 - core 152 r2854 e9a5903 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - http://www.videolan.org/x264.html - options: cabac=0 ref=3 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=48 keyint_min=4 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=16.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
[mp4 @ 0x7f9dc1091e00] Could not find tag for codec none in stream #9, codec not currently supported in container
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Error initializing output stream 0:0 -- 
[aac @ 0x7f9dc1094800] Qavg: 11055.401
[aac @ 0x7f9dc1094800] 2 frames left in the queue on closing
[aac @ 0x7f9dc1095a00] Qavg: 207.793
[aac @ 0x7f9dc1095a00] 2 frames left in the queue on closing
[aac @ 0x7f9dc1083600] Qavg: 65536.000
[aac @ 0x7f9dc1083600] 2 frames left in the queue on closing
[aac @ 0x7f9dc1084800] Qavg: 65536.000
[aac @ 0x7f9dc1084800] 2 frames left in the queue on closing
[aac @ 0x7f9dc1085a00] Qavg: 65536.000
[aac @ 0x7f9dc1085a00] 2 frames left in the queue on closing
[aac @ 0x7f9dc1086c00] Qavg: 65536.000
[aac @ 0x7f9dc1086c00] 2 frames left in the queue on closing
[aac @ 0x7f9dc1087e00] Qavg: 65536.000
[aac @ 0x7f9dc1087e00] 2 frames left in the queue on closing
[aac @ 0x7f9dc1089000] Qavg: 65536.000
[aac @ 0x7f9dc1089000] 2 frames left in the queue on closing
Conversion failed!





More information about the ffmpeg-user mailing list