Maddening problem with Qt and H.264 video on Jetson TK1

Hi, all,

I’m trying to build a simple Qt app on my Jetson, and the interaction between gstreamer and Qt has me pulling my hair out. Using the standard universe/multiverse apt repositories, and a fresh 21.4 install, a simple application with a QtMediaPlayer, and a pretty much standard issue baseline/3.0 H.264 video stream (in an MPEG-4 container), my application fails to play any video (log here).

If I simply doubleclick on the video file icon in Unity, it launches and plays with no problems, so clearly something on the TK1 is capable of decoding and playing this simple video. At this point, before I jump down the rabbit hole of rebuilding Qt, gstreamer, &c., I thought I’d ask here.

Is this a configuration issue? Is there some package I’m missing? And why are both gstreamer 0.10 and 1.00 installed? Is that the problem? At this point, I don’t even need GPU accelerated H.264 decoding – I just need to be able to play the movie.

Any pointers gratefully accepted. TIA.

EDIT: I have looked at the error message more closely, and it appears that there’s a problem with the nVidia H.264 decoder. Is anybody well versed enough in gstreamer to help me put together a test pipeline to see if I can decode the video at all?

GStreamer 0.10 and 1.0 are both supported and both installed as many apps still depend on the 0.10 version while many of the newer apps use the 1.0 version.

Typically you do need HW accelerated video decoding as that is a heavy process and without acceleration you can decode at most 720p or so and even then you have consume most of your CPU and can’t do anything else while showing the video.

Besides accelerated decoding, you need accelerated rendering of the frames as well. That’s typically done by using XVideo or nowadays maybe more often OpenGL (ES).

GStreamer is the only supported video API on Jetson but I think QtMediaPlayer does support it already (otherwise your log wouldn’t show messages from the HW decoder). I’ve used GStreamer from Qt but I’ve created the pipelines directly and I haven’t used the QtMediaPlayer. You may need to experiment with the GStreamer video rendering plugins and then find a way to tell QtMediaPlayer which one to use, if it’s not choosing that by default.

I was developing qt video player and qt audio player on IMX6 using QML (Qt5). Initially we faced several problems in making QMediaplayer to work. We knew that QMediaPlayer internally uses GStreamer. Just to verify these, we created a sample media player application using QML to create the UI and used GStreamer pipelines for media player operations. We were surprised that it worked directly. So next step we started debugging the issue. During debugging, we found out that we missed some GStreamer plugins while installation. Once this was fixed, it worked like a charm on IMX6 !!!
So please make sure you have all GStreamer plugins like gstreamer-plugins-good, gstreamer-plugins-ugly, gstreamer-plugins-bad, etc.
Hope it helps.

e-con systems

@tftio: Did you ever manage to sort this problem out. I am trying to get a gstreamer + QT pipeline to encode and decode H.264 video files without any luck as well. If you got a bit far in the process, I would be very grateful if you can share some tips!

Hello xargon, assuming you are using QT5, perhaps this thread might be of some help: https://devtalk.nvidia.com/default/topic/894891/jetson-tk1/gstreamer-1-0-and-qt5-video-playback/