# Python Deepstream 5.0 app with TX2 onboard and raspberry pi camera

**URL:** <https://forums.developer.nvidia.com/t/python-deepstream-5-0-app-with-tx2-onboard-and-raspberry-pi-camera/148954>\
**Category:** DeepStream SDK\
**Tags:** gstreamer, camera\
**Created:** [August 26, 2020, 9:57am UTC](https://forums.developer.nvidia.com/t/python-deepstream-5-0-app-with-tx2-onboard-and-raspberry-pi-camera/148954 "2020-08-26T09:57:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![DarkEvilz](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@DarkEvilz](https://forums.developer.nvidia.com/u/DarkEvilz)\
**Post date:** [August 26, 2020, 9:57am UTC](https://forums.developer.nvidia.com/t/python-deepstream-5-0-app-with-tx2-onboard-and-raspberry-pi-camera/148954/1 "2020-08-26T09:57:28Z")

</div>

**• Hardware Platform (Jetson / GPU): Nano and TX2**  
**• DeepStream Version: 5.0 GA**  
**• JetPack Version: 4.4**  
**• TensorRT Version: 7.1**

Hi,  
How can I change the input source in [deepstream-test1](https://github.com/NVIDIA-AI-IOT/deepstream_python_apps/tree/master/apps/deepstream-test1) from video file to live onbord camera in TX2 or raspberry pi camera in Nano.

Thank you.

---

<div class="post-metadata">

**Author:** ![Amycao](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/amycao/32/11342_2.png) [@Amycao](https://forums.developer.nvidia.com/u/Amycao)\
**Post date:** [August 27, 2020, 2:33am UTC](https://forums.developer.nvidia.com/t/python-deepstream-5-0-app-with-tx2-onboard-and-raspberry-pi-camera/148954/3 "2020-08-27T02:33:56Z")

</div>

You can use deepstream-app sample, and samples/configs/deepstream-app/source1\_csi\_dec\_infer\_resnet\_int8.txt is for CSI camera.

---

<div class="post-metadata">

**Author:** ![DarkEvilz](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@DarkEvilz](https://forums.developer.nvidia.com/u/DarkEvilz)\
**Post date:** [August 27, 2020, 7:40am UTC](https://forums.developer.nvidia.com/t/python-deepstream-5-0-app-with-tx2-onboard-and-raspberry-pi-camera/148954/4 "2020-08-27T07:40:37Z")

</div>

Thank you for the answer.  
I understand that we can use config file and start the application via  
deepstream-app -c source1\_csi\_dec\_infer\_resnet\_int8.txt

However, my task is required to work python because I need to extract the bounding box and other metadata to do some post processing.

In the example the file source gst pipeline start with this

```
print("Creating Source \n ")
source = Gst.ElementFactory.make("filesrc", "file-source")
if not source:
    sys.stderr.write(" Unable to create Source \n")

```

So, is it possible to start the gst pipeline with the CSI camera in python?

Edit: I have found the solution!

> [@Unable to run inference pipeline using csi camera source in deepstream python app](https://forums.developer.nvidia.com/t/unable-to-run-inference-pipeline-using-csi-camera-source-in-deepstream-python-app/111633/3):
>
> Below is a working main function. Please note that image flip is currently not supported. The nvvidconv plugin is deprecated and not fully compatible with other deepstream plugins due to buffer format differences. This will be addressed in an upcoming release of the SDK. def main(args): # Standard GStreamer initialization GObject.threads\_init() Gst.init(None) # Create gstreamer elements # Create Pipeline element that will form a connection of other elements print("Creat…

Thanks!

---

<div class="post-metadata">

**Author:** ![miguel1997caic](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@miguel1997caic](https://forums.developer.nvidia.com/u/miguel1997caic)\
**Post date:** [April 13, 2021, 4:57pm UTC](https://forums.developer.nvidia.com/t/python-deepstream-5-0-app-with-tx2-onboard-and-raspberry-pi-camera/148954/6 "2021-04-13T16:57:03Z")

</div>

Have you already done the changes and works ok?  
Could you share what changes are needed?  
Thanks @DarkEvilz

---

<div class="post-metadata">

**Author:** ![TomNVIDIA](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/tomnvidia/32/14181_2.png) [@TomNVIDIA](https://forums.developer.nvidia.com/u/TomNVIDIA)\
**Post date:** [October 12, 2021, 4:14pm UTC](https://forums.developer.nvidia.com/t/python-deepstream-5-0-app-with-tx2-onboard-and-raspberry-pi-camera/148954/7 "2021-10-12T16:14:33Z")

</div>

Closed on October 12, 2021, 4:14pm UTC


