Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhanced silence skipping implementation #7423

Open
jakoss opened this issue May 25, 2020 · 2 comments
Open

Enhanced silence skipping implementation #7423

jakoss opened this issue May 25, 2020 · 2 comments

Comments

@jakoss
Copy link

jakoss commented May 25, 2020

Issue description

We are playing HLS tracks and facing skip silence issues. Attached project reproduces problem exactly. On some track, especially on film music, skip silence just rolls over few second with no apparent reason. This produces very strange audio glitches and it's confusing for the end user.

Reproduction steps

SkipSilenceRepro.zip
Run attached project, then seek to 40th second. The issue is very apparent on span 40-46 seconds of this track. If we turn off skip silence - everything works perfectly.

Link to test content

Test content is embedded in attached reproduction code

A full bug report captured from the device

These is no bug on the device, no strange logs or errors in console.

Version of ExoPlayer being used

2.11.4

Device(s) and version(s) of Android being used

Any device we tested it on - Emulators, Samsung S6, OnePlus 7, Samsung Note 10 and so on

@andrewlewis
Copy link
Collaborator

The implementation in ExoPlayer at the moment is quite simple and doesn't fade the audio out/in across silent portions. I guess this may be causing the strange artifacts when there is music in the stream. We tested this feature on spoken content without music. We have a task on our roadmap to improve silence skipping (including ramping audio out/in) but it is currently low priority.

In the short term you may want to try tweaking the constants used by SilenceSkippingAudioProcessor. See the commits on #6705, which added the APIs to allow this. If you can get all the music to be classified as non-silence that may remove the artifacts.

@Samrobbo Could you take a look at this at some point?

@jakoss
Copy link
Author

jakoss commented May 26, 2020

Thanks for the answer, i will try and tweak those constants

@ojw28 ojw28 changed the title Skip silence cuts way too much audio inside the HLS track Enhanced silence skipping implementation Jun 11, 2020
copybara-service bot pushed a commit to androidx/media that referenced this issue Jan 29, 2024
The updated algorithm has two main improvements:
 - The silence padding is not constant but a ratio of the original
   silence (up to a defined max) to more naturally represent the
   original gaps.
 - The silence is not instantly going to zero, but uses a ramp down
   and up for a smooth volume transition and also retains a small
   percentage of the original noise for more natural "silences" that
   still contain some background noise.

#minor-release

Issue: google/ExoPlayer#7423
PiperOrigin-RevId: 602322442
copybara-service bot pushed a commit that referenced this issue Jan 29, 2024
The updated algorithm has two main improvements:
 - The silence padding is not constant but a ratio of the original
   silence (up to a defined max) to more naturally represent the
   original gaps.
 - The silence is not instantly going to zero, but uses a ramp down
   and up for a smooth volume transition and also retains a small
   percentage of the original noise for more natural "silences" that
   still contain some background noise.

#minor-release

Issue: #7423
PiperOrigin-RevId: 602322442
SheenaChhabra pushed a commit to androidx/media that referenced this issue Feb 9, 2024
The updated algorithm has two main improvements:
 - The silence padding is not constant but a ratio of the original
   silence (up to a defined max) to more naturally represent the
   original gaps.
 - The silence is not instantly going to zero, but uses a ramp down
   and up for a smooth volume transition and also retains a small
   percentage of the original noise for more natural "silences" that
   still contain some background noise.

#minor-release

Issue: google/ExoPlayer#7423
PiperOrigin-RevId: 602322442
(cherry picked from commit bb53333)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants