RSATom / wcjs-gs

[proof-of-concept] WebChimera.js GStreamer editon
GNU Lesser General Public License v2.1
42 stars 7 forks source link

How to use with web camera #10

Closed herryliq closed 3 years ago

herryliq commented 3 years ago

I want to use your repo to work with a web camera. I had try the follows pipeline in demo project, but it is not working so far.

v4l2src ! video/x-raw,width=640,height=480,format=YUY2, framerate=30/1 ! videoconvert ! video/x-raw, format=I420, width=1280, height=720 ! appsink name=sink

Can you give me some suggestion about how I can use web camera with wcjs-gs?

RSATom commented 3 years ago

videoconvert can't do scaling, so you have to add videoscale element, since you are trying convert 640*480 video to 1280*720.

RSATom commented 3 years ago

I would also recommend define something like GST_DEBUG=3 in environment variables to be able see troubles in GStreamer pipelines.

herryliq commented 3 years ago

Thanks for your reply. I had sloved use follow pipeline without convert resolution. v4l2src ! video/x-raw,width=640,height=480,format=YUY2, framerate=30/1 ! videoconvert ! video/x-raw, format=I420 ! appsink name=sink