Hi,
I’m using Jetson Nano dev kit and have connected a camera on CAM0.
I’ve also made a camera driver and devicetree for the camera. Camera connected to Jetson Nano provides 400x400 yuv frames at 30fps.
From v4l2 I’m able to fetch yuv frames at 30fps but frame saved from camera is with resolution 416x400.
when I view the frame in yuv player, I see 16px green at the end.
In dmesg i see the following errors too, but frame gets captured somehow
[ 269.636593] video4linux video0: frame start syncpt timeout!0
[ 269.844606] video4linux video0: frame start syncpt timeout!0
[ 270.052571] video4linux video0: frame start syncpt timeout!0
[ 270.260562] video4linux video0: frame start syncpt timeout!0
[ 270.468741] video4linux video0: frame start syncpt timeout!0
[ 270.676820] video4linux video0: frame start syncpt timeout!0
Following is the command I used for saving a single frame.
v4l2-ctl --set-fmt-video=width=400,height=400,pixelformat=YUYV --set-ctrl bypass_mode=0 --stream-mmap --stream-count=1 -d /dev/video0 --stream-to=frame_1.raw
Also somehow from Gstreamer I’m unable to view the frames and here is the command I’m using to view frames.
gst-launch-1.0 -v nvarguscamerasrc sensor-id=0 ! ‘video/x-raw(memory:NVMM), width=(int)400, height=(int)400, format=(string)NV12, framerate=(fraction)30/1’ ! nvvidconv ! queue ! nvoverlaysink
In dmesg I don’t see any errors while running Gstreamer command.
Could you please help me find out answer’s for the following questions,
Question 1: why I’m receiving 16 pixels extra in width? as camera only provides 400x400 frames.
Question 2: I’m receiving camera frames using v4l-ctl command but why I’m unable to receive frames from Gstreamer?
For reference, here is the devicetree configuration I’m using,
i2c@546c0000 {
devcam1_a@36 {
status = "okay";
compatible = "nvidia,devcam1";
reg = <0x36>;
devnode = "video0";
set_mode_delay_ms = "3000";
mode0 {
mclk_khz = "24000";
num_lanes = "2";
tegra_sinterface = "serial_a";
phy_mode = "DPHY";
discontinuous_clk = "no";
dpcm_enable = "false";
cil_settletime = "0";
active_w = "400";
active_h = "400";
mode_type = "yuv";
pixel_phase = "yuyv";
csi_pixel_bit_depth = "16";
readout_orientation = "0";
line_length = "416";
inherent_gain = "1";
mclk_multiplier = "12.5";
pix_clk_hz = "300000000";
gain_factor = "1";
min_gain_val = "1";
max_gain_val = "255";
step_gain_val = "1";
default_gain = "16";
min_hdr_ratio = "1";
max_hdr_ratio = "1";
framerate_factor = "1000000";
min_framerate = "3000000";
max_framerate = "30000000";
step_framerate = "1";
default_framerate = "30000000";
exposure_factor = "1000000";
min_exp_time = "832";
max_exp_time = "16667";
step_exp_time = "208";
default_exp_time = "8000";
embedded_metadata_height = "0";
};
ports {
status = "okay";
#address-cells = <1>;
#size-cells = <0>;
port@0 {
status = "okay";
reg = <0>;
devcam1_devcam1_out0: endpoint {
status = "okay";
port-index = <0>;
bus-width = <1>;
remote-endpoint = <&devcam1_csi_in0>;
};
};
};
};
};
};
tegra-camera-platform {
status = "okay";
compatible = "nvidia, tegra-camera-platform";
num_csi_lanes = <1>;
max_lane_speed = <1500000>;
min_bits_per_pixel = <16>;
vi_peak_byte_per_pixel = <2>;
vi_bw_margin_pct = <25>;
max_pixel_rate = <200000>;
isp_peak_byte_per_pixel = <5>;
isp_bw_margin_pct = <25>;
modules {
module0 {
status = "okay";
badge = "devcam1_front_devcam1";
position = "front";
orientation = "1";
drivernode0 {
status = "okay";
pcl_id = "v4l2_sensor";
devname = "devcam1 6-0036";
proc-device-tree = "/proc/device-tree/host1x/i2c@546c0000/devcam1_a@36";
};
};
};
};