次のGStreamerパイプラインを使用して、エンコードされたストリームをバイナリファイルに保存しました。
gst-launch v4l2src ! videorate ! video/x-raw-yuv, framerate=\(fraction\)10/1 \
! videoscale ! video/x-raw-yuv, format=\(fourcc\)I420, width=640, height=480\
! ffmpegcolorspace ! x264enc ! fdsink > vid.bin
次に、次のパイプラインを使用して、GStreamerで以前に記録されたファイルを再生したいと思います。
cat vid.bin | gst-launch fdsrc ! ffdec_h264 ! autovideosink
ただし、次のエラーが発生します。
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
ERROR: from element /GstPipeline:pipeline0/ffdec_h264:ffdec_h2640: Internal GStreamer error: negotiation problem. Please file a bug at http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer.
Additional debug info:
gstffmpegdec.c(2804): gst_ffmpegdec_chain (): /GstPipeline:pipeline0/ffdec_h264:ffdec_h2640:
ffdec_h264: input format was not set before data start
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...
ビデオをキャプチャする最良の方法はMuxersを使用することですが、以前のファイルを再生する方法はありますか?
ありがとう