# rtpSession

**URL:** <https://community.wowza.com/t/rtpsession/52957>\
**Category:** Wowza Streaming Engine\
**Created:** [March 8, 2019, 4:22am UTC](https://community.wowza.com/t/rtpsession/52957 "2019-03-08T04:22:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gustavo\_BM](https://avatars.discourse-cdn.com/v4/letter/g/67e7ee/32.png) [@Gustavo\_BM](https://community.wowza.com/u/Gustavo_BM)\
**Post date:** [March 8, 2019, 4:22am UTC](https://community.wowza.com/t/rtpsession/52957/1 "2019-03-08T04:22:14Z")

</div>

Hello!

Is it quite possible to get the last video keyframe from RTPSession (not tranconding, yes inbound stream)? Like IMediaStream.getLastKeyFrame()?

Regards,

---

<div class="post-metadata">

**Author:** ![Andrew\_Kennedy1](https://avatars.discourse-cdn.com/v4/letter/a/278dde/32.png) [@Andrew\_Kennedy1](https://community.wowza.com/u/Andrew_Kennedy1)\
**Post date:** [March 11, 2019, 12:13pm UTC](https://community.wowza.com/t/rtpsession/52957/2 "2019-03-11T12:13:12Z")

</div>

Hi,

If it is an inbound stream, so being published and you know the name you can use the Java API. Assuming the name of the stream is myStream

```auto
IMediaStream streamSource = appInstance.getStreams().getStream("myStream");
streamSource.getLastKeyFrame()

```

You can use the getLastKeyFrame on the stream, regardless of the inbound type.

Andrew.
