Extract 1 Video Channel from H.264 encoded multi-stream Matroska File
Class, Phil
phil.class at fluke.com
Fri Oct 5 12:45:28 UTC 2018
Hi,
On Linux, I am able to mux the streams from 2 different V4L2 webcams into a Matroska container with the following pipeline:
gst-launch-1.0 -v -e \
v4l2src device=/dev/video2 io-mode=4 \
! 'video/x-raw, format=(string)UYVY, width=(int)160, height=(int)120' \
! videoconvert \
! 'video/x-raw, format=(string)NV12, width=(int)160, height=(int)120' \
! ducatih264enc \
! queue \
! "video/x-h264,width=160,height=120" \
! h264parse \
! queue \
! mux. \
v4l2src device=/dev/video1 \
! queue max-size-buffers=0 max-size-time=0 max-size-bytes=0 \
! 'video/x-raw, format=(string)YUY2, width=(int)640, height=(int)480, framerate=30/1' \
! videoconvert \
! 'video/x-raw, format=(string)NV12, width=(int)640, height=(int)480' \
! ducatih264enc \
! queue \
! "video/x-h264,width=640,height=480" \
! h264parse \
! queue \
! mux. \
matroskamux name=mux min-index-interval=1000000000 \
! queue max-size-buffers=0 max-size-time=0 max-size-bytes=0 \
! filesink location=test-video.mkv
Now I want to be able to exract one of those video streams like shown in: https://gstreamer.freedesktop.org/documentation/tutorials/basic/gstreamer-tools.html
Basic tutorial 10: GStreamer tools<https://gstreamer.freedesktop.org/documentation/tutorials/basic/gstreamer-tools.html>
gstreamer.freedesktop.org
Basic tutorial 10: GStreamer tools Goal. GStreamer comes with a set of tools which range from handy to absolutely essential. There is no code in this tutorial, just sit back and relax, and we will teach you:
I am trying to use the pipeline:
gst-launch-1.0 filesrc location=test-video.mkv ! matroskademux name=d d.video_00 ! queue ! video/x-h264 ! queue ! h264parse ! ducatih264dec ! waylandsink sync=false
The problem is that all variations of this that I try give a "Delayed linking failed" error - here is an example:
Setting pipeline to PAUSED ...[68219.713998] omap-iommu 55082000.mmu: 55082000.mmu: version 2.1
Pipeline is PREROLLING ...
WARNING: from element /GstPipeline:pipeline0/GstMatroskaDemux:d: Delayed linking failed.
Additional debug info:
../../../gstreamer-1.12.2/gst/parse/grammar.y(510): gst_parse_no_more_pads (): /GstPipeline:pipeline0/GstMatroskaDemux:d:
failed delayed linking pad video_00 of GstMatroskaDemux named d to some pad of GstQueue named queue0
ERROR: from element /GstPipeline:pipeline0/GstMatroskaDemux:d: Internal data stream error.
Additional debug info:
../../../gst-plugins-good-1.12.2/gst/matroska/matroska-demux.c(4799): gst_matroska_demux_loop (): /GstPipeline:pipeline0/GstMatroskaDemux:d:
streaming stopped, reason not-linked (-1)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...
How can I extract one video stream from the matroska file? Thanks.
________________________________
Please be advised that this email may contain confidential information. If you are not the intended recipient, please notify us by email by replying to the sender and delete this message. The sender disclaims that the content of this email constitutes an offer to enter into, or the acceptance of, any agreement; provided that the foregoing does not invalidate the binding effect of any digital or other electronic reproduction of a manual signature that is included in any attachment.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20181005/1f6a67a3/attachment.html>
More information about the gstreamer-devel
mailing list