![](/img/trans.png)
[英]How to play the video stream from an OGG file using gstreamer in Linux
[英]How to create an indexed video file with Gstreamer
我正在嘗試使用Gstreamer在Linux中創建可搜索(索引)的視頻文件。 我的管道可用於記錄和保存數據,但是我不知道如何索引數據,因此可以使用gst_element_seek_simple()[ http://docs.gstreamer.com/display/GstSDK/Basic+tutorial+4 %3A +時間+管理]
我看過這篇文章: Gstreamer視頻輸出位置跟蹤和查找並驗證,我正在使用-e在管道上發送EOS。
這是我的管道和輸出。 我准備將其顯示在嵌入式系統的屏幕上並保存到M4V文件。
# gst-launch-0.10 -e v4l2src ! \
tee name=t !
queue !
video/x-raw-yuv,width=320,height=240 !
videoflip method=clockwise !
ffmpegcolorspace !
fbdevsink t. !
queue !
ffmpegcolorspace !
ffenc_mpeg4 !
filesink location=output.m4v
這是輸出:
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
WARNING: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Could not get parameters on device '/dev/video0'
Additional debug info:
v4l2src_calls.c(235): gst_v4l2src_set_capture (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
system error: Inappropriate ioctl for device
Setting pipeline to PLAYING ...
New clock: GstSystemClock
^CCaught interrupt -- handling interrupt.
Interrupt: Stopping pipeline ...
(gst-launch-0.10:534): GLib-CRITICAL **: Source ID 62 was not found when attempting to remove it
EOS on shutdown enabled -- Forcing EOS on the pipeline
Waiting for EOS...
Got EOS from element "pipeline0".
EOS received - stopping pipeline...
Execution ended after 10057977251 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
這是我的新文件中gst-discover的輸出:
beaglebone:# gst-discoverer-0.10 output.m4v
Analyzing file:///output.m4v
Done discovering file:///output.m4v
Topology:
video: MPEG-4 Video
Properties:
Duration: 0:00:00.000000000
Seekable: no
謝謝
您需要以可搜索/索引格式存儲結果。 為此,您可以將mpeg4視頻放入諸如mp4或matroska之類的容器中。 使用“!mp4mux!filesink”或“!matroskamux!filesink”將其包含在應該使其可查找的那些格式內。
旁注:gstreamer 0.10在2年內已過時且未使用,請升級到1.0。 http://gstreamer.freedesktop.org/是gstreamer的官方網站,您可以在此處找到1.x版本的發行版。 gstreamer.com網站是一個與官方項目無關的項目,如果您閱讀gstreamer.com中的文本,將會看到您應該使用官方存儲庫和安裝程序。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.