【问题标题】:How to save all the frames from a mp4 video using gstreamer如何使用 gstreamer 保存 mp4 视频中的所有帧
【发布时间】:2021-08-13 05:50:34
【问题描述】:

我想知道如何使用 GStreamer 将我的 20 分钟 mp4 视频中的所有帧保存为 jpg 图像的语法或命令。使用 FFmpeg 我可以做到,但不确定 gst-launch-1.0

【问题讨论】:

  • 另存为什么?
  • @FlorianZwoch 一张 jpg 图片

标签: video gstreamer frames gst-launch-1.0


【解决方案1】:

应该是这样的:

gst-launch-1.0 filesrc location=<video_file> ! decodebin ! videoconvert ! jpegenc ! multifilesink location=%05d.jpg

【讨论】:

  • jetson@jetson-desktop:~/Downloads$ gst-launch-1.0 filesrc location=toy_cars.mp4 !解码器!视频转换!杰佩根! multifilesink location=images/img%05d.jpg 将管道设置为 PAUSED ...管道正在预滚动 ...以阻塞模式打开 以阻塞模式打开 NvMMLiteOpen : Block : BlockType = 261
  • 这听起来像是特定于 jetson 的错误。可能它想使用由于某种原因失败的硬件解码器。
  • 警告:来自元素 /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstCapsFilter:capsfilter0:未协商附加调试信息:gstbasetransform.c(1415):gst_base_transform_reconfigure ():/GstPipeline:pipeline0/GstDecodeBin:decodebin0 /GstCapsFilter:capsfilter0:未协商错误:来自元素 /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstQTDemux:qtdemux0:内部数据流错误。附加调试信息: qtdemux.c(6073): gst_qtdemux_loop (): /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstQTDemux:qtdemux0: 流停止,原因未协商 (-4)
  • 你知道我该如何解决吗?可以看看吗?
  • 您尝试手动设置解码器。将decodebin 替换为qtdemux ! h264parse ! avdec_h264 ! 。如果视频编解码器是 H.264。否则,您需要调整和锄头安装解码器。如果您想在硬件上使用它,则需要进行更多调查。我没有jetson。
猜你喜欢
  • 2021-09-02
  • 2015-06-14
  • 2013-03-06
  • 2020-09-24
  • 1970-01-01
  • 1970-01-01
  • 2019-11-17
  • 1970-01-01
  • 2019-09-17
相关资源
最近更新 更多