-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Expose properties for skipSilence #6705
Comments
Issue:#6705 PiperOrigin-RevId: 310907118
Issue:#6705 PiperOrigin-RevId: 310907118
Hi, the above referenced commit has added the functionality you were hoping to see. To use this, you would have to pass a custom SilenceSkippingAudioProcessor to the DefaultAudioSink. However to do this, you will need to override the DefaultRenderersFactory, changing the buildAudioRenderers method (which is where the DefaultAudioSink is created). The following snippet is an example of how you would create a DefaultRenderersFactory with this change.
|
Issue:#6705 PiperOrigin-RevId: 310907118
Issue:#6705 PiperOrigin-RevId: 310907118
Is it on the roadmap for these parameters to be applied from the SimpleExoPlayer class rather than it being set with the factory? |
Yes, but it's a low priority enhancement. |
Thank you, and thanks for your work. |
#5165 # [REQUIRED] Use case description
I was using an app that had a "skip silence" feature and while using it I thought to myself "This is very useful but I would like to adjust the replacement silence as it's a bit too abrupt. This seems like a simple fix and if it were open source I just might do it myself." Turns out it is open source and uses ExoPlayer.
So this feature request is if those properties can be exposed to change the properties of skip silence.
This description is a little long-winded but I want to it make clear how I'm not actively involved in ExoPlayer and not to come off seeming I know more than I do.
Proposed solution
I checked
SilenceSkippingAudioProcessor.java
and it hasPADDING_SILENCE_US
which seems to be what I was looking for, also it declared as static so I'm not sure if it can be changed realtime. There are also useful properties such as what's considered silence.So a system where this:
SkipSilenceProperties skipSilence = new PlaybackParameters.SkipSilenceProperties(200, 300, .5); // Padding in ms, Length Detection in ms, Threshold declared as a float from 0-1 player.setPlaybackParameters(skipSilence);
code can be executed, or something like it.
Alternatives considered
Ignoring this issue by saying who would want to make such changes to
skip silence
. Our presets are golden and to say otherwise is akin to blasphemy. Let's put this in the bin where we put that proposal those folks suggested for performance improvements.-yak27
The text was updated successfully, but these errors were encountered: