tanersener / mobile-ffmpeg

FFmpeg for Android, iOS and tvOS. Not maintained anymore. Superseded by FFmpegKit.
https://tanersener.github.io/mobile-ffmpeg
GNU General Public License v3.0
3.87k stars 791 forks source link

Unable to perform ffmpeg command #228

Closed vikas-markk closed 5 years ago

vikas-markk commented 5 years ago

Description Unable to perform below command I wanted to add png file on every frame of video, using below command -i test.mp4 -i overlay-large.png -filter_complex "[1] scale=w=1080:h=1920 [tmp]; [0][tmp] overlay=0:0" -strict -2 -y -movflags +faststart -c:v libx264 -coder 1 -pix_fmt yuv420p -preset:v ultrafast -tune film -bf 3 -b_strategy 2 -g 100 -refs 10 -b:v 3M -minrate 2.85M -maxrate 7M -bufsize 7M -movflags faststart -b:a 128k -pass 1 output_001.mp4 Same command working fine on desktop, but facing problem on mobile device.

Expected behavior Above command working fine on desktop, but facing problem on android mobile devices.

Current behavior Getting ffmpeg error.

Screenshots N/A

Logs N/A

Environment

Other N/A

tanersener commented 5 years ago

Logs N/A

I need to see the logs to make a comment.

vikas-markk commented 5 years ago

