3

I am facing some with androidFfmpeg library on video seek.

Can anyone help me out on this reported issue. jni_player_seek problem

TheFlash
  • 5,997
  • 4
  • 41
  • 46
Steve
  • 385
  • 1
  • 16

2 Answers2

1

If I saw that correctly, the Android FFMPEG library uses android.widget.SeekBar in its VideoActivity .

You might have to call the method onFFUpdateTime(long currentTimeUs, long videoDurationUs, boolean isFinished) or implement a seekbar yourself according to this tutorial.

Calon
  • 4,174
  • 1
  • 19
  • 30
  • That's fine I have used that. But what happens inside is it call player.seekNative(params[0].longValue()) which is in FFmpegPlayer.java and this seekNative is not returning video frame sequentially on moving the video backward. – Steve Sep 06 '13 at 09:58
  • On Seeking the video for large amount of time, The video takes time to load and seek bar flutter ........ Is there any way for smoothing the frames on seeking. – Steve Sep 06 '13 at 10:05
  • The FFmpegPlayer#seekNative is calling "private native void seekNative(int position) throws NotPlayingException;" . Using some JNI magic there, it seems. so if you have to change that behaviour, you'll have to find out what native method it is calling, or define that seekbar yourself, I'd say. But I can't figure out what exactly that method is calling there. You'll have to get a grasp on someone with more experience with that Player. – Calon Sep 09 '13 at 07:39
  • I have gone inside all its jni calls and tried to modify the seek in the C code but it has so many mutex declaration. Very difficult to understand what is happening inside. Please someone guide me what should I do .. – Steve Sep 09 '13 at 07:52
0

Currently player_seek is using Asynchtask, You should run play_seek on main thread, do not use Asynchtask.

I am running on main thread and player_seek is working as expecting.

Sinh Ho
  • 430
  • 3
  • 11