aos-AVP
aos-AVP copied to clipboard
Add playback speed control with audio
Add capability to speed up video with same audio pitch to watch more in less time.
I hate to be the squeaky wheel here, but how are we doing on this front? I use this feature religiously on every media player I touch, so the lack of the feature here kinda threw me.
Any update on this? This seems like a basic feature in most video players now.
Looks like no progress
@Thewisem yes but there is already an issue open no need to have duplicates. Playback speed is on my todo but no time for now to make progress.
FYI implementation in progress. It works using audiotrack setspeed on playbackparams and scaling avos stream parser timestamps. What is still nok: subs are not yet at audioSpeed and on the fly adjustment of the playback speed causes crashes.
Updated status:
- on the fly playback speed modification KO (causes JNI error not in the
audio_interface_audiotrack_java:audiotrack_change_audio_speed
) - when using shield on samsung soundbar, playback speed has no effect (just player as well) but
AudioTrack
PlaybackParams
are correctly set (setSpeed
ok)
Update: on the fly playback is fixed but requires seeking to flush all previous timestamps and causes jump to closest iframe. It could be enhanced by waiting for the next iframe before applying the seek to not cause the time jump effect. Method to achieve this is to be found.
For soundbar problem issue happens when playing multichannel content only and adb shell dumpsys media.audio_flinger
reveals that two audio output are created for some reasons cf. logs.zip.
Workaround would be to downmix to stereo when changing playback speed (TBD).
Buffer wise in avos_mp_video.c
a 2x increase is performed stream_set_buffer_size(video->s, 48)
. TBD: make it dynamic. And VIDEO_MINDATA_SIZE
in stream.h
might need to be doubled but would probably cause extra wait at video start using streaming.