Opened 3 months ago

Closed 3 months ago

Last modified 3 months ago

#6700 closed defect (fixed)

Error reading long MOV file

Reported by: Melkor Owned by:
Priority: normal Component: avformat
Version: git-master Keywords: mov
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:

I have a 1.1TB ProRes? 422 MOV file (a bit more than 24 hours of recording) when I open it with FFmpeg i get the following:

[mov,mp4,m4a,3gp,3g2,mj2 @ 0000000002611ca0] Invalid sample_count=-118755256
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000000002611ca0] error reading header
Metadata Error.mov: Invalid data found when processing input 

How to reproduce:

% ffmpeg -v error -i input
ffmpeg N-87353-g183fd30

The same file works fine in VLC and I get correct metadata from it using MediaInfo?.

Attachments (1)

patchsample_count.diff (451 bytes) - added by cehoyos 3 months ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 3 months ago by cehoyos

  • Keywords mov added

To make this a valid ticket, please test current FFmpeg git head, provide the command line you tested with default or higher verbosity together with the complete, uncut console output and explain how the sample was created.

Last edited 3 months ago by cehoyos (previous) (diff)

Changed 3 months ago by cehoyos

comment:2 Changed 3 months ago by cehoyos

And please test if attached patch really fixes the issue you see.

comment:3 follow-up: Changed 3 months ago by Melkor

I created this file using Matrox DSX Utils SDK on Windows.

ffmpeg version N-87353-g183fd30 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 7.2.0 (GCC)
  configuration: --enable-gpl --enable-version3 --enable-cuda --enable-cuvid --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib
  libavutil      55. 76.100 / 55. 76.100
  libavcodec     57.106.101 / 57.106.101
  libavformat    57. 82.101 / 57. 82.101
  libavdevice    57.  8.101 / 57.  8.101
  libavfilter     6.105.100 /  6.105.100
  libswscale      4.  7.103 /  4.  7.103
  libswresample   2.  8.100 /  2.  8.100
  libpostproc    54.  6.100 / 54.  6.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 00000000026a1ca0] Invalid sample_count=-118755256
[mov,mp4,m4a,3gp,3g2,mj2 @ 00000000026a1ca0] error reading header
Metadata Error.mov: Invalid data found when processing input

That patch almost does it. You need to change MOVStts.count on isom.h (sorry I don't know how to generate the diff files myself).

I did the same changes in a local build and it worked.

comment:4 in reply to: ↑ 3 Changed 3 months ago by cehoyos

  • Component changed from undetermined to avformat
  • Status changed from new to open
  • Version changed from unspecified to git-master

Replying to Melkor:

That patch almost does it. You need to change MOVStts.count on isom.h (sorry I don't know how to generate the diff files myself).

Please send your patch - made with git format-patch to the development mailing list, I cannot test here.

comment:5 Changed 3 months ago by Melkor

I'll try. Thank you.

comment:6 Changed 3 months ago by cehoyos

  • Resolution set to fixed
  • Status changed from open to closed

Pushed your patch as 1015982f45d832ee926a81460121673a97292333 - thank you for the report and the fix!

comment:7 Changed 3 months ago by Melkor

Awesome, thank you!

Note: See TracTickets for help on using tickets.