selsamman / react-native-transcode

Video Transcoder for React Native
Apache License 2.0
11 stars 6 forks source link

Error: extractor does not contain video and/or audio tracks. #21

Open antiergit opened 1 year ago

antiergit commented 1 year ago

While processing this library i got issue

Error: extractor does not contain video and/or audio tracks.

RNFetchBlob.fs.stat(fileURI) .then((stats) => { console.log('stats', stats); var inputFile = stats.path; const outputFile = RNFetchBlob.fs.dirs.DownloadDir + '/output_' + 'Hopscotch' + '.mp4'; Transcode.start() .asset({name: "A", path: inputFile, type:'AudioVideo'}) .asset({name: "B", path: inputFile, type:'AudioVideo'}) .segment(500) .track({asset: "A"}) .segment(500) .track({asset: "A", filter: "FadeOut"}) .track({asset: "B", filter: "FadeIn", seek: 750}) .segment(500) .track({asset: "B"}) .segment(500) .track({asset: "B", filter: "FadeOut"}) .track({asset: "A", filter: "FadeIn", seek: 500}) .segment(500) .track({asset: "A"}) .process("low", outputFile, (progress)=>{console.log('progress', progress);}); }).catch((err) => {console.log('error=====', err);})

selsamman commented 1 year ago

What type of video file is it? Would it be possible to make it available for me to test with? Is this on Android or iPhone?

antiergit commented 1 year ago

I am uploading video file from the library by using react-native-image-picker and tested on my android phone. I am getting this error.

selsamman commented 1 year ago

The error is likely related to the video which mush have both an audio and a video track. I would need to have access to the video to diagnose further.