FFprobe 在非常大的 .mov 文件上报告 Invalid sample_count

Posted

技术标签:

【中文标题】FFprobe 在非常大的 .mov 文件上报告 Invalid sample_count【英文标题】:FFprobe reports Invalid sample_count on very large .mov file 【发布时间】:2018-03-09 07:57:21 【问题描述】:

我有一个 1.1TB ProRes 422 MOV 文件(录制时间超过 24 小时)。

运行ffprobe -v error -print_format xml -select_streams v:0 -show_format -show_streams "Metadata Error.mov" 时,我得到以下信息:

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

但如果我运行mediainfo,我会得到正确的信息:

General
Complete name                            : Metadata Error.mov
Format                                   : YSDO
Codec ID                                 : YSDO (qt  /YSDO)
File size                                : 1.10 TiB
Duration                                 : 24 h 10 min
Overall bit rate mode                    : Variable
Overall bit rate                         : 111 Mb/s
Encoded date                             : UTC 2017-09-24 23:48:33
Tagged date                              : UTC 2017-09-26 09:23:29
Writing library                          : mtrx

Video
ID                                       : 1
Format                                   : ProRes
Format version                           : Version 0
Format profile                           : 422
Codec ID                                 : apcn
Duration                                 : 24 h 10 min
Bit rate mode                            : Variable
Bit rate                                 : 101 Mb/s
Width                                    : 1 920 pixels
Clean aperture width                     : 1 888 pixels
Height                                   : 1 080 pixels
Clean aperture height                    : 1 062 pixels
Display aspect ratio                     : 16:9
Clean aperture display aspect ratio      : 16:9
Frame rate mode                          : Constant
Frame rate                               : 29.970 (29970/1000) FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:2
Scan type                                : Interlaced
Scan type, store method                  : Interleaved fields
Scan order                               : Top Field First
Bits/(Pixel*Frame)                       : 1.633
Stream size                              : 1.00 TiB (92%)
Writing library                          : apm0
Language                                 : English
Encoded date                             : UTC 2017-09-24 23:48:33
Tagged date                              : UTC 2017-09-26 09:23:29
Color primaries                          : BT.709
Transfer characteristics                 : BT.709
Matrix coefficients                      : BT.709
matrix_coefficients_Original             : BT.709

Audio #1
ID                                       : 2
Format                                   : PCM
Format settings                          : Little / Signed
Format settings, Endianness              : Little
Format settings, Sign                    : Signed
Codec ID                                 : in24
Duration                                 : 24 h 10 min
Source duration                          : 24 h 10 min
Bit rate mode                            : Constant
Bit rate                                 : 1 152 kb/s
Channel(s)                               : 1 channel
Sampling rate                            : 48.0 kHz
Bit depth                                : 24 bits
Stream size                              : 11.7 GiB (1%)
Source stream size                       : 11.7 GiB (1%)
Language                                 : English
Encoded date                             : UTC 2017-09-24 23:48:33
Tagged date                              : UTC 2017-09-26 09:23:29
mdhd_Duration                            : 66187116

Audio #2
ID                                       : 3
Format                                   : PCM
Format settings                          : Little / Signed
Format settings, Endianness              : Little
Format settings, Sign                    : Signed
Codec ID                                 : in24
Duration                                 : 24 h 10 min
Source duration                          : 24 h 10 min
Bit rate mode                            : Constant
Bit rate                                 : 1 152 kb/s
Channel(s)                               : 1 channel
Sampling rate                            : 48.0 kHz
Bit depth                                : 24 bits
Stream size                              : 11.7 GiB (1%)
Source stream size                       : 11.7 GiB (1%)
Language                                 : English
Encoded date                             : UTC 2017-09-24 23:48:33
Tagged date                              : UTC 2017-09-26 09:23:29
mdhd_Duration                            : 66187116

Audio #3
ID                                       : 4
Format                                   : PCM
Format settings                          : Little / Signed
Format settings, Endianness              : Little
Format settings, Sign                    : Signed
Codec ID                                 : in24
Duration                                 : 24 h 10 min
Source duration                          : 24 h 10 min
Bit rate mode                            : Constant
Bit rate                                 : 1 152 kb/s
Channel(s)                               : 1 channel
Sampling rate                            : 48.0 kHz
Bit depth                                : 24 bits
Stream size                              : 11.7 GiB (1%)
Source stream size                       : 11.7 GiB (1%)
Language                                 : English
Encoded date                             : UTC 2017-09-24 23:48:33
Tagged date                              : UTC 2017-09-26 09:23:29
mdhd_Duration                            : 66187116

Audio #4
ID                                       : 5
Format                                   : PCM
Format settings                          : Little / Signed
Format settings, Endianness              : Little
Format settings, Sign                    : Signed
Codec ID                                 : in24
Duration                                 : 24 h 10 min
Source duration                          : 24 h 10 min
Bit rate mode                            : Constant
Bit rate                                 : 1 152 kb/s
Channel(s)                               : 1 channel
Sampling rate                            : 48.0 kHz
Bit depth                                : 24 bits
Stream size                              : 11.7 GiB (1%)
Source stream size                       : 11.7 GiB (1%)
Language                                 : English
Encoded date                             : UTC 2017-09-24 23:48:33
Tagged date                              : UTC 2017-09-26 09:23:29
mdhd_Duration                            : 66187116

Audio #5
ID                                       : 6
Format                                   : PCM
Format settings                          : Little / Signed
Format settings, Endianness              : Little
Format settings, Sign                    : Signed
Codec ID                                 : in24
Duration                                 : 24 h 10 min
Source duration                          : 24 h 10 min
Bit rate mode                            : Constant
Bit rate                                 : 1 152 kb/s
Channel(s)                               : 1 channel
Sampling rate                            : 48.0 kHz
Bit depth                                : 24 bits
Stream size                              : 11.7 GiB (1%)
Source stream size                       : 11.7 GiB (1%)
Language                                 : English
Encoded date                             : UTC 2017-09-24 23:48:33
Tagged date                              : UTC 2017-09-26 09:23:29
mdhd_Duration                            : 66187116

Audio #6
ID                                       : 7
Format                                   : PCM
Format settings                          : Little / Signed
Format settings, Endianness              : Little
Format settings, Sign                    : Signed
Codec ID                                 : in24
Duration                                 : 24 h 10 min
Source duration                          : 24 h 10 min
Bit rate mode                            : Constant
Bit rate                                 : 1 152 kb/s
Channel(s)                               : 1 channel
Sampling rate                            : 48.0 kHz
Bit depth                                : 24 bits
Stream size                              : 11.7 GiB (1%)
Source stream size                       : 11.7 GiB (1%)
Language                                 : English
Encoded date                             : UTC 2017-09-24 23:48:33
Tagged date                              : UTC 2017-09-26 09:23:29
mdhd_Duration                            : 66187116

Audio #7
ID                                       : 8
Format                                   : PCM
Format settings                          : Little / Signed
Format settings, Endianness              : Little
Format settings, Sign                    : Signed
Codec ID                                 : in24
Duration                                 : 24 h 10 min
Source duration                          : 24 h 10 min
Bit rate mode                            : Constant
Bit rate                                 : 1 152 kb/s
Channel(s)                               : 1 channel
Sampling rate                            : 48.0 kHz
Bit depth                                : 24 bits
Stream size                              : 11.7 GiB (1%)
Source stream size                       : 11.7 GiB (1%)
Language                                 : English
Encoded date                             : UTC 2017-09-24 23:48:33
Tagged date                              : UTC 2017-09-26 09:23:29
mdhd_Duration                            : 66187116

Audio #8
ID                                       : 9
Format                                   : PCM
Format settings                          : Little / Signed
Format settings, Endianness              : Little
Format settings, Sign                    : Signed
Codec ID                                 : in24
Duration                                 : 24 h 10 min
Source duration                          : 24 h 10 min
Bit rate mode                            : Constant
Bit rate                                 : 1 152 kb/s
Channel(s)                               : 1 channel
Sampling rate                            : 48.0 kHz
Bit depth                                : 24 bits
Stream size                              : 11.7 GiB (1%)
Source stream size                       : 11.7 GiB (1%)
Language                                 : English
Encoded date                             : UTC 2017-09-24 23:48:33
Tagged date                              : UTC 2017-09-26 09:23:29
mdhd_Duration                            : 66187116

【问题讨论】:

对于未来的读者,最好参考您应用的补丁自己回答。 【参考方案1】:

最后,这是 FFmpeg 中的一个错误。感谢上帝,这很容易解决!

Patch

【讨论】:

以上是关于FFprobe 在非常大的 .mov 文件上报告 Invalid sample_count的主要内容,如果未能解决你的问题,请参考以下文章

非常大的地址被复制为负值

Mac 上 ffprobe/avprobe 和 youtube_dl 的 Python 问题

如何重新创建MP4文件

CUDA 结果使用非常大的数组返回垃圾,但不报告错误

如何使用终端批量重命名文件?

Android Chaquopy 没有这样的文件或目录:'ffprobe'