Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chemicalbird/ExoPlayerTimelineView
Extracts video frames using ExoPlayer and show as a video timeline(FixedView, ScrollView)
https://github.com/chemicalbird/ExoPlayerTimelineView
android android-custom-view android-video exo-player exoplayer glsurfaceview opengl-es recyclerview timeline-view video-preview
Last synced: about 2 months ago
JSON representation
Extracts video frames using ExoPlayer and show as a video timeline(FixedView, ScrollView)
- Host: GitHub
- URL: https://github.com/chemicalbird/ExoPlayerTimelineView
- Owner: chemicalbird
- License: mit
- Created: 2020-06-08T17:14:01.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-08-27T09:15:38.000Z (about 4 years ago)
- Last Synced: 2024-07-27T11:39:16.780Z (2 months ago)
- Topics: android, android-custom-view, android-video, exo-player, exoplayer, glsurfaceview, opengl-es, recyclerview, timeline-view, video-preview
- Language: Java
- Size: 466 KB
- Stars: 29
- Watchers: 2
- Forks: 5
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ExoPlayerTimelineView
If you already use ExoPlayer in your project and need to extract video
frames and show them as a **timeline view** either scrollable or in a
fixed-width mode then you're in the right place.
You might already be familiar with `MediaMetadataRetriever` api and its
`getFrameAtTime(..)` method, I included adapter implementation(it's not
meant for production use) for comparison with `RetroInstance` API, which
caches frames internally and won't init any mediaCodec resource if
unnecessary. And it's running significantly faster.### Installation
Add this to your application module, inside *dependencies* block.
```sh
dependencies {
implementation 'com.chemicalbird.android:videotimelineview:0.0.4'
}
```### Usage example
1. For fixed frame list there is already an implementation of
`GLSurfaceView` that you can use out of the box. Your layout and code
goes like this.```sh
```
```sh
VideoTimeLine.with(fileUri).show(glSurfaceView);
```2. To create a frame grabber MediaRetriever implementation use
`RetroInstance`, for example pass it to your RecyclerView.Adapter. To
get a frame at specific time call
`retroInstance.load(presentationTime, callback)`. Checkout Sample
project for more details.```sh
RetroInstance retroInstance = new RetroInstance.Builder(context, mediaUri).setFrameSizeDp(180).create();
// in adapter
retroInstance.load(position * frameDuration, holder.hashCode(),
file -> imageLoader.load(file, imageView));
```