I want to implement the video function, so I implemented the functions of Playback, Stop, Pause, Fast Forward, Rewind.
However, I don't know how to implement double speed and slow playback, so I'm researching a lot.
Android's MediaPlayer
class doesn't have a speed-changing method, so I don't know how to implement it.
Please let me know if you have any knowledge.
android android-mediaplayer
You cannot change the playback speed using MediaPlayer
(or ViewoView
).
As you know, some of the many video playback player apps can adjust the playback speed.Once upon a time, I checked the libraries that these software depended on, but most software used ffmpeg in the backend. Similar Stack Overflow questions also introduce non-standard player components, but also rely on ffmpeg.It seems inconvenient to publish it, so if you have a detailed request, you will have to use ffmpeg to create your own video playback display.
reference:
MediaPlayer
Google provides ExoPlayer that implements considerable functionality as a user application.Based on this implementation, you can also play with the playback time management part.
https://github.com/google/ExoPlayer
© 2024 OneMinuteCode. All rights reserved.