gpt4 book ai didi

ffmpeg .264 视频转换为 jpg

转载 作者:行者123 更新时间:2023-12-04 23:25:09 27 4
gpt4 key购买 nike

我用谷歌搜索了它,但我找不到任何正确的答案。所以我在这里发帖。

我正在尝试从以 .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 NAL unit (“数据包”),其中包含解码以下数据包所需的信息。

您应该检查 .264 文件是如何创建的。在许多 H.264 流中,PPS(和 SPS,“序列参数集”)在每个 I 帧之前传输。但在某些情况下也不是,例如。 IP 摄像机可能只会将此信息作为 RTSP DESCRIBE 发送回复 SDP data .

关于ffmpeg .264 视频转换为 jpg,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51053810/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com