-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Video grabber with profile YUVY not YUYV #7
Comments
I think this issue may need to be expanded. I'm using a generic EasyCap, with the Empia chipset and a generic NTSC backup camera. (BTW, there are at least 4 different chipsets, STK1160 being one of the others, used in Easycaps, described here: https://www.linuxtv.org/wiki/index.php/Easycap). My EasyCap defaults to Pal output and S-video input, so I get no picture in Cam_overlay at all unless I go into V4L2 settings after each statup and reset things to NTSC and composite input. There are numerous other settings that could be changed also depending on which capture device is used. Unfortunately, there is no way short of a script to reset things at each restart of the RPi using V4l2-ctl. Even the V4l2 capture utility does not carry settings across restarts. This can be done with a startup script, or udev as outlined here: https://askubuntu.com/questions/295637/v4l2-change-default-setting. Raspbian works the same as Ubuntu in this case. Obviously, this approach is not user friendly. If cam_overlay (or Crankshaft) could read the device options, and allow them to be set |
Hi @hawkeyexp, In regards to changing the shader from YUYV to YUVY, this should be relatively straight forwards, but I don't have the hardware to test this. Line 55 in 182c1b6
Once it's tested against some real hardware I'm more than happy to commit the shader, or accept a pull request |
@jonlowe I've created a new issue for your report, as I believe it to be a different issue |
Hi @meekys , Could you please also add the shader for MJPG. My device only supports MJPG pixel format. I would also appreciate any guidance on how to create the shader. Thanks pi@raspberrypi:~/cam_overlay $ ./cam_overlay.bin
Opened device '/dev/video0'
Dimensions: 640 x 480 Pixel Format: MJPG
MESA-LOADER: failed to retrieve device information
MESA-LOADER: failed to retrieve device information
MESA-LOADER: failed to retrieve device information
Opened screen 0 @ 800 x 480
Cannot open 'shader-MJPG.frag': 2, No such file or directory pi@raspberrypi:~/cam_overlay $ v4l2-ctl --all
Driver Info (not using libv4l2):
Driver name : uvcvideo
Card type : USB2.0 PC CAMERA
Bus info : usb-3f980000.usb-1.5
Driver version: 4.14.79
Capabilities : 0x84200001
Video Capture
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04200001
Video Capture
Streaming
Extended Pix Format
Priority: 2
Video input : 0 (Camera 1: ok)
Format Video Capture:
Width/Height : 640/480
Pixel Format : 'MJPG'
Field : None
Bytes per Line : 0
Size Image : 614400
Colorspace : Default
Transfer Function : Default
YCbCr/HSV Encoding: Default
Quantization : Default
Flags :
Crop Capability Video Capture:
Bounds : Left 0, Top 0, Width 640, Height 480
Default : Left 0, Top 0, Width 640, Height 480
Pixel Aspect: 1/1
Selection: crop_default, Left 0, Top 0, Width 640, Height 480
Selection: crop_bounds, Left 0, Top 0, Width 640, Height 480
Streaming Parameters Video Capture:
Capabilities : timeperframe
Frames per second: 60.000 (60/1)
Read buffers : 0
brightness (int) : min=0 max=255 step=1 default=-8193 value=128
contrast (int) : min=0 max=255 step=1 default=57343 value=128
saturation (int) : min=0 max=255 step=1 default=57343 value=70
hue (int) : min=-127 max=127 step=1 default=-8193 value=0
gamma (int) : min=1 max=8 step=1 default=57343 value=4
gain (int) : min=0 max=65535 step=1 default=57343 value=16
power_line_frequency (menu) : min=0 max=2 default=1 value=1
sharpness (int) : min=0 max=255 step=1 default=57343 value=3 |
@hawkeyexp did you have any success on creating the correct shader-UYVY.frag file? I have an easycap with stk1160 so I would be able to test. |
sorry for late response - have not really tracked it and started a new job on feb which consumed most time... |
Hi @hawkeyexp, |
@Revanas UYVY as opposed to YUVY ? (Yet another variation of the same thing by the looks of it?) I've added another (untested) shader to support this variation in the cpp branch. It would be much appreciated if you were able to test this just to confirm it's all good. Cheers, |
Hi,
i adapted your code for crankshaft (pi based android auto headunit) and noticed a prob with a Syntek STK1160 video bridge:
the request profile is not YUYV - it is YUVY. With a easy copy to test it works with wrong colors.
Can you possible add this profile ?
If you are interested on our free project:
getcrankshaft.com
github.com/opencardev
Thx, Hawkeye
The text was updated successfully, but these errors were encountered: