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.25k stars 326 forks source link

ProcessingManager.getVideoInfo() fails ONLY for SQUARE videos???? #292

Open chai86 opened 4 years ago

chai86 commented 4 years ago

@pisacode @pmella16 @ebellumat @shahen94

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!

chai86 commented 4 years ago

Anyone?

chai86 commented 4 years ago

Anyone?

chai86 commented 4 years ago

?