YUV420p->RGBA conversion is broken
Closed this issue · 11 comments
Detail
well, i connected my android13 phone via droidcam to my linux laptop.
as it works with stopmotion application, i expected the same with pix_video.
unfortunately there seems to be some issues, because the output of pix_video is garbage. the device is available, the connection is made...
hope i was clear:)
greetings
Gem Version
v09.4
Pd Version
plugdata 0.7.1
Operating System
Linux
OS Version
xubuntu 22.4.3
Which CPU are you using?
amd64/x86_64 ("64bit Intel")
hmm.
no, you were not very clear.
- try again with Pd-vanilla
- check other video devices (a "real" webcam)
- show us your "garbage" (there are many different levels of "garbage", i have no idea whether you get static, a half-broken feed or scrambled colors)
- give us the configuration of the videodevice (
v4l2-ctl --all -d /dev/videoX
)
also, the exact version of droidcam
might be useful
ok, thanks for answering!
here we go...
a screenrecording of the "garbage":)
https://github.com/umlaeute/Gem/assets/79641361/c39ca6c2-967d-4cf8-8664-eebd16697dc8
edit: seems the videupload failed?
the same result in pd-vanilla
droidcam client 2.1.2
other webcams (internal, usb) are working.
~$ v4l2-ctl --all -d /dev/video3
Driver Info:
Driver name : v4l2 loopback
Card type : Dummy video device (0x0000)
Bus info : platform:v4l2loopback-000
Driver version : 6.5.8
Capabilities : 0x85200003
Video Capture
Video Output
Read/Write
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x05200003
Video Capture
Video Output
Read/Write
Streaming
Extended Pix Format
Priority: 2
Video input : 0 (loopback: ok)
Video output: 0 (loopback in)
Format Video Capture:
Width/Height : 640/480
Pixel Format : 'YU12' (Planar YUV 4:2:0)
Field : None
Bytes per Line : 640
Size Image : 460800
Colorspace : sRGB
Transfer Function : Default (maps to sRGB)
YCbCr/HSV Encoding: Default (maps to ITU-R 601)
Quantization : Default (maps to Limited Range)
Flags :
Format Video Output:
Width/Height : 640/480
Pixel Format : 'YU12' (Planar YUV 4:2:0)
Field : None
Bytes per Line : 640
Size Image : 460800
Colorspace : sRGB
Transfer Function : Default (maps to sRGB)
YCbCr/HSV Encoding: Default (maps to ITU-R 601)
Quantization : Default (maps to Limited Range)
Flags :
Streaming Parameters Video Capture:
Frames per second: 30.000 (30/1)
Read buffers : 2
Streaming Parameters Video Output:
Frames per second: 30.000 (30/1)
Write buffers : 2
User Controls
keep_format 0x0098f900 (bool) : default=0 value=1
sustain_framerate 0x0098f901 (bool) : default=0 value=0
timeout 0x0098f902 (int) : min=0 max=100000 step=1 default=0 value=0
timeout_image_io 0x0098f903 (bool) : default=0 value=0
I cannot reproduce the problem with Gem-0.94 (e.g. as packaged in Debian, and thus (x)Xubuntu).
however, i can reproduce the problem with current git (c6eff7f).
there's a reason why i ask for the (exact) Gem version :-)
i've recently updated the color-conversions, and obviously broke the I420->RGBA conversion.
until this is fixed, you should be able to get a working video feed by sending a [colorspace yuv(
message to [pix_video]
before opening the device.
the [colorspace yuv] message does the job!
i swear, i would have given you the exact gem version, if i knew where to read it!:)
thank you very much for your help!
greetings
i swear, i would have given you the exact gem version, if i knew where to read it!:)
well, the bug-reporting template spells it:
What is the exact version of Gem you are using (as printed in the Pd-console)?
the Pd-console should say something like this (when loading Gem):
GEM: Graphics Environment for Multimedia
GEM: ver: 0.94.git v0.94-845-g4f88c7ac9
the console here says:
GEM: Graphics Environment for Multimedia
GEM: ver: 0.94.
GEM: compiled on Feb 5 2024
in both plugdata and pd-vanilla
Interesting.
How did you get/compile Gem?
i guess not in the most recommended way...
some mixture of from within pd/plugdata and from the repository.
i encountered lots of crashes/freezes in the beginning, so i tried this and that
GEM: ver: 0.94.
I can tell you tomorrow for sure, but I think I have the same incomplete version message in my last home made build (current master).
EDIT false alarm, the message is right: ver: 0.94.git v0.94-843-gc6eff7f12
i'm hiding this.