befovy / fijkplayer

ijkplayer for flutter. ijkplayer 的 flutter 封装。 Flutter video/audio player. Flutter media player plugin for android/iOS based on ijkplayer. fijkplayer 是基于 ijkplayer 封装的 flutter 媒体播放器,开箱即用,无需编译 ijkplayer
https://fijkplayer.befovy.com
MIT License
1.65k stars 354 forks source link

[BUG] player.setSpeed(2) is having no effect, speed is still 1 in video. #301

Open Gh05ts opened 4 years ago

Gh05ts commented 4 years ago

Describe the bug Not able to setSpeed to be greater than 1.

What attempts have you made to resolve this error ? I removed all setOption from my code and tried to run the player, still did not fix (even the ones in fijkplayer.dart).

To Reproduce Steps to reproduce the behavior:

  1. Load any video file (I noticed on m3u8)
  2. Use setSpeed() to change speed
  3. No change in speed if speed > 1

Expected behavior setSpeed() should change the speed to the amount set.

fijkplayer version Latest fijkplayer: ^0.8.7

Smartphone (please complete the following information): OS: Android 10, Phone: Motorola P30

Additional context I encountered the same issue with flutter ijk player (not fijk) in that player if we used setOptions(), the ability to play faster than 1 was also going, but if I did not use setOption() it would play faster than 1. In this version I can't play speeds greater than 1 even if I don't use setOption anywhere. The reason I had to switch from flutter ijk to fijk is because that player is not able to play ipv6 videos, while this player can play ipv6, it is not able to change speeds, pls help, could you either fix this issue in your version or help me understand how I can fix ipv6 issue in flutter ijkplayer?

Also, I'm not sure about this but, I noticed in fijk player I get the header in log on my ipv6 video, then perhaps in your java code you might be doing a set option in setnetworksource function for protocol_whitelist, because that is something I noticed in flutter ijkplayer, or it could be caused by some other setOption in java code, obviously using set option should not be disabling ability to play faster ideally but I'm not sure if that issue is related to implementation of ijk or fijk or with the ffmpeg itself.

befovy commented 4 years ago

Dose your video file has audio stream?

Gh05ts commented 4 years ago

Yes, it's a vimeo hls video, it comes with a audio stream and video playlists

This is what the master file looks like, I've removed the links to audio and video files with path/to/file.

#EXTM3U
#EXT-X-INDEPENDENT-SEGMENTS
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="audio-medium",NAME="audio",AUTOSELECT=YES,DEFAULT=YES,CHANNELS="1",URI="path/to/file"
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="audio-high",NAME="audio",AUTOSELECT=YES,DEFAULT=YES,CHANNELS="1",URI="path/to/file"

#EXT-X-STREAM-INF:CLOSED-CAPTIONS=NONE,BANDWIDTH=249902,AVERAGE-BANDWIDTH=135000,RESOLUTION=426x240,FRAME-RATE=25.000,CODECS="avc1.640015,mp4a.40.2",AUDIO="audio-medium"
path/to/file
#EXT-X-STREAM-INF:CLOSED-CAPTIONS=NONE,BANDWIDTH=383947,AVERAGE-BANDWIDTH=172000,RESOLUTION=640x360,FRAME-RATE=25.000,CODECS="avc1.64001E,mp4a.40.2",AUDIO="audio-medium"
path/to/file