Open razamerchantwork opened 4 years ago
@shahen94
const compressOptions = { width: 720, height: 1280, bitrateMultiplier: 3, saveToCameraRoll: true, // default is false, iOS only saveWithCurrentDate: true, // default is false, iOS only minimumBitrate: 300000, removeAudio: true, // default is false };
ProcessingManager.compress(response.uri, compressOptions) // like VideoPlayer compress options .then((data) => console.log("compressData",data));
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-gpl --enable-yasm --disable-doc --disable-shared --enable-static --enable-small --disable-network --pkg-config=/Users/kesha/Projects/ffmpeg-android/ffmpeg-pkg-config-for-3.3 --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-libs=-lx264 --extra-cxxflags= 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.100content://media/external/video/media/44440: Protocol not foundDid you mean file:content://media/external/video/media/44440? promiseMethodWrapper@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:5121:45 compress@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:164865:39 http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:126619:67 invokeCallback@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:5676:23 http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:5380:34 guard@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:5588:15 invokeCallbackAndReturnFlushedQueue@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:5379:21 invokeCallbackAndReturnFlushedQueue@[native code]
Hey @razamerchantwork you have to pass file source code do not pass URI.
Use rn-fetch-blob to get file original path. Here I attach my getVideoPath function
Notes:
@shahen94
const compressOptions = { width: 720, height: 1280, bitrateMultiplier: 3, saveToCameraRoll: true, // default is false, iOS only saveWithCurrentDate: true, // default is false, iOS only minimumBitrate: 300000, removeAudio: true, // default is false };
ProcessingManager.compress(response.uri, compressOptions) // like VideoPlayer compress options .then((data) => console.log("compressData",data));
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-gpl --enable-yasm --disable-doc --disable-shared --enable-static --enable-small --disable-network --pkg-config=/Users/kesha/Projects/ffmpeg-android/ffmpeg-pkg-config-for-3.3 --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-libs=-lx264 --extra-cxxflags= 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.100content://media/external/video/media/44440: Protocol not foundDid you mean file:content://media/external/video/media/44440? promiseMethodWrapper@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:5121:45 compress@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:164865:39 http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:126619:67 invokeCallback@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:5676:23 http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:5380:34 guard@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:5588:15 invokeCallbackAndReturnFlushedQueue@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:5379:21 invokeCallbackAndReturnFlushedQueue@[native code]