代码之家  ›  专栏  ›  技术社区  ›  Amandasaurus

Turn a video into a sequence of images using GStreamer (not ffmpeg)

  •  6
  • Amandasaurus  · 技术社区  · 14 年前

    I have an ogg vorbis video. It plays fine in totem and mplayer. I want to covert it to a sequnces of images, one image per frame. I can do this on ffmpeg with the following command:

    ffmpeg -i video.ogv -f image 2 video-frames-%08png
    

    However that doesn't work for this video. Each frame is all grey as if there has been loads of decoding problems. Since it works in totem, I suspect that gstreamer is better able to decode the video than ffmpeg. Is there a gstreamer command that will take in a ogg vorbis video and then create a pile of images, one for each frame?

    我用的是股票Ubuntu Lucid桌面。

    1 回复  |  直到 14 年前
        1
  •  6
  •   elmarco    14 年前

    try multifilesink:

    gst-launch filesrc location=video.ogv ! decodebin ! pngenc ! multifilesink location=img%d.png