【问题标题】:ffmpeg .264 video conversion to jpgffmpeg .264 视频转换为 jpg
【发布时间】:2018-06-27 02:41:27
【问题描述】:

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

我正在尝试从以 .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

我做错了什么?

【问题讨论】:

    标签: ffmpeg h.264


    【解决方案1】:

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

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

    【讨论】:

      猜你喜欢
      • 2010-12-22
      • 2023-03-03
      • 2020-11-23
      • 1970-01-01
      • 1970-01-01
      • 2020-12-31
      • 2018-10-29
      • 2011-09-09
      • 1970-01-01
      相关资源
      最近更新 更多