Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#5730 closed defect (invalid)

Rewrapping H.264 MXF file from camera Sony FS 7 creates file not playable by Quicktime

Reported by: rmk Owned by:
Priority: normal Component: undetermined
Version: unspecified Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

How to reproduce:

ffmpeg -i ~/lesspain/samples/cameras/sony/pxw_fs7/sony_pxw_fs7_1080_xavc_2997p_13s.MXF -y -an -c:v copy sony_pxw_fs7_1080_xavc_2997p_13s-ffmpeg-rewrap-video-only.mov
ffmpeg version N-81077-g640c096 Copyright (c) 2000-2016 the FFmpeg developers
  built with Apple LLVM version 7.0.2 (clang-700.1.81)
  configuration: 
  libavutil      55. 28.100 / 55. 28.100
  libavcodec     57. 50.100 / 57. 50.100
  libavformat    57. 44.100 / 57. 44.100
  libavdevice    57.  0.102 / 57.  0.102
  libavfilter     6. 47.100 /  6. 47.100
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  1.100 /  2.  1.100
[h264 @ 0x7fb0b2001600] Truncating likely oversized PPS
    Last message repeated 9 times
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 '/Users/krueger/lesspain/samples/cameras/sony/pxw_fs7/sony_pxw_fs7_1080_xavc_2997p_13s.MXF':
  Metadata:
    uid             : 791517d2-264c-11e6-826b-0800469995c2
    generation_uid  : 791517dc-264c-11e6-8829-0800469995c2
    company_name    : Sony
    product_name    : Mem 
    product_version : 2.00
    product_uid     : cede1104-8280-11de-8a39-08004678031c
    modification_date: 2016-05-30 09:54:17
    material_package_umid: 0x060A2B340101010501010D43130000000FA7A669387505D208004602029995C2
    timecode        : 00:00:57;20
  Duration: 00:00:13.68, start: 0.000000, bitrate: 123923 kb/s
    Stream #0:0: Video: h264 (High 4:2:2 Intra), yuv422p10le(pc, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 29.97 tbn, 59.94 tbc
    Metadata:
      file_package_umid: 0x060A2B340101010501010D431300000010A7A669387505D208004602029995C2
    Stream #0:1: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit), 1152 kb/s
    Metadata:
      file_package_umid: 0x060A2B340101010501010D431300000010A7A669387505D208004602029995C2
    Stream #0:2: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit), 1152 kb/s
    Metadata:
      file_package_umid: 0x060A2B340101010501010D431300000010A7A669387505D208004602029995C2
    Stream #0:3: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit), 1152 kb/s
    Metadata:
      file_package_umid: 0x060A2B340101010501010D431300000010A7A669387505D208004602029995C2
    Stream #0:4: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit), 1152 kb/s
    Metadata:
      file_package_umid: 0x060A2B340101010501010D431300000010A7A669387505D208004602029995C2
    Stream #0:5: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit), 1152 kb/s
    Metadata:
      file_package_umid: 0x060A2B340101010501010D431300000010A7A669387505D208004602029995C2
    Stream #0:6: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit), 1152 kb/s
    Metadata:
      file_package_umid: 0x060A2B340101010501010D431300000010A7A669387505D208004602029995C2
    Stream #0:7: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit), 1152 kb/s
    Metadata:
      file_package_umid: 0x060A2B340101010501010D431300000010A7A669387505D208004602029995C2
    Stream #0:8: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit), 1152 kb/s
    Metadata:
      file_package_umid: 0x060A2B340101010501010D431300000010A7A669387505D208004602029995C2
    Stream #0:9: Data: none
    Metadata:
      file_package_umid: 0x060A2B340101010501010D431300000010A7A669387505D208004602029995C2
      data_type       : vbi_vanc_smpte_436M
[mov @ 0x7fb0b1838600] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
Output #0, mov, to 'sony_pxw_fs7_1080_xavc_2997p_13s-ffmpeg-rewrap-video-only.mov':
  Metadata:
    uid             : 791517d2-264c-11e6-826b-0800469995c2
    generation_uid  : 791517dc-264c-11e6-8829-0800469995c2
    company_name    : Sony
    product_name    : Mem 
    product_version : 2.00
    product_uid     : cede1104-8280-11de-8a39-08004678031c
    modification_date: 2016-05-30 09:54:17
    material_package_umid: 0x060A2B340101010501010D43130000000FA7A669387505D208004602029995C2
    timecode        : 00:00:57;20
    encoder         : Lavf57.44.100
    Stream #0:0: Video: h264 (avc1 / 0x31637661), yuv422p10le(pc, bt709), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 0.03 fps, 29.97 tbr, 30k tbn, 29.97 tbc
    Metadata:
      file_package_umid: 0x060A2B340101010501010D431300000010A7A669387505D208004602029995C2
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
[NULL @ 0x7fb0b2001600] Truncating likely oversized PPS
    Last message repeated 399 times
[mov @ 0x7fb0b1838600] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
frame=  410 fps=0.0 q=-1.0 Lsize=  189217kB time=00:00:13.64 bitrate=113583.0kbits/s speed=27.3x    
video:189215kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.001157%

Then open the resulting file in Quicktime. It will refuse to open it and show an error dialog with the text "The file may be damaged or may not be a movie file compatible with Quicktime"

Sample can be downloaded at https://www.dropbox.com/s/l6jx4ymfeuga53z/sony_pxw_fs7_1080_xavc_2997p_13s.MXF?dl=1

Please note the warnings about "Truncating likely oversized PPS". The mov container of the resulting file looks ok at first glance compared to files that work but maybe the H.264 extradata is not parsed and then written correctly for some reason (just a wild guess).

Change History (5)

comment:1 Changed 2 years ago by cehoyos

  • Keywords h264 added; h.264 removed

The following does not change the output file here, so I don't think the warning is related:

diff --git a/libavcodec/h264.h b/libavcodec/h264.h
index 1e3dfd5..a3f3681 100644
--- a/libavcodec/h264.h
+++ b/libavcodec/h264.h
@@ -217,7 +217,7 @@ typedef struct PPS {
     uint8_t scaling_matrix8[6][64];
     uint8_t chroma_qp_table[2][QP_MAX_NUM+1];  ///< pre-scaled (with chroma_qp_index_offset) version of qp_table
     int chroma_qp_diff;
-    uint8_t data[4096];
+    uint8_t data[12288];
     size_t data_size;

     uint32_t dequant4_buffer[6][QP_MAX_NUM + 1][16];

Is QuickTime supposed to play yuv422p10 / do you have such a mov file that is played by QuickTime?

comment:2 follow-up: Changed 2 years ago by rmk

Oh, sh*t, you are most likely right! I did not even look at the specs of the video, sorry. Yes, that is entirely possible. Final Cut Pro X and Premiere play the file just fine, so it is very likely just a Quicktime limitation.

Does it make sense to make another ticket for the warning? It would be great if that could be elimitated because it seems to be emitted for every frame and clogs the logs for any library user.

comment:3 in reply to: ↑ 2 Changed 2 years ago by cehoyos

  • Keywords mxf mov h264 removed
  • Resolution set to invalid
  • Status changed from new to closed

Replying to rmk:

Does it make sense to make another ticket for the warning?

I guess so. Maybe you can produce a 2 MB sample for the new ticket...

comment:4 Changed 2 years ago by rmk

I don't have the camera, sorry. That's the smallest sample I have that causes this warning.

comment:5 Changed 2 years ago by rmk

Created ticket #5731

Note: See TracTickets for help on using tickets.