v4l2 format conversion

Nicolas Dufresne nicolas at ndufresne.ca
Sun Oct 8 19:19:06 UTC 2023


Hi,

Le dim. 8 oct. 2023, 10 h 00, Regine Issan via gstreamer-devel <
gstreamer-devel at lists.freedesktop.org> a écrit :

>
> Hello Dear community,
> I will appreciate your opinion regarding the question below.
> THanks in advance.
>
> I need an app that uses v4l2 to capture frames from webcam.
> the app needs to process (un compressed !!!) 4k frames with 30fps.
>
> according to v4l2-ctl, to get 4k frames with 30 fps, camera requires MJPEG
> files (compressed).
>
> That means MJPEG files has to be converted to raw files (eg, RGB).
>
> question is:
>
>    1. is there any way to configure v4l2 do the conversion for me
>    or do i have to write special code to do the conversion ?
>
> As you are asking on GStreamer mailing list, I will assume you intend to
use GStreamer. A simple pipeline like this (you can test with
gst-launch-1.0) can do:


v4l2src ! queue ! jpegdec ! ...


Depending on your platform, a hardware accelerated jpeg decoder might be
available.



>    1. if i have to write special code to do the conversion,
>    is there any recommandation how to do it efficently ?(i an working
>    with Orin)
>
>
Orin like in Jetson Orin? If yes, some Nvidia specific elements might be
needed to move the memory into memory usable by the GPU, refer to Nvidia
forum for more details.

Nicolas

p.s. GStreamer also have a forum now at discourse.gstreamer.org

>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20231008/6f64bb4c/attachment.htm>


More information about the gstreamer-devel mailing list