Open DalalAbadi opened 6 years ago
+1,i have the same problem
react-native-video-processing v1.13.0,react-native v0.54.2, android 5、6、8 all have this problem
Hello guys it's critical issue !
Hello guys ,I did a few tricks to avoid this issue I hope it helps ` const videoTrimOptions = () => { return { startTime: 0, endTime: 30 } }
const videoCompressOptions = () => { return { // width: 360, // height: 640, bitrateMultiplier: 3, // saveToCameraRoll: false, // default is false, iOS only // saveWithCurrentDate: false, // default is false, iOS only minimumBitrate: 300000 // removeAudio: false // default is false } }
export interface IVideoProcessOutput { uri?: string, error?: any }
export class VideoProcessHelper {
public static trimAndCompressForUpload(uri: string): Promise And getImagePickerFileAddress is:
public static getImagePickerFileAddress = (path: string): string => {
return (EnvironmentVariables.isIos)
? path.replace('file://', '')
: path
}`
Now it works correctly in both android and ios ,Although it takes lots of time in android and you need a timeout
In my case, it was URI issue, library pass source path directly to FFmpeg and FFmpeg does not soppurt content://
or 'file://` or other protocols
Issue solved by converting URI to real path, I use react-native-get-real-path to convert uri
Hi @farnabaz
I am stuck at same problem. Can you please tell me what exactly needs to be passed as source
here. This is what I am doing and getting same error.
const source ={"uri":"content://com.android.providers.media.documents/document/video%3A160","fileSize":10498677,"fileName":"SampleVideo_1280x720_10mb-1.mp4","type":"video/mp4"}
I am using react-native-document-picker to pick video.
const options = {bitrateMultiplier: 3, minimumBitrate: 300000};
ProcessingManager.compress(source, options)
.
Thanks in advance
I am trying to compress videos it's work fine with iOS but Android throw{"framesToPop":1,"code":"EUNSPECIFIED"}
Bellow my code:
Your Environment