souvik-ghosh / react-native-create-thumbnail

iOS/Android thumbnail generator with support for both local and remote videos
MIT License
252 stars 105 forks source link

Inaccurate Thumbnail Creation on Android with react-native-create-thumbnail #115

Open UmidbekU opened 3 months ago

UmidbekU commented 3 months ago

I am experiencing an issue with the react-native-create-thumbnail library on Android. When I specify an exact time to generate a thumbnail from a video, the resulting thumbnail does not correspond to the specified time. This problem does not occur on iOS, where thumbnails are generated accurately at the specified times.

Steps to Reproduce:

Use the react-native-create-thumbnail library in a React Native project. Specify a time (e.g., 10000 ms) to generate a thumbnail from a video on an Android device. Observe that the generated thumbnail does not match the specified time.

Expected Behavior: The generated thumbnail should correspond exactly to the specified time.

Actual Behavior: The generated thumbnail does not match the specified time on Android.

Environment: React Native version: 0.73.2 react-native-create-thumbnail version: 2.0.0 Device: Samsung S10

Additional Context: This issue only occurs on Android. On iOS, the thumbnails are generated accurately according to the specified time.

UmidbekU commented 3 months ago

@souvik-ghosh I tried using the version from the master branch with the parameter onlySyncedFrames=False, and it worked correctly. Could you please release a new version with this change?

UmidbekU commented 3 months ago

@souvik-ghosh It turns out that the files generated on Android from the master branch code were created without an image format. I had to manually add the format to them.