Use SeekParameters in ClippingMediaSource to snap clipping positions to keyframes
- Dominant language
- Java
- Stars
- 21.9k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
I have problem with ExoPlayer - ClippedMediaSource.
In application I have a source video.
From this video, I'd like to play content from start to end - in miliseconds, in sample app its:
start: 1140ms end 3140ms
I'd like to concat it with looped part of a video:
start: 3140ms end 34050ms
Looks like perfect scenario for ClippingMediaSource, LoopingMediaSource and ConcatenatingMediaSource.
I created sample application with code used for it:
https://github.com/bkraszewski/ExoPlayerSample/tree/master
Also you can take a look at video captured:
https://www.youtube.com/watch?v=SOBl6biAUgI
Hoverer I noticed transition between start part and looped part is not smooth, there is a visual glitch when switching part. In docs I found that I need to make sure time match keyframes - but can I make it dynamically?
There is a way to find closest frame to exact moment of video ending so I can adjust clipping time?
This video is just a sample, but our IOS team is using similar logic to stitch videos with same start/end params and its smooth.
Testing ENV:
ExoPlayer 2.9.5 (previously tested with 2.9.4, same result)
Android Studio 3.3
Phone: Samsung S8
Contributor guide
Assessment
This issue has not been assessed yet.