souvik-ghosh / react-native-create-thumbnail

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

Error: File doesn't exist or not supported #47

Closed eakenbor closed 2 years ago

eakenbor commented 3 years ago

I use react-native-image-crop-picker to take a picture using the camera and when I pass the path of the image to createThumbnail I get this error: "File doesn't exist or not supported".

Here is my code:

ImagePicker.openCamera({
        width: windowFrame.width,
        height: windowFrame.height,
        cropping: true
      }).then(async response => {
createThumbnail({
          url: response.path,
          timeStamp: 10000,
        })
          .then(response => console.log({ response }))
          .catch(err => console.log({ err })) }

The response.path looks like this: "/private/var/mobile/Containers/Data/Application/RR62F5C8-26F5-4B9A-8A3F-3D65BE6207FF/tmp/react-native-image-crop-picker/A90DD27F-6E4E-4E70-B678-D595D84A13F9.jpg"

Please can someone tell me where I got this wrong? Thanks.

DoanDat2511 commented 3 years ago

I have the same problem as you. you have solution yet ?

honghong01 commented 3 years ago

Same issue. Problems occur with high-definition video.

souvik-ghosh commented 2 years ago

@eakenbor This library creates a thumbnail from video files only. You're passing a JPEG image.