# How can I the get context of the video stream about a frame when the capsule running process\_frame?

**URL:** <https://forum.aotu.ai/t/how-can-i-the-get-context-of-the-video-stream-about-a-frame-when-the-capsule-running-process-frame/140>\
**Category:** Questions\
**Created:** [December 16, 2020, 7:07am UTC](https://forum.aotu.ai/t/how-can-i-the-get-context-of-the-video-stream-about-a-frame-when-the-capsule-running-process-frame/140 "2020-12-16T07:07:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![huanzi](https://avatars.discourse-cdn.com/v4/letter/h/db5fbb/32.png) [@huanzi](https://forum.aotu.ai/u/huanzi)\
**Post date:** [December 16, 2020, 7:07am UTC](https://forum.aotu.ai/t/how-can-i-the-get-context-of-the-video-stream-about-a-frame-when-the-capsule-running-process-frame/140/1 "2020-12-16T07:07:55Z")

</div>

I would get video stream address when capsule running `process_frame` interface,but I didn’t find the relevant interface or property  
有没有微信交流群?留一个！

---

<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:** [December 16, 2020, 5:46pm UTC](https://forum.aotu.ai/t/how-can-i-the-get-context-of-the-video-stream-about-a-frame-when-the-capsule-running-process-frame/140/2 "2020-12-16T17:46:54Z")

</div>

Hi Huanzi,

Thank you for joining the community and using BrainFrame! We’re glad to have you.

> I would get video stream address when capsule running `process_frame` interface,but I didn’t find the relevant interface or property

This is a great question. Capsules do not have information about how to connect the stream, because that’s something that BrainFrame (the capsule runtime) handles for you.

Shown below is the [architecture diagram](https://aotu.ai/docs/user_guide/technical_introduction/) for BrainFrame. As you can see, Gstreamer handles connecting to cameras and extracting frames, and the capsules handle processing the frames and the algorithms.

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

**Could you help me understand what you need the video stream address for?**

If you are looking to save variables on a per-stream basis, you can use [the `StreamState` interface](https://openvisioncapsules.readthedocs.io/en/latest/stream_state.html), which is useful for trackers that need to hold information on a per-stream basis across the lifetime of the stream. I’d happily explain more, if that’s something you’re interested in?

> 有没有微信交流群?留一个！

Here you go!  
 ![image](https://us1.discourse-cdn.com/flex019/uploads/aotu/original/1X/200abb67264c6235bc71a3dd0d8c3655e7e43f74.png)
