Skip silences between tracks only

Feature description:

A player option similar to Skip silence (all) that suppresses silences between tracks but not within tracks.

Brought benefits:

Continuous playback of songs, radio-like (not crossfade).

Additional description and context:

As mentionned here, Skip silence (all) is meant to be used with Audio books, but I really like how it handles transitions between music tracks. Unfortunately when the track contains silences, those are skipped too.

Screenshots / Mockup:

Not really a mockup but a suggestion of how to implement this (not sure if feasible). I get that ExoPlayer only supports skipping all silences or none. Would it be possible to enable it a few seconds before the end of a track and disable it a few seconds after the beginning of the next?

2 Likes

That’s not really possible by default.

There’s no way to know the proper values to only do this once per file and it could lead to packet loss during flush.

With that said with the merge of Format passed to audioSink.configure is missing information. by Tolriq · Pull Request #594 · androidx/media · GitHub it’s now theoretically possible to build a new SilenceSkippingAudioProcessor that could do that as the processors can now properly detect media changes. So could internally handle the need by only skipping silence at start and end once and only when needed.

This is not that hard, but not that easy either, and I’m not sure I’ll have time to play with that, but if you know Java / Kotlin and can build such AudioProcessor I can definitively implement it.