The Linux Page

Playing a video with your Jetson TX1/TX2 from the command line

I got a Jetson TX2 not too long ago and was first looking into how to play a 4K video using the full accelerated GPU to see that it would be all smooth and play with the correct colors, etc.

My first experience with SBCs was with a Raspberry Pi and that board would display really crappy videos.

The first test I tried was to go to Chrome, the browser, and then attempt to play the video from there. Unfortunately, Chrome has difficulties to find the right wayt to accelerate video decompression and thus it did everything in software. It would use a good 100% of the 6 CPUs and  the video was still choppy. Hmmm.... Not too surprising since 4K is a pretty large amount of data to deal with. (See video example below)

Searching a little more, I finally found out that nVidia supports G-Streamer and has that command line pre-installed. So all you have to do is run that nVidia version as in:

nvgstplayer -i <video-filename>

That command line tool will open a window at the size of the video (so pretty much full size with a 4K video) and start playing your video. It's also possible to connect to a server playing a video on another computer. Assuming your network has enough bandwidth, it should work like a charm.

The framerate was around 23.97 throughout the entire movie even though I moved the windows, had my console over the G-Stream window, change the window size multiple times. While changing the size of my console, it was slow to respond, but the framerate on the video playback was constant. So they have a way to prioritize that over other X-Windows functions.

In any event, this looked just perfect.

Now here is the old video with the Chrome movie player. It works, but every now and then, it blocks for a second or so, which looks really bad. It would certainly work okay with a 2K video, though.