Missing encoders

I am trying to use gstreamer to trancode ts mpeg-2 videos into mp4 and I noticed that for some reason when I call gst-inspect-1.0 nvv4l2h264enc
No such element or plugin ‘nvv4l2h264enc’

when I try to install plugins-bad, it tells me that it is already the more recent version:

sudo apt-get install gstreamer1.0-tools gstreamer1.0-alsa gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav

(sample line from output)
gstreamer1.0-plugins-bad is already the newest version (1.14.5-0ubuntu1~18.04.1).

I read that some people suggest to reflash the device, but in my case, we already have code and environment setup on Xavier, and if I reflash it, we lose everything.

This is used by our public school to record security videos. The videos are being recorded as .TS format and are near 200GB each. I noticed that if I compress them into mp4, they drop to less than 20GB if not 15GB. I tried to transcode with ffmpeg but I am told it does not have GPU support for encoding on Xavier. So, now I am trying to do it with gstreamer, and I understand I need these encoders to use GPU for transcoding.

Without GPU, transcoding will take too long, because the system still records and we are running out of space.

The contractor who set it up left, and I now need to figure this out. Would greatly appreciate the help.

Hi,
Please check your release version by executing head -1 /etc/nv_tegra_release. If it is r31.1, it is not a stable release and we strongly suggest you upgrade the system. If you cannot upgrade, you may use omx plugins.

The v4l2 plugins are in each r32 release. If your version is r32, you may clean the cache and see if the plugins are present.

$ rm .cache/gstreamer-1.0/registry.aarch64.bin

Hello,

thank you for your reply! It seems it is indeed R31.1

head -1 /etc/nv_tegra_release

R31 (release), REVISION: 0.1, GCID: 12775118, BOARD: t186ref, EABI: aarch64, DATE: Thu Sep 20 21:49:38 UTC 2018

I tried to replace nvv with omxh but it seems as omxh is also missing:

gst-inspect-1.0 omxh264enc
No such element or plugin 'omxh264enc’omxh264enc

I was under the impression that omxh was deprecated, but I should still have it, no? This is really hard… :(

The program on Xavier is running non-stop (our school video recording) and we do not have installer for it. Can I upgrade Xavier without losing the existing program we have running or will I need to reinstall everything? I can reboot Xavier; however, everything is installed on it as is, and I cannot flash it clean. What can be done? Because TS files are so big, I used my own money to buy a new disk to move file; however, it will only buy us two weeks at most. Any advice would be greatly appreciated!

Hi,
Since r31.1 is developer preview and not a stable release, we do suggest upgrade the system. After cleaning the cache, you should at least see omx plugins(omxh264enc, omxh264dec, omxh265enc, omxh265dec). If these plugins are not present, the system seems to be in uncertain status. You can check if the prebuilt lib is present:

/usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstomx.so

I deleted the cache as you have suggested and confirmed that libgstomx.so exists. Yet,
gst-inspect-1.0 omxh264enc
No such element or plugin 'omxh264enc

I thought I figured a way to transcode the videos using Google Colab Pro, but I am only getting 120 fps. It is 3 times faster than normal CPU, but still not fast enough. Plus it kicks me out after two hours

This is how I was able to get 120 FPS on Google Colab with their built-in ffmpeg:
!ffmpeg -vsync 0 -threads 0 -hwaccel auto -i “$inputFile” -c:v h264_nvenc -pix_fmt yuv420p -preset slow -rc vbr_hq -b:v 8M -maxrate:v 10M -c:a aac -b:a 224k -y “$outputPath”“$fileName”.mp4 -loglevel info -stats

So, google Colab Pro is also not an option…arghhh…

Ok, a little bit of progress. I found another Xavier in the other building. It is running too. But, this one has R32!

R32 (release), REVISION: 3.1, GCID: 18284527, BOARD: t186ref, EABI: aarch64, DATE: Mon Dec 16 21:38:34 UTC 2019

I removed cache:

rm .cache/gstreamer-1.0/registry.aarch64.bin

and when I do inspect, it gives me really strange errors. If I run inspect again, it then tellms plugin not found:

Error: Can’t initialize nvrm channel
Error: Can’t initialize nvrm channel
Couldn’t create ddkvic Session: Cannot allocate memory
nvbuf_utils: Could not create Default NvBufferSession

But as I was writing this and I did inspect again - it gave me this:

sudo gst-inspect-1.0 nvv4l2h264enc
Factory Details:
Rank primary + 1 (257)
Long-name V4L2 H.264 Encoder
Klass Codec/Encoder/Video
Description Encode H.264 video streams via V4L2 API
Author ayaka ayaka@soulik.info

Plugin Details:
Name nvvideo4linux2
Description Nvidia elements for Video 4 Linux
Filename /usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstnvvideo4linux2.so
Version 1.14.0
License LGPL
Source module nvvideo4linux2
Binary package nvvideo4linux2
Origin URL http://nvidia.com/

I tried to call it again and …
sudo gst-inspect-1.0 nvv4l2h264enc
No such element or plugin ‘nvv4l2h264enc’

I also noticed that if I use @sudo@ in front of my gst calls, it says it finds the device. If I do not use it, it tells me that it cannot find the device,

If I then remove cache, query the version, then it gst-inspect works… What is going on???
I am so confused…

Hi,
We don’t see the issue on a clean flashed Xavier. Probably you have installed certain packages that overwrites some libraries.

Beside gstreamer, we support jetson_multimedia_api. You may try the samples in

/usr/src/jetson_multimedia_api/

Dane, you are wonderful, but you would like me to learn how to code now? :) I mean, I did volunteer as a sysadmin for the school, but my Linux know-how was all gained over the last three weeks at a great expense to the relationship with my lovely wife, bless her heart.

I really just need to make these 24 hr security videos we have more manageable… 200GB for 24 hr feed is a bit too much. Is there something out there that would help me convert what is now terabytes of security footage into something a bit more manageable?

Hi,
Have given information in

Just to share we also support jetson_multimedia_api on Jetson platforms. Don’t have other thoughts. If it is offensive, my apology for it.