ExoPlayer
ExoPlayer copied to clipboard
Can ConcatenatingMediaSource connect multiple video sources to achieve smooth transition at the connection?
I use ConcatenatingMediaSource to play multiple videos continuously, but sometimes it will pause for a while when playing the next video, is there a good solution to solve this problem, thank you
Have you tried to use the MediaItem
API and add multiple media items to the player, one for each video? The player should make transitions seamlessly (no pausing).
The demo app demonstrates this under "Playlists".
Thank you for your answer. My requirement is to crop the video and then splicing it together for playback, so I use ClippingMediaSource and ConcatenatingMediaSource for processing, but sometimes the two video connections can be played smoothly, sometimes it will stop for a while, what I need is how to solve it Can't play smoothly.
The version I'm currently relying on is 'com.google.android.exoplayer:exoplayer-core:2.11.4'
@marcbaechinger do you have any insights of the behavior of ConcatenatingMediaSource
in 2.11.4?
I think this is difficult to achieve because of #9319, #2347 and #5501.
Roughly, #9319 is about the codecs being flushed in between timeline items which results in the problem you are observing.
The other two issues are about the requirement that a media item is clipped at exactly a key frame boundary. If you have this clipping set at a key frame boundary, you may be able to disable flushing the codecs manually as mentioned in https://github.com/google/ExoPlayer/issues/9319#issuecomment-986946127
I think this is difficult to achieve because of #9319, #2347 and #5501.
Roughly, #9319 is about the codecs being flushed in between timeline items which results in the problem you are observing.
The other two issues are about the requirement that a media item is clipped at exactly a key frame boundary. If you have this clipping set at a key frame boundary, you may be able to disable flushing the codecs manually as mentioned in #9319 (comment)
@marcbaechinger Would you be able to provide a sample on how to manually disable codec flushing? I have been struggling with this issue for a while and could not find a solution. Thank you
I think we can close this issue as a combined duplicate of #9319 and #5501 because there is no additional feature tracked that isn't covered by these items already.