-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Improve skipping silences. #12530
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
base: dev
Are you sure you want to change the base?
Improve skipping silences. #12530
Conversation
ExoPlayer allows controlling silence skipping by adjusting the silence duration that is removed by `SilenceSkippingAudioProcessor`. The default behavior with the default parameters for this component makes it hard to listen to content because it leaves almost no pauses. After this commit it is possible to adjust silence length that remains and shorten only long pauses.
|
Looking forward to this! |
|
Do I need to fix/change anything? It's been over 2 months, which is a lot for a tiny change, and there is zero feedback |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your pull request and sorry for the late reply.
Even if we don't accept new features (see the README), as the refactor branch will use NewPlayer with Media3 at some point, I think we can make an exception for this PR.
Code looks almost good to me, you should provide a way to reset the value set by the user.
| final SilenceSkippingAudioProcessor silenceSkippingAudioProcessor = | ||
| new SilenceSkippingAudioProcessor( | ||
| MILLISECONDS.toMicros(maxSilenceDurationMillis), | ||
| MILLISECONDS.toMicros(maxSilenceDurationMillis), | ||
| SilenceSkippingAudioProcessor.DEFAULT_SILENCE_THRESHOLD_LEVEL); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For reference for NewPlayer, this approach has been changed in Media3.
I would remove the duplicate call to MILLISECONDS.toMicros(maxSilenceDurationMillis) by saving the result in a variable.
Can you explain why you set the same value to minimumSilenceDurationUs and paddingSilenceUs?
| * load video extension libraries is not needed in our case and has been removed. This should be | ||
| * changed in the case an extension is shipped with the app, such as the AV1 one. | ||
| * </p> | ||
| */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The JavaDoc of this class should be updated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this nice addition! Sorry for the late review from my side, too. I haven't had enough time to keep up with the various PRs lately.
I agree with @AudricV, I think this can be merged as it's rather small and shouldn't introduce issues.
| app:singleLineTitle="false" | ||
| app:iconSpaceReserved="false"/> | ||
|
|
||
| <SeekBarPreference |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder whether this should go to the playback parameters dialog, so it's easily accessible from the player, and it also does not clutter settings. And there it should be shown only when "Fast-forward during silence" is enabled, to further reduce clutter for users that don't enable "Fast-forward during silence". Let me know what you think.
ExoPlayer allows controlling silence skipping by adjusting the silence duration that is removed by
SilenceSkippingAudioProcessor. The default behavior with the default parameters for this component makes it hard to listen to content because it leaves almost no pauses. After this commit it is possible to adjust silence length that remains and shorten only long pauses.What is it?
Description of the changes in your PR
Before/After Screenshots/Screen Record
Fixes the following issue(s)
APK testing
The APK can be found by going to the "Checks" tab below the title. On the left pane, click on "CI", scroll down to "artifacts" and click "app" to download the zip file which contains the debug APK of this PR. You can find more info and a video demonstration on this wiki page.
Due diligence