Error during running video-viewer

Hello!

I meet error during running video-viewer. May I ask if any one know the reasons of the error? Also, May I ask they solution of it?

Remarks: I can start the docker successfully, but just meet error during running video-viewer.

Thank you!

Regards,
Anthony

want to provide the L4T version.

want to provide the jetpack version

Do you use an USB webcam?

Would you show your command to run it?

Hi Hiker,

Yes. I use USB camera. it is logitech c525. The command I use to start it is: video-viewer /dev/video0

Thank you.

Regards,
Anthony

check first,
$ v4l2-ctl --list-formats-ext --device=/dev/video0

then, choose proper resolution,
make sure whether 1280 x 720 @30 is provided.

Additionally, you’re running it on the local machine? or remote ssh?

Hi Hiker,

I am running it on the local machine. Also1280 x 720 @30 is provided. Thank you

Index : 1
Type : Video Capture
Pixel Format: ‘MJPG’ (compressed)
Name : Motion-JPEG
Size: Discrete 1280x720
Interval: Discrete 0.033s (30.000 fps)

Regards,
Anthony

export.txt (13.5 KB)

May I ask how to “choose proper resolution”? Thank you!

Hi,
Please make sure you execute $ export DISPLAY=:0(or 1) and can see display information in executing xrandr. The error looks to be in rendering frames.

Hi DaneLLL,
Thanks for the advices!
I have tried the commands “$ export DISPLAY=:0” or “$ export DISPLAY=:1”, and execute “xlrandr” before running “video-viewer /dev/video0”. However, the error is still the same. Could you please have a look in the images for details and give me some suggestions? Thank you so much!

Regards,
Anthony

Hi,
Please check if you can run this gstreamer command and see video preview:

gst-launch-1.0 videotestsrc is-live=1 ! nvvidconv ! ‘video/x-raw(memory:NVMM)’ ! nv3dsink

Would like to know if another EGL render works or not.

The command has run. Please find the below for the result.

Hi @sangwong416, can you try running glxinfo / glxgears to confirm the OpenGL drivers are still working?

apt-get update
apt-get install mesa-utils
glxinfo
glxgears

Also, you could try building from source to see if that behaves any different than the container.

Thank you for your reply. Please find the below captured screen for the result of commends “glxinfo” & “glxgears”.

Can you copy & paste the text output from glxinfo, or take a snapshot of the top of it’s output?

You could also try flashing a fresh SD card to see if that resolves the issue with your OpenGL drivers.

Or if it’s an issue with your container runtime, you may want to try building the jetson-inference project from source and trying it outside of container.

Hi dusty_nv,

Thank you for the reply. Please find the attachment glxinfo.txt as requested.

Since my kit is not development kit, but NVIDIA product (mini PC), the SD card inside cannot be flashed.

Also, I can start the docker, but the issue is running the video-viewer only, Maybe, let e take your advice after you review the glxinfo.txt.

Thank you!

Regards,
Anthony

glxinfo.txt (64.8 KB)

It looks like your OpenGL installation got messed up, because it reports the driver vendor as “SGI”, where it should say “NVIDIA” like below:

name of display: :0
display: :0  screen: 0
direct rendering: Yes
server glx vendor string: NVIDIA Corporation
server glx version string: 1.4
server glx extensions:
    GLX_ARB_context_flush_control, GLX_ARB_create_context,
    GLX_ARB_create_context_no_error, GLX_ARB_create_context_profile,
    GLX_ARB_create_context_robustness, GLX_ARB_fbconfig_float,
    GLX_ARB_multisample, GLX_EXT_buffer_age,
    GLX_EXT_create_context_es2_profile, GLX_EXT_create_context_es_profile,
    GLX_EXT_framebuffer_sRGB, GLX_EXT_import_context, GLX_EXT_libglvnd,
    GLX_EXT_stereo_tree, GLX_EXT_swap_control, GLX_EXT_swap_control_tear,
    GLX_EXT_texture_from_pixmap, GLX_EXT_visual_info, GLX_EXT_visual_rating,
    GLX_NV_copy_image, GLX_NV_delay_before_swap, GLX_NV_float_buffer,
    GLX_NV_robustness_video_memory_purge, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer,
    GLX_SGI_swap_control, GLX_SGI_video_sync
client glx vendor string: NVIDIA Corporation
client glx version string: 1.4
client glx extensions:
    GLX_ARB_context_flush_control, GLX_ARB_create_context,
    GLX_ARB_create_context_no_error, GLX_ARB_create_context_profile,
    GLX_ARB_create_context_robustness, GLX_ARB_fbconfig_float,
    GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_buffer_age,
    GLX_EXT_create_context_es2_profile, GLX_EXT_create_context_es_profile,
    GLX_EXT_fbconfig_packed_float, GLX_EXT_framebuffer_sRGB,
    GLX_EXT_import_context, GLX_EXT_stereo_tree, GLX_EXT_swap_control,
    GLX_EXT_swap_control_tear, GLX_EXT_texture_from_pixmap,
    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_NV_copy_buffer,
    GLX_NV_copy_image, GLX_NV_delay_before_swap, GLX_NV_float_buffer,
    GLX_NV_multisample_coverage, GLX_NV_present_video,
    GLX_NV_robustness_video_memory_purge, GLX_NV_swap_group,
    GLX_NV_video_capture, GLX_NV_video_out, GLX_SGIX_fbconfig,
    GLX_SGIX_pbuffer, GLX_SGI_swap_control, GLX_SGI_video_sync
