Opened 2 years ago

Closed 2 years ago

#8210 closed defect (fixed)

Header Compression Issue ProRes MKV to MOV

Reported by: Luke Hodgson Owned by:
Priority: normal Component: avformat
Version: git-master Keywords: mkv
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: yes

Description

When remuxing MKV ProRes into MOV and playing the video in Adobe Premiere Pro, a green bar appears bottom right of preview window. This doesnt happen in other apps (presumably using FFMPEG libs).

Input file: https://www.dropbox.com/s/zsuskktbufy2bmy/2019-09-28_15-58-47.mkv?dl=0

This file was also created by FFMPEG

ffmpeg -f gdigrab -framerate 60 -offset_x 0 -offset_y 0 -video_size 1920x1080 -i desktop -c:v prores -profile:v 3 -pix_fmt yuv422p10le 2019-09-28_15-58-47.mkv

Commandline:

ffmpeg -v 9 -loglevel 99 -i "2019-09-28_15-46-41.mkv" -map 0 -c copy "2019-09-28_15-46-41_remux.mov"

Console output:

ffmpeg version N-95129-g04858650b1 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 9.2.1 (GCC) 20190918
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
  libavutil      56. 35.100 / 56. 35.100
  libavcodec     58. 59.101 / 58. 59.101
  libavformat    58. 33.100 / 58. 33.100
  libavdevice    58.  9.100 / 58.  9.100
  libavfilter     7. 59.100 /  7. 59.100
  libswscale      5.  6.100 /  5.  6.100
  libswresample   3.  6.100 /  3.  6.100
  libpostproc    55.  6.100 / 55.  6.100
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set logging level) with argument '9'.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument '99'.
Reading option '-i' ... matched as input url with argument 'G:\Projects\Frankie\OBS\ticket\2019-09-28_15-58-47.mkv'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '0'.
Reading option '-c' ... matched as option 'c' (codec name) with argument 'copy'.
Reading option 'G:\Projects\Frankie\OBS\ticket\2019-09-28_15-58-47_remux.mov' ... matched as output url.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument 9.
Successfully parsed a group of options.
Parsing a group of options: input url G:\Projects\Frankie\OBS\ticket\2019-09-28_15-58-47.mkv.
Successfully parsed a group of options.
Opening an input file: G:\Projects\Frankie\OBS\ticket\2019-09-28_15-58-47.mkv.
[NULL @ 000002ec7dd08e40] Opening 'G:\Projects\Frankie\OBS\ticket\2019-09-28_15-58-47.mkv' for reading
[file @ 000002ec7dd0a000] Setting default whitelist 'file,crypto'
Probing matroska,webm score:100 size:2048
[matroska,webm @ 000002ec7dd08e40] Format matroska,webm probed with size=2048 and score=100
st:0 removing common factor 1000000 from timebase
[matroska,webm @ 000002ec7dd08e40] Before avformat_find_stream_info() pos: 653 bytes read:32768 seeks:0 nb_streams:1
[matroska,webm @ 000002ec7dd08e40] parser not found for codec prores, packets or times may be invalid.
[prores @ 000002ec7dd1d140] Auto bitdepth precision. Use 10b decoding based on codec tag.
[matroska,webm @ 000002ec7dd08e40] parser not found for codec prores, packets or times may be invalid.
[matroska,webm @ 000002ec7dd08e40] All info found
[matroska,webm @ 000002ec7dd08e40] stream 0: start_time: 0.000 duration: -9223372036854776.000
[matroska,webm @ 000002ec7dd08e40] format: start_time: 0.000 duration: 13.500 bitrate=233658 kb/s
[matroska,webm @ 000002ec7dd08e40] After avformat_find_stream_info() pos: 822850 bytes read:822850 seeks:0 frames:1
Input #0, matroska,webm, from 'G:\Projects\Frankie\OBS\ticket\2019-09-28_15-58-47.mkv':
  Metadata:
    ENCODER         : Lavf58.33.100
  Duration: 00:00:13.50, start: 0.000000, bitrate: 233658 kb/s
    Stream #0:0, 1, 1/1000: Video: prores (HQ), 1 reference frame (apch / 0x68637061), yuv422p10le(tv), 1920x1080, 0/1, 60 fps, 60 tbr, 1k tbn, 1k tbc (default)
    Metadata:
      ENCODER         : Lavc58.59.101 prores
      DURATION        : 00:00:13.500000000
