I want my exoplayer to play low quality video around 360p. What parameter I have to set in trackselector.
-
Exo player will play like youtube adaptive streaming... – Gobu CSG Jul 14 '22 at 17:37
-
you are using DASH or HLS for streaming? – karan Dec 08 '22 at 12:22
-
or you are streaming from url like this https://storage.googleapis.com/exoplayer-test-media-1/gen-3/screens/dash-vod-single-segment/video-avc-baseline-480.mp4 – karan Dec 08 '22 at 12:23
1 Answers
If you mean that you want to ensure that the video is played at 360p, even if there are higher or lower bitrate renditions available, then this can be done manually by the user or programatically.
For the manual use case the user can select the desired rendition from the settings.
Programatically, which is what I suspect you mean, you can use 'player.setTrackSelectionParameters' to set certain constraints including 'Maximum and minimum video width, height, frame rate, and bitrate.'
More information is available in the online ExoPlayer documentation here: https://exoplayer.dev/track-selection.html
This link (at the time of writing) also includes information on selecting specific tracks in the media:
It’s possible to select specific tracks using TrackSelectionParameters. First, the player’s currently available tracks should be queried using Player.getCurrentTracks. Second, having identified which tracks to select, they can be set on TrackSelectionParameters using a TrackSelectionOverride

- 24,231
- 1
- 54
- 120
-
-
Take a look here - it shows a screen shot of the exoplayer demo app with manual selection: https://medium.com/google-exoplayer/exoplayer-2-x-track-selection-2b62ff712cc9 – Mick Nov 22 '22 at 08:57
-
can we lower the video quality of mp4 video playing from url like https://storage.googleapis.com/exoplayer-test-media-1/gen-3/screens/dash-vod-single-segment/video-avc-baseline-480.mp4 – karan Dec 08 '22 at 10:12
-
@Karan, your linked video stream appears to be an mp4 file which can be progressively downloaded. It does not appear to be an ABR DASH or HLS stream with multiple video quality streams. Hence there is only one video quality/resolution stream and you can't choose another higher or lower one. Take a look at this answer to see more about ABR, which may help explain : https://stackoverflow.com/a/42365034/334402 – Mick Dec 08 '22 at 11:01
-
@Mick so i can not decrease video quality by Streaming from this url https://storage.googleapis.com/exoplayer-test-media-1/gen-3/screens/dash-vod-single-segment/video-avc-baseline-480.mp4 right? – karan Dec 08 '22 at 11:46
-
@Karan, if you mean can you select a lower bit rate/resolution from the UI in the player then the answer is no, as there are no lower bit rates. You could transcode the video on the server side to a lower bit rate and then stream, or convert to ABR and then stream which would allow this but both of these require work on the server side. – Mick Dec 08 '22 at 12:12