GLX version: 1.4
GLX extensions:
    GLX_ARB_context_flush_control, GLX_ARB_create_context,
    GLX_ARB_create_context_no_error, GLX_ARB_create_context_profile,
    GLX_ARB_create_context_robustness, GLX_ARB_fbconfig_float,
    GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_buffer_age,
    GLX_EXT_create_context_es2_profile, GLX_EXT_create_context_es_profile,
    GLX_EXT_framebuffer_sRGB, GLX_EXT_import_context, GLX_EXT_stereo_tree,
    GLX_EXT_swap_control, GLX_EXT_swap_control_tear,
    GLX_EXT_texture_from_pixmap, GLX_EXT_visual_info, GLX_EXT_visual_rating,
    GLX_NV_copy_image, GLX_NV_delay_before_swap, GLX_NV_float_buffer,
    GLX_NV_robustness_video_memory_purge, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer,
    GLX_SGI_swap_control, GLX_SGI_video_sync
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: NVIDIA Tegra Xavier (nvgpu)/integrated
OpenGL core profile version string: 4.6.0 NVIDIA 418.00
OpenGL core profile shading language version string: 4.60 NVIDIA
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
    GL_AMD_multi_draw_indirect, GL_AMD_seamless_cubemap_per_texture,
    GL_AMD_vertex_shader_layer, GL_AMD_vertex_shader_viewport_index,
    GL_ARB_ES2_compatibility, GL_ARB_ES3_1_compatibility,
    GL_ARB_ES3_2_compatibility, GL_ARB_ES3_compatibility,
    GL_ARB_arrays_of_arrays, GL_ARB_base_instance, GL_ARB_bindless_texture,
    GL_ARB_blend_func_extended, GL_ARB_buffer_storage,
    GL_ARB_clear_buffer_object, GL_ARB_clear_texture, GL_ARB_clip_control,
    GL_ARB_color_buffer_float, GL_ARB_compressed_texture_pixel_storage,
    GL_ARB_compute_shader, GL_ARB_compute_variable_group_size,
    GL_ARB_conditional_render_inverted, GL_ARB_conservative_depth,
    GL_ARB_copy_buffer, GL_ARB_copy_image, GL_ARB_cull_distance,
    GL_ARB_debug_output, GL_ARB_depth_buffer_float, GL_ARB_depth_clamp,
    GL_ARB_depth_texture, GL_ARB_derivative_control,
    GL_ARB_direct_state_access, GL_ARB_draw_buffers,
    GL_ARB_draw_buffers_blend, GL_ARB_draw_elements_base_vertex,
    GL_ARB_draw_indirect, GL_ARB_draw_instanced, GL_ARB_enhanced_layouts,
    GL_ARB_explicit_attrib_location, GL_ARB_explicit_uniform_location,
    GL_ARB_fragment_coord_conventions, GL_ARB_fragment_layer_viewport,
    GL_ARB_fragment_program, GL_ARB_fragment_program_shadow,
    GL_ARB_fragment_shader, GL_ARB_fragment_shader_interlock,
    GL_ARB_framebuffer_no_attachments, GL_ARB_framebuffer_object,
    GL_ARB_framebuffer_sRGB, GL_ARB_geometry_shader4,
    GL_ARB_get_program_binary, GL_ARB_get_texture_sub_image, GL_ARB_gl_spirv,
    GL_ARB_gpu_shader5, GL_ARB_gpu_shader_fp64, GL_ARB_gpu_shader_int64,
    GL_ARB_half_float_pixel, GL_ARB_half_float_vertex, GL_ARB_imaging,
    GL_ARB_indirect_parameters, GL_ARB_instanced_arrays,
    GL_ARB_internalformat_query, GL_ARB_internalformat_query2,
    GL_ARB_invalidate_subdata, GL_ARB_map_buffer_alignment,
    GL_ARB_map_buffer_range, GL_ARB_multi_bind, GL_ARB_multi_draw_indirect,
    GL_ARB_multisample, GL_ARB_multitexture, GL_ARB_occlusion_query,
    GL_ARB_occlusion_query2, GL_ARB_parallel_shader_compile,
    GL_ARB_pipeline_statistics_query, GL_ARB_pixel_buffer_object,
    GL_ARB_point_parameters, GL_ARB_point_sprite, GL_ARB_polygon_offset_clamp,
    GL_ARB_post_depth_coverage, GL_ARB_program_interface_query,
    GL_ARB_provoking_vertex, GL_ARB_query_buffer_object,
    GL_ARB_robust_buffer_access_behavior, GL_ARB_robustness,
    GL_ARB_sample_locations, GL_ARB_sample_shading, GL_ARB_sampler_objects,
    GL_ARB_seamless_cube_map, GL_ARB_seamless_cubemap_per_texture,
    GL_ARB_separate_shader_objects, GL_ARB_shader_atomic_counter_ops,
    GL_ARB_shader_atomic_counters, GL_ARB_shader_ballot,
    GL_ARB_shader_bit_encoding, GL_ARB_shader_clock,
    GL_ARB_shader_draw_parameters, GL_ARB_shader_group_vote,
    GL_ARB_shader_image_load_store, GL_ARB_shader_image_size,
    GL_ARB_shader_objects, GL_ARB_shader_precision,

Normally I would recommend to reflash the device or SD card. You could also try installing this: https://github.com/NVIDIA/libglvnd