tanersener / react-native-ffmpeg

FFmpeg for react-native. Not maintained anymore. Superseded by FFmpegKit.
GNU General Public License v3.0
401 stars 52 forks source link

Not overwriting - exiting Conversion failed! - Cutting video #134

Closed iamadityaaz closed 4 years ago

iamadityaaz commented 4 years ago

Description I am trying to cut a part of the video using command : -i source-file.mp4 -ss 0 -t 60 first-1-min.mp4 Here is the program :

 let startTime = 0;
    let stopTime = 30;

    RNFFmpeg.executeWithArguments([
      '-i',
      this.state.path,
      '-ss',
      `${startTime}`,
      '-t',
      `${stopTime}`,
      `${this.state.path}-split-${0}.mp4`,
    ]).then(result => {
      console.log('FFmpeg process exited with rc ' + result.rc);

      if (!result.rc) {
        this.setState({
          message: 'Splitted successfully',
        });
      } else {
        this.setState({
          message: 'Spliting failed',
        });
      }
    });

Expected behavior The command will split the source-file.mp4 for the first 60 secs and return

FFmpeg process exited with rc 0

Current behavior If i look inside the output path then I get the **

output file working very well,

** but it is also returning

FFmpeg process exited with rc 1


Not overwriting - exiting

index.js:81 Conversion failed!

I have also tried some other video files, but same problem.

**Logs**

index.js:177 Console was cleared index.js:92 Loading react-native-ffmpeg. infoLog.js:16 Running "svs" with {"rootTag":61} index.js:99 Loaded react-native-ffmpeg-android-x86. App.js:57 Response = {path: "/storage/emulated/0/Download/brown rang/Brown Rang…ney Singh India's No.1 Video 2012_AvpTube.Com.MP4", uri: "content://com.google.android.apps.photos.contentpr…nal%2Fvideo%2Fmedia%2F116/ORIGINAL/NONE/625248754"} index.js:81 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/Download/brown rang/inputvideo.MP4':

index.js:81 Metadata:

index.js:81 major_brand : index.js:81 mp42 index.js:81

index.js:81 minor_version : index.js:81 0 index.js:81

index.js:81 compatible_brands: index.js:81 isommp42 index.js:81

index.js:81 creation_time : index.js:81 2018-10-25T10:30:26.000000Z index.js:81

index.js:81 Duration: index.js:81 00:02:59.05 index.js:81 , start: App.js:104 Result: {streams: Array(2), metadata: {…}, rawInformation: "Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/… produced by Google Inc. Created on: 10/25/2018.↵", bitrate: 565, duration: 179050, …}streams: (2) [{…}, {…}]metadata: {compatible_brands: "isommp42", minor_version: "0", major_brand: "mp42", creation_time: "2018-10-25T10:30:26.000000Z"}rawInformation: "Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/Download/brown rang/inputvideo.MP4':↵ Metadata:↵ major_brand : mp42↵ minor_version : 0↵ compatible_brands: isommp42↵ creation_time : 2018-10-25T10:30:26.000000Z↵ Duration: 00:02:59.05, start: 0.000000, bitrate: 565 kb/s↵ Stream #0:0(und): Video: h264 (avc1 / 0x31637661), yuv420p(tv, bt709), 640x360 [SAR 1:1 DAR 16:9], 466 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)↵ Metadata:↵ creation_time : 2018-10-25T10:30:26.000000Z↵ handler_name : ISO Media file produced by Google Inc. Created on: 10/25/2018.↵ Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 95 kb/s (default)↵ Metadata:↵ creation_time : 2018-10-25T10:30:26.000000Z↵ handler_name : ISO Media file produced by Google Inc. Created on: 10/25/2018.↵"bitrate: 565duration: 179050startTime: 0path: "/storage/emulated/0/Download/brown rang/Brown Rang - Yo Yo Honey Singh India"format: "mov,mp4,m4a,3gp,3g2,mj2"proto: constructor: ƒ Object()defineGetter: ƒ defineGetter()defineSetter: ƒ defineSetter()hasOwnProperty: ƒ hasOwnProperty()lookupGetter: ƒ lookupGetter()lookupSetter: ƒ lookupSetter()isPrototypeOf: ƒ isPrototypeOf()propertyIsEnumerable: ƒ propertyIsEnumerable()toString: ƒ toString()valueOf: ƒ valueOf()toLocaleString: ƒ toLocaleString()get proto: ƒ proto()set proto: ƒ proto() App.js:114 parts : 5 App.js:131 FFmpeg process exited with rc 1 index.js:81 0.000000 index.js:81 , bitrate: index.js:81 565 kb/s index.js:81

index.js:81 Stream #0:0 index.js:81 (und) index.js:81 : Video: h264 (avc1 / 0x31637661), yuv420p(tv, bt709), 640x360 [SAR 1:1 DAR 16:9], 466 kb/s index.js:81 , index.js:81 25 fps, index.js:81 25 tbr, index.js:81 12800 tbn, index.js:81 50 tbc index.js:81 (default) index.js:81

index.js:81 Metadata:

index.js:81 creation_time : index.js:81 2018-10-25T10:30:26.000000Z index.js:81

index.js:81 handler_name : index.js:81 ISO Media file produced by Google Inc. Created on: 10/25/2018. index.js:81

index.js:81 Stream #0:1 index.js:81 (und) index.js:81 : Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 95 kb/s index.js:81 (default) index.js:81

index.js:81 Metadata:

index.js:81 creation_time : index.js:81 2018-10-25T10:30:26.000000Z index.js:81

index.js:81 handler_name : index.js:81 ISO Media file produced by Google Inc. Created on: 10/25/2018. index.js:81

index.js:81 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/Download/brown rang/inputvideo.MP4':

index.js:81 Metadata:

index.js:81 major_brand : index.js:81 mp42 index.js:81

index.js:81 minor_version : index.js:81 0 index.js:81

index.js:81 compatible_brands: index.js:81 isommp42 index.js:81

index.js:81 creation_time : index.js:81 2018-10-25T10:30:26.000000Z index.js:81

index.js:81 Duration: index.js:81 00:02:59.05 index.js:81 , start: index.js:81 0.000000 index.js:81 , bitrate: index.js:81 565 kb/s index.js:81

index.js:81 Stream #0:0 index.js:81 (und) index.js:81 : Video: h264 (avc1 / 0x31637661), yuv420p(tv, bt709), 640x360 [SAR 1:1 DAR 16:9], 466 kb/s index.js:81 , index.js:81 25 fps, index.js:81 25 tbr, index.js:81 12800 tbn, index.js:81 50 tbc index.js:81 (default) index.js:81

index.js:81 Metadata:

index.js:81 creation_time : index.js:81 2018-10-25T10:30:26.000000Z index.js:81

index.js:81 handler_name : index.js:81 ISO Media file produced by Google Inc. Created on: 10/25/2018. index.js:81

index.js:81 Stream #0:1 index.js:81 (und) index.js:81 : Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 95 kb/s App.js:104 Result: {streams: Array(2), metadata: {…}, rawInformation: "Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/… produced by Google Inc. Created on: 10/25/2018.↵", bitrate: 565, duration: 179050, …} App.js:114 parts : 5 index.js:81 (default) index.js:81

index.js:81 Metadata:

index.js:81 creation_time : index.js:81 2018-10-25T10:30:26.000000Z index.js:81

index.js:81 handler_name : index.js:81 ISO Media file produced by Google Inc. Created on: 10/25/2018. index.js:81

index.js:81 index.js:81 Not overwriting - exiting

index.js:81 Conversion failed!

index.js:81 index.js:81 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/Download/brown rang/inputvideo.MP4':

index.js:81 Metadata:

index.js:81 major_brand : index.js:81 mp42 index.js:81

index.js:81 minor_version : index.js:81 0 index.js:81

index.js:81 compatible_brands: index.js:81 isommp42 index.js:81

index.js:81 creation_time : index.js:81 2018-10-25T10:30:26.000000Z index.js:81

index.js:81 Duration: index.js:81 00:02:59.05 index.js:81 , start: index.js:81 0.000000 index.js:81 , bitrate: index.js:81 565 kb/s index.js:81

index.js:81 Stream #0:0 index.js:81 (und) index.js:81 : Video: h264 (avc1 / 0x31637661), yuv420p(tv, bt709), 640x360 [SAR 1:1 DAR 16:9], 466 kb/s index.js:81 , index.js:81 25 fps, index.js:81 25 tbr, index.js:81 12800 tbn, index.js:81 50 tbc index.js:81 (default) index.js:81

index.js:81 Metadata:

index.js:81 creation_time : index.js:81 2018-10-25T10:30:26.000000Z index.js:81

index.js:81 handler_name : index.js:81 ISO Media file produced by Google Inc. Created on: 10/25/2018. index.js:81

index.js:81 Stream #0:1 index.js:81 (und) index.js:81 : Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 95 kb/s index.js:81 (default) index.js:81

index.js:81 Metadata:

index.js:81 creation_time : index.js:81 2018-10-25T10:30:26.000000Z index.js:81

index.js:81 handler_name : index.js:81 ISO Media file produced by Google Inc. Created on: 10/25/2018. index.js:81

index.js:81 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/Download/brown rang/inputvideo.MP4':

index.js:81 Metadata:

index.js:81 major_brand : index.js:81 mp42 index.js:81

index.js:81 minor_version : index.js:81 0 index.js:81

index.js:81 compatible_brands: index.js:81 isommp42 index.js:81

index.js:81 creation_time : index.js:81 2018-10-25T10:30:26.000000Z index.js:81

index.js:81 Duration: index.js:81 00:02:59.05 index.js:81 , start: index.js:81 0.000000 index.js:81 , bitrate: index.js:81 565 kb/s index.js:81

index.js:81 Stream #0:0 index.js:81 (und) index.js:81 : Video: h264 (avc1 / 0x31637661), yuv420p(tv, bt709), 640x360 [SAR 1:1 DAR 16:9], 466 kb/s index.js:81 , index.js:81 25 fps, index.js:81 25 tbr, index.js:81 12800 tbn, index.js:81 50 tbc index.js:81 (default) index.js:81

index.js:81 Metadata:

index.js:81 creation_time : index.js:81 2018-10-25T10:30:26.000000Z index.js:81

index.js:81 handler_name : index.js:81 ISO Media file produced by Google Inc. Created on: 10/25/2018. index.js:81

index.js:81 Stream #0:1 index.js:81 (und) index.js:81 : Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 95 kb/s index.js:81 (default) index.js:81

index.js:81 Metadata:

index.js:81 creation_time : index.js:81 2018-10-25T10:30:26.000000Z index.js:81

index.js:81 handler_name : index.js:81 ISO Media file produced by Google Inc. Created on: 10/25/2018. index.js:81

index.js:81 index.js:81 Not overwriting - exiting

index.js:81 Conversion failed!

index.js:81 App.js:131 FFmpeg process exited with rc 1 index.js:81 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/Download/brown rang/inputvideo.MP4':

index.js:81 Metadata:

index.js:81 major_brand : index.js:81 mp42 index.js:81

index.js:81 minor_version : index.js:81 0 index.js:81

index.js:81 compatible_brands: index.js:81 isommp42 index.js:81

index.js:81 creation_time : index.js:81 2018-10-25T10:30:26.000000Z index.js:81

index.js:81 Duration: index.js:81 00:02:59.05 index.js:81 , start: index.js:81 0.000000 index.js:81 , bitrate: index.js:81 565 kb/s index.js:81

index.js:81 Stream #0:0 index.js:81 (und) index.js:81 : Video: h264 (avc1 / 0x31637661), yuv420p(tv, bt709), 640x360 [SAR 1:1 DAR 16:9], 466 kb/s index.js:81 , index.js:81 25 fps, index.js:81 25 tbr, index.js:81 12800 tbn, index.js:81 50 tbc index.js:81 (default) index.js:81

index.js:81 Metadata:

index.js:81 creation_time : index.js:81 2018-10-25T10:30:26.000000Z index.js:81

index.js:81 handler_name : index.js:81 ISO Media file produced by Google Inc. Created on: 10/25/2018. index.js:81

index.js:81 Stream #0:1 index.js:81 (und) index.js:81 : Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 95 kb/s index.js:81 (default) index.js:81

index.js:81 Metadata:

index.js:81 creation_time : App.js:104 Result: {streams: Array(2), metadata: {…}, rawInformation: "Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/… produced by Google Inc. Created on: 10/25/2018.↵", bitrate: 565, duration: 179050, …} App.js:114 parts : 5 index.js:81 2018-10-25T10:30:26.000000Z index.js:81

index.js:81 handler_name : index.js:81 ISO Media file produced by Google Inc. Created on: 10/25/2018. index.js:81

index.js:81 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/Download/brown rang/inputvideo.MP4':

index.js:81 Metadata:

index.js:81 major_brand : index.js:81 mp42 index.js:81

App.js:131 FFmpeg process exited with rc 1 index.js:81 minor_version : index.js:81 0 index.js:81

index.js:81 compatible_brands: index.js:81 isommp42 index.js:81

index.js:81 creation_time : index.js:81 2018-10-25T10:30:26.000000Z index.js:81

index.js:81 Duration: index.js:81 00:02:59.05 index.js:81 , start: index.js:81 0.000000 index.js:81 , bitrate: index.js:81 565 kb/s index.js:81

index.js:81 Stream #0:0 index.js:81 (und) index.js:81 : Video: h264 (avc1 / 0x31637661), yuv420p(tv, bt709), 640x360 [SAR 1:1 DAR 16:9], 466 kb/s index.js:81 , index.js:81 25 fps, index.js:81 25 tbr, index.js:81 12800 tbn, index.js:81 50 tbc index.js:81 (default) index.js:81

index.js:81 Metadata:

index.js:81 creation_time : index.js:81 2018-10-25T10:30:26.000000Z index.js:81

index.js:81 handler_name : index.js:81 ISO Media file produced by Google Inc. Created on: 10/25/2018. index.js:81

index.js:81 Stream #0:1 index.js:81 (und) index.js:81 : Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 95 kb/s index.js:81 (default) index.js:81

index.js:81 Metadata:

index.js:81 creation_time : index.js:81 2018-10-25T10:30:26.000000Z index.js:81

index.js:81 handler_name : index.js:81 ISO Media file produced by Google Inc. Created on: 10/25/2018. index.js:81

index.js:81 index.js:81 Not overwriting - exiting

index.js:81 Conversion failed!

index.js:81 index.js:81 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/Download/brown rang/inputvideo.MP4':

index.js:81 Metadata:

index.js:81 major_brand : index.js:81 mp42 index.js:81

index.js:81 minor_version : index.js:81 0 index.js:81

index.js:81 compatible_brands: index.js:81 isommp42 index.js:81

index.js:81 creation_time : index.js:81 2018-10-25T10:30:26.000000Z index.js:81

index.js:81 Duration: index.js:81 00:02:59.05 index.js:81 , start: index.js:81 0.000000 index.js:81 , bitrate: index.js:81 565 kb/s index.js:81

index.js:81 Stream #0:0 index.js:81 (und) index.js:81 : Video: h264 (avc1 / 0x31637661), yuv420p(tv, bt709), 640x360 [SAR 1:1 DAR 16:9], 466 kb/s index.js:81 , index.js:81 25 fps, index.js:81 25 tbr, index.js:81 12800 tbn, index.js:81 50 tbc index.js:81 (default) index.js:81

index.js:81 Metadata:

index.js:81 creation_time : index.js:81 2018-10-25T10:30:26.000000Z index.js:81

index.js:81 handler_name : index.js:81 ISO Media file produced by Google Inc. Created on: 10/25/2018. index.js:81

index.js:81 Stream #0:1 index.js:81 (und) index.js:81 : Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 95 kb/s index.js:81 (default) index.js:81

index.js:81 Metadata:

index.js:81 creation_time : index.js:81 2018-10-25T10:30:26.000000Z index.js:81

index.js:81 handler_name : index.js:81 ISO Media file produced by Google Inc. Created on: 10/25/2018. index.js:81

App.js:104 Result: {streams: Array(2), metadata: {…}, rawInformation: "Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/… produced by Google Inc. Created on: 10/25/2018.↵", bitrate: 565, duration: 179050, …} App.js:114 parts : 5 index.js:81 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/Download/brown rang/inputvideo.MP4':

index.js:81 Metadata:

index.js:81 major_brand : index.js:81 mp42 index.js:81

index.js:81 minor_version : index.js:81 0 index.js:81

index.js:81 compatible_brands: index.js:81 isommp42 index.js:81

index.js:81 creation_time : index.js:81 2018-10-25T10:30:26.000000Z index.js:81

index.js:81 Duration: index.js:81 00:02:59.05 index.js:81 , start: index.js:81 0.000000 index.js:81 , bitrate: index.js:81 565 kb/s index.js:81

index.js:81 Stream #0:0 index.js:81 (und) index.js:81 : Video: h264 (avc1 / 0x31637661), yuv420p(tv, bt709), 640x360 [SAR 1:1 DAR 16:9], 466 kb/s index.js:81 , index.js:81 25 fps, index.js:81 25 tbr, index.js:81 12800 tbn, index.js:81 50 tbc index.js:81 (default) index.js:81

index.js:81 Metadata:

index.js:81 creation_time : index.js:81 2018-10-25T10:30:26.000000Z index.js:81

index.js:81 handler_name : index.js:81 ISO Media file produced by Google Inc. Created on: 10/25/2018. App.js:131 FFmpeg process exited with rc 1 index.js:81

index.js:81 Stream #0:1 index.js:81 (und) index.js:81 : Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 95 kb/s index.js:81 (default) index.js:81

index.js:81 Metadata:

index.js:81 creation_time : index.js:81 2018-10-25T10:30:26.000000Z index.js:81

index.js:81 handler_name : index.js:81 ISO Media file produced by Google Inc. Created on: 10/25/2018. index.js:81

index.js:81 index.js:81 Not overwriting - exiting

index.js:81 Conversion failed!

index.js:81 YellowBox.js:71 Remote debugger is in a background tab which may cause apps to perform slowly. Fix this by foregrounding the tab (or opening it in a separate window). console.warn @ YellowBox.js:71 n @ debuggerWorker.js:22 (anonymous) @ debuggerWorker.js:50



**Environment**
 - React Native Environment - Android
tanersener commented 4 years ago

Please add -y option to your command.

iamadityaaz commented 4 years ago

Please add -y option to your command.

Thank you, its working.