title: Error while trying to compress a 10 sec video on react-native
body: <p>I am currently using the library <a href="https://github.com/shahen94/react-native-video-processing" rel="nofollow noreferrer">react-native-video-processing</a> to compress a 10 sec video on android. But this is the error I get while trying to compress it.</p>
  
  <p>Any ideas suggestions?</p>
  
  <blockquote>
    <p>Possible Unhandled Promise Rejection (id: 0): Error: compress error:
    failed. ffmpeg version 3.3.5 Copyright (c) 2000-2017 the FFmpeg
    developers  built with gcc 4.8 (GCC)  configuration: --target-os=linux
    --cross-prefix=/Users/kesha/Projects/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi-
    --arch=arm --cpu=cortex-a8 --enable-runtime-cpudetect --sysroot=/Users/kesha/Projects/ffmpeg-android/toolchain-android/sysroot
    --enable-libx264 --enable-pthreads --disable-debug --disable-ffserver --enable-version3 --enable-hardcoded-tables --disable-ffplay --disable-ffprobe --enable-yasm --disable-doc --disable-shared --enable-static --enable-nonfree --disable-network --enable-gpl --enable-ffmpeg --enable-small --disable-filters --enable-filter=copy --enable-filter=trim --enable-filter=crop --enable-filter=scale --enable-filter=format --pkg-config=/Users/kesha/Projects/ffmpeg-android/ffmpeg-3.3-pkg-config --prefix=/Users/kesha/Projects/ffmpeg-android/build/armeabi-v7a --extra-cflags='-I/Users/kesha/Projects/ffmpeg-android/toolchain-android/include
    -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all' --extra-ldflags='-L/Users/kesha/Projects/ffmpeg-android/toolchain-android/lib -Wl,-z,relro -Wl,-z,now -pie' --extra-cxxflags= --extra-libs='-lx264 -lm'  libavutil      55. 58.100 / 55. 58.100  libavcodec     57. 89.100 / 57. 89.100  libavformat    57. 71.100 / 57. 71.100  libavdevice    57.  6.100 / 57.  6.100  libavfilter     6. 82.100 / 
    6. 82.100  libswscale      4.  6.100 /  4.  6.100  libswresample   2.  7.100 /  2.  7.100  libpostproc    54.  5.100 / 54.  5.100Input #0, mov,mp4,m4a,3gp,3g2,mj2, from
    'file:///storage/emulated/0/Movies/VID_20171110_195700.mp4': 
    Metadata:    major_brand     : mp42    minor_version   : 0<br>
    compatible_brands: isommp42    creation_time   :
    2017-11-10T16:57:05.000000Z    com.android.version: 7.1.1  Duration:
    00:00:03.10, start: 0.000000, bitrate: 2094 kb/s    Stream #0:0(eng):
    Video: h264 (avc1 / 0x31637661), yuvj420p(pc, smpte170m), 720x480,
    1991 kb/s, SAR 1:1 DAR 3:2, 30 fps, 30 tbr, 90k tbn, 180k tbc
    (default)    Metadata:      rotate          : 270      creation_time<br>
    : 2017-11-10T16:57:05.000000Z      handler_name    : VideoHandle<br>
    Side data:      displaymatrix: rotation of 90.00 degrees    Stream</p>
    
    <h1>0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 95 kb/s (default)    Metadata:      creation_time   :</h1>
    
    <p>2017-11-10T16:57:05.000000Z      handler_name    : SoundHandleStream
    mapping:  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264)) 
    Stream #0:1 -> #0:1 (aac (native) -> aac (native))Press [q] to stop,
    [?] for helpError reinitializing filters!Failed to inject frame into
    filter network: Out of memoryError while processing the decoded data
    for stream #0:0[aac @ 0xf6f04c00] Qavg: 12036.106[aac @ 0xf6f04c00] 2
    frames left in the queue on closingConversion failed! Error: compress
    error: failed. ffmpeg version 3.3.5 Copyright (c) 2000-2017 the FFmpeg
    developers  built with gcc 4.8 (GCC)  configuration: --target-os=linux
    --cross-prefix=/Users/kesha/Projects/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi-
    --arch=arm --cpu=cortex-a8 --enable-runtime-cpudetect --sysroot=/Users/kesha/Projects/ffmpeg-android/toolchain-android/sysroot
    --enable-libx264 --enable-pthreads --disable-debug --disable-ffserver --enable-version3 --enable-hardcoded-tables --disable-ffplay --disable-ffprobe --enable-yasm --disable-doc --disable-shared --enable-static --enable-nonfree --disable-network --enable-gpl --enable-ffmpeg --enable-small --disable-filters --enable-filter=copy --enable-filter=trim --enable-filter=crop --enable-filter=scale --enable-filter=format --pkg-config=/Users/kesha/Projects/ffmpeg-android/ffmpeg-3.3-pkg-config --prefix=/Users/kesha/Projects/ffmpeg-android/build/armeabi-v7a --extra-cflags='-I/Users/kesha/Projects/ffmpeg-android/toolchain-android/include
    -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all' --extra-ldflags='-L/Users/kesha/Projects/ffmpeg-android/toolchain-android/lib -Wl,-z,relro -Wl,-z,now -pie' --extra-cxxflags= --extra-libs='-lx264 -lm'  libavutil      55. 58.100 / 55. 58.100  libavcodec     57. 89.100 / 57. 89.100  libavformat    57. 71.100 / 57. 71.100  libavdevice    57.  6.100 / 57.  6.100  libavfilter     6. 82.100 / 
    6. 82.100  libswscale      4.  6.100 /  4.  6.100  libswresample   2.  7.100 /  2.  7.100  libpostproc    54.  5.100 / 54.  5.100Input #0, mov,mp4,m4a,3gp,3g2,mj2, from
    'file:///storage/emulated/0/Movies/VID_20171110_195700.mp4': 
    Metadata:    major_brand     : mp42    minor_version   : 0<br>
    compatible_brands: isommp42    creation_time   :
    2017-11-10T16:57:05.000000Z    com.android.version: 7.1.1  Duration:
    00:00:03.10, start: 0.000000, bitrate: 2094 kb/s    Stream #0:0(eng):
    Video: h264 (avc1 / 0x31637661), yuvj420p(pc, smpte170m), 720x480,
    1991 kb/s, SAR 1:1 DAR 3:2, 30 fps, 30 tbr, 90k tbn, 180k tbc
    (default)    Metadata:      rotate          : 270      creation_time<br>
    : 2017-11-10T16:57:05.000000Z      handler_name    : VideoHandle<br>
    Side data:      displaymatrix: rotation of 90.00 degrees    Stream</p>
    
    <h1>0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 95 kb/s (default)    Metadata:      creation_time   :</h1>
    
    <p>2017-11-10T16:57:05.000000Z      handler_name    : SoundHandleStream
    mapping:  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264)) 
    Stream #0:1 -> #0:1 (aac (native) -> aac (native))Press [q] to stop,
    [?] for helpError reinitializing filters!Failed to inject frame into
    filter network: Out of memoryError while processing the decoded data
    for stream #0:0[aac @ 0xf6f04c00] Qavg: 12036.106[aac @ 0xf6f04c00] 2
    frames left in the queue on closingConversion failed!
        at createErrorFromErrorData (<a href="http://localhost:8081/index.bundle?platform=android&amp;dev=true&amp;minify=false:1807:15" rel="nofollow noreferrer">http://localhost:8081/index.bundle?platform=android&amp;dev=true&amp;minify=false:1807:15</a>)
        at <a href="http://localhost:8081/index.bundle?platform=android&amp;dev=true&amp;minify=false:1760:25" rel="nofollow noreferrer">http://localhost:8081/index.bundle?platform=android&amp;dev=true&amp;minify=false:1760:25</a>
        at MessageQueue.__invokeCallback (<a href="http://localhost:8081/index.bundle?platform=android&amp;dev=true&amp;minify=false:2118:16" rel="nofollow noreferrer">http://localhost:8081/index.bundle?platform=android&amp;dev=true&amp;minify=false:2118:16</a>)
        at <a href="http://localhost:8081/index.bundle?platform=android&amp;dev=true&amp;minify=false:1935:16" rel="nofollow noreferrer">http://localhost:8081/index.bundle?platform=android&amp;dev=true&amp;minify=false:1935:16</a>
        at MessageQueue.__guard (<a href="http://localhost:8081/index.bundle?platform=android&amp;dev=true&amp;minify=false:2053:9" rel="nofollow noreferrer">http://localhost:8081/index.bundle?platform=android&amp;dev=true&amp;minify=false:2053:9</a>)
        at MessageQueue.invokeCallbackAndReturnFlushedQueue (<a href="http://localhost:8081/index.bundle?platform=android&amp;dev=true&amp;minify=false:1934:12" rel="nofollow noreferrer">http://localhost:8081/index.bundle?platform=android&amp;dev=true&amp;minify=false:1934:12</a>)
        at <a href="http://localhost:8081/debugger-ui/debuggerWorker.js:72:58" rel="nofollow noreferrer">http://localhost:8081/debugger-ui/debuggerWorker.js:72:58</a></p>
  </blockquote>