Successfully opened the file.
Parsing a group of options: output url G:\Projects\Frankie\OBS\ticket\2019-09-28_15-58-47_remux.mov.
Applying option map (set input stream mapping) with argument 0.
Applying option c (codec name) with argument copy.
Successfully parsed a group of options.
Opening an output file: G:\Projects\Frankie\OBS\ticket\2019-09-28_15-58-47_remux.mov.
[file @ 000002ec7fae2d80] Setting default whitelist 'file,crypto'
Successfully opened the file.
Output #0, mov, to 'G:\Projects\Frankie\OBS\ticket\2019-09-28_15-58-47_remux.mov':
  Metadata:
    encoder         : Lavf58.33.100
    Stream #0:0, 0, 1/16000: Video: prores (HQ), 1 reference frame (apch / 0x68637061), yuv422p10le(tv), 1920x1080 (0x0), 0/1, q=2-31, 60 fps, 60 tbr, 16k tbn, 1k tbc (default)
    Metadata:
      ENCODER         : Lavc58.59.101 prores
      DURATION        : 00:00:13.500000000
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
No more output streams to write to, finishing.
frame=  437 fps=0.0 q=-1.0 Lsize=  385048kB time=00:00:13.48 bitrate=233946.4kbits/s speed=29.1x
video:385041kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.001817%
Input file #0 (G:\Projects\Frankie\OBS\ticket\2019-09-28_15-58-47.mkv):
  Input stream #0:0 (video): 437 packets read (394282169 bytes);
  Total: 437 packets (394282169 bytes) demuxed
Output file #0 (G:\Projects\Frankie\OBS\ticket\2019-09-28_15-58-47_remux.mov):
  Output stream #0:0 (video): 437 packets muxed (394282169 bytes);
  Total: 437 packets (394282169 bytes) muxed
0 frames successfully decoded, 0 decoding errors
[AVIOContext @ 000002ec7dd0a1c0] Statistics: 2 seeks, 1508 writeouts
[AVIOContext @ 000002ec7dd12280] Statistics: 394298965 bytes read, 0 seeks

I was unable to compile the githead so used nightly build from https://ffmpeg.zeranoe.com/builds/

Change History (8)

comment:1 by Carl Eugen Hoyos, 2 years ago

Do you see the same issue if you reencode the input video (with the same encoder) instead of remuxing it?

comment:2 by mkver, 2 years ago

I have a guess to why this is happening: When FFmpeg's Matroska demuxer inverts the header stripping, it writes the size of the actual payload (i.e. the size of the frame as it is in Matroska) into the in-band length field. But in the mp4/mov world, said length field usually does not contain the size of the payload only, but of the whole atom (i.e. including the size field and the atom tag). So it might be that the internal size field is short by eight bytes. I will produce files for you to test in Premiere.

comment:3 by Luke Hodgson, 2 years ago

reencoding the video stream, it doesnt happen. Problem with this approach is the videos being recorded are 120fps @ 4k so reencoding will take a long time compared with remuxing

comment:4 by mkver, 2 years ago

Can you test this file?

comment:5 by Luke Hodgson, 2 years ago

yup whatever you did that fixed it, your a wizard :)

comment:6 by Luke Hodgson, 2 years ago

when will the changed be in the live build on the site?

comment:7 by mkver, 2 years ago

Analyzed by developer: set
Component: undeterminedavformat
Keywords: mkv added
Reproduced by developer: set

As soon as someone reviews and (pending approval) pushes this. I can't give you an ETM.

comment:8 by James, 2 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.