Open thilindaEdiri opened 9 months ago
could you try with current main
(9ba7e294ea6f45410a15f192381d4918e8df4f02)?
i cannot fully reproduce the problem (having no hardware that natively speaks h264), however:
the following pipeline appears to work for me with v0.12.7 and current main:
gst-launch-1.0 -v videotestsrc \
! x264enc \
! h264parse \
! "video/x-h264,width=640,height=480,pixel-aspect-ratio=1/1,framerate=30/1,interlace-mode=progressive,colorimetry=2:4:7:1" \
! v4l2sink device=/dev/video2
however, the following pipeline fails from me with v0.12.7 (note the "colorimetry=bt601")
gst-launch-1.0 -v videotestsrc \
! x264enc \
! h264parse \
! "video/x-h264,width=640,height=480,pixel-aspect-ratio=1/1,framerate=30/1,interlace-mode=progressive,colorimetry=bt601" \
! v4l2sink device=/dev/video2
however, the above pipeline appears to work with main
Hi @umlaeute,
Thank you for your response.
I tried with v4l2loopback v0.12.7 (https://github.com/umlaeute/v4l2loopback/commit/9ba7e294ea6f45410a15f192381d4918e8df4f02) with following pipeline (/dev/video10
is the virtual camera).
gst-launch-1.0 -v videotestsrc \
! x264enc \
! h264parse \
! "video/x-h264,width=640,height=480,pixel-aspect-ratio=1/1,framerate=30/1,interlace-mode=progressive,colorimetry=2:4:7:1" \
! v4l2sink device=/dev/video10
I get the following error.
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
/GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0.GstPad:src: caps = video/x-raw, width=(int)640, height=(int)480, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, format=(string)Y444, multiview-mode=(string)mono, interlace-mode=(string)progressive
Redistribute latency...
/GstPipeline:pipeline0/GstX264Enc:x264enc0.GstPad:sink: caps = video/x-raw, width=(int)640, height=(int)480, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, format=(string)Y444, multiview-mode=(string)mono, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstX264Enc:x264enc0.GstPad:src: caps = video/x-h264, codec_data=(buffer)01f4001effe1001d67f4001e919b281407b602d41808150000030001000003003c8f162d9601000568ebec4480, stream-format=(string)avc, alignment=(string)au, level=(string)3, profile=(string)high-4:4:4, width=(int)640, height=(int)480, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1, interlace-mode=(string)progressive, colorimetry=(string)bt601, chroma-site=(string)jpeg, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = video/x-h264, codec_data=(buffer)01f4001effe1001d67f4001e919b281407b602d41808150000030001000003003c8f162d9601000568ebec4480, stream-format=(string)avc, alignment=(string)au, level=(string)3, profile=(string)high-4:4:4, width=(int)640, height=(int)480, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1, interlace-mode=(string)progressive, colorimetry=(string)bt601, chroma-site=(string)jpeg, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, parsed=(boolean)true
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:sink: caps = video/x-h264, codec_data=(buffer)01f4001effe1001d67f4001e919b281407b602d41808150000030001000003003c8f162d9601000568ebec4480, stream-format=(string)avc, alignment=(string)au, level=(string)3, profile=(string)high-4:4:4, width=(int)640, height=(int)480, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1, interlace-mode=(string)progressive, colorimetry=(string)bt601, chroma-site=(string)jpeg, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono
ERROR: from element /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0: Internal data stream error.
Additional debug info:
../subprojects/gstreamer/libs/gst/base/gstbasesrc.c(3127): gst_base_src_loop (): /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0:
streaming stopped, reason not-negotiated (-4)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...
For the following pipeline:
gst-launch-1.0 -v v4l2src device=/dev/video2 ! video/x-h264,width=640,height=480,framerate=30/1 \
! h264parse ! v4l2sink device=/dev/video10
I get the following error:
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Device '/dev/video2' does not support 2:0:0:0 colorimetry
Additional debug info:
gstv4l2object.c(3849): gst_v4l2_object_set_format_full (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
Device wants 2:4:5:1 colorimetry
Execution ended after 0:00:00.175808594
Setting pipeline to NULL ...
Freeing pipeline ...
For the following pipeline:
gst-launch-1.0 -v v4l2src device=/dev/video2 \
! "video/x-h264,width=640,height=480,framerate=30/1,pixel-aspect-ratio=1/1,interlace-mode=progressive,colorimetry=2:4:5:1" \
! h264parse ! v4l2sink device=/dev/video10
I get the following error:
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
Additional debug info:
../subprojects/gstreamer/libs/gst/base/gstbasesrc.c(3127): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming stopped, reason not-negotiated (-4)
Execution ended after 0:00:00.000449644
Setting pipeline to NULL ...
Freeing pipeline ...
Is it possible that the outcome can be changed based on the Linux distribution or the kernel version?
Because i want to run this on Jetson Orin with Ubuntu 20.04 installed. It also get the same errors as my laptop.
rather than the Linux kernel version i would imagine that the GStreamer version matters.
I'm using gstreamer_1.22.6-1 (on my Debian/sid machine).
Newer Linux distributions will have newer versions of the packaged software, which in turn will have bugs fixed (and new bugs)
My environment
v4l2loopback
version: 0.12.5GStreamer version: 1.16.3
kernel version (
uname -a
): 5.15.0-84-generic # 93~20.04.1-Ubuntu SMP Wed Sep 6 16:15:40 UTC 2023 x86_64 x86_64 x86_64 GNU/LinuxDistribution (+version) (
lsb_release -a
): Distributor ID: Ubuntu Description: Ubuntu 20.04.6 LTS Release: 20.04 Codename: focalProblem Description:
I am trying to stream my USB cam video in H264 format to virtual camera using GStreamer. But i am getting error:
does not support 2:4:7:1 colorimetry
. My USB cam (Arducam USB Camera: Arducam USB) support H264 video format.Trying to stream H264 video from USB camera (
/dev/video2
) to virtual camera (/dev/video10
):gst-launch-1.0 -v v4l2src device=/dev/video2 ! video/x-h264,width=640,height=480,framerate=30/1 ! v4l2sink device=/dev/video10
Gets Following error:
Trying to get raw video from USB camera (
/dev/video0
) and convert to H264 and stream to virtual camera (/dev/video10
):gst-launch-1.0 -v v4l2src device=/dev/video0 ! videoscale ! videoconvert ! x264enc ! h264parse ! video/x-h264,stream-format=avc,alignment=au,width=640,height=480,framerate=30/1 ! v4l2sink device=/dev/video10
Gets Following error:
Successful when trying to stream raw video from
/dev/video0
to virtual camera/dev/video10
gst-launch-1.0 -v v4l2src device=/dev/video0 ! video/x-raw,format=YUY2,width=640,height=480,framerate=30/1 ! videoconvert ! v4l2sink device=/dev/video10
Result of
gst-device-monitor-1.0
:I also tried with
v4l2loopback
versions0.12.6, 0.12.7
and gstreamer version1.18.6
. But same errors.I would appreciate a prompt response.
Thank you.