Encoder.set_property("bitrate", 2000000) AttributeError: 'NoneType' object has no attribute 'set_property'

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU)-jetson agx xavier
• DeepStream Version-6.1
• JetPack Version (valid for Jetson only)-
• TensorRT Version -8.4.1
• NVIDIA GPU Driver Version (valid for GPU only)
• Issue Type( questions, new requirements, bugs)
• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing)
• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)

I am trying to run the sample deepstream-opticalflow app using python. when I run the command

python3 deepstream-opticalflow.py file:///opt/nvidia/deepstream/deepstream-6.1/samples/streams/sample_720p.mp4

I have the following error.

Creating Pipeline

Creating streamux

Creating source_bin 0

Creating source bin
source-bin-00
Creating tiler

Creating nv optical flow element

Creating nv optical flow visualisation element

Creating queue

Creating queue

Creating Queue

Creating nvosd

Creating converter 2

Creating capsfilter

Creating Encoder

Unable to create encoder
Traceback (most recent call last):
File “deepstream-opticalflow.py”, line 377, in
sys.exit(main(sys.argv))
File “deepstream-opticalflow.py”, line 288, in main
encoder.set_property(“bitrate”, 2000000)
AttributeError: ‘NoneType’ object has no attribute ‘set_property’

How do I resolve this error.

It seems to be a problem with your environment.
First, you can install deepstream step by step by referring to the link below:
https://docs.nvidia.com/metropolis/deepstream/dev-guide/text/DS_Quickstart.html#jetson-setup
Second, you should install the python binding step by step by referring to the link below:
https://github.com/NVIDIA-AI-IOT/deepstream_python_apps/tree/master/bindings
Please make sure the version of DeepStream when you install it.

Hi, I have successfully installed deepstream and python bindings. I can run the other test apps successfully. This problem comes only when I run deepstream-opticalflow app.

There is no update from you for a period, assuming this is not an issue anymore. Hence we are closing this topic. If need further support, please open a new one. Thanks

It seems that some plugins are not installed. You can try to install dependent plugins with the command below:

apt-get install -y gstreamer1.0-libav
apt-get install --reinstall -y gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly libavresample-dev libavresample4 libavutil-dev libavutil56 libavcodec-dev libavcodec58 libavformat-dev libavformat58 libavfilter7 libde265-dev libde265-0 libx264-155 libx265-179 libvpx6 libmpeg2encpp-2.1-0 libmpeg2-4 libmpg123-0

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