titansgroup / k4l-video-trimmer

A library with UI and mechanisms to trim local videos on Android applications.
MIT License
784 stars 224 forks source link

Video always starts from beginning #2

Open NegreaVlad opened 8 years ago

NegreaVlad commented 8 years ago

I expect the video to start playing from where the mHolderTopView is set. Instead each time I push play, the video plays from the beginning.

wesjon commented 8 years ago

Hello @NegreaVlad

Can you provide more details? (file format, codec, length, device, Android version, etc.)

NegreaVlad commented 8 years ago

Hello @wesjon I made a demo video: https://gfycat.com/BlueScentedCoyote

The video is filmed with the back camera. The video recording is launched from within the app. The device is a Samsung Galaxy S6 running Android 6.0.1. The file format is MP4.

wesjon commented 8 years ago

Thanks for the demo @NegreaVlad

I'm currently working on a small refactoring this weekend. I haven't started investigating this specific issue yet but I was able to reproduce it. Seems like the Android's VideoView is rounding up/down when we seek to fractioned seconds (ex.: seek to 3458 plays video at 3000).

I'll be looking this up after later this week.

NegreaVlad commented 8 years ago

The issue is either that or it's starting playback at the closest sync frame that is before the position indicated by the thumb.

hsiangyu69 commented 7 years ago

I have same problem, How can I solved?

incipio-swati commented 7 years ago

I need a solution to this too

SoluLabLive commented 7 years ago

Appreciate if we have solution to this problem as this is not providing right user experience and its impacting quality of the app.

eanajjar commented 7 years ago

Nicrob64's fork solves this issue: https://github.com/Nicrob64/k4l-video-trimmer

h777arsh commented 7 years ago

@eanajjar Hi i tried with Nicrob64's fork but still facing the same issue.

AhmedAlaaZenhom commented 6 years ago

i fixed it here using FFmpeg & Exoplayer https://github.com/AhmedZenhom/k4l-video-trimmer_FFmpeg_ExoPlayer

WilBajamas commented 5 years ago

@AhmedZenhom still the same

NsAveek commented 5 years ago

I have tried to debug the sample code. And found some logical mismatch which is causing the issue. what you need to do is to override the method "setSeekBarPosition" or a workaround is to increase the maxDuration in TrimmerActivity.

screenshot 2018-11-08 at 12 34 11 pm