[FFmpeg-user] FFMPEG Overlay image on video results large size videos

Rajasekhar Reddy rajasekhar.u at krify.net
Mon Dec 28 06:07:25 CET 2015


Hi,

I used the sample project to run FFMpeg command downloaded from the
following link.

https://github.com/WritingMinds/ffmpeg-android-java


Also i am getting the apk size 28.9 MB, How to reduce the apk size.


*COMMAND:*

ffmpeg -i /storage/emulated/0/video/nsm.mp4 -i /storage/emulated/0/saved_
images/scaled_image_176_287.png -preset ultrafast -strict -2
-filter_complex overlay=x=550:y=380:enable='between(t,3,14)'
/storage/emulated/0/video/outputxy550_380.mp4


*OUTPUT:*

SUCCESS with output : WARNING: linker: /data/data/com.github.
hiteshsondhi88.sampleffmpeg/files/ffmpeg has text relocations. This is
wasting memory and prevents security hardening. Please fix.
ffmpeg version n2.4.2 Copyright (c) 2000-2014 the FFmpeg developers
  built on Oct  7 2014 15:08:46 with gcc 4.8 (GCC)
  configuration: --target-os=linux --cross-prefix=/home/sb/
Source-Code/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi-
--arch=arm --cpu=cortex-a8 --enable-runtime-cpudetect
--sysroot=/home/sb/Source-Code/ffmpeg-android/toolchain-android/sysroot
--enable-pic --enable-libx264 --enable-libass --enable-libfreetype
--enable-libfribidi --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/sb/Source-
Code/ffmpeg-android/ffmpeg-pkg-config --prefix=/home/sb/Source-Code/
ffmpeg-android/build/armeabi-v7a-neon --extra-cflags='-I/home/sb/
Source-Code/ffmpeg-android/toolchain-android/include -U_FORTIFY_SOURCE
-D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all -mfpu=neon'
--extra-ldflags='-L/home/sb/Source-Code/ffmpeg-android/toolchain-android/lib
-Wl,-z,relro -Wl,-z,now -pie' --extra-libs='-lpng -lexpat -lm'
--extra-cxxflags=
  libavutil      54.  7.100 / 54.  7.100
  libavcodec     56.  1.100 / 56.  1.100
  libavformat    56.  4.101 / 56.  4.101
  libavdevice    56.  0.100 / 56.  0.100
  libavfilter     5.  1.100 /  5.  1.100
  libswscale      3.  0.100 /  3.  0.100
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  0.100 / 53.  0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/video/nsm.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : https://clipchamp.com
    comment         : Converted with https://clipchamp.com - online video
converter, video compressor, and webcam selfie recorder. Fast, reliable,
and total privacy.
    description     : This video file was converted on Sun May 17 2015 at
15:12:59 GMT-0700 (Pacific Daylight Time) in Chrome (version 42.0.2311.135)
on a Win computer using the https://clipchamp.com online video converter,
video compressor, and selfie webcam recorder.
  Duration: 00:00:17.28, start: 0.000000, bitrate: 2196 kb/s
    Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p,
1280x720 [SAR 1:1 DAR 16:9], 2194 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc
(default)
    Metadata:
      handler_name    : VideoHandler
Input #1, png_pipe, from '/storage/emulated/0/saved_
images/scaled_image_176_287.png':
  Duration: N/A, bitrate: N/A
    Stream #1:0: Video: png, rgba, 440x235, 25 tbr, 25 tbn, 25 tbc
[libx264 @ 0xb90a6cb0] using SAR=1/1
[libx264 @ 0xb90a6cb0] using cpu capabilities: none!
[libx264 @ 0xb90a6cb0] profile Constrained Baseline, level 3.1
[libx264 @ 0xb90a6cb0] 264 - core 142 - H.264/MPEG-4 AVC codec - Copyleft
2003-2014 - http://www.videolan.org/x264.html - options: cabac=0 ref=1
deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0
me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11
fast_pskip=1 chroma_qp_offset=0 threads=6 lookahead_threads=1
sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0
constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=0
intra_refresh=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69
qpstep=4 ip_ratio=1.40 aq=0
Output #0, mp4, to '/storage/emulated/0/video/outputxy550_380.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    description     : This video file was converted on Sun May 17 2015 at
15:12:59 GMT-0700 (Pacific Daylight Time) in Chrome (version 42.0.2311.135)
on a Win computer using the https://clipchamp.com online video converter,
video compressor, and selfie webcam recorder.
    comment         : Converted with https://clipchamp.com - online video
