Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change quality of video streaming in ExoPlayer

i am creating IPTV app. In this use Exoplayer for video streaming and now requirement is change Quality of video at runtime (Auto, 720p, 1080p, HD) like Youtube.

i have found 2-3 solution but i don't understand how to implement that.

enter image description here

like image 317
Ankit Dubariya Avatar asked Jun 02 '19 15:06

Ankit Dubariya


People also ask

How do I change the bitrate on ExoPlayer?

ExoPlayer provides a way of setting a max bitrate using DefaultTrackSelector#Parameters . You can use setMaxVideoBitrate or setMaxVideoSize to limit the max bitrate.

What is HLS in ExoPlayer?

You can find its link here Introduction to Android ExoPlayer. In this blog, we are going to learn how to play live stream using ExoPlayer. We will be using HLS (HTTP Live Streaming) technology as communication protocol to serve the multimedia content. HLS is an adaptive streaming communications protocol.

Does ExoPlayer support Webrtc?

RTSP. ExoPlayer supports both live and on demand RTSP.


1 Answers

ExoPlayer will do this automatically if the requirement is simply to match the bitrate/quality to the device capabilities and current network conditions.

If you actually want to allow the user to select it manually, that is also supported using the track selector functionality in Exoplayer2:

  • https://stackoverflow.com/a/44068596/334402

The demo app available in GitHub includes TrackSelector functionality which you can look at and modify as you need - most apps just use the DefaultTrackSelector: https://github.com/google/ExoPlayer

like image 70
Mick Avatar answered Sep 27 '22 19:09

Mick