gstreamer-devel Digest, Vol 129, Issue 16
Howling wong
watertreader at hotmail.com
Mon Oct 11 14:43:58 UTC 2021
Hi thanks
>> Use your command or a variant -- v4l2-ctl --list-formats-ext -d /dev/video0
This are the result
ioctl: VIDIOC_ENUM_FMT
Index [ 5628.245685] ov5640_mipi 3-003c: Please assign pixel format, t
: 0
Type : Video Capture
Pixel Format: 'YUYV'
Name : YUYV 4:2:2
Size: Discrete 640x480
Interval: Discrete 0.033s (30.000 fps)
Size: Discrete 320x240
Interval: Discrete 0.033s (30.000 fps)
Size: Discrete 720x480
Interval: Discrete 0.033s (30.000 fps)
Size: Discrete 1280x720
Interval: Discrete 0.033s (30.000 fps)
Size: Discrete 1920x1080
Interval: Discrete 0.033s (30.000 fps)
Size: Discrete 2592x1944
Interval: Discrete 0.067s (15.000 fps)
Size: Discrete 0x0
I do not think the camera would support 25 fp/sec.
Btw is there way we can control the frame rate in the downstream, like when encoding to save file or send it to another src
Regards
________________________________
From: gstreamer-devel <gstreamer-devel-bounces at lists.freedesktop.org> on behalf of gstreamer-devel-request at lists.freedesktop.org <gstreamer-devel-request at lists.freedesktop.org>
Sent: Monday, October 11, 2021 8:00 PM
To: gstreamer-devel at lists.freedesktop.org <gstreamer-devel at lists.freedesktop.org>
Subject: gstreamer-devel Digest, Vol 129, Issue 16
Send gstreamer-devel mailing list submissions to
gstreamer-devel at lists.freedesktop.org
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
or, via email, send a message with subject or body 'help' to
gstreamer-devel-request at lists.freedesktop.org
You can reach the person managing the list at
gstreamer-devel-owner at lists.freedesktop.org
When replying, please edit your Subject line so it is more specific
than "Re: Contents of gstreamer-devel digest..."
Today's Topics:
1. Re: Question on adjusting frame rate of pipeline
(Marianna Smidth Buschle)
----------------------------------------------------------------------
Message: 1
Date: Mon, 11 Oct 2021 12:44:51 +0200
From: Marianna Smidth Buschle <msb at qtec.com>
To: gstreamer-devel at lists.freedesktop.org, watertreader at hotmail.com
Subject: Re: Question on adjusting frame rate of pipeline
Message-ID: <af5a6286-2a5e-794d-555b-b38f9688e642 at qtec.com>
Content-Type: text/plain; charset="utf-8"; Format="flowed"
Try adding --gst-debug=*:3 to the failing command line.
If you are getting a non-negotiated error then it is because your source
doesn't support a fps of 25.
Fx my webcam only supports 10/1:
msb at QTEC-P53-MSB-Debian:~/QtecGit/python-tests$ gst-launch-1.0 v4l2src !
video/x-raw, framerate=5/1 ! fakesink --gst-debug=*:3
PAUSERER r?rledning ...
R?rledningen k?rer, og beh?ver ikke at blive PREROLL'ed ...
R?rledningen er PREROLL'ed ...
R?rledning s?ttes til AFSPIL ...
New clock: GstSystemClock
0:00:00.132050019 18347 0x55e8e83d6f00 WARN basesrc
gstbasesrc.c:3127:gst_base_src_loop:<v4l2src0> error: Internal data
stream error.
0:00:00.132109933 18347 0x55e8e83d6f00 WARN basesrc
gstbasesrc.c:3127:gst_base_src_loop:<v4l2src0> error: streaming stopped,
reason not-negotiated (-4)
FEJL: fra element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal
data stream error.
Yderligere fejls?gningsinformation:
../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.000560010
R?rledning s?ttes til NUL ...
R?rledning frig?res ...
If you install v4l-utils you can use: v4l2-ctl -d <videodev> --all
And it will tell you what it supports:
Video input : 0 (Camera 1: ok)
Format Video Capture:
??? Width/Height????? : 1280/720
??? Pixel Format????? : 'YUYV' (YUYV 4:2:2)
??? Field???????????? : None
??? Bytes per Line??? : 2560
??? Size Image??????? : 1843200
??? Colorspace??????? : sRGB
??? Transfer Function : Default (maps to sRGB)
??? YCbCr/HSV Encoding: Default (maps to ITU-R 601)
??? Quantization????? : Default (maps to Limited Range)
??? Flags???????????? :
Crop Capability Video Capture:
??? Bounds????? : Left 0, Top 0, Width 1280, Height 720
??? Default???? : Left 0, Top 0, Width 1280, Height 720
??? Pixel Aspect: 1/1
Selection Video Capture: crop_default, Left 0, Top 0, Width 1280, Height
720, Flags:
Selection Video Capture: crop_bounds, Left 0, Top 0, Width 1280, Height
720, Flags:
Streaming Parameters Video Capture:
??? Capabilities???? : timeperframe
??? Frames per second: 10.000 (10/1)
Best Regards
Marianna
> Hi
>
> I have a question on frame rate on gstreamer in coding. I have set a caps filter after the video src (v4l2src)
>
> A code snippet
> GstCaps *caps;
> caps = gst_caps_new_simple("video/x-raw",
> "width", G_TYPE_INT, 640,
> "height", G_TYPE_INT, 480,
> "framerate", GST_TYPE_FRACTION, 30, 1,
> "is-live", G_TYPE_BOOLEAN, TRUE,
> NULL);
>
> if((gst_element_link_filtered(src,
> caps))!=TRUE)
> {
> g_print(" Could not link pipeline\n");
> gst_object_unref (GST_OBJECT (pipeline));
> return 0;
> }
>
> I have 3 branches to the source (1) Display (2) Records (3) sending video elsewhere. But it is only at caps, I define the size of video and the frame rate to collect
>
> Video play smoothly. However when I changed to a lower value of framerate to 25, the video refuse to play. I wonder why? isnt the lower framerate would have lesser stress on the system resource
>
>
> A little other experiment that I have done using command line:
>
> Pipeline play
>>> gst-launch-1.0 -v v4l2src device=/dev/video0 ! video/x-raw, width=640, height=480, framerate=30/1 ! videoconvert ! autovideosink
> Pipeline do not play
>>> gst-launch-1.0 -v v4l2src device=/dev/video0 ! video/x-raw, width=640, height=480, framerate=25/1 ! videoconvert ! autovideosink
> Would like suggestion on what to do next
>
> Thanks
--
Best regards / Med venlig hilsen
?Marianna Smidth Buschle?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20211011/d96dbf78/attachment-0001.htm>
------------------------------
Subject: Digest Footer
_______________________________________________
gstreamer-devel mailing list
gstreamer-devel at lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
------------------------------
End of gstreamer-devel Digest, Vol 129, Issue 16
************************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20211011/6a531288/attachment.htm>
More information about the gstreamer-devel
mailing list