Failed creating encoder avenc_mpeg4 in deepstream 5.1

Using below command I am trying to create encoder.
encoder = Gst.ElementFactory.make(“avenc_mpeg4”, “encoder”)

It return None and fails to create encoder. I tried “export LD_PRELOAD=/usr/lib/aarch64-linux-gnu/” but it also didn’t work. Help me.

Error Log:

Unable to create encoder
Traceback (most recent call last):
File “”, line 622, in
File “”, line 557, in main
encoder.set_property(“bitrate”, 2000000)
AttributeError: ‘NoneType’ object has no attribute ‘set_property’

Are you able to see the plugin in gst-launch-1.0 command:

$ gst-inspect-1.0 avenc_mpeg4

I used $ sudo gst-launch-1.0 avenc_mpeg4 and it shows:

ERROR: pipeline could not be constructed: no element “avenc_mpeg4”.

It should be gst-inspect-1.0. Have corrected the command. Please give it a try.

It says:

No such element or plugin ‘avenc_mpeg4’

It looks like you don’t install libav package. Please install it and try again:

$ sudo apt install gstreamer1.0-libav

It is already installed correctly.
$ sudo apt-get install gstreamer1.0-libav

Reading package lists… Done
Building dependency tree
Reading state information… Done
gstreamer1.0-libav is already the newest version (1.14.5-0ubuntu1~18.04.1).
The following packages were automatically installed and are no longer required:
apt-clone archdetect-deb bogl-bterm busybox-static cryptsetup-bin dpkg-repack gir1.2-timezonemap-1.0 gir1.2-xkl-1.0 grub-common kde-window-manager kinit kio kpackagetool5 kwayland-data kwin-common
kwin-data kwin-x11 libdebian-installer4 libkdecorations2-5v5 libkdecorations2private5v5 libkf5activities5 libkf5attica5 libkf5completion-data libkf5completion5 libkf5declarative-data
libkf5declarative5 libkf5doctools5 libkf5globalaccel-data libkf5globalaccel5 libkf5globalaccelprivate5 libkf5idletime5 libkf5jobwidgets-data libkf5jobwidgets5 libkf5kcmutils-data libkf5kcmutils5
libkf5kiocore5 libkf5kiontlm5 libkf5kiowidgets5 libkf5newstuff-data libkf5newstuff5 libkf5newstuffcore5 libkf5package-data libkf5package5 libkf5plasma5 libkf5quickaddons5 libkf5solid5
libkf5solid5-data libkf5sonnet5-data libkf5sonnetcore5 libkf5sonnetui5 libkf5textwidgets-data libkf5textwidgets5 libkf5waylandclient5 libkf5waylandserver5 libkf5xmlgui-bin libkf5xmlgui-data
libkf5xmlgui5 libkscreenlocker5 libkwin4-effect-builtins1 libkwineffects11 libkwinglutils11 libkwinxrenderutils11 libqgsttools-p1 libqt5designer5 libqt5help5 libqt5multimedia5
libqt5multimedia5-plugins libqt5multimediaquick-p5 libqt5multimediawidgets5 libqt5opengl5 libqt5quickwidgets5 libqt5sql5 libqt5test5 libxcb-composite0 libxcb-cursor0 libxcb-damage0 os-prober
python3-dbus.mainloop.pyqt5 python3-icu python3-pam python3-pyqt5 python3-pyqt5.qtsvg python3-pyqt5.qtwebkit python3-sip qml-module-org-kde-kquickcontrolsaddons qml-module-qtmultimedia
qml-module-qtquick2 rdate tasksel tasksel-data
Use ‘sudo apt autoremove’ to remove them.
0 upgraded, 0 newly installed, 0 to remove and 226 not upgraded.

$ sudo gst-inspect-1.0 avenc_mpeg4

No such element or plugin ‘avenc_mpeg4’

We can see the plugin. Not sure why you cannot see it. May try to clean gstreamer cache:

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

If the plugin is still missing, probably it is better to re-flash the system.

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