# BrainFrame Client error

**URL:** <https://forum.aotu.ai/t/brainframe-client-error/21>\
**Category:** Questions\
**Created:** [February 21, 2020, 6:19am UTC](https://forum.aotu.ai/t/brainframe-client-error/21 "2020-02-21T06:19:03Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![xiaofei](https://avatars.discourse-cdn.com/v4/letter/x/b77776/32.png) [@xiaofei](https://forum.aotu.ai/u/xiaofei)\
**Post date:** [February 21, 2020, 6:19am UTC](https://forum.aotu.ai/t/brainframe-client-error/21/1 "2020-02-21T06:19:03Z")

</div>

1. Error importing local video to Client ，Are there any other requirements for importing local videos? It doesn’t seem to be mentioned in the documentation  

2. Error occurs when opening the webcam,too . And other tools can normally open the video of the rtsp address  

3. The program crashed with the message “An exception occurred, the client must be closed”  

4. My server address is set as follows. Is there an error?  

5.Other error messages when open client

 ![18-报错信息](https://us1.discourse-cdn.com/flex019/uploads/aotu/original/1X/24e5023321018ec919f7c5bd13e5cc8497b9075d.png)

---

<div class="post-metadata">

**Author:** ![tyler.compton](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.aotu.ai/tyler.compton/32/27_2.png) [@tyler.compton](https://forum.aotu.ai/u/tyler.compton)\
**Post date:** [February 21, 2020, 5:59pm UTC](https://forum.aotu.ai/t/brainframe-client-error/21/2 "2020-02-21T17:59:58Z")

</div>

Hi Xiaofei, welcome to the forum and thanks for posting!

> [@xiaofei](#):
>
> Error importing local video to Client ，Are there any other requirements for importing local videos? It doesn’t seem to be mentioned in the documentation

Yes, the documentation about this needs to be updated. To stream a video file, move that file to the same directory as your `docker-compose.yml` on the server side. Then, create a new stream with the file path `/working_dir/video_t1.mp4`.

> [@xiaofei](#):
>
> Error occurs when opening the webcam,too

Would you mind showing us the device ID you’re using and the error that you get?

> [@xiaofei](#):
>
> And other tools can normally open the video of the rtsp address

It looks like the URL you’re providing is an IP address. RTSP URLs have to start with “rtsp://” and often have additional information in the URL that BrainFrame needs in order to connect. The documentation on this can be [found here](https://aotu.ai/docs/user_guide/streams/#ip-cameras). Basically, the format looks like this:

`rtsp://[username]:[password]@[ip]/[path]`

Not all RTSP streams need a path, so it may not be necessary in your case. If you can give us the make and model of your IP Camera, we may be able to help you figure out this RTSP URL!

> [@xiaofei](#):
>
> The program crashed with the message “An exception occurred, the client must be closed”

This looks like a bug we found in the v0.23.0 version of the client. Please download the latest v0.23.1 release from our [Downloads page](https://aotu.ai/docs/downloads/), which has this issue fixed.

---

<div class="post-metadata">

**Author:** ![xiaofei](https://avatars.discourse-cdn.com/v4/letter/x/b77776/32.png) [@xiaofei](https://forum.aotu.ai/u/xiaofei)\
**Post date:** [February 24, 2020, 5:46am UTC](https://forum.aotu.ai/t/brainframe-client-error/21/3 "2020-02-24T05:46:53Z")

</div>

I tried again and upgraded both the server and client to v0\_23\_1.Opening the camera of the local video file and RTSP address still fails, and the prompt message seems to be the same as the version of v0\_23\_0. As follows:

1. Failed to open RTSP address camera，The failure information is shown in the red box in the picture  

2. The same error occurred when opening the local video file. At this time, the video file and docker-compose.yml are in the same path  

3.When the new version of the client is opened and run, if you choose to click close, the program will crash, as shown in the figure below

 ![9-关闭客户端后，程序仍未退出，输入ctrl c，提示奔溃](https://us1.discourse-cdn.com/flex019/uploads/aotu/original/1X/dacffbb12480c9103a267029fad26f2c0f413773.png)

4.Server running at this time

 ![4-运行版本信息](https://us1.discourse-cdn.com/flex019/uploads/aotu/original/1X/853c4021e843af45ccaea30d84ef7d41d7ae7931.png)  
 ![10-运行客户端版本信息](https://us1.discourse-cdn.com/flex019/uploads/aotu/original/1X/2585cdca59c738d477b965299cb03d6271393058.png)

---

<div class="post-metadata">

**Author:** ![tyler.compton](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.aotu.ai/tyler.compton/32/27_2.png) [@tyler.compton](https://forum.aotu.ai/u/tyler.compton)\
**Post date:** [February 24, 2020, 5:52pm UTC](https://forum.aotu.ai/t/brainframe-client-error/21/4 "2020-02-24T17:52:27Z")

</div>

> [@xiaofei](#):
>
> Failed to open RTSP address camera，The failure information is shown in the red box in the picture

That is a 401 Unauthorized error, which usually means that the provided username and password for the stream is incorrect or no username and password is provided. Are you putting the username and password for the IP camera in the URL?

> [@xiaofei](#):
>
> The same error occurred when opening the local video file. At this time, the video file and docker-compose.yml are in the same path

You’re on the right track, but the current solution is confusing. Instead of using the file explorer to select the file, type in “/working\_dir/video\_t1.mp4”. We’re looking to improve this experience in the future to make this process easier and more clear.

> [@xiaofei](#):
>
> 3.When the new version of the client is opened and run, if you choose to click close, the program will crash, as shown in the figure below

It looks like you closed the client with `Ctrl+C`. This prevents the client from closing gracefully, and you’ll get the `KeyboardInterrupt` error. This is usually harmless, but I would recommend closing the client with the “X” on the top right of the window instead.

---

<div class="post-metadata">

**Author:** ![xiaofei](https://avatars.discourse-cdn.com/v4/letter/x/b77776/32.png) [@xiaofei](https://forum.aotu.ai/u/xiaofei)\
**Post date:** [February 25, 2020, 2:50am UTC](https://forum.aotu.ai/t/brainframe-client-error/21/5 "2020-02-25T02:50:55Z")

</div>

1. Yes, The mosaic part in the picture used to be the account and password. I used this address to open it in vlc media player.  

2. I tried, it shows same error

3. Yes, I did click “X” to close the client . But the terminal command line did not respond, so I had to type “ctrl + C” to close.

Thanks so much for your response！

---

<div class="post-metadata">

**Author:** ![alex.thiel](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.aotu.ai/alex.thiel/32/48_2.png) [@alex.thiel](https://forum.aotu.ai/u/alex.thiel)\
**Post date:** [February 25, 2020, 5:26am UTC](https://forum.aotu.ai/t/brainframe-client-error/21/6 "2020-02-25T05:26:09Z")

</div>

1. 

Hmm, very interesting! To help us figure out the issue, could you run the following command?

```bash
GST_DEBUG=3 gst-play rtsp://your-url-here

```

Please send the logs from this command. Thank you!

1. 

In the screenshot you put “/opt/BrainFrame/video\_t1.mp4”. The “video\_t1.mp4” has to be in the root directory as the docker-compose.yml.

```bash
└── BrainFrame
    ├── docker-compose.yml
    └── video_t1.mp4

```

Then, make your file path == “/working\_dir/video\_t1.mp4”

1. 

I’m not sure why the client is taking a long time to close. Usually, it will wait until all videostream connections have been closed cleanly. Maybe it’s taking a long while? Either way, it’s not a big deal.

---

<div class="post-metadata">

**Author:** ![xiaofei](https://avatars.discourse-cdn.com/v4/letter/x/b77776/32.png) [@xiaofei](https://forum.aotu.ai/u/xiaofei)\
**Post date:** [February 25, 2020, 5:48am UTC](https://forum.aotu.ai/t/brainframe-client-error/21/7 "2020-02-25T05:48:20Z")

</div>

1. It shows like this:  

2. It works when I make file path == “/working\_dir/video\_t1.mp4”, Great!  
 ![13-本地文件路径OK后，能够读取视频](https://us1.discourse-cdn.com/flex019/uploads/aotu/original/1X/0dab31d913f5b656a89782a78d28e0d87506b1db.jpeg)

---

<div class="post-metadata">

**Author:** ![alex.thiel](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.aotu.ai/alex.thiel/32/48_2.png) [@alex.thiel](https://forum.aotu.ai/u/alex.thiel)\
**Post date:** [February 25, 2020, 7:46am UTC](https://forum.aotu.ai/t/brainframe-client-error/21/8 "2020-02-25T07:46:35Z")

</div>

Oops, sorry, I forgot to mention the dependencies.

To install gstreamer:

```auto
sudo apt install gstreamer1.0-plugins-{base,good,bad,ugly} gstreamer1.0-tools

```

To test the stream

```auto
GST_DEBUG=3 gst-play rtsp://your-url-here

```

---

<div class="post-metadata">

**Author:** ![xiaofei](https://avatars.discourse-cdn.com/v4/letter/x/b77776/32.png) [@xiaofei](https://forum.aotu.ai/u/xiaofei)\
**Post date:** [February 25, 2020, 8:50am UTC](https://forum.aotu.ai/t/brainframe-client-error/21/9 "2020-02-25T08:50:17Z")

</div>

Error messager is following， please check：

 ![16-调试提示错误](https://us1.discourse-cdn.com/flex019/uploads/aotu/original/1X/036028eefd1404c365a8c1eabc88e4fab47df754.png)

按“k”键来显示键盘快捷键列表。  
正在播放 rtsp://admin:password@192.168.2.64:554/Streaming/Channels/101?transportmode=unicast  
0:00:00.378669369 9016 0x55f0679e6e70 WARN uridecodebin gsturidecodebin.c:1409:gen\_source\_element: error: “rtsp”未实现 URI 处理器。  
ERROR “rtsp”未实现 URI 处理器。 for rtsp://admin:password@192.168.2.64:554/Streaming/Channels/101?transportmode=unicast  
ERROR debug information: gsturidecodebin.c(1409): gen\_source\_element (): /GstPlayBin:playbin/GstURIDecodeBin:uridecodebin0  
到达播放列表结尾。

---

<div class="post-metadata">

**Author:** ![tyler.compton](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.aotu.ai/tyler.compton/32/27_2.png) [@tyler.compton](https://forum.aotu.ai/u/tyler.compton)\
**Post date:** [February 25, 2020, 5:26pm UTC](https://forum.aotu.ai/t/brainframe-client-error/21/10 "2020-02-25T17:26:13Z")

</div>

That’s strange, the error usually means that GStreamer RTSP plugins are not installed, but they should be included in the `gstreamer1.0-plugins-good` package. What happens if you run the following command?

```
gst-inspect-1.0 rtspsrc
```

---

<div class="post-metadata">

**Author:** ![xiaofei](https://avatars.discourse-cdn.com/v4/letter/x/b77776/32.png) [@xiaofei](https://forum.aotu.ai/u/xiaofei)\
**Post date:** [February 26, 2020, 7:40am UTC](https://forum.aotu.ai/t/brainframe-client-error/21/11 "2020-02-26T07:40:57Z")

</div>

No plugs ‘rtspsrc’  
So What to do next？ Any other ideas?

 ![17-调试提示错误](https://us1.discourse-cdn.com/flex019/uploads/aotu/original/1X/0ce5abca3521a04008665d6fd74ef36ed89fca13.jpeg)

---

<div class="post-metadata">

**Author:** ![alex.thiel](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.aotu.ai/alex.thiel/32/48_2.png) [@alex.thiel](https://forum.aotu.ai/u/alex.thiel)\
**Post date:** [February 26, 2020, 8:34am UTC](https://forum.aotu.ai/t/brainframe-client-error/21/12 "2020-02-26T08:34:05Z")

</div>

Are you sure that this command finished successfully?

> [@alex.thiel](#):
>
> ```auto
> sudo apt install gstreamer1.0-plugins-{base,good,bad,ugly} gstreamer1.0-tools
> 
> ```

If you wouldn’t mind, could you send me the output from that command?

---

<div class="post-metadata">

**Author:** ![xiaofei](https://avatars.discourse-cdn.com/v4/letter/x/b77776/32.png) [@xiaofei](https://forum.aotu.ai/u/xiaofei)\
**Post date:** [February 26, 2020, 8:54am UTC](https://forum.aotu.ai/t/brainframe-client-error/21/13 "2020-02-26T08:54:25Z")

</div>

LIke this？

 ![18-调试提示错误](https://us1.discourse-cdn.com/flex019/uploads/aotu/original/1X/372697a14a55d1f63b11e7cba3491cfdb6b97063.png)

---

<div class="post-metadata">

**Author:** ![alex.thiel](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.aotu.ai/alex.thiel/32/48_2.png) [@alex.thiel](https://forum.aotu.ai/u/alex.thiel)\
**Post date:** [February 26, 2020, 5:37pm UTC](https://forum.aotu.ai/t/brainframe-client-error/21/14 "2020-02-26T17:37:04Z")

</div>

I just realized- are you using Anaconda? 😨

 ![arrow](https://us1.discourse-cdn.com/flex019/uploads/aotu/original/1X/b7cbd5c3feefbbd790e4808cb220a28ccf947293.png)

We’ve had issues in the past with Anaconda, because it ships with it’s own version of gstreamer (and a limited subset of gstreamer plugins).

Could you try exiting the Anaconda environment then trying again?

```auto
conda deactivate
gst-inspect-1.0 rtspsrc

```

And if that works, then try the URL again?

```auto
GST_DEBUG=3 gst-play rtsp://your-url-here

```

---

<div class="post-metadata">

**Author:** ![alex.thiel](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.aotu.ai/alex.thiel/32/48_2.png) [@alex.thiel](https://forum.aotu.ai/u/alex.thiel)\
**Post date:** [February 27, 2020, 3:47am UTC](https://forum.aotu.ai/t/brainframe-client-error/21/15 "2020-02-27T03:47:51Z")

</div>

Okay! The problem has been solved remotely. For all future people who come looking at this thread, the end problem was that the rtsp camera password that @xiaofei had included an “@” symbol. This seems to confuse gstreamers parser, ending up with a “401 unauthorized” error on the client logs.

We changed the cameras’ passwords, and it worked fine!

Another possible solution is to replace the “@” in the client with “%40”. This is the url encoding for “@”, and will be parsed fine.

---

<div class="post-metadata">

**Author:** ![xiaofei](https://avatars.discourse-cdn.com/v4/letter/x/b77776/32.png) [@xiaofei](https://forum.aotu.ai/u/xiaofei)\
**Post date:** [February 27, 2020, 4:28am UTC](https://forum.aotu.ai/t/brainframe-client-error/21/16 "2020-02-27T04:28:48Z")

</div>

Great!! Well done!!  
@alex.thiel Thank you so much!
