# How to apply hardware acceleration for RTSP streaming on Android?

**URL:** <https://discourse.gstreamer.org/t/how-to-apply-hardware-acceleration-for-rtsp-streaming-on-android/852>\
**Category:** General Discussion\
**Tags:** android\
**Created:** [January 19, 2024, 3:00pm UTC](https://discourse.gstreamer.org/t/how-to-apply-hardware-acceleration-for-rtsp-streaming-on-android/852 "2024-01-19T15:00:48Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joe](https://discourse.gstreamer.org/letter_avatar_proxy/v4/letter/j/b9e5f3/32.png) [@Joe](https://discourse.gstreamer.org/u/Joe)\
**Post date:** [January 19, 2024, 3:00pm UTC](https://discourse.gstreamer.org/t/how-to-apply-hardware-acceleration-for-rtsp-streaming-on-android/852/1 "2024-01-19T15:00:48Z")

</div>

I use VA-API for this on Linux. I know VA-API was made for Intel cards. Does it work for Android as well?

---

<div class="post-metadata">

**Author:** ![tpm](https://discourse.gstreamer.org/letter_avatar_proxy/v4/letter/t/c5a1d2/32.png) [@tpm](https://discourse.gstreamer.org/u/tpm)\
**Post date:** [January 19, 2024, 6:02pm UTC](https://discourse.gstreamer.org/t/how-to-apply-hardware-acceleration-for-rtsp-streaming-on-android/852/2 "2024-01-19T18:02:54Z")

</div>

There’s the `androidmedia` plugin for Android.

---

<div class="post-metadata">

**Author:** ![Joe](https://discourse.gstreamer.org/letter_avatar_proxy/v4/letter/j/b9e5f3/32.png) [@Joe](https://discourse.gstreamer.org/u/Joe)\
**Post date:** [January 19, 2024, 6:25pm UTC](https://discourse.gstreamer.org/t/how-to-apply-hardware-acceleration-for-rtsp-streaming-on-android/852/3 "2024-01-19T18:25:57Z")

</div>

It is included in my app. will androidmedia + avdec\_h264/5 have hardware acceleration? Any other settings needed?

---

<div class="post-metadata">

**Author:** ![tpm](https://discourse.gstreamer.org/letter_avatar_proxy/v4/letter/t/c5a1d2/32.png) [@tpm](https://discourse.gstreamer.org/u/tpm)\
**Post date:** [January 19, 2024, 6:57pm UTC](https://discourse.gstreamer.org/t/how-to-apply-hardware-acceleration-for-rtsp-streaming-on-android/852/4 "2024-01-19T18:57:54Z")

</div>

`avdec_h264` etc will always be software decoders based on ffmpeg.

The `androidmedia` plugin will have its own `amcviddec-*` decoders which should be accelerated.

---

<div class="post-metadata">

**Author:** ![Joe](https://discourse.gstreamer.org/letter_avatar_proxy/v4/letter/j/b9e5f3/32.png) [@Joe](https://discourse.gstreamer.org/u/Joe)\
**Post date:** [January 20, 2024, 12:16am UTC](https://discourse.gstreamer.org/t/how-to-apply-hardware-acceleration-for-rtsp-streaming-on-android/852/5 "2024-01-20T00:16:55Z")

</div>

Thanks a lot for your reply. Are these decoders correct on Android?  
h264 decoder: amcviddec-omxgoogleh264decoder  
h265 decoder: amcviddec-omxgooglehevcdecoder

---

<div class="post-metadata">

**Author:** ![ystreet00](https://discourse.gstreamer.org/letter_avatar_proxy/v4/letter/y/3d9bf3/32.png) [@ystreet00](https://discourse.gstreamer.org/u/ystreet00)\
**Post date:** [January 20, 2024, 9:32am UTC](https://discourse.gstreamer.org/t/how-to-apply-hardware-acceleration-for-rtsp-streaming-on-android/852/6 "2024-01-20T09:32:12Z")

</div>

They will generally be software based. Hardware based codecs will have a different name. E.g. qualcomm chips will have something with qcom in the name Samsung chips exynos I think.

---

<div class="post-metadata">

**Author:** ![Joe](https://discourse.gstreamer.org/letter_avatar_proxy/v4/letter/j/b9e5f3/32.png) [@Joe](https://discourse.gstreamer.org/u/Joe)\
**Post date:** [January 22, 2024, 4:29pm UTC](https://discourse.gstreamer.org/t/how-to-apply-hardware-acceleration-for-rtsp-streaming-on-android/852/7 "2024-01-22T16:29:34Z")

</div>

Thanks for your reply. Where to get the exact name?

---

<div class="post-metadata">

**Author:** ![vivideradicator](https://discourse.gstreamer.org/letter_avatar_proxy/v4/letter/v/ec9cab/32.png) [@vivideradicator](https://discourse.gstreamer.org/u/vivideradicator)\
**Post date:** [May 31, 2024, 7:34pm UTC](https://discourse.gstreamer.org/t/how-to-apply-hardware-acceleration-for-rtsp-streaming-on-android/852/8 "2024-05-31T19:34:30Z")

</div>

Checkout my reply here:

> [@OMX Removal from GStreamer 1.24](https://discourse.gstreamer.org/t/omx-removal-from-gstreamer-1-24/1672/4):
>
> In GStreamer there are amcviddec-... elements that are created dynamically with the information given from Android MediaCodec. You can use this snippet of code: GList \*decoders = gst\_element\_factory\_list\_get\_elements(GST\_ELEMENT\_FACTORY\_TYPE\_DECODABLE, GST\_RANK\_MARGINAL); // Iterate through the list for (GList \*iter = decoders; iter != NULL; iter = iter-\>next) { GstElementFactory \*factory = (GstElementFactory \*) iter-\>data; // Ge…