converter, video compressor, and webcam selfie recorder. Fast, reliable,
and total privacy.
    encoder         : Lavf56.4.101
    Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p,
1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 25 fps, 12800 tbn, 25 tbc (default)
    Metadata:
      encoder         : Lavc56.1.100 libx264
Stream mapping:
  Stream #0:0 (h264) -> overlay:main
  Stream #1:0 (png) -> overlay:overlay
  overlay -> Stream #0:0 (libx264)
Press [q] to stop, [?] for help
frame=    5 fps=0.0 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A
frame=   10 fps=9.6 q=26.0 size=     275kB time=00:00:00.12
bitrate=18770.0kbits/s
frame=   15 fps=9.6 q=25.0 size=     507kB time=00:00:00.32
bitrate=12985.9kbits/s
frame=   20 fps=9.2 q=25.0 size=     775kB time=00:00:00.52
bitrate=12209.7kbits/s
frame=   25 fps=9.2 q=25.0 size=    1047kB time=00:00:00.72
bitrate=11917.4kbits/s
frame=   31 fps=9.3 q=25.0 size=    1377kB time=00:00:00.96
bitrate=11750.3kbits/s
frame=   36 fps=9.3 q=25.0 size=    1632kB time=00:00:01.16
bitrate=11525.1kbits/s
frame=   42 fps=9.3 q=25.0 size=    1953kB time=00:00:01.40
bitrate=11429.7kbits/s
frame=   47 fps=9.4 q=25.0 size=    2207kB time=00:00:01.60
bitrate=11297.7kbits/s
frame=   53 fps=9.5 q=27.0 size=    2615kB time=00:00:01.84
bitrate=11641.3kbits/s
frame=   57 fps=9.3 q=27.0 size=    2886kB time=00:00:02.00
bitrate=11819.7kbits/s
frame=   62 fps=9.3 q=27.0 size=    3222kB time=00:00:02.20
bitrate=11999.2kbits/s
frame=   66 fps=9.0 q=27.0 size=    3500kB time=00:00:02.36
bitrate=12147.9kbits/s
frame=   69 fps=8.6 q=28.0 size=    3702kB time=00:00:02.48
bitrate=12228.1kbits/s
frame=   73 fps=8.5 q=27.0 size=    3991kB time=00:00:02.64
bitrate=12382.7kbits/s
frame=   78 fps=8.5 q=27.0 size=    4345kB time=00:00:02.84
bitrate=12534.2kbits/s
frame=   82 fps=8.4 q=27.0 size=    4634kB time=00:00:03.00
bitrate=12652.9kbits/s
frame=   87 fps=8.5 q=27.0 size=    5016kB time=00:00:03.20
bitrate=12840.9kbits/s
frame=   92 fps=8.4 q=27.0 size=    5391kB time=00:00:03.40
bitrate=12989.0kbits/s
frame=   98 fps=8.5 q=26.0 size=    5806kB time=00:00:03.64
bitrate=13067.3kbits/s
frame=  103 fps=8.5 q=23.0 size=    6154kB time=00:00:03.84
bitrate=13127.6kbits/s
frame=  107 fps=8.4 q=24.0 size=    6355kB time=00:00:04.00
bitrate=13014.9kbits/s
frame=  111 fps=8.4 q=23.0 size=    6420kB time=00:00:04.16
bitrate=12643.1kbits/s
frame=  116 fps=8.4 q=23.0 size=    6543kB time=00:00:04.36
bitrate=12293.4kbits/s
frame=  121 fps=8.2 q=22.0 size=    6674kB time=00:00:04.56
bitrate=11990.4kbits/s
frame=  127 fps=8.3 q=23.0 size=    6775kB time=00:00:04.80
bitrate=11561.9kbits/s
frame=  132 fps=8.3 q=26.0 size=    6880kB time=00:00:05.00
bitrate=11272.3kbits/s
frame=  136 fps=8.3 q=28.0 size=    7016kB time=00:00:05.16
bitrate=11138.3kbits/s
frame=  140 fps=8.2 q=27.0 size=    7188kB time=00:00:05.32
bitrate=11068.8kbits/s
frame=  146 fps=8.2 q=28.0 size=    7449kB time=00:00:05.56
bitrate=10975.3kbits/s
frame=  150 fps=8.2 q=27.0 size=    7599kB time=00:00:05.72
bitrate=10883.1kbits/s
frame=  154 fps=8.1 q=27.0 size=    7812kB time=00:00:05.88
bitrate=10884.2kbits/s
frame=  159 fps=8.1 q=27.0 size=    8041kB time=00:00:06.08
bitrate=10834.9kbits/s
frame=  162 fps=8.1 q=25.0 size=    8106kB time=00:00:06.20
bitrate=10710.7kbits/s
frame=  166 fps=8.0 q=23.0 size=    8262kB time=00:00:06.36
bitrate=10642.2kbits/s
frame=  170 fps=8.0 q=23.0 size=    8341kB time=00:00:06.52
bitrate=10480.5kbits/s
frame=  174 fps=8.0 q=26.0 size=    8423kB time=00:00:06.68
bitrate=10330.1kbits/s
frame=  178 fps=8.0 q=23.0 size=    8560kB time=00:00:06.84
bitrate=10251.5kbits/s
frame=  184 fps=8.0 q=23.0 size=    8733kB time=00:00:07.08
bitrate=10104.9kbits/s
frame=  190 fps=8.1 q=21.0 size=    8882kB time=00:00:07.32
bitrate=9940.0kbits/s
frame=  194 fps=8.1 q=20.0 size=    8980kB time=00:00:07.48
bitrate=9835.0kbits/s
frame=  201 fps=8.2 q=20.0 size=    9072kB time=00:00:07.76
bitrate=9576.6kbits/s
frame=  207 fps=8.2 q=20.0 size=    9143kB time=00:00:08.00
bitrate=9362.0kbits/s
frame=  213 fps=8.3 q=27.0 size=    9213kB time=00:00:08.24
bitrate=9159.6kbits/s
frame=  219 fps=8.3 q=25.0 size=    9396kB time=00:00:08.48
bitrate=9076.8kbits/s
frame=  225 fps=8.3 q=25.0 size=    9576kB time=00:00:08.72
bitrate=8996.2kbits/s
frame=  231 fps=8.4 q=24.0 size=    9757kB time=00:00:08.96
bitrate=8920.8kbits/s
frame=  236 fps=8.4 q=24.0 size=    9929kB time=00:00:09.16
bitrate=8879.9kbits/s
frame=  242 fps=8.4 q=24.0 size=   10076kB time=00:00:09.40
bitrate=8780.9kbits/s
frame=  248 fps=8.5 q=24.0 size=   10213kB time=00:00:09.64
bitrate=8678.8kbits/s
frame=  253 fps=8.5 q=21.0 size=   10326kB time=00:00:09.84
bitrate=8596.4kbits/s
frame=  259 fps=8.5 q=24.0 size=   10549kB time=00:00:10.08
bitrate=8573.3kbits/s
frame=  265 fps=8.6 q=24.0 size=   10681kB time=00:00:10.32
bitrate=8478.6kbits/s
frame=  271 fps=8.6 q=23.0 size=   10815kB time=00:00:10.56
bitrate=8389.7kbits/s
frame=  277 fps=8.6 q=23.0 size=   10932kB time=00:00:10.80
bitrate=8292.0kbits/s
frame=  281 fps=8.6 q=22.0 size=   11006kB time=00:00:10.96
bitrate=8226.6kbits/s
frame=  286 fps=8.6 q=24.0 size=   11135kB time=00:00:11.16
bitrate=8173.6kbits/s
frame=  291 fps=8.6 q=22.0 size=   11242kB time=00:00:11.36
bitrate=8106.8kbits/s
frame=  294 fps=8.6 q=24.0 size=   11295kB time=00:00:11.48
bitrate=8059.8kbits/s
frame=  299 fps=8.6 q=24.0 size=   11391kB time=00:00:11.68
bitrate=7989.0kbits/s
frame=  303 fps=8.5 q=24.0 size=   11503kB time=00:00:11.84
bitrate=7958.8kbits/s
frame=  309 fps=8.6 q=23.0 size=   11635kB time=00:00:12.08
bitrate=7890.1kbits/s
frame=  314 fps=8.6 q=23.0 size=   11749kB time=00:00:12.28
bitrate=7838.0kbits/s
frame=  319 fps=8.6 q=23.0 size=   11856kB time=00:00:12.48
bitrate=7782.2kbits/s
frame=  326 fps=8.6 q=22.0 size=   11986kB time=00:00:12.76
bitrate=7695.0kbits/s
frame=  331 fps=8.7 q=22.0 size=   12086kB time=00:00:12.96
bitrate=7639.7kbits/s
frame=  337 fps=8.7 q=22.0 size=   12199kB time=00:00:13.20
bitrate=7570.9kbits/s
frame=  343 fps=8.7 q=22.0 size=   12302kB time=00:00:13.44
bitrate=7498.1kbits/s
frame=  344 fps=8.5 q=22.0 size=   12317kB time=00:00:13.48
bitrate=7485.1kbits/s
frame=  350 fps=8.6 q=28.0 size=   12408kB time=00:00:13.72
bitrate=7408.9kbits/s
frame=  354 fps=8.5 q=28.0 size=   12638kB time=00:00:13.88
bitrate=7459.1kbits/s
frame=  358 fps=8.5 q=29.0 size=   12837kB time=00:00:14.04
bitrate=7490.1kbits/s
frame=  363 fps=8.5 q=27.0 size=   13107kB time=00:00:14.24
bitrate=7540.4kbits/s
frame=  367 fps=8.5 q=26.0 size=   13317kB time=00:00:14.40
bitrate=7576.0kbits/s
frame=  373 fps=8.5 q=28.0 size=   13515kB time=00:00:14.64
bitrate=7562.5kbits/s
frame=  378 fps=8.5 q=26.0 size=   13755kB time=00:00:14.84
bitrate=7593.3kbits/s
frame=  382 fps=8.5 q=19.0 size=   13964kB time=00:00:15.00
bitrate=7626.1kbits/s
frame=  389 fps=8.6 q=18.0 size=   14022kB time=00:00:15.28
bitrate=7517.3kbits/s
frame=  394 fps=8.6 q=20.0 size=   14053kB time=00:00:15.48
bitrate=7437.0kbits/s
frame=  399 fps=8.6 q=18.0 size=   14103kB time=00:00:15.68
bitrate=7368.2kbits/s
frame=  407 fps=8.7 q=18.0 size=   14163kB time=00:00:16.00
bitrate=7251.4kbits/s
frame=  416 fps=8.8 q=16.0 size=   14216kB time=00:00:16.36
bitrate=7118.4kbits/s
frame=  426 fps=8.9 q=15.0 size=   14245kB time=00:00:16.76
bitrate=6962.5kbits/s
frame=  432 fps=8.9 q=-1.0 Lsize=   14288kB time=00:00:17.28
bitrate=6773.8kbits/s
video:14285kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 0.021855%
[libx264 @ 0xb90a6cb0] frame I:2     Avg QP:20.50  size:168292
[libx264 @ 0xb90a6cb0] frame P:430   Avg QP:23.59  size: 33235
[libx264 @ 0xb90a6cb0] mb I  I16..4: 100.0%  0.0%  0.0%
[libx264 @ 0xb90a6cb0] mb P  I16..4: 22.3%  0.0%  0.0%  P16..4: 44.2%
0.0%  0.0%  0.0%  0.0%    skip:33.5%
[libx264 @ 0xb90a6cb0] coded y,uvDC,uvAC intra: 35.0% 45.3% 16.0% inter:
30.2% 28.2% 5.4%
[libx264 @ 0xb90a6cb0] i16 v,h,dc,p: 40% 27% 15% 18%
[libx264 @ 0xb90a6cb0] i8c dc,h,v,p: 47% 23% 20% 10%
[libx264 @ 0xb90a6cb0] kb/s:6772.03

On Mon, Dec 28, 2015 at 10:08 AM, Lou <lou at lrcd.com> wrote:

> On Sun, Dec 27, 2015, at 07:09 PM, Rajasekhar Reddy wrote:
> > Hi This is my command and output using ffmpeg github example
> [...]
>
> What is a "ffmpeg github example"?
>
> Your console output has a large amount of extra non-FFmpeg junk in it
> that makes it too annoying to read.
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>



-- 
With Regards,

U.Rajasekhar Reddy


More information about the ffmpeg-user mailing list