Video-viewer: failed to create output stream

Hello everyone,

I just started following the HelloAIWorld tutorial. I built the project from source on my Jetson Nano following each step. Then, when checking if the v4l2 webcam works properly the following message appears:

[OpenGL] failed to open X11 server connection.
[OpenGL] failed to create X11 Winfow.
video-viewer: failed to create output stream

Then it starts capturing frames in default settings but I can see no video nor window.

I am using Dewanxin Webcam and I could do previous courses with it without any camera issue.

What should I do to fix this?

Thank you very much,
Alex

Hi @pujol, do you have a display attached to your Jetson? If so, are you able to run glxgears from the mesa-utils package?

If you don’t have a display attached and don’t wish to, then see here for how to stream the video out over RTP to a PC:

Hello @dusty_nv. I do not have a display attached to my Jetson. I get inside it via ssh on Power Shell in my Windows 10 PC.

If I try the RTC method:

video-viewer --input-codec=h264 rtp://@:1234 

I have the same problem but now it is not even able to capture frames.

[gstreamer] initialized gstreamer, version 1.14.5.0
[gstreamer] gstDecoder -- creating decoder for 127.0.0.1
[gstreamer] gstDecoder -- resource discovery not supported for RTP streams
[gstreamer] gstDecoder -- pipeline string:
[gstreamer] udpsrc port=1234 multicast-group=127.0.0.1 auto-multicast=true caps="application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)H264" ! rtph264depay ! h264parse ! omxh264dec ! video/x-raw ! appsink name=mysink
[video]  created gstDecoder from rtp://@:1234
------------------------------------------------
gstDecoder video options:
------------------------------------------------
  -- URI: rtp://@:1234
     - protocol:  rtp
     - location:  127.0.0.1
     - port:      1234
  -- deviceType: ip
  -- ioType:     input
  -- codec:      h264
  -- width:      0
  -- height:     0
  -- frameRate:  0.000000
  -- bitRate:    0
  -- numBuffers: 4
  -- zeroCopy:   true
  -- flipMethod: none
  -- loop:       0
  -- rtspLatency 2000
------------------------------------------------
[OpenGL] failed to open X11 server connection.
[OpenGL] failed to create X11 Window.
video-viewer:  failed to create output stream
[gstreamer] opening gstDecoder for streaming, transitioning pipeline to GST_STATE_PLAYING
[gstreamer] gstreamer changed state from NULL to READY ==> mysink
[gstreamer] gstreamer changed state from NULL to READY ==> capsfilter0
[gstreamer] gstreamer changed state from NULL to READY ==> omxh264dec-omxh264dec0
[gstreamer] gstreamer changed state from NULL to READY ==> h264parse0
[gstreamer] gstreamer changed state from NULL to READY ==> rtph264depay0
[gstreamer] gstreamer changed state from NULL to READY ==> udpsrc0
[gstreamer] gstreamer changed state from NULL to READY ==> pipeline0
[gstreamer] gstreamer changed state from READY to PAUSED ==> capsfilter0
[gstreamer] gstreamer changed state from READY to PAUSED ==> omxh264dec-omxh264dec0
[gstreamer] gstreamer changed state from READY to PAUSED ==> h264parse0
[gstreamer] gstreamer changed state from READY to PAUSED ==> rtph264depay0
[gstreamer] gstreamer stream status CREATE ==> src
[gstreamer] gstreamer changed state from READY to PAUSED ==> udpsrc0
[gstreamer] gstreamer changed state from READY to PAUSED ==> pipeline0
[gstreamer] gstreamer message new-clock ==> pipeline0
[gstreamer] gstreamer stream status ENTER ==> src
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> capsfilter0
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> omxh264dec-omxh264dec0
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> h264parse0
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> rtph264depay0
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> udpsrc0
[gstreamer] gstreamer message stream-start ==> pipeline0
video-viewer:  failed to capture video frame
video-viewer:  failed to capture video frame
video-viewer:  failed to capture video frame

This is the command that you would run on your Linux PC to view the RTP stream. But first you need to transmit the RTP feed from your Jetson:

video-viewer --output-codec=h264 /dev/video0 rtp://$IP_ADDRESS_OF_YOUR_LAPTOP:1234

Then to view the RTP feed from your laptop, see this section (I recommend to install GStreamer):

https://github.com/dusty-nv/jetson-inference/blob/master/docs/aux-streaming.md#viewing-rtp-remotely

Dear dusty,

If I am on my laptop, connect my Jetson to it via USB and use cmd or Power Shell to go inside the docker we installed in the tutorial and first run

video-viewer --output-codec=h264 /dev/video0 rtp://192.168.1.54:1234

Everything seems to work until it says:

[OpenGL] failed to open X11 server connection.
[OpenGL] failed to create X11 Window

and then starts capturing frames as if everything is fine but I cannot see any of those.

Then if I run

video-viewer --input-codec=h264 rtp://@:1234

It has even more errors:

[OpenGL] failed to open X11 server connection.
[OpenGL] failed to create X11 Window
video-viewer: failed to create outputstream

and then fails to capture every frame.

Finally if I run GStreamer using

gst-launch-1.0 -v udpsrc port=1234 \
 caps = "application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, payload=(int)96" ! \
 rtph264depay ! decodebin ! videoconvert ! autovideosink

it seems to run but nothing happens…

Sorry for the inconveniences, I am trying to learn.

Alex

This is fine, this is the command you should run on your Jetson to send the RTP feed to your laptop. The OpenGL error is expected because you don’t have a display attached to your Nano. You won’t see any video frames until you start a viewer on your laptop.

You don’t want to run this command on your Jetson, this is the command you would run if you wanted to receive an RTP stream on your Jetson. Instead you want to transmit an RTP stream from your Jetson, so you should run the first command on your Jetson.

You should run this on your laptop, not your Jetson. This is the GStreamer command that receives and displays the RTP stream. You can install GStreamer to your laptop or use VNC player (GStreamer is more reliable and I prefer that way)

This is the section for what to run on your laptop side: jetson-inference/aux-streaming.md at master · dusty-nv/jetson-inference · GitHub

1 Like

OMG thank you very much! I could manage to run it with VLC :)

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.