shahen94 / react-native-video-processing

Native Video editing/trimming/compressing :movie_camera: library for React-Native
https://shahen94.github.io/react-native-video-processing/
MIT License
1.24k stars 323 forks source link

getVideoInfo() fails!! #312

Open chai86 opened 3 years ago

chai86 commented 3 years ago

@shahen94 @BaderSerhan @wehriam @santiagovazquez @jaspermeijaard

Similar to #215

I'm also getting the error: Exception thrown while executing UI block: CALayer bounds contains NaN: [0 0; nan 50]

It looks like its happening when i'm trying to call getVideoInfo for a video that's a square. (NaN something to do with divide by zero or a variable not having a default?). Perfectly fine for rectangular videos, whether portrait or landscape orientation.

I'm using the latest module and my RNVideoPlayer.swift and RNTrimmerView.swift are as you've mentioned in #215 already and the URL for the file is already: URL = assets-library://asset/asset.MP4?id=3A59DD37-58A6-4988-928F-9AD3B65E65A2&ext=MP4

ProcessingManager.getVideoInfo(URL)
         .then(({ size, duration }) => { 
                                this.setState({
                                                videoWidth: size.width,
                                                videoHeight: size.height,
                                                durationEnd: duration
                                              }); 
                             });   

Theres no data returned in the call. I think this is an outlier case that's perhaps not been addressed and i have no idea how to solve it. Please help!

harveyconnor commented 3 years ago

any luck?

chai86 commented 3 years ago

@harveyconnor Unfortunately not. This is still failing. Its true for perfectly square videos i've noticed. Any ideas?

chai86 commented 3 years ago

Any ideas guys?