I want to stamp custom text on video recorded by my app, here i am using FFmpeg Video Library and throwing this command to stamp custom text on video as a stamp.
ffmpeg -i /storage/emulated/0/RecordThrow/VID_20170510_195716.mp4 -vf drawtext="text='mycustomtext'" -codec:a copy /storage/emulated/0/output.mp4
but I got invalid output format error and sometimes the process run for a long time and didn't get a stamp on the video, after killing process I saw empty output.mp4 file on my device.so help me out about this issues. I think the main problem is in FFmpeg command that I posted.
i am following this tutorial but i am getting below error:
************error**********
built with gcc 4.8 (GCC) configuration: --target-os=linux --cross-prefix=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi- --arch=arm --cpu=cortex-a8 --enable-runtime-cpudetect --sysroot=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/sysroot --enable-pic --enable-libx264 --enable-libass --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-fontconfig --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 --pkg-config=/home/vagrant/SourceCode/ffmpeg-android/ffmpeg-pkg-config --prefix=/home/vagrant/SourceCode/ffmpeg-android/build/armeabi-v7a --extra-cflags='-I/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all' --extra-ldflags='-L/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/lib -Wl,-z,relro -Wl,-z,now -pie' --extra-libs='-lpng -lexpat -lm' --extra-cxxflags= libavutil 55. 17.103 / 55. 17.103 libavcodec 57. 24.102 / 57. 24.102 libavformat 57. 25.100 / 57. 25.100 libavdevice 57. 0.101 / 57. 0.101 libavfilter 6. 31.100 / 6. 31.100 libswscale 4. 0.100 / 4. 0.100 libswresample 2. 0.101 / 2. 0.101 libpostproc 54. 0.100 / 54. 0.100 [mov,mp4,m4a,3gp,3g2,mj2 @ 0xa62d3000] sample aspect ratio already set to 1:1, ignoring 'pasp' atom (65536:65536) Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/RecordThrow/VID_20170510_195716.mp4':
Metadata: major_brand : mp42 minor_version : 0 compatible_brands: isommp42 creation_time : 2017-05-10 14:27:20 com.android.version: 7.0 Duration: 00:00:02.70, start: 0.000000, bitrate: 16857 kb/s Stream #0:0(eng): Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p(tv, smpte170m), 640x480, 16693 kb/s, SAR 1:1 DAR 4:3, 29.93 fps, 30 tbr, 90k tbn, 180k tbc (default) Metadata: rotate : 90 creation_time : 2017-05-10 14:27:20 handler_name : VideoHandle Side data: displaymatrix: rotation of -90.00 degrees Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 129 kb/s (default) Metadata: creation_time : 2017-05-10 14:27:20 handler_name : SoundHandle [NULL @ 0xa62d4800] Unable to find a suitable output format for ' ffmpeg' ffmpeg: Invalid argument