我用Google搜索了它,但是找不到正确的答案。所以我在这里发布。
我正在尝试从IP摄像机视频转换以.264格式存储的图像。我给了这个命令进行转换:
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
我在做什么错了?
答案 0 :(得分:0)
主要问题是您的.264文件开头缺少图片参数集(PPS)。 PPS是一种特殊的H.264 NAL unit(“数据包”),其中包含解码以下数据包所需的信息。
您应该检查.264文件的创建方式。在许多H.264流中,PPS(和SPS,“序列参数集”)在每个I帧之前发送。但是在某些情况下也不是。 IP摄像机只能在RTSP DESCRIBE中以SDP data答复的形式发送此信息。