-
Notifications
You must be signed in to change notification settings - Fork 6k
Description
Hi I am trying to achieve the following media composition with two videos - a first video with no clipping applied that is then concatenated with a second clip that has the first 1000ms of playback clipped. The mode for this looks something like:
val firstVideo = createMediaSourceFromUrl(firstVideoSource)
val secondVideo = createMediaSourceFromUrl(secondVideoSource, clipStartMs: 1000)
val finalMediaSource = ConcatenatingMediaSource2.Builder()
.add(firstVideo)
.add(secondVideo)
.build()
However, I get the following error "Can't concatenate windows. A window has a non-zero offset in a period."
from this line in the ConcatenatingMediaSource2
implementation. I also noticed at the top of the class it specifically says it excludes ClippingMediaSource
's from being concat.
I'm trying to understand the way this class works a bit better and why the non-zero offset of the clipped media source prevents it from being concatenated and was wondering if anyone might be able to share some insights on this or if there is a way to achieve this (or the steps I might take to make my own Concat class that would support this)?
Thank you in advance! 🙌