Adds fast seeking for exoplayer. (Note: it also depends on the amount of video encoding, mainly IDR Frames)


How to install

repositories {
    maven {
        url ""

dependencies {
    implementation 'com.github.kibotu:FastExoPlayerSeeker:-SNAPSHOT'

How to use

Create Emitter

val emitter = SeekPositionEmitter()

Create Observable

        logv("seekTo=${it.first} isSeeking=${it.second}")
    }, { loge("${it.message}") })
    .addTo(subscriptions) // don't forget to dispose when you're done!


I've had good results increasing the amount if IDR frames using the following script which in term will help exoplayer snap to those sync frames and improve scrubbing.

#!/usr/bin/env bash
# change iframe rate
# -movflags faststart
#  Run a second pass moving the index (moov atom) to the beginning of the file. This operation can take a while, and will not work in various situations such as fragmented output, thus it is not enabled by default.
# -movflags rtphint
#  Add RTP hinting tracks to the output file.
# -c:v libx264
# -c codec codec name
# -profile profile set profile
# Another optional setting is -profile:v which will limit the output to a specific H.264 profile.
# Omit this unless your target device only supports a certain profile (see Compatibility).
# Current profiles include: baseline, main, high, high10, high422, high444. Note that usage of -profile:v is incompatible with lossless encoding.
#  -keyint_min E..V…. minimum interval between IDR-frames (from INT_MIN to INT_MAX) (default 25)
ffmpeg -i inputvide.mp4 -c:v libx264 -profile:v baseline -level 3.0 -x264opts keyint=10:min-keyint=10 -g 10 -movflags +faststart+rtphint -maxrate:v 4000k -bufsize:v 4500k outputvideo.mp4

How to build

graldew clean build


gradlew clean assembleRelease test javadoc

Build Requirements

  • JDK8
  • Android Build Tools 28.0.3
  • Android SDK 28