2019-09-04 16:42:54.694 12722-12792 I/mobile-ffmpeg: Loading mobile-ffmpeg. 2019-09-04 16:42:54.811 12722-12792/ I/mobile-ffmpeg: Loaded mobile-ffmpeg-full-arm64-v8a-4.2-lts. 2019-09-04 16:42:54.932 12722-13640/D/mobile-ffmpeg: Callback thread started. 2019-09-04 16:42:54.932 12722-13640/ I/mobile-ffmpeg: ffmpeg version v4.2-dev-480 2019-09-04 16:42:54.933 12722-13640/ I/mobile-ffmpeg: Copyright (c) 2000-2018 the FFmpeg developers 2019-09-04 16:42:54.933 12722-13640/ I/mobile-ffmpeg: built with Android (4751641 based on r328903) clang version 7.0.2 (https://android.googlesource.com/toolchain/clang 003100370607242ddd5815e4a043907ea9004281) (https://android.googlesource.com/toolchain/llvm 1d739ffb0366421d383e04ff80ec2ee591315116) (based on LLVM 7.0.2svn) 2019-09-04 16:42:54.933 12722-13640/ I/mobile-ffmpeg: configuration: --cross-prefix=aarch64-linux-android- --sysroot=/files/android-sdk/ndk-bundle/toolchains/mobile-ffmpeg-api-21-aarch64/sysroot --prefix=/home/taner/Projects/mobile-ffmpeg/prebuilt/android-arm64/ffmpeg --pkg-config=/usr/bin/pkg-config --enable-version3 --arch=aarch64 --cpu=armv8-a --target-os=android --enable-neon --enable-asm --enable-inline-asm --enable-cross-compile --enable-pic --enable-jni --enable-lto --enable-optimizations --enable-swscale --enable-shared --disable-v4l2-m2m --disable-outdev=v4l2 --disable-outdev=fbdev --disable-indev=v4l2 --disable-indev=fbdev --enable-small --disable-openssl --disable-xmm-clobber-test --disable-debug --disable-neon-clobber-test --disable-programs --disable-postproc --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --disable-sndio --disable-schannel --disable-securetransport --disable-xlib --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --disable-videotoolbox --disable-audiotoolbox --disable-appkit --disable-alsa --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-gmp --enable-gnutls --enable-libmp3lame --enable-libass --enable-iconv --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libxml2 --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libshine --enable-libspeex --enable-libwavpack --enable-libkvazaar --enable-libilbc --enable-libopus --enable-libsnappy --enable-libsoxr --enable-libaom --enable-libtwolame --disable-sdl2 --enable-zlib --enable-mediacodec 2019-09-04 16:42:54.933 12722-13640/ I/mobile-ffmpeg: libavutil 56. 25.100 / 56. 25.100 2019-09-04 16:42:54.938 12722-13640/ I/mobile-ffmpeg: libavcodec 58. 42.104 / 58. 42.104 2019-09-04 16:42:54.938 12722-13640/ I/mobile-ffmpeg: libavformat 58. 25.100 / 58. 25.100 2019-09-04 16:42:54.938 12722-13640/ I/mobile-ffmpeg: libavdevice 58. 6.101 / 58. 6.101 2019-09-04 16:42:54.938 12722-13640/ I/mobile-ffmpeg: libavfilter 7. 46.101 / 7. 46.101 2019-09-04 16:42:54.938 12722-13640/ I/mobile-ffmpeg: libswscale 5. 4.100 / 5. 4.100 2019-09-04 16:42:54.939 12722-13640/ I/mobile-ffmpeg: libswresample 3. 4.100 / 3. 4.100 2019-09-04 16:42:54.939 12722-13640/ W/mobile-ffmpeg: Trailing options were found on the commandline. 2019-09-04 16:42:55.474 12722-13640/ I/mobile-ffmpeg: Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/Android/data//files/upload/1567595556399/original.mp4': 2019-09-04 16:42:55.494 12722-13640/ I/mobile-ffmpeg: Metadata: 2019-09-04 16:42:55.494 12722-13640/ I/mobile-ffmpeg: major_brand : 2019-09-04 16:42:55.494 12722-13640/ I/mobile-ffmpeg: mp42 2019-09-04 16:42:55.510 12722-13640/ I/mobile-ffmpeg: minor_version : 2019-09-04 16:42:55.513 12722-13640/ I/mobile-ffmpeg: 0 2019-09-04 16:42:55.515 12722-13640/ I/mobile-ffmpeg: compatible_brands: 2019-09-04 16:42:55.515 12722-13640/ I/mobile-ffmpeg: isommp42 2019-09-04 16:42:55.516 12722-13640/ I/mobile-ffmpeg: creation_time : 2019-09-04 16:42:55.516 12722-13640/ I/mobile-ffmpeg: 2019-09-04T11:12:45.000000Z 2019-09-04 16:42:55.516 12722-13640/ I/mobile-ffmpeg: com.android.version: 2019-09-04 16:42:55.516 12722-13640/ I/mobile-ffmpeg: 9 2019-09-04 16:42:55.517 12722-13640/ I/mobile-ffmpeg: com.android.manufacturer: 2019-09-04 16:42:55.524 12722-13640/ I/mobile-ffmpeg: Google 2019-09-04 16:42:55.525 12722-13640/ I/mobile-ffmpeg: com.android.model: 2019-09-04 16:42:55.536 12722-13640/ I/mobile-ffmpeg: Pixel XL 2019-09-04 16:42:55.537 12722-13640/ I/mobile-ffmpeg: Duration: 2019-09-04 16:42:55.537 12722-13640/ I/mobile-ffmpeg: 00:00:05.95 2019-09-04 16:42:55.537 12722-13640/ I/mobile-ffmpeg: , start: 2019-09-04 16:42:55.537 12722-13640/ I/mobile-ffmpeg: 0.000000 2019-09-04 16:42:55.537 12722-13640/ I/mobile-ffmpeg: , bitrate: 2019-09-04 16:42:55.537 12722-13640/ I/mobile-ffmpeg: 8467 kb/s 2019-09-04 16:42:55.538 12722-13640/ I/mobile-ffmpeg: Stream #0:0 2019-09-04 16:42:55.538 12722-13640/ I/mobile-ffmpeg: (eng) 2019-09-04 16:42:55.539 12722-13640/ I/mobile-ffmpeg: : Video: h264 (avc1 / 0x31637661), yuvj420p(pc, smpte170m), 1920x1080, 8376 kb/s 2019-09-04 16:42:55.540 12722-13640/ I/mobile-ffmpeg: , SAR 1:1 DAR 16:9 2019-09-04 16:42:55.540 12722-13640/ I/mobile-ffmpeg: , 2019-09-04 16:42:55.540 12722-13640/ I/mobile-ffmpeg: 29.96 fps, 2019-09-04 16:42:55.540 12722-13640/ I/mobile-ffmpeg: 30 tbr, 2019-09-04 16:42:55.540 12722-13640/ I/mobile-ffmpeg: 90k tbn, 2019-09-04 16:42:55.540 12722-13640/ I/mobile-ffmpeg: 180k tbc 2019-09-04 16:42:55.541 12722-13640/ I/mobile-ffmpeg: (default) 2019-09-04 16:42:55.541 12722-13640/ I/mobile-ffmpeg: Metadata: 2019-09-04 16:42:55.541 12722-13640/ I/mobile-ffmpeg: rotate : 2019-09-04 16:42:55.541 12722-13640/ I/mobile-ffmpeg: 90 2019-09-04 16:42:55.549 12722-13640/ I/mobile-ffmpeg: creation_time : 2019-09-04 16:42:55.576 12722-13640/ I/mobile-ffmpeg: 2019-09-04T11:12:45.000000Z 2019-09-04 16:42:55.576 12722-13640/ I/mobile-ffmpeg: handler_name : 2019-09-04 16:42:55.576 12722-13640/ I/mobile-ffmpeg: VideoHandle 2019-09-04 16:42:55.576 12722-13640/ I/mobile-ffmpeg: Side data: 2019-09-04 16:42:55.576 12722-13640/ I/mobile-ffmpeg:
2019-09-04 16:42:55.577 12722-13640/ I/mobile-ffmpeg: displaymatrix: rotation of -90.00 degrees 2019-09-04 16:42:55.577 12722-13640/ I/mobile-ffmpeg: Stream #0:1 2019-09-04 16:42:55.577 12722-13640/ I/mobile-ffmpeg: (eng) 2019-09-04 16:42:55.577 12722-13640/ I/mobile-ffmpeg: : Audio: aac (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 96 kb/s 2019-09-04 16:42:55.585 12722-13640/ I/mobile-ffmpeg: (default) 2019-09-04 16:42:55.586 12722-13640/ I/mobile-ffmpeg: Metadata: 2019-09-04 16:42:55.586 12722-13640/ I/mobile-ffmpeg: creation_time : 2019-09-04 16:42:55.586 12722-13640/ I/mobile-ffmpeg: 2019-09-04T11:12:45.000000Z 2019-09-04 16:42:55.601 12722-13640/ I/mobile-ffmpeg: handler_name : 2019-09-04 16:42:55.601 12722-13640/ I/mobile-ffmpeg: SoundHandle 2019-09-04 16:42:56.022 12722-13640/ I/mobile-ffmpeg: Input #1, png_pipe, from '/storage/emulated/0/Android/data//files/upload/1567595556399/screengrab.jpg': 2019-09-04 16:42:56.022 12722-13640/ I/mobile-ffmpeg: Duration: 2019-09-04 16:42:56.022 12722-13640/ I/mobile-ffmpeg: N/A 2019-09-04 16:42:56.022 12722-13640/ I/mobile-ffmpeg: , bitrate: 2019-09-04 16:42:56.023 12722-13640/ I/mobile-ffmpeg: N/A 2019-09-04 16:42:56.023 12722-13640/ I/mobile-ffmpeg: Stream #1:0 2019-09-04 16:42:56.023 12722-13640/ I/mobile-ffmpeg: : Video: png, rgba(pc), 1439x2391 2019-09-04 16:42:56.023 12722-13640/ I/mobile-ffmpeg: , 2019-09-04 16:42:56.023 12722-13640/ I/mobile-ffmpeg: 25 tbr, 2019-09-04 16:42:56.024 12722-13640/ I/mobile-ffmpeg: 25 tbn, 2019-09-04 16:42:56.024 12722-13640/ I/mobile-ffmpeg: 25 tbc 2019-09-04 16:42:56.024 12722-13640/ E/mobile-ffmpeg: Filter overlay has an unconnected output

tanersener commented 5 years ago

Please remove all space characters and double quotes in your complex filter block.

[1]scale=w=1080:h=1920[tmp];[0][tmp]overlay=0:0