ffmpeg.264视频到jpg的转换

ffmpeg.264视频到jpg的转换,ffmpeg,h.264,Ffmpeg,H.264,我用谷歌搜索了一下,但找不到合适的答案。所以我在这里发帖 我正在尝试转换以.264格式存储的IP摄像头视频中的图像。我发出此命令以转换: ffmpeg -i P1234_5665.264 -an -ss 2 -s 1280x720 test1.jpg 它不转换,并给出错误: [h264 @ 00863fc0] non-existing PPS 0 referenced [h264 @ 00863fc0] decode_slice_header error [h264 @ 00863fc0] n

我用谷歌搜索了一下,但找不到合适的答案。所以我在这里发帖

我正在尝试转换以.264格式存储的IP摄像头视频中的图像。我发出此命令以转换:

ffmpeg -i P1234_5665.264 -an -ss 2 -s 1280x720 test1.jpg
它不转换,并给出错误:

[h264 @ 00863fc0] non-existing PPS 0 referenced
[h264 @ 00863fc0] decode_slice_header error
[h264 @ 00863fc0] no frame!
[h264 @ 00863fc0] non-existing PPS 0 referenced
[h264 @ 00863fc0] decode_slice_header error
[h264 @ 00863fc0] no frame!
[h264 @ 00863fc0] non-existing PPS 0 referenced
[h264 @ 00863fc0] decode_slice_header error
[h264 @ 00863fc0] no frame!
[h264 @ 00863fc0] non-existing PPS 0 referenced
[h264 @ 00863fc0] decode_slice_header error
[h264 @ 00863fc0] no frame!
[h264 @ 00863fc0] non-existing PPS 0 referenced
[h264 @ 00863fc0] decode_slice_header error
[h264 @ 00863fc0] no frame!
[h264 @ 00863fc0] non-existing PPS 0 referenced
[h264 @ 00863fc0] decode_slice_header error
[h264 @ 00863fc0] no frame!
[h264 @ 00863fc0] non-existing PPS 0 referenced
[h264 @ 00863fc0] decode_slice_header error
[h264 @ 00863fc0] no frame!
[h264 @ 00863fc0] non-existing PPS 0 referenced
[h264 @ 00863fc0] decode_slice_header error
[h264 @ 00863fc0] no frame!
[h264 @ 0081f740] decoding for stream 0 failed
[h264 @ 0081f740] Could not find codec parameters for stream 0 (Video: h264 (Mai
n), none(progressive)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, h264, from 'P1234_5665.264':
  Duration: N/A, bitrate: N/A
    Stream #0:0: Video: h264 (Main), none(progressive), 25 fps, 25 tbr, 1200k tb
n, 50 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> mjpeg (native))
Error while opening decoder for input stream #0:0 : Invalid data found when proc
essing input

我做错了什么?

主要问题是.264文件开头缺少图片参数集(PPS)。PPS是一种特殊的H.264(“数据包”),包含解码以下数据包所需的信息

您应该检查.264文件是如何创建的。在许多H.264流中,PPS(和SP,“序列参数集”)在每个I帧之前传输。但在某些情况下,IP摄像头可能仅将此信息作为答复发送到网络中