-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to play sections of a video (eg: 0:10s - 0:30s) #1988
Comments
Thanks @andrewlewis for picking it up.. Any quick suggestions on how we could implement it currently? Seeking manually is an option, though not the best. |
ClippingMediaSource wraps a single period/window video-on-demand source and exposes a specified time range within it. Issue: #1988 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=141991215
@satyan Sorry for not replying sooner. Please try out ClippingMediaSource and let us know if this does what you need. You can compose ClippingMediaSources in a ConcatenatingMediaSource or LoopingMediaSource as required. An important caveat is that when playback transitions into a ClippingMediaSource the player needs to do a frame-exact seek operation. To avoid buffering you therefore need to ensure that the clipping start point corresponds to a synchronization sample/key-frame. (Playback should work even if you don't do this, but transitions from one source to the next will not be seamless.) |
@andrewlewis ClippingMediaSource was removed from 2.1.0 release . should we import it manually ?
|
ClippingMediaSource is currently in the dev-v2 branch, so presumably will be available in future releases. |
Thanks for including this quickly.. It worked beautifully for my case. |
It will be available in 2.2.0. |
I'm looking at version 2.x of the API and trying to figure out if I could play sections of a video. eg: play only certain sections in a 1 minute video (eg: 10s- 30s then 40-50s).
Could use seek, but each section would start buffering initially.. and playback doesn't seem smooth.
I tried using the ConcatenatingMediaSource, (providing the same media multiple times, with different timeline). Though, couldn't figure out how to set the start and end time with the Timeline API.
Any suggestions would be helpful. Thanks.
The text was updated successfully, but these errors were encountered: