Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Audio language tagging not passed through when remuxing to mxf or mov #98

Open
FranceBB opened this issue Jun 21, 2022 · 9 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@FranceBB
Copy link

I have an IMF package with videos and audios and of course the CPL.
Video file is a MJPEG2000 BT709 SDR 10bit muxed in mxf
The audio files are PCM lossless 24bit 48'000Hz muxed as .mxf
To differentiate them, each one has audio tagging inside, so if I use Mediainfo I can see for instance:

General

Complete name : Test.mxf
Format : MXF
Format version : 1.3
Format profile : OP-1a
Format settings : Closed / Complete
File size : 6.10 GiB
Duration : 2 h 6 min
Overall bit rate : 6 912 kb/s
Package name : Material Package / File Package: SMPTE 382M clip wrapping of wave audio
Encoded date : 2022-05-03 22:48:00.768
Writing application : Rohde and Schwarz Clipster 6.9.1.0.1
Writing library : Windows 8 (64-bit) 2.38.0.20411.1

Audio

ID : 2
Format : PCM
Format settings : Little
Format settings, wrapping mode : Clip (BWF)
Codec ID : 0D01030102060200
Duration : 2 h 6 min
Bit rate mode : Constant
Bit rate : 6 912 kb/s
Channel(s) : 6 channels
Channel layout : L R C LFE Ls Rs
Sampling rate : 48.0 kHz
Bit depth : 24 bits
Stream size : 6.10 GiB (100%)
Title : FP Sound track
Language : Italian
Locked : Yes
MCA Title : MCA Title
MCA Title Version : MCA Title Version
MCA Audio Content Kind : MCA Audio Content Kind
MCA Audio Element Kind : MCA Audio Element Kind

Other #1

ID : 1-Material
Type : Time code
Format : MXF TC
Frame rate : 24.000 FPS
Time code of first frame : 00:59:30:00
Time code settings : Material Package
Time code, striped : Yes
Title : Timecode track

Other #2

ID : 1-Source
Type : Time code
Format : MXF TC
Frame rate : 24.000 FPS
Time code of first frame : 00:59:30:00
Time code settings : Source Package
Time code, striped : Yes
Title : Timecode track

As you can see, there's the language tagging:

Language : Italian

same goes for other tracks that might have a different language like English:

General

Complete name : Test2.mxf
Format : MXF
Format version : 1.3
Format profile : OP-1a
Format settings : Closed / Complete
File size : 6.10 GiB
Duration : 2 h 6 min
Overall bit rate : 6 912 kb/s
Package name : Material Package / File Package: SMPTE 382M clip wrapping of wave audio
Encoded date : 2022-05-03 22:48:00.768
Writing application : Rohde and Schwarz Clipster 6.9.1.0.1
Writing library : Windows 8 (64-bit) 2.38.0.20411.1

Audio

ID : 2
Format : PCM
Format settings : Little
Format settings, wrapping mode : Clip (BWF)
Codec ID : 0D01030102060200
Duration : 2 h 6 min
Bit rate mode : Constant
Bit rate : 6 912 kb/s
Channel(s) : 6 channels
Channel layout : L R C LFE Ls Rs
Sampling rate : 48.0 kHz
Bit depth : 24 bits
Stream size : 6.10 GiB (100%)
Title : FP Sound track
Language : English
Locked : Yes

Other #1

ID : 1-Material
Type : Time code
Format : MXF TC
Frame rate : 24.000 FPS
Time code of first frame : 00:59:30:00
Time code settings : Material Package
Time code, striped : Yes
Title : Timecode track

Other #2

ID : 1-Source
Type : Time code
Format : MXF TC
Frame rate : 24.000 FPS
Time code of first frame : 00:59:30:00
Time code settings : Source Package
Time code, striped : Yes
Title : Timecode track

so:
Language : English

however when I do:

ffmpeg.exe -f imf -i "D:\Masterfiles\CPL_IMF.xml" -map 0:0 -map 0:1 -map 0:2 -map 0:3 -map 0:4 -c:v copy -c:a copy -f mxf -y "D:\Masterfiles\test.mxf"

pause

FFMpeg outputs an error in the language tagging, namely:

[imf @ 000001d283a12a00] Opening 'D:\Masterfiles\ASSETMAP.xml' for reading
[mxf @ 000001d283a689c0] local tag 0xdff5 with 0 size
[mxf @ 000001d283a689c0] local tag 0xdff4 with 0 size
[mxf @ 000001d283a689c0] local tag 0xdff3 with 0 size
[mxf @ 000001d283a689c0] local tag 0xdff2 with 0 size
[mxf @ 000001d283a689c0] local tag 0xdff5 with 0 size
[mxf @ 000001d283a689c0] local tag 0xdff4 with 0 size
[mxf @ 000001d283a689c0] local tag 0xdff3 with 0 size
[mxf @ 000001d283a689c0] local tag 0xdff2 with 0 size

The whole command line output is:

H:\MJPEG2000 DCP Hardsubber (x86) - Final>ffmpeg.exe -f imf -i "D:\Masterfiles\CPL_IMF.xml" -map 0:0 -map 0:1 -map 0:2 -map 0:3 -map 0:4 -c:v copy -c:a copy -f mxf -y "D:\Masterfiles\test.mxf"
ffmpeg version git-2022-01-28-f581139854-20220128 Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 11.2.0 (crosstool-NG 1.24.0.498_5075e1f)
  configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --disable-libpulse --enable-libvmaf --disable-libxcb --disable-xlib --enable-amf --enable-libaom --enable-avisynth --enable-libdav1d --enable-libdavs2 --disable-libfdk-aac --enable-ffnvcodec --enable-cuda-llvm --enable-frei0r --enable-libgme --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librist --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --disable-libdrm --disable-vaapi --enable-libvidstab --enable-vulkan --enable-libshaderc --enable-libplacebo --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --enable-libzvbi --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags= --extra-libs=-lgomp --extra-version=20220128
  libavutil      57. 18.100 / 57. 18.100
  libavcodec     59. 20.100 / 59. 20.100
  libavformat    59. 17.101 / 59. 17.101
  libavdevice    59.  5.100 / 59.  5.100
  libavfilter     8. 25.100 /  8. 25.100
  libswscale      6.  5.100 /  6.  5.100
  libswresample   4.  4.100 /  4.  4.100
  libpostproc    56.  4.100 / 56.  4.100
IMF CPL ContentTitle: Hitch
IMF CPL Id: urn:uuid:e945442e-aa35-4961-9b74-7c624fb9d232
[imf @ 000001d283a12a00] Opening 'D:\Masterfiles\ASSETMAP.xml' for reading
[mxf @ 000001d283a689c0] local tag 0xdff5 with 0 size
[mxf @ 000001d283a689c0] local tag 0xdff4 with 0 size
[mxf @ 000001d283a689c0] local tag 0xdff3 with 0 size
[mxf @ 000001d283a689c0] local tag 0xdff2 with 0 size
[mxf @ 000001d283a689c0] local tag 0xdff5 with 0 size
[mxf @ 000001d283a689c0] local tag 0xdff4 with 0 size
[mxf @ 000001d283a689c0] local tag 0xdff3 with 0 size
[mxf @ 000001d283a689c0] local tag 0xdff2 with 0 size
Input #0, imf, from 'D:\Masterfiles\CPL_IMF.xml':
  Duration: 02:06:22.49, start: 0.000000, bitrate: 0 kb/s
  Stream #0:0: Video: jpeg2000, yuv422p10le(tv, bt709, progressive), 3840x2160, 23.98 tbr, 23.98 tbn
  Stream #0:1: Audio: pcm_s24le, 48000 Hz, downmix, s32 (24 bit), 2304 kb/s
  Stream #0:2: Audio: pcm_s24le, 48000 Hz, downmix, s32 (24 bit), 2304 kb/s
  Stream #0:3: Audio: pcm_s24le, 48000 Hz, 5.1(side), s32 (24 bit), 6912 kb/s
  Stream #0:4: Audio: pcm_s24le, 48000 Hz, 5.1(side), s32 (24 bit), 6912 kb/s
Output #0, mxf, to 'D:\Masterfiles\test.mxf':
  Metadata:
    encoder         : Lavf59.17.101
  Stream #0:0: Video: jpeg2000, yuv422p10le(tv, bt709, progressive), 3840x2160, q=2-31, 23.98 tbr, 23.98 tbn
  Stream #0:1: Audio: pcm_s24le, 48000 Hz, downmix, s32 (24 bit), 2304 kb/s (default)
  Stream #0:2: Audio: pcm_s24le, 48000 Hz, downmix, s32 (24 bit), 2304 kb/s
  Stream #0:3: Audio: pcm_s24le, 48000 Hz, 5.1(side), s32 (24 bit), 6912 kb/s
  Stream #0:4: Audio: pcm_s24le, 48000 Hz, 5.1(side), s32 (24 bit), 6912 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
  Stream #0:2 -> #0:2 (copy)
  Stream #0:3 -> #0:3 (copy)
  Stream #0:4 -> #0:4 (copy)
Press [q] to stop, [?] for help
frame= 3987 fps=793 q=-1.0 size= 3678208kB time=00:02:46.29 bitrate=181199.6kbits/s speed=33.1x

and indeed the final file lacks the audio tagging:

General

Complete name : D:\Masterfiles\test.mxf
Format : MXF
Format version : 1.3
Format profile : OP-1a
Format settings : Closed / Complete
File size : 3.64 GiB
Duration : 2 min 52 s
Overall bit rate : 181 Mb/s
Encoded date : 0-00-00 00:00:00.000
Writing application : FFmpeg OP1a Muxer 59.17.101.0.0
Writing library : Lavf (mingw32) 59.17.101.0.0

Video

ID : 2
Format : JPEG 2000
Format profile : BCS@L5
Format settings, wrapping mode : Frame
Codec ID : 0D010301020C0100-0401020203010100
Duration : 2 min 52 s
Bit rate : 163 Mb/s
Width : 3 840 pixels
Height : 2 160 pixels
Display aspect ratio : 16:9
Frame rate : 23.976 (24000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:2
Bit depth : 10 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.819
Stream size : 3.27 GiB (90%)
Color range : Limited
Color primaries : BT.709
Transfer characteristics : BT.709
Matrix coefficients : BT.709

Audio #1

ID : 3
Format : PCM
Format settings : Little
Format settings, wrapping mode : Frame (AES)
Codec ID : 0D01030102060300
Duration : 2 min 52 s
Bit rate mode : Constant
Bit rate : 2 304 kb/s
Channel(s) : 2 channels
Sampling rate : 48.0 kHz
Frame rate : 23.976 FPS (2002 SPF)
Bit depth : 24 bits
Stream size : 47.4 MiB (1%)
Locked : Yes

Audio #2

ID : 4
Format : PCM
Format settings : Little
Format settings, wrapping mode : Frame (AES)
Codec ID : 0D01030102060300
Duration : 2 min 52 s
Bit rate mode : Constant
Bit rate : 2 304 kb/s
Channel(s) : 2 channels
Sampling rate : 48.0 kHz
Frame rate : 23.976 FPS (2002 SPF)
Bit depth : 24 bits
Stream size : 47.4 MiB (1%)
Locked : Yes

Audio #3

ID : 5
Format : PCM
Format settings : Little
Format settings, wrapping mode : Frame (AES)
Codec ID : 0D01030102060300
Duration : 2 min 52 s
Bit rate mode : Constant
Bit rate : 6 912 kb/s
Channel(s) : 6 channels
Sampling rate : 48.0 kHz
Frame rate : 23.976 FPS (2002 SPF)
Bit depth : 24 bits
Stream size : 142 MiB (4%)
Locked : Yes

Audio #4

ID : 6
Format : PCM
Format settings : Little
Format settings, wrapping mode : Frame (AES)
Codec ID : 0D01030102060300
Duration : 2 min 52 s
Bit rate mode : Constant
Bit rate : 6 912 kb/s
Channel(s) : 6 channels
Sampling rate : 48.0 kHz
Frame rate : 23.976 FPS (2002 SPF)
Bit depth : 24 bits
Stream size : 142 MiB (4%)
Locked : Yes

Other #1

ID : 1-Material
Type : Time code
Format : MXF TC
Frame rate : 24.000 FPS
Time code of first frame : 00:00:00:00
Time code settings : Material Package
Time code, striped : Yes

Other #2

ID : 1-Source
Type : Time code
Format : MXF TC
Frame rate : 24.000 FPS
Time code of first frame : 00:00:00:00
Time code settings : Source Package
Time code, striped : Yes

Other #3

Type : Time code
Format : SMPTE TC
Muxing mode : SDTI
Frame rate : 24.000 FPS
Time code of first frame : 00:00:00:00

Changing the remux to mov doesn't improve things either:

ffmpeg.exe -f imf -i "D:\Masterfiles\CPL_IMF.xml" -map 0:0 -map 0:1 -map 0:2 -map 0:3 -map 0:4 -c:v copy -c:a copy -f mov -y "D:\Masterfiles\test.mov"

pause

General

Complete name : D:\Masterfiles\test.mov
Format : MPEG-4
Format profile : QuickTime
Codec ID : qt 0000.02 (qt )
File size : 2.06 GiB
Duration : 1 min 42 s
Overall bit rate mode : Variable
Overall bit rate : 173 Mb/s
Writing application : Lavf59.17.101

Video

ID : 1
Format : JPEG 2000
Codec ID : mjp2
Duration : 1 min 42 s
Bit rate mode : Variable
Bit rate : 155 Mb/s
Width : 3 840 pixels
Height : 2 160 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 23.976 (24000/1001) FPS
Color space : YUV
Scan type : Progressive
Bits/(Pixel*Frame) : 0.778
Stream size : 1.84 GiB (89%)
Color primaries : BT.709
Transfer characteristics : BT.709
Matrix coefficients : BT.709

Audio #1

ID : 2
Format : PCM
Format settings : Little / Signed
Codec ID : in24
Duration : 1 min 42 s
Bit rate mode : Constant
Bit rate : 2 304 kb/s
Channel(s) : 2 channels
Channel layout : Lt Rt
Sampling rate : 48.0 kHz
Bit depth : 24 bits
Stream size : 28.1 MiB (1%)
Default : Yes
Alternate group : 1

Audio #2

ID : 3
Format : PCM
Format settings : Little / Signed
Codec ID : in24
Duration : 1 min 42 s
Bit rate mode : Constant
Bit rate : 2 304 kb/s
Channel(s) : 2 channels
Channel layout : Lt Rt
Sampling rate : 48.0 kHz
Bit depth : 24 bits
Stream size : 28.1 MiB (1%)
Default : No
Alternate group : 1

Audio #3

ID : 4
Format : PCM
Format settings : Little / Signed
Codec ID : in24
Duration : 1 min 42 s
Bit rate mode : Constant
Bit rate : 6 912 kb/s
Channel(s) : 6 channels
Channel layout : L R C LFE Ls Rs
Sampling rate : 48.0 kHz
Bit depth : 24 bits
Stream size : 84.3 MiB (4%)
Default : No
Alternate group : 1

Audio #4

ID : 5
Format : PCM
Format settings : Little / Signed
Codec ID : in24
Duration : 1 min 42 s
Bit rate mode : Constant
Bit rate : 6 912 kb/s
Channel(s) : 6 channels
Channel layout : L R C LFE Ls Rs
Sampling rate : 48.0 kHz
Bit depth : 24 bits
Stream size : 84.2 MiB (4%)
Default : No
Alternate group : 1

@palemieux
Copy link
Contributor

@FranceBB Can you do a dump of the source MXF file at https://registry.smpte-ra.org/apps/regxmldump/view/published/

@FranceBB
Copy link
Author

Done.
Source MXF Dump.zip

@palemieux
Copy link
Contributor

It looks like FFmpeg does not support writing MCA sub-descriptors, which contain the language information:

https://github.com/FFmpeg/FFmpeg/blob/fed07efcde72824ac1ada80d4af4e91ac4fcfc14/libavformat/mxfenc.c#L1430

@palemieux
Copy link
Contributor

Language seems to be working when converting to MP4: ffmpeg -i WAV_d01bc6be-ae2f-436b-9705-c402e1d92212.mxf out.mp4

The audio track in out.mp4 is labeled "English".

WAV_d01bc6be-ae2f-436b-9705-c402e1d92212.zip

@FranceBB
Copy link
Author

Gotcha, so it's not the IMF code but rather an FFMpeg mxf muxer limitation.
I've created a ticket in the official bug tracker asking for the new feature.
Let's see if someone is gonna pick it up or if it's gonna die out like other mxf related requests... :(

https://trac.ffmpeg.org/ticket/9818#ticket

@FranceBB FranceBB reopened this Jun 27, 2022
@FranceBB
Copy link
Author

FranceBB commented Jun 27, 2022

Actually, I'm going to re-open this, 'cause I made some new discoveries.

Decoding the mxf file directly does indeed make the info being displayed in FFMpeg (so I can remux into something else that isn't mxf and supports the language tagging), however such an info ain't displayed when the file is opened by the CPL IMF decoder, thus preventing me from using other containers like mkv etc.

By opening the mxf file directly:

H:\x262 Audio Hardsubber (x86) - Final>ffmpeg.exe  -i "\\mibcsrvarca01.pbc.local\Avisynth Server 3\Masterfiles\hitch_sdr_sky_italy\IMF9668671_HITCH_2D_D_UHD_LB240_XVYCC_2398_TXT_ENG_00.mxf" -i "\\mibcsrvarca01.pbc.local\Avisynth Server 3\Masterfiles\hitch_sdr_sky_italy\IMF10544357_HITCH_2D_D_UHD_LB240_XVYCC_2398_TXT_ITA_ITA_DS.mxf" -map 0:0 -map 1:0 -vcodec copy -acodec copy  -t 1 -f mxf -y "\\mibcsrvarca01.pbc.local\Avisynth Server 3\Masterfiles\trim.mxf"
ffmpeg version git-2022-01-28-f581139854-20220128 Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 11.2.0 (crosstool-NG 1.24.0.498_5075e1f)
  configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --disable-libpulse --enable-libvmaf --disable-libxcb --disable-xlib --enable-amf --enable-libaom --enable-avisynth --enable-libdav1d --enable-libdavs2 --disable-libfdk-aac --enable-ffnvcodec --enable-cuda-llvm --enable-frei0r --enable-libgme --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librist --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --disable-libdrm --disable-vaapi --enable-libvidstab --enable-vulkan --enable-libshaderc --enable-libplacebo --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --enable-libzvbi --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags= --extra-libs=-lgomp --extra-version=20220128
  libavutil      57. 18.100 / 57. 18.100
  libavcodec     59. 20.100 / 59. 20.100
  libavformat    59. 17.101 / 59. 17.101
  libavdevice    59.  5.100 / 59.  5.100
  libavfilter     8. 25.100 /  8. 25.100
  libswscale      6.  5.100 /  6.  5.100
  libswresample   4.  4.100 /  4.  4.100
  libpostproc    56.  4.100 / 56.  4.100
Input #0, mxf, from '\\mibcsrvarca01.pbc.local\Avisynth Server 3\Masterfiles\hitch_sdr_sky_italy\IMF9668671_HITCH_2D_D_UHD_LB240_XVYCC_2398_TXT_ENG_00.mxf':
  Metadata:
    operational_pattern_ul: 060e2b34.04010101.0d010201.01010100
    uid             : 1a566ace-8338-4b8f-a82e-441affdf6970
    company_name    : Rohde and Schwarz DVS GmbH
    product_name    : Clipster
    product_version : 5.10.0.19
    product_version_num: 5.10.0.19.1
    toolkit_version_num: 1.2.0.19.4
    application_platform: Windows Server 2008 R2 (64-bit)
    modification_date: 2019-08-06T14:20:14.836000Z
    product_uid     : 2da05c9e-580a-542c-a426-7e5b93cca6b4
    generation_uid  : a568b931-30dc-4090-9525-b5a4678e378b
    material_package_umid: 0x060A2B340101010501010F201300000033A7C7AED15544D1AC4AC5A8CEFB6F08
    timecode        : 00:59:30:00
  Duration: 01:59:07.60, start: 0.000000, bitrate: 484091 kb/s
  Stream #0:0: Video: jpeg2000, yuv422p10le(tv, bt709, progressive), 3840x2160, SAR 1:1 DAR 16:9, 23.98 tbr, 23.98 tbn
    Metadata:
      file_package_umid: 0x060A2B340101010501010F2013000000FDCB9BEAB59345B9926D6E6A7EC205E1
      track_name      : MP Picture track
Input #1, mxf, from '\\mibcsrvarca01.pbc.local\Avisynth Server 3\Masterfiles\hitch_sdr_sky_italy\IMF10544357_HITCH_2D_D_UHD_LB240_XVYCC_2398_TXT_ITA_ITA_DS.mxf':
  Metadata:
    operational_pattern_ul: 060e2b34.04010101.0d010201.01010100
    uid             : 9dae8d74-568b-490b-a56d-ea01b162e5eb
    company_name    : Rohde and Schwarz
    product_name    : Clipster
    product_version : 6.9.1.0
    product_version_num: 6.9.1.0.1
    toolkit_version_num: 2.38.0.20411.1
    application_platform: Windows 8 (64-bit)
    modification_date: 2022-05-03T22:45:04.940000Z
    product_uid     : 11541793-dee2-56c7-b142-13f88b4264b9
    generation_uid  : 0dfb7915-0316-427c-89a7-7efd58f4d1fc
    material_package_umid: 0x060A2B340101010501010F2013000000A0EB6358194B4F0BADA1F35498880DB5
    material_package_name: Material Package
    timecode        : 00:59:30:00
  Duration: 02:06:22.49, start: 0.000000, bitrate: 2304 kb/s
  Stream #1:0(ita): Audio: pcm_s24le, 48000 Hz, downmix, s32 (24 bit), 2304 kb/s
    Metadata:
      file_package_umid: 0x060A2B340101010501010F201300000038723ACE89734FC680B85F2D7B78FA25
      file_package_name: File Package: SMPTE 382M clip wrapping of wave audio
      track_name      : MP sound track
Output #0, mxf, to '\\mibcsrvarca01.pbc.local\Avisynth Server 3\Masterfiles\trim.mxf':
  Metadata:
    operational_pattern_ul: 060e2b34.04010101.0d010201.01010100
    uid             : 1a566ace-8338-4b8f-a82e-441affdf6970
    timecode        : 00:59:30:00
    material_package_umid: 0x060A2B340101010501010F201300000033A7C7AED15544D1AC4AC5A8CEFB6F08
    generation_uid  : a568b931-30dc-4090-9525-b5a4678e378b
    product_version_num: 5.10.0.19.1
    toolkit_version_num: 1.2.0.19.4
    application_platform: Windows Server 2008 R2 (64-bit)
    modification_date: 2019-08-06T14:20:14.836000Z
    product_uid     : 2da05c9e-580a-542c-a426-7e5b93cca6b4
    encoder         : Lavf59.17.101
  Stream #0:0: Video: jpeg2000, yuv422p10le(tv, bt709, progressive), 3840x2160 [SAR 1:1 DAR 16:9], q=2-31, 23.98 tbr, 23.98 tbn
    Metadata:
      file_package_umid: 0x060A2B340101010501010F2013000000FDCB9BEAB59345B9926D6E6A7EC205E1
      track_name      : MP Picture track
  Stream #0:1(ita): Audio: pcm_s24le, 48000 Hz, downmix, s32 (24 bit), 2304 kb/s
    Metadata:
      file_package_umid: 0x060A2B340101010501010F201300000038723ACE89734FC680B85F2D7B78FA25
      file_package_name: File Package: SMPTE 382M clip wrapping of wave audio
      track_name      : MP sound track
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #1:0 -> #0:1 (copy)

it says Stream #0:1**(ita)**

however when I open the CPL with the IMF decoder:

H:\MJPEG2000 DCP Hardsubber (x86) - Final>ffmpeg.exe -f imf -i "\\mibcsrvarca01.pbc.local\Avisynth Server 3\Masterfiles\hitch_sdr_sky_italy\CPL_IMF10544357_958008_HITCH_D_UHD_LB240_XVYCC_2398_48K_ITA_DS_ENG_DS_ITA_51_TXT_ITA_e945442e-aa35-4961-9b74-7c624fb9d232.xml" -map 0:0 -map 0:1 -map 0:2 -map 0:3 -map 0:4 -c:v copy -c:a copy -f mxf -y "\\mibcsrvarca01.pbc.local\Avisynth Server 3\Masterfiles\test.mxf"
ffmpeg version git-2022-01-28-f581139854-20220128 Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 11.2.0 (crosstool-NG 1.24.0.498_5075e1f)
  configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --disable-libpulse --enable-libvmaf --disable-libxcb --disable-xlib --enable-amf --enable-libaom --enable-avisynth --enable-libdav1d --enable-libdavs2 --disable-libfdk-aac --enable-ffnvcodec --enable-cuda-llvm --enable-frei0r --enable-libgme --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librist --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --disable-libdrm --disable-vaapi --enable-libvidstab --enable-vulkan --enable-libshaderc --enable-libplacebo --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --enable-libzvbi --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags= --extra-libs=-lgomp --extra-version=20220128
  libavutil      57. 18.100 / 57. 18.100
  libavcodec     59. 20.100 / 59. 20.100
  libavformat    59. 17.101 / 59. 17.101
  libavdevice    59.  5.100 / 59.  5.100
  libavfilter     8. 25.100 /  8. 25.100
  libswscale      6.  5.100 /  6.  5.100
  libswresample   4.  4.100 /  4.  4.100
  libpostproc    56.  4.100 / 56.  4.100
IMF CPL ContentTitle: Hitch
IMF CPL Id: urn:uuid:e945442e-aa35-4961-9b74-7c624fb9d232
[imf @ 0000025932742a40] Opening '\\mibcsrvarca01.pbc.local\Avisynth Server 3\Masterfiles\hitch_sdr_sky_italy/ASSETMAP.xml' for reading
[mxf @ 00000259327708c0] local tag 0xdff5 with 0 size
[mxf @ 00000259327708c0] local tag 0xdff4 with 0 size
[mxf @ 00000259327708c0] local tag 0xdff3 with 0 size
[mxf @ 00000259327708c0] local tag 0xdff2 with 0 size
[mxf @ 00000259327708c0] local tag 0xdff5 with 0 size
[mxf @ 00000259327708c0] local tag 0xdff4 with 0 size
[mxf @ 00000259327708c0] local tag 0xdff3 with 0 size
[mxf @ 00000259327708c0] local tag 0xdff2 with 0 size
Input #0, imf, from '\\mibcsrvarca01.pbc.local\Avisynth Server 3\Masterfiles\hitch_sdr_sky_italy\CPL_IMF10544357_958008_HITCH_D_UHD_LB240_XVYCC_2398_48K_ITA_DS_ENG_DS_ITA_51_TXT_ITA_e945442e-aa35-4961-9b74-7c624fb9d232.xml':
  Duration: 02:06:22.49, start: 0.000000, bitrate: 0 kb/s
  Stream #0:0: Video: jpeg2000, yuv422p10le(tv, bt709, progressive), 3840x2160, 23.98 tbr, 23.98 tbn
  Stream #0:1: Audio: pcm_s24le, 48000 Hz, downmix, s32 (24 bit), 2304 kb/s
  Stream #0:2: Audio: pcm_s24le, 48000 Hz, downmix, s32 (24 bit), 2304 kb/s
  Stream #0:3: Audio: pcm_s24le, 48000 Hz, 5.1(side), s32 (24 bit), 6912 kb/s
  Stream #0:4: Audio: pcm_s24le, 48000 Hz, 5.1(side), s32 (24 bit), 6912 kb/s
Output #0, mxf, to '\\mibcsrvarca01.pbc.local\Avisynth Server 3\Masterfiles\test.mxf':
  Metadata:
    encoder         : Lavf59.17.101
  Stream #0:0: Video: jpeg2000, yuv422p10le(tv, bt709, progressive), 3840x2160, q=2-31, 23.98 tbr, 23.98 tbn
  Stream #0:1: Audio: pcm_s24le, 48000 Hz, downmix, s32 (24 bit), 2304 kb/s (default)
  Stream #0:2: Audio: pcm_s24le, 48000 Hz, downmix, s32 (24 bit), 2304 kb/s
  Stream #0:3: Audio: pcm_s24le, 48000 Hz, 5.1(side), s32 (24 bit), 6912 kb/s
  Stream #0:4: Audio: pcm_s24le, 48000 Hz, 5.1(side), s32 (24 bit), 6912 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
  Stream #0:2 -> #0:2 (copy)
  Stream #0:3 -> #0:3 (copy)
  Stream #0:4 -> #0:4 (copy)

it doesn't display the language tag, so something must be wrong with the IMF / FFMpeg integration.

Again, I don't mean in the final package, I mean inside the FFMpeg decoding.
In other words, it doesn't matter which container I remux to, it will never ever show up.

Do you know how I can trim a IMF package to send you a sample?
The only thing I've been able to trim was the audio file but if I open that directly with -i "file.mxf" it does indeed show (ita), so it's not really a valid test... https://trac.ffmpeg.org/attachment/ticket/9818/trim_1.mxf

@palemieux
Copy link
Contributor

@FranceBB Can you give #99 a try?

@palemieux palemieux self-assigned this Jun 27, 2022
@palemieux palemieux added the bug Something isn't working label Jun 27, 2022
@FranceBB
Copy link
Author

Sure, but it's evening in Europe right now.
If you have a build ready I'll try it first thing in the morning tomorrow, otherwise I'll build it tomorrow afternoon as soon as I get a few spare minutes from work.

@FranceBB
Copy link
Author

FranceBB commented Jul 3, 2022

Sorry for the delay, but yes, your commit seems to be solving the issue, thanks! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants