ExoPlayer icon indicating copy to clipboard operation
ExoPlayer copied to clipboard

Saving Clipped Media Source

Open ntohill95 opened this issue 8 years ago • 3 comments

I am having an issue when trying to save a video after using ClippingMediaSource. I want to be able to store the clip after it has been trimmed. Can this be done?

Is ClippingMediaSource simply only to playback a section of the MediaSource or can it be used to trim a clip?

ntohill95 avatar Aug 06 '18 08:08 ntohill95

Could you elaborate on what you mean by saving/storing a video? As you say, ClippingMediaSource is intended for playing back part of another media source. If you want to cache the clip I think that should just work in the normal way with CacheDataSource.

andrewlewis avatar Aug 06 '18 10:08 andrewlewis

I want to edit a video clip and save the new trimmed version to storage. Thank you for the quick response i will investigate CacheDataSource

ntohill95 avatar Aug 06 '18 10:08 ntohill95

I'm afraid ExoPlayer doesn't provide a way to save media streams to storage. For example, if you wanted to produce an MP3 file with the first thirty seconds removed, ExoPlayer does not support that. CacheDataSource will cache media in its own internal format, so it won't help with this.

andrewlewis avatar Aug 06 '18 11:08 andrewlewis