How can I implement double speed or slow video playback on Android?

Asked 2 years ago, Updated 2 years ago, 46 views

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

2022-09-30 20:15

2 Answers

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:


2022-09-30 20:15

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


2022-09-30 20:15

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.