Newest 'ffmpeg' Questions - Stack Overflow

http://stackoverflow.com/questions/tagged/ffmpeg

Les articles publiés sur le site

  • ffmpeg blend filter does not work properly

    16 mai 2018, par tainguyen

    I'm doing my android project which uses blend filter to create uncover down video transition. My test device is Samsung S4 (Android version : 4.4.2) this is my command string :

    ffmpeg 
    -loop 1 -t 1 -i img001.jpg 
    -loop 1 -t 1 -i img002.jpg 
    -loop 1 -t 1 -i img003.jpg 
    -loop 1 -t 1 -i img004.jpg 
    -loop 1 -t 1 -i img005.jpg 
    -filter_complex 
    "[1:v][0:v]blend=all_expr='if(lte(Y,N*H/24),A,B)'[b1v];
    [2:v][1:v]blend=all_expr='if(lte(Y,H*N/24),A,B)'[b2v];
    [3:v][2:v]blend=all_expr='if(lte(Y,H*N/24),A,B)'[b3v];
    [4:v][3:v]blend=all_expr='if(lte(Y,H*N/24),A,B)'[b4v];
    [0:v][b1v][1:v][b2v][2:v][b3v][3:v][b4v]
    [4:v]concat=n=9:v=1:a=0,format=yuv420p[v]" -map "[v]" out_cover_top.mp4 -y
    

    The expected output is that the top image (yellow) will uncover from the top to the bottom of bottom image (red) like this : enter image description here

    I tested in my PC (windows 7) it's right, but this is what I get in android enter image description here

    My logcat :

    onProgress: ffmpeg version n3.0.1 Copyright (c) 2000-2016 the FFmpeg developers onProgress: built with gcc 4.8 (GCC) onProgress: 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= onProgress: libavutil 55. 17.103 / 55. 17.103 onProgress: libavcodec 57. 24.102 / 57. 24.102 onProgress: libavformat 57. 25.100 / 57. 25.100 onProgress: libavdevice 57. 0.101 / 57. 0.101 onProgress: libavfilter 6. 31.100 / 6. 31.100 onProgress: libswscale 4. 0.100 / 4. 0.100 onProgress: libswresample 2. 0.101 / 2. 0.101 onProgress: libpostproc 54. 0.100 / 54. 0.100 onProgress: [mjpeg @ 0x43240d90] Changing bps to 8 onProgress: Input #0, image2, from '/storage/emulated/0/com.example.mrtai.test_animationtovideo/temporary/0.jpg': onProgress: Duration: 00:00:00.04, start: 0.000000, bitrate: 4096 kb/s onProgress: Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 480x480 [SAR 1:1 DAR 1:1], 25 fps, 25 tbr, 25 tbn, 25 tbc onProgress: [mjpeg @ 0x43242a70] Changing bps to 8 onProgress: Input #1, image2, from '/storage/emulated/0/com.example.mrtai.test_animationtovideo/temporary/1.jpg': onProgress: Duration: 00:00:00.04, start: 0.000000, bitrate: 4971 kb/s onProgress: Stream #1:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 480x480 [SAR 1:1 DAR 1:1], 25 fps, 25 tbr, 25 tbn, 25 tbc onProgress: [mjpeg @ 0x43280780] Changing bps to 8 onProgress: Input #2, image2, from '/storage/emulated/0/com.example.mrtai.test_animationtovideo/temporary/2.jpg': onProgress: Duration: 00:00:00.04, start: 0.000000, bitrate: 9413 kb/s onProgress: Stream #2:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 480x480 [SAR 1:1 DAR 1:1], 25 fps, 25 tbr, 25 tbn, 25 tbc onProgress: [mjpeg @ 0x43244260] Changing bps to 8 onProgress: Input #3, image2, from '/storage/emulated/0/com.example.mrtai.test_animationtovideo/temporary/3.jpg': onProgress: Duration: 00:00:00.04, start: 0.000000, bitrate: 4096 kb/s onProgress: Stream #3:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 480x480 [SAR 1:1 DAR 1:1], 25 fps, 25 tbr, 25 tbn, 25 tbc onProgress: [swscaler @ 0x438292b0] deprecated pixel format used, make sure you did set range correctly onProgress: [swscaler @ 0x438320f0] deprecated pixel format used, make sure you did set range correctly onProgress: [swscaler @ 0x4383af40] deprecated pixel format used, make sure you did set range correctly onProgress: [swscaler @ 0x44044100] deprecated pixel format used, make sure you did set range correctly onProgress: [swscaler @ 0x4404cf50] deprecated pixel format used, make sure you did set range correctly onProgress: [swscaler @ 0x44055d90] deprecated pixel format used, make sure you did set range correctly onProgress: [swscaler @ 0x4405ebe0] deprecated pixel format used, make sure you did set range correctly onProgress: [swscaler @ 0x44067a20] deprecated pixel format used, make sure you did set range correctly onProgress: [swscaler @ 0x44070870] deprecated pixel format used, make sure you did set range correctly onProgress: [swscaler @ 0x440796b0] deprecated pixel format used, make sure you did set range correctly onProgress: [libx264 @ 0x43df2fd0] using SAR=1/1 onProgress: [libx264 @ 0x43df2fd0] using cpu capabilities: none! onProgress: [libx264 @ 0x43df2fd0] profile Constrained Baseline, level 3.0 onProgress: [libx264 @ 0x43df2fd0] 264 - core 148 - H.264/MPEG-4 AVC codec - Copyleft 2003-2015 - 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 onProgress: Output #0, mp4, to '/storage/emulated/0/com.example.mrtai.test_animationtovideo/saves/test.mp4': onProgress: Metadata: onProgress: encoder : Lavf57.25.100 onProgress: Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 480x480 [SAR 1:1 DAR 1:1], q=-1--1, 25 fps, 12800 tbn, 25 tbc (default) onProgress: Metadata: onProgress: encoder : Lavc57.24.102 libx264 onProgress: Side data: onProgress: unknown side data type 10 (24 bytes) onProgress: Stream mapping: onProgress: Stream #0:0 (mjpeg) -> blen>bottom onProgress: Stream #0:0 (mjpeg) -> concat:in0:v0 onProgress: Stream #1:0 (mjpeg) -> blen>top onProgress: Stream #1:0 (mjpeg) -> blen>bottom onProgress: Stream #1:0 (mjpeg) -> concat:in2:v0 onProgress: Stream #2:0 (mjpeg) -> blen>top onProgress: Stream #2:0 (mjpeg) -> blen>bottom onProgress: Stream #2:0 (mjpeg) -> concat:in4:v0 onProgress: Stream #3:0 (mjpeg) -> blen>top onProgress: Stream #3:0 (mjpeg) -> concat:in6:v0 onProgress: format -> Stream #0:0 (libx264) onProgress: Press [q] to stop, [?] for help onProgress: frame= 16 fps=0.0 q=12.0 size= 51kB time=00:00:00.36 bitrate=1171.2kbits/s speed=0.685x
    onProgress: frame= 29 fps= 25 q=25.0 size= 64kB time=00:00:00.88 bitrate= 593.2kbits/s speed=0.762x
    onProgress: frame= 33 fps= 19 q=25.0 size= 72kB time=00:00:01.04 bitrate= 565.8kbits/s speed=0.611x
    onProgress: frame= 37 fps= 17 q=16.0 size= 113kB time=00:00:01.20 bitrate= 769.9kbits/s speed=0.537x
    onProgress: frame= 41 fps= 15 q=13.0 size= 147kB time=00:00:01.36 bitrate= 886.3kbits/s speed=0.495x
    onProgress: frame= 46 fps= 14 q=12.0 size= 180kB time=00:00:01.56 bitrate= 943.1kbits/s speed=0.463x
    onProgress: frame= 50 fps= 13 q=12.0 size= 188kB time=00:00:01.72 bitrate= 896.8kbits/s speed=0.439x
    onProgress: frame= 77 fps= 17 q=12.0 size= 209kB time=00:00:02.80 bitrate= 610.9kbits/s speed=0.63x
    onProgress: frame= 82 fps= 16 q=27.0 size= 213kB time=00:00:03.00 bitrate= 580.6kbits/s speed=0.594x
    onProgress: frame= 87 fps= 15 q=17.0 size= 288kB time=00:00:03.20 bitrate= 737.1kbits/s speed=0.566x
    onProgress: frame= 91 fps= 15 q=13.0 size= 349kB time=00:00:03.36 bitrate= 851.1kbits/s speed=0.536x
    onProgress: frame= 95 fps= 14 q=12.0 size= 407kB time=00:00:03.52 bitrate= 946.2kbits/s speed=0.515x
    onProgress: frame= 100 fps= 13 q=12.0 size= 416kB time=00:00:03.72 bitrate= 917.1kbits/s speed=0.501x
    onProgress: frame= 128 fps= 16 q=17.0 size= 429kB time=00:00:04.84 bitrate= 725.7kbits/s speed=0.604x
    onProgress: frame= 133 fps= 16 q=24.0 size= 438kB time=00:00:05.04 bitrate= 712.4kbits/s speed=0.589x
    onProgress: frame= 138 fps= 15 q=14.0 size= 487kB time=00:00:05.24 bitrate= 761.2kbits/s speed=0.577x
    onProgress: frame= 142 fps= 15 q=12.0 size= 519kB time=00:00:05.40 bitrate= 787.4kbits/s speed=0.564x
    onProgress: frame= 147 fps= 14 q=12.0 size= 545kB time=00:00:05.60 bitrate= 796.5kbits/s speed=0.551x
    onProgress: frame= 175 fps= 16 q=12.0 size= 561kB time=00:00:06.72 bitrate= 683.7kbits/s speed=0.619x
    onProgress: frame= 175 fps= 16 q=-1.0 Lsize= 566kB time=00:00:07.00 bitrate= 662.9kbits/s speed=0.642x
    onProgress: video:565kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhea> 0.262062% onProgress: [libx264 @ 0x43df2fd0] frame I:1 Avg QP:20.00 size: 28930 onProgress: [libx264 @ 0x43df2fd0] frame P:174 Avg QP:14.14 size: 3155 onProgress: [libx264 @ 0x43df2fd0] mb I I16..4: 100.0% 0.0% 0.0% onProgress: [libx264 @ 0x43df2fd0] mb P I16..4: 1.7% 0.0% 0.0% P16..4: 28.8% 0.0% 0.0% 0.0% 0.0% skip:69.4% onProgress: [libx264 @ 0x43df2fd0] coded y,uvDC,uvAC intra: 74.7% 79.5% 49.5% inter: 11.8% 14.3% 5.3% onProgress: [libx264 @ 0x43df2fd0] i16 v,h,dc,p: 19% 46% 18% 18% onProgress: [libx264 @ 0x43df2fd0] i8c dc,h,v,p: 26% 46% 17% 11% onProgress: [libx264 @ 0x43df2fd0] kb/s:660.46 onSuccess: ------------------------- onFinish:

    Logcat of setSar behavior :

    onProgress: ffmpeg version n3.0.1 Copyright (c) 2000-2016 the FFmpeg developers onProgress: built with gcc 4.8 (GCC) onProgress: 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= onProgress: libavutil 55. 17.103 / 55. 17.103 onProgress: libavcodec 57. 24.102 / 57. 24.102 onProgress: libavformat 57. 25.100 / 57. 25.100 onProgress: libavdevice 57. 0.101 / 57. 0.101 onProgress: libavfilter 6. 31.100 / 6. 31.100 onProgress: libswscale 4. 0.100 / 4. 0.100 onProgress: libswresample 2. 0.101 / 2. 0.101 onProgress: libpostproc 54. 0.100 / 54. 0.100 onProgress: [mjpeg @ 0x41be8890] Changing bps to 8 onProgress: Input #0, image2, from '/storage/emulated/0/test.jpg': onProgress: Duration: 00:00:00.04, start: 0.000000, bitrate: 16530 kb/s onProgress: Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 900x900 [SAR 300:300 DAR 1:1], 25 tbr, 25 tbn, 25 tbc onProgress: [swscaler @ 0x41b1c020] deprecated pixel format used, make sure you did set range correctly onProgress: Output #0, image2, to '/storage/emulated/0/com.example.mrtai.test_animationtovideo/temporary/0.jpg': onProgress: Metadata: onProgress: encoder : Lavf57.25.100 onProgress: Stream #0:0: Video: mjpeg, yuvj420p(pc), 480x480 [SAR 1:1 DAR 1:1], q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc onProgress: Metadata: onProgress: encoder : Lavc57.24.102 mjpeg onProgress: Side data: onProgress: unknown side data type 10 (24 bytes) onProgress: Stream mapping: onProgress: Stream #0:0 -> #0:0 (mjpeg (native) -> mjpeg (native)) onProgress: Press [q] to stop, [?] for help onProgress: frame= 1 fps=0.0 q=4.6 Lsize=N/A time=00:00:00.04 bitrate=N/A speed=0.293x
    onProgress: video:20kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhea> unknown onSuccess: ------------------------- onFinish: onProgress: ffmpeg version n3.0.1 Copyright (c) 2000-2016 the FFmpeg developers onProgress: built with gcc 4.8 (GCC) onProgress: 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= onProgress: libavutil 55. 17.103 / 55. 17.103 onProgress: libavcodec 57. 24.102 / 57. 24.102 onProgress: libavformat 57. 25.100 / 57. 25.100 onProgress: libavdevice 57. 0.101 / 57. 0.101 onProgress: libavfilter 6. 31.100 / 6. 31.100 onProgress: libswscale 4. 0.100 / 4. 0.100 onProgress: libswresample 2. 0.101 / 2. 0.101 onProgress: libpostproc 54. 0.100 / 54. 0.100 onProgress: [mjpeg @ 0x41ffe890] Changing bps to 8 onProgress: Input #0, image2, from '/storage/emulated/0/test2.jpg': onProgress: Duration: 00:00:00.04, start: 0.000000, bitrate: 14981 kb/s onProgress: Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 720x960 [SAR 72:72 DAR 3:4], 25 tbr, 25 tbn, 25 tbc onProgress: [swscaler @ 0x420171b0] deprecated pixel format used, make sure you did set range correctly onProgress: Output #0, image2, to '/storage/emulated/0/com.example.mrtai.test_animationtovideo/temporary/1.jpg': onProgress: Metadata: onProgress: encoder : Lavf57.25.100 onProgress: Stream #0:0: Video: mjpeg, yuvj420p(pc), 480x480 [SAR 1:1 DAR 1:1], q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc onProgress: Metadata: onProgress: encoder : Lavc57.24.102 mjpeg onProgress: Side data: onProgress: unknown side data type 10 (24 bytes) onProgress: Stream mapping: onProgress: Stream #0:0 -> #0:0 (mjpeg (native) -> mjpeg (native)) onProgress: Press [q] to stop, [?] for help onProgress: frame= 1 fps=0.0 q=5.8 Lsize=N/A time=00:00:00.04 bitrate=N/A speed=0.428x
    onProgress: video:24kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhea> unknown onSuccess: ------------------------- onFinish: onProgress: ffmpeg version n3.0.1 Copyright (c) 2000-2016 the FFmpeg developers onProgress: built with gcc 4.8 (GCC) onProgress: 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= onProgress: libavutil 55. 17.103 / 55. 17.103 onProgress: libavcodec 57. 24.102 / 57. 24.102 onProgress: libavformat 57. 25.100 / 57. 25.100 onProgress: libavdevice 57. 0.101 / 57. 0.101 onProgress: libavfilter 6. 31.100 / 6. 31.100 onProgress: libswscale 4. 0.100 / 4. 0.100 onProgress: libswresample 2. 0.101 / 2. 0.101 onProgress: libpostproc 54. 0.100 / 54. 0.100 onProgress: [mjpeg @ 0x42dac890] Changing bps to 8 onProgress: Input #0, image2, from '/storage/emulated/0/test3.jpg': onProgress: Duration: 00:00:00.04, start: 0.000000, bitrate: 6901 kb/s onProgress: Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 500x283, 25 tbr, 25 tbn, 25 tbc onProgress: [swscaler @ 0x42dcd8a0] deprecated pixel format used, make sure you did set range correctly onProgress: Output #0, image2, to '/storage/emulated/0/com.example.mrtai.test_animationtovideo/temporary/2.jpg': onProgress: Metadata: onProgress: encoder : Lavf57.25.100 onProgress: Stream #0:0: Video: mjpeg, yuvj420p(pc), 480x480 [SAR 1:1 DAR 1:1], q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc onProgress: Metadata: onProgress: encoder : Lavc57.24.102 mjpeg onProgress: Side data: onProgress: unknown side data type 10 (24 bytes) onProgress: Stream mapping: onProgress: Stream #0:0 -> #0:0 (mjpeg (native) -> mjpeg (native)) onProgress: Press [q] to stop, [?] for help onProgress: frame= 1 fps=0.0 q=6.0 Lsize=N/A time=00:00:00.04 bitrate=N/A speed=0.497x
    onProgress: video:46kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhea> unknown onSuccess: ------------------------- onFinish: onProgress: ffmpeg version n3.0.1 Copyright (c) 2000-2016 the FFmpeg developers onProgress: built with gcc 4.8 (GCC) onProgress: 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= onProgress: libavutil 55. 17.103 / 55. 17.103 onProgress: libavcodec 57. 24.102 / 57. 24.102 onProgress: libavformat 57. 25.100 / 57. 25.100 onProgress: libavdevice 57. 0.101 / 57. 0.101 onProgress: libavfilter 6. 31.100 / 6. 31.100 onProgress: libswscale 4. 0.100 / 4. 0.100 onProgress: libswresample 2. 0.101 / 2. 0.101 onProgress: libpostproc 54. 0.100 / 54. 0.100 onProgress: [mjpeg @ 0x4228a890] Changing bps to 8 onProgress: Input #0, image2, from '/storage/emulated/0/test.jpg': onProgress: Duration: 00:00:00.04, start: 0.000000, bitrate: 16530 kb/s onProgress: Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 900x900 [SAR 300:300 DAR 1:1], 25 tbr, 25 tbn, 25 tbc onProgress: [swscaler @ 0x422a31b0] deprecated pixel format used, make sure you did set range correctly onProgress: Output #0, image2, to '/storage/emulated/0/com.example.mrtai.test_animationtovideo/temporary/3.jpg': onProgress: Metadata: onProgress: encoder : Lavf57.25.100 onProgress: Stream #0:0: Video: mjpeg, yuvj420p(pc), 480x480 [SAR 1:1 DAR 1:1], q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc onProgress: Metadata: onProgress: encoder : Lavc57.24.102 mjpeg onProgress: Side data: onProgress: unknown side data type 10 (24 bytes) onProgress: Stream mapping: onProgress: Stream #0:0 -> #0:0 (mjpeg (native) -> mjpeg (native)) onProgress: Press [q] to stop, [?] for help onProgress: frame= 1 fps=0.0 q=4.6 Lsize=N/A time=00:00:00.04 bitrate=N/A speed=0.533x
    onProgress: video:20kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhea> unknown onSuccess: ------------------------- onFinish:

    Help me please.

  • PHP exec not executing FFmpeg command

    16 mai 2018, par Ali faizan

    I have used php's exec to execute FFmpeg command but its not woking when I open it in browser. But when i run this php file script in terminal it works fine.And my php safe mode is off. please help me to get it solved. my php code is

        <?php
        $output=exec("ffmpeg -f image2 -i /home/phedra/imgs/image/img%03d.png -r 12 -s 610x489 /home/phedra/imgs/video/out.avi", $out);
    echo $out;
    echo $output;
        ?>
    
  • FFmpeg stops Process C#

    16 mai 2018, par Srdjan M.

    I believe my "FFmpeg" process is getting stuck in a infinite loop or it's waiting for something and I don't know what that is. It won't pass the WaitForExit method.

    FFmpeg:

    -ss 0 -i output.mp4 -t 10 -an -y test.mp4
    

    C# Code:

    using (Process process = new Process())
    {
         process.StartInfo.UseShellExecute = false;
         process.StartInfo.RedirectStandardOutput = true;
         process.StartInfo.RedirectStandardError = true;
         process.StartInfo.FileName = FileName; // ffmpeg.exe
         process.StartInfo.Arguments = Arguments; //-ss 0 -i output.mp4 -t 10 -an -y test.mp4
         process.Start();
         process.WaitForExit(); // stops here and waits
    
         return process.StandardOutput.ReadToEnd();
    }
    

    Edit:

    Adding -loglevel quiet to my ffmpeg query made my problem disappear. Why? How can I achieve same results with out adding -loglevel quiet?

  • FFMPEG Hwaccel error with hwupload

    16 mai 2018, par nameless

    I'm currently trying to use the vaapi hwaccelleration on FFMPEG.

    In my command, I have hwaccel on vaapi, hwaccel_output_fomrat on vaapi, -hwaccel_device on /dev/dri/renderD128, as well as -vf as format=nv12, hwupload and as video codec -c:v on h264_vaapi.

    When I now try to start it, I'm getting the error

    grep stderr: [hwupload @ 0x30bb660] A hardware deveice reference is required to upload frames to. [Parsed_hwupload_1 @ 0x30bb560] Query format failed for 'Parsed_hwupload_1': Invalid argument

    Can I somewhere define a hardware device reference? I thought it's what I do with hwaccel_device, but seems like not. So what can I do to get this working?

  • Using ffmpeg in node, without using fluent-ffmpeg

    16 mai 2018, par drexdelta

    I am using ffmpeg without using fluent-ffmpeg. I am using 'child_process' from node.

    First of all I verified how can I pass more than one arguments to the child process command. and I verified it given below code.

    I used copy command like this

    cp vid1.mp4 vid2.mp4

    which successfully copied vid1 into vid2.

    const execFile = require('child_process').execFile;
    const child = execFile('cp', ['vid1.mp4', 'vid3.mp4'], (error, stdout, stderr) => {
        if (error) {
            console.error('stderr: =============================', stderr);
            throw error;
        }
        console.log('stdout: ==========================', stdout);
    });
    
    console.log('here');
    

    Above code is content of the 'index.js'(default entry point in node). And running this with node . , which copies vid1 into vid3 successfully.

    Now, I want to do watermarking to the given video. For that I am using this tutorial. Currently link to the actual tutorial is broken, you can see it here.

    This is the command that I am using

    ffmpeg -i input.mp4 -i logo.png -filter_complex "overlay=10:10" output.mp4
    

    Now the same command I am using like this ,

    const execFile = require('child_process').execFile;
    
    const child = execFile('ffmpeg', ['-i', 'input.mp4' , '-i' , 'logo.png' , '-filter_complex' , '"overlay=10:10"' , 'output.mp4' ], (error, stdout, stderr) => {
        if (error) {
            console.error('stderr: =============================', stderr);
            throw error;
        }
        console.log('stdout: ==========================', stdout);
    });
    
    console.log('here');
    

    and I am getting an error , that ,

    No such filter: '"overlay' Error initializing complex filters. Invalid argument

    /Users/neerpatel/Desktop/testProjects/childProcess/index.js:7 throw error; ^

    Error: Command failed: ffmpeg -i input.mp4 -i logo.png -filter_complex "overlay=10:10" output.mp4

    You can clearly see that the same command that runs in terminal directly, doesn't work when I pass it in child process. Why does it happen ?

    Moreover, I wanted to add tag 'watermarking' , but I can't create tag since my reputation is below 1500. please, someone do it.

    UPDATE : I used EXEC , instead of execFile . and it worked like charm, but parent file kept waiting for child process. Child process never returns END signal. and this is my code.

    const exec = require('child_process').exec;
    
    const child = exec('ffmpeg -i input.mp4 -i logo.png -filter_complex "overlay=10:10" output.mp4', (error, stdout, stderr) => {
        if (error) {
            console.error('stderr: =============================', stderr);
            throw error;
        }
        console.log('stdout: ==========================', stdout);
    });
    
    console.log('here');