Requirements: A video player that can play video created with multi-angle cameras. (To be implemented in application that provides multi-angle views for sports) The camera angle switch part must be smooth similar to u-switch player at:
Initial setup: videos captured by normal camera, wowza streaming server for VOD(The protocol being used is HLS), amazon servers to store files, i'm getting url to videos that need to streamed.
Approach 1:
eg. http://[wowza-server]/[application]/mp4:[file_name_camera1]/playlist.m3u8
http://[wowza-server]/[application]/mp4:[file_name_camera2]/playlist.m3u8
--In android application,load data from next camera view in same video view when next is clicked. Prob: The switching is not smooth.
--Load data in buffer in background while first camera view url is being played. Prob: Continuous increase in size of buffer as well as network bandwidth consumption which is waste in case the user never loads next camera url.
Approach 2:
-Create single video with multiple video and audio tracks for multiple camera angles.
The single video must be timecode-alligned(Requires specific hardware e.g: wirecast,u-switch encoder etc)
Prob:
Default media player as well as exoplayer doesn't provide support for changing video tracks. However, Exoplayer supports adaptive streaming by switching to diff quality tracks in the stream for DASH and HLS.
I'm looking for help to either modify the TrackRenderer class in Exoplayer to add support for multi track selection and switching or any other solution that fits to the current problem.
More digging into exoplayer helped me understand that the player can handle multi-track selection for video as well.