Opened 6 years ago

Last modified 7 days ago

#1102 open defect

mxf separate fields in interlaced j2k

Reported by: zhukov Owned by: mateo
Priority: normal Component: avformat
Version: git-master Keywords: mxf j2k
Cc: dave@dericed.com, matthieu.bouron@gmail.com, kieran.o.leary@gmail.com Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: yes

Description

http://dl.dropbox.com/u/1109725/ntsc2.mxf
this mxf stores fields as two separate j2k images
expected dimension: 720x486
actual dimension: 720x243

Attachments (1)

short.mxf (1.0 MB) - added by nichot20 2 years ago.
Sample IMX50 frame wrapped separate fields file for comparison

Download all attachments as: .zip

Change History (14)

comment:1 Changed 6 years ago by cehoyos

  • Keywords mxf added

Please add a ffmpeg -i ntsc2.mxf output.

comment:2 Changed 5 years ago by cehoyos

  • Keywords j2k added
  • Status changed from new to open
$ ffmpeg -i ntsc2.mxf
ffmpeg version N-44896-ge4b1fcd Copyright (c) 2000-2012 the FFmpeg developers
  built on Sep 30 2012 14:35:48 with gcc 4.5.3 (GCC)
  configuration: --cc=/usr/local/gcc-4.5.3/bin/gcc --enable-gpl --enable-libopenjpeg
  libavutil      51. 73.101 / 51. 73.101
  libavcodec     54. 61.100 / 54. 61.100
  libavformat    54. 29.105 / 54. 29.105
  libavdevice    54.  3.100 / 54.  3.100
  libavfilter     3. 18.100 /  3. 18.100
  libswscale      2.  1.101 /  2.  1.101
  libswresample   0. 16.100 /  0. 16.100
  libpostproc    52.  1.100 / 52.  1.100
[mxf @ 0x150a240] broken or empty index
Input #0, mxf, from 'ntsc2.mxf':
  Metadata:
    timecode        : 02:57:45;02
  Duration: 00:00:01.53, start: 0.000000, bitrate: 78647 kb/s
    Stream #0:0: Video: jpeg2000, yuv422p10le, 720x243, 29.97 fps, 29.97 tbr, 29.97 tbn, 29.97 tbc
At least one output file must be specified

comment:3 Changed 5 years ago by cehoyos

This sample may be related:
http://samples.ffmpeg.org/jpeg2000/jpeg2000_mxf_first_10mb.mxf

$ ffmpeg -i jpeg2000_mxf_first_10mb.mxf
ffmpeg version N-52668-gf685aee Copyright (c) 2000-2013 the FFmpeg developers
  built on May  3 2013 07:42:11 with gcc 4.7 (SUSE Linux)
  configuration: --enable-libopenjpeg --enable-gpl --disable-indev=jack
  libavutil      52. 27.101 / 52. 27.101
  libavcodec     55.  6.100 / 55.  6.100
  libavformat    55.  4.100 / 55.  4.100
  libavdevice    55.  0.100 / 55.  0.100
  libavfilter     3. 62.100 /  3. 62.100
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  3.100 / 52.  3.100
[mxf @ 0x1e35000] broken or empty index
[mxf @ 0x1e35000] error getting stream index 67174400
[jpeg2000 @ 0x1e38440] SOD marker not found
[jpeg2000 @ 0x1e38440] error during processing marker segment ff90
[mxf @ 0x1e35000] error getting stream index 67174400
    Last message repeated 40 times
[mxf @ 0x1e35000] Estimating duration from bitrate, this may be inaccurate
Guessed Channel Layout for  Input Stream #0.1 : 4.0
Input #0, mxf, from 'jpeg2000_mxf_first_10mb.mxf':
  Metadata:
    uid             : 81ddd167-c3b8-11de-a525-001b2128a1f2
    generation_uid  : 81ddd168-c3b8-11de-a2e4-001b2128a1f2
    company_name    : SAMMA Systems
    product_name    : MXF for SAMMA mjpeg2k
    product_version : 0.2.0.41
    application_platform: win32
    product_uid     : 43339ae6-9040-4e2c-be5f-a3de38328894
    modification_date: 2009-10-28 11:53:28
    timecode        : 01:03:34:21
  Duration: 00:00:26.67, start: 0.000000, bitrate: 3071 kb/s
    Stream #0:0: Video: jpeg2000 (JPEG 2000 codestream restriction 0), rgb24, 720x243, 59.94 fps, 59.94 tbr, 59.94 tbn, 59.94 tbc
    Stream #0:1: Audio: pcm_s16le, 48000 Hz, 4.0, s16, 3072 kb/s
At least one output file must be specified

comment:5 Changed 3 years ago by dericed

MXF/j2k with this type of interlacement seem to be gaining popularity, so I wanted to bump this ticket. I have a variety of interlaced mxf/j2k if the patch requires more testing.

comment:6 Changed 3 years ago by dericed

  • Cc dave@dericed.com added

comment:7 Changed 2 years ago by mateo

  • Analyzed by developer set
  • Cc matthieu.bouron@gmail.com added
  • Owner set to mateo
  • Reproduced by developer set

I'm currently working on this issue. New patches should be expected within a couple of days.

Last edited 2 years ago by mateo (previous) (diff)

comment:8 follow-up: Changed 2 years ago by cehoyos

I hope this will work with the native jpeg2000 decoder...

comment:9 in reply to: ↑ 8 Changed 2 years ago by mateo

Replying to cehoyos:

I hope this will work with the native jpeg2000 decoder...

As long as the decoder is able to decode the stream, it will work with it.

Last edited 2 years ago by mateo (previous) (diff)

Changed 2 years ago by nichot20

Sample IMX50 frame wrapped separate fields file for comparison

comment:10 Changed 22 months ago by tleegwater

Would it be hard to patch mxfenc as well, so it will be possible to generate field-wrapped j2k mxf through ffmpeg?
If I want to give it a shot myself, which parts need attention?

I can come up with changing the frame layout tag to "2" (Separate Fields), but there's more to it to make this work

     // frame layout
    mxf_write_local_tag(pb, 1, 0x320C);
    avio_w8(pb, 2);
Last edited 22 months ago by tleegwater (previous) (diff)

comment:11 Changed 22 months ago by cehoyos

I believe that the following sample has the same issue:
http://samples.ffmpeg.org/ffmpeg-bugs/trac/ticket2817/warehouse.mxf

comment:13 Changed 7 days ago by kieranjol

  • Cc kieran.o.leary@gmail.com added

I just noticed this with a jpeg2000/MXF PAL 50i capture using Avid Media Composer. 720x592 showed up as 720x296 in ffmpeg.

Note: See TracTickets for help on using tickets.