我试图准确理解“null”格式的含义。我确实从以下位置阅读了文档:
但我无法理解以下情况。考虑:
$ ffmpeg -y -hide_banner -i input.mkv -ss 0 -t 1 -an -sn -c:v mpeg4 -f mp4 /dev/null
[mpeg4 @ 0x562dc220aa00] Failed to parse extradata
Input #0, matroska,webm, from 'input.mkv':
Metadata:
ENCODER : Lavf58.20.100
Duration: 01:07:47.92, start: 0.000000, bitrate: 1433 kb/s
Stream #0:0: Video: mpeg4 (Advanced Simple Profile), yuv420p, 688x512 [SAR 1:1 DAR 43:32], 25 fps, 25 tbr, 1k tbn, 25 tbc (default)
Metadata:
DURATION : 01:07:47.920000000
Stream #0:1: Audio: mp3, 48000 Hz, stereo, fltp, 80 kb/s (default)
Metadata:
DURATION : 01:07:47.880000000
Stream mapping:
Stream #0:0 -> #0:0 (mpeg4 (native) -> mpeg4 (native))
Press [q] to stop, [?] for help
Output #0, mp4, to '/dev/null':
Metadata:
encoder : Lavf58.20.100
Stream #0:0: Video: mpeg4 (mp4v / 0x7634706D), yuv420p, 688x512 [SAR 1:1 DAR 43:32], q=2-31, 200 kb/s, 25 fps, 12800 tbn, 25 tbc (default)
Metadata:
DURATION : 01:07:47.920000000
encoder : Lavc58.35.100 mpeg4
Side data:
cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
frame= 25 fps=0.0 q=1.6 Lsize= 16kB time=00:00:00.96 bitrate= 140.1kbits/s dup=2 drop=0 speed=32.3x
video:15kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 6.221970%
使用空格式时:
$ ffmpeg -y -hide_banner -i input.mkv -ss 0 -t 1 -an -sn -c:v mpeg4 -f null /dev/null
[mpeg4 @ 0x5645807d5a00] Failed to parse extradata
Input #0, matroska,webm, from 'input.mkv':
Metadata:
ENCODER : Lavf58.20.100
Duration: 01:07:47.92, start: 0.000000, bitrate: 1433 kb/s
Stream #0:0: Video: mpeg4 (Advanced Simple Profile), yuv420p, 688x512 [SAR 1:1 DAR 43:32], 25 fps, 25 tbr, 1k tbn, 25 tbc (default)
Metadata:
DURATION : 01:07:47.920000000
Stream #0:1: Audio: mp3, 48000 Hz, stereo, fltp, 80 kb/s (default)
Metadata:
DURATION : 01:07:47.880000000
Stream mapping:
Stream #0:0 -> #0:0 (mpeg4 (native) -> mpeg4 (native))
Press [q] to stop, [?] for help
Output #0, null, to '/dev/null':
Metadata:
encoder : Lavf58.20.100
Stream #0:0: Video: mpeg4, yuv420p, 688x512 [SAR 1:1 DAR 43:32], q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc (default)
Metadata:
DURATION : 01:07:47.920000000
encoder : Lavc58.35.100 mpeg4
Side data:
cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
[mpeg4 @ 0x564580804380] Invalid pts (2) <= last (3)
Video encoding failed
Conversion failed!
我应该如何解释上述错误?下面重复:
[mpeg4 @ 0x564580804380] Invalid pts (2) <= last (3)
Video encoding failed
Conversion failed!
更新,使用-enc_time_base -1
给出:
$ ffmpeg -y -hide_banner -i input.mkv -ss 0 -t 1 -an -sn -c:v mpeg4 -enc_time_base -1 -f null /dev/null
[mpeg4 @ 0x561134551ac0] Failed to parse extradata
Input #0, matroska,webm, from 'input.mkv':
Metadata:
ENCODER : Lavf58.20.100
Duration: 01:07:47.92, start: 0.000000, bitrate: 1433 kb/s
Stream #0:0: Video: mpeg4 (Advanced Simple Profile), yuv420p, 688x512 [SAR 1:1 DAR 43:32], 25 fps, 25 tbr, 1k tbn, 25 tbc (default)
Metadata:
DURATION : 01:07:47.920000000
Stream #0:1: Audio: mp3, 48000 Hz, stereo, fltp, 80 kb/s (default)
Metadata:
DURATION : 01:07:47.880000000
Stream mapping:
Stream #0:0 -> #0:0 (mpeg4 (native) -> mpeg4 (native))
Press [q] to stop, [?] for help
Output #0, null, to '/dev/null':
Metadata:
encoder : Lavf58.20.100
Stream #0:0: Video: mpeg4, yuv420p, 688x512 [SAR 1:1 DAR 43:32], q=2-31, 200 kb/s, 25 fps, 1k tbn, 1k tbc (default)
Metadata:
DURATION : 01:07:47.920000000
encoder : Lavc58.35.100 mpeg4
Side data:
cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
[mpeg4 @ 0x561134582100] Invalid pts (80) <= last (120)
Video encoding failed
Conversion failed!