
Recherche avancée
Autres articles (25)
-
La sauvegarde automatique de canaux SPIP
1er avril 2010, parDans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...) -
Automated installation script of MediaSPIP
25 avril 2011, parTo overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
The documentation of the use of this installation script is available here.
The code of this (...) -
Librairies et logiciels spécifiques aux médias
10 décembre 2010, parPour un fonctionnement correct et optimal, plusieurs choses sont à prendre en considération.
Il est important, après avoir installé apache2, mysql et php5, d’installer d’autres logiciels nécessaires dont les installations sont décrites dans les liens afférants. Un ensemble de librairies multimedias (x264, libtheora, libvpx) utilisées pour l’encodage et le décodage des vidéos et sons afin de supporter le plus grand nombre de fichiers possibles. Cf. : ce tutoriel ; FFMpeg avec le maximum de décodeurs et (...)
Sur d’autres sites (2772)
-
FFMPEG Video Cropping slower [duplicate]
23 juin 2016, par syed imtyThis question already has an answer here :
-
Fast Video Compression on Android
2 answers
I am trying to crop rectangular video into a square one using FFMPEG. The video conversion take too much time.
For a video of 30 secs, it takes around 60-70secs to convert
FFMPEG Command
String commandStr =" -i "+videoPath+" -vcodec libx264 -b:v 880k -vf crop=" + videoSize.height + ":"+ videoSize.height + ":" + cropStart +":0 -preset ultrafast -strict -2 " +compressedVideoPath;
Progress Log
D/ViewRootImpl: ViewPostImeInputStage ACTION_DOWN
I/System.out: Video converison : /storage/emulated/0/IHH_y/147.mp4 /storage/emulated/0/IHH_y/147upload.mp4 wxh1080:1080:420
I/System.out: FFMpeg lib onStart
D/FFmpeg: Running publishing updates method
I/System.out: FFMpeg lib onProgressWARNING: linker: /data/data/com.x.y/files/ffmpeg has text relocations. This is wasting memory and prevents security hardening. Please fix.
I/System.out: FFMpeg lib onProgressffmpeg version n2.4.2 Copyright (c) 2000-2014 the FFmpeg developers
I/System.out: FFMpeg lib onProgress built on Oct 7 2014 15:08:46 with gcc 4.8 (GCC)
I/System.out: FFMpeg lib onProgress 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=
I/System.out: FFMpeg lib onProgress libavutil 54. 7.100 / 54. 7.100
I/System.out: FFMpeg lib onProgress libavcodec 56. 1.100 / 56. 1.100
I/System.out: FFMpeg lib onProgress libavformat 56. 4.101 / 56. 4.101
I/System.out: FFMpeg lib onProgress libavdevice 56. 0.100 / 56. 0.100
I/System.out: FFMpeg lib onProgress libavfilter 5. 1.100 / 5. 1.100
I/System.out: FFMpeg lib onProgress libswscale 3. 0.100 / 3. 0.100
I/System.out: FFMpeg lib onProgress libswresample 1. 1.100 / 1. 1.100
I/System.out: FFMpeg lib onProgress libpostproc 53. 0.100 / 53. 0.100
I/System.out: FFMpeg lib onProgressInput #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/IHH_y/147.mp4':
I/System.out: FFMpeg lib onProgress Metadata:
I/System.out: FFMpeg lib onProgress major_brand : mp42
I/System.out: FFMpeg lib onProgress minor_version : 0
I/System.out: FFMpeg lib onProgress compatible_brands: isommp42
I/System.out: FFMpeg lib onProgress creation_time : 2016-06-23 20:00:50
I/System.out: FFMpeg lib onProgress Duration: 00:00:08.92, start: 0.000000, bitrate: 8966 kb/s
I/System.out: FFMpeg lib onProgress Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080, 8983 kb/s, 16.66 fps, 16.67 tbr, 90k tbn, 180k tbc (default)
I/System.out: FFMpeg lib onProgress Metadata:
I/System.out: FFMpeg lib onProgress rotate : 90
I/System.out: FFMpeg lib onProgress creation_time : 2016-06-23 20:00:50
I/System.out: FFMpeg lib onProgress handler_name : VideoHandle
I/System.out: FFMpeg lib onProgress Side data:
I/System.out: FFMpeg lib onProgress displaymatrix: rotation of -90.00 degrees
I/System.out: FFMpeg lib onProgress Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 254 kb/s (default)
I/System.out: FFMpeg lib onProgress Metadata:
I/System.out: FFMpeg lib onProgress creation_time : 2016-06-23 20:00:50
I/System.out: FFMpeg lib onProgress handler_name : SoundHandle
I/System.out: FFMpeg lib onProgress[libx264 @ 0xb5e08800] using cpu capabilities: none!
I/System.out: FFMpeg lib onProgress[libx264 @ 0xb5e08800] profile Constrained Baseline, level 3.2
I/System.out: FFMpeg lib onProgress[libx264 @ 0xb5e08800] 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=16 scenecut=0 intra_refresh=0 rc=abr mbtree=0 bitrate=880 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0
I/System.out: FFMpeg lib onProgressOutput #0, mp4, to '/storage/emulated/0/IHH_y/147upload.mp4':
I/System.out: FFMpeg lib onProgress Metadata:
I/System.out: FFMpeg lib onProgress major_brand : mp42
I/System.out: FFMpeg lib onProgress minor_version : 0
I/System.out: FFMpeg lib onProgress compatible_brands: isommp42
I/System.out: FFMpeg lib onProgress encoder : Lavf56.4.101
I/System.out: FFMpeg lib onProgress Stream #0:0(eng): Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 1080x1080, q=-1--1, 880 kb/s, 16.67 fps, 12800 tbn, 16.67 tbc (default)
I/System.out: FFMpeg lib onProgress Metadata:
I/System.out: FFMpeg lib onProgress rotate : 90
I/System.out: FFMpeg lib onProgress creation_time : 2016-06-23 20:00:50
I/System.out: FFMpeg lib onProgress handler_name : VideoHandle
I/System.out: FFMpeg lib onProgress encoder : Lavc56.1.100 libx264
I/System.out: FFMpeg lib onProgress Stream #0:1(eng): Audio: aac ([64][0][0][0] / 0x0040), 48000 Hz, stereo, fltp, 128 kb/s (default)
I/System.out: FFMpeg lib onProgress Metadata:
I/System.out: FFMpeg lib onProgress creation_time : 2016-06-23 20:00:50
I/System.out: FFMpeg lib onProgress handler_name : SoundHandle
I/System.out: FFMpeg lib onProgress encoder : Lavc56.1.100 aac
I/System.out: FFMpeg lib onProgressStream mapping:
I/System.out: FFMpeg lib onProgress Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
I/System.out: FFMpeg lib onProgress Stream #0:1 -> #0:1 (aac (native) -> aac (native))
I/System.out: FFMpeg lib onProgressPress [q] to stop, [?] for help
I/System.out: FFMpeg lib onProgressframe= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.96 bitrate= 0.4kbits/s
I/System.out: FFMpeg lib onProgressframe= 7 fps=6.8 q=0.0 size= 0kB time=00:00:01.05 bitrate= 0.4kbits/s
I/System.out: FFMpeg lib onProgressframe= 15 fps=9.7 q=35.0 size= 87kB time=00:00:01.07 bitrate= 660.5kbits/s
I/System.out: FFMpeg lib onProgressframe= 15 fps=7.3 q=35.0 size= 87kB time=00:00:01.88 bitrate= 376.7kbits/s
I/System.out: FFMpeg lib onProgressframe= 25 fps=9.6 q=35.0 size= 154kB time=00:00:02.05 bitrate= 613.4kbits/s
I/System.out: FFMpeg lib onProgressframe= 32 fps= 10 q=35.0 size= 199kB time=00:00:02.07 bitrate= 784.7kbits/s
I/System.out: FFMpeg lib onProgressframe= 32 fps=8.8 q=35.0 size= 199kB time=00:00:02.93 bitrate= 556.4kbits/s
I/System.out: FFMpeg lib onProgressframe= 42 fps= 10 q=35.0 size= 263kB time=00:00:03.06 bitrate= 705.2kbits/s
I/System.out: FFMpeg lib onProgressframe= 49 fps= 10 q=36.0 size= 328kB time=00:00:03.08 bitrate= 870.9kbits/s
I/System.out: FFMpeg lib onProgressframe= 50 fps=9.5 q=36.0 size= 341kB time=00:00:04.06 bitrate= 687.2kbits/s
I/System.out: FFMpeg lib onProgressframe= 59 fps= 10 q=36.0 size= 407kB time=00:00:04.06 bitrate= 821.2kbits/s
I/System.out: FFMpeg lib onProgressframe= 66 fps= 10 q=36.0 size= 462kB time=00:00:04.10 bitrate= 922.7kbits/s
I/System.out: FFMpeg lib onProgressframe= 66 fps=9.7 q=36.0 size= 462kB time=00:00:05.00 bitrate= 757.4kbits/s
I/System.out: FFMpeg lib onProgressframe= 77 fps= 10 q=35.0 size= 534kB time=00:00:05.06 bitrate= 864.0kbits/s
I/System.out: FFMpeg lib onProgressframe= 83 fps= 11 q=34.0 size= 566kB time=00:00:05.44 bitrate= 850.2kbits/s
I/System.out: FFMpeg lib onProgressframe= 89 fps= 11 q=34.0 size= 600kB time=00:00:06.06 bitrate= 810.6kbits/s
I/System.out: FFMpeg lib onProgressframe= 95 fps= 11 q=35.0 size= 636kB time=00:00:06.06 bitrate= 859.0kbits/s
I/System.out: FFMpeg lib onProgressframe= 100 fps= 11 q=34.0 size= 676kB time=00:00:06.28 bitrate= 881.8kbits/s
I/System.out: FFMpeg lib onProgressframe= 104 fps= 11 q=33.0 size= 702kB time=00:00:07.07 bitrate= 812.8kbits/s
I/System.out: FFMpeg lib onProgressframe= 114 fps= 11 q=34.0 size= 765kB time=00:00:07.07 bitrate= 885.7kbits/s
I/System.out: FFMpeg lib onProgressframe= 117 fps= 11 q=33.0 size= 787kB time=00:00:07.26 bitrate= 887.7kbits/s
I/System.out: FFMpeg lib onProgressframe= 117 fps= 10 q=33.0 size= 787kB time=00:00:08.03 bitrate= 802.8kbits/s
I/System.out: FFMpeg lib onProgressframe= 129 fps= 11 q=33.0 size= 857kB time=00:00:08.07 bitrate= 869.1kbits/s
I/System.out: FFMpeg lib onProgressframe= 138 fps= 11 q=34.0 size= 922kB time=00:00:08.07 bitrate= 935.1kbits/s
I/System.out: FFMpeg lib onProgressframe= 140 fps= 11 q=33.0 size= 937kB time=00:00:08.58 bitrate= 894.1kbits/s
I/System.out: FFMpeg lib onProgressframe= 144 fps= 11 q=-1.0 Lsize= 1032kB time=00:00:08.96 bitrate= 943.0kbits/s
I/System.out: FFMpeg lib onProgressvideo:889kB audio:138kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.512610%
I/System.out: FFMpeg lib onProgress[libx264 @ 0xb5e08800] frame I:1 Avg QP:33.00 size: 21090
I/System.out: FFMpeg lib onProgress[libx264 @ 0xb5e08800] frame P:143 Avg QP:34.49 size: 6217
I/System.out: FFMpeg lib onProgress[libx264 @ 0xb5e08800] mb I I16..4: 100.0% 0.0% 0.0%
I/System.out: FFMpeg lib onProgress[libx264 @ 0xb5e08800] mb P I16..4: 10.3% 0.0% 0.0% P16..4: 21.2% 0.0% 0.0% 0.0% 0.0% skip:68.5%
I/System.out: FFMpeg lib onProgress[libx264 @ 0xb5e08800] final ratefactor: 34.56
I/System.out: FFMpeg lib onProgress[libx264 @ 0xb5e08800] coded y,uvDC,uvAC intra: 16.9% 5.8% 0.1% inter: 6.2% 0.9% 0.0%
I/System.out: FFMpeg lib onProgress[libx264 @ 0xb5e08800] i16 v,h,dc,p: 55% 30% 8% 7%
I/System.out: FFMpeg lib onProgress[libx264 @ 0xb5e08800] i8c dc,h,v,p: 55% 18% 24% 3%
I/System.out: FFMpeg lib onProgress[libx264 @ 0xb5e08800] kb/s:842.72
I/System.out: FFMpeg lib onSuccessWARNING: linker: /data/data/com.x.y/files/ffmpeg has text relocations. This is wasting memory and prevents security hardening. Please fix.
I/System.out: ffmpeg version n2.4.2 Copyright (c) 2000-2014 the FFmpeg developers
I/System.out: built on Oct 7 2014 15:08:46 with gcc 4.8 (GCC)
I/System.out: 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=
I/System.out: libavutil 54. 7.100 / 54. 7.100
I/System.out: libavcodec 56. 1.100 / 56. 1.100
I/System.out: libavformat 56. 4.101 / 56. 4.101
I/System.out: libavdevice 56. 0.100 / 56. 0.100
I/System.out: libavfilter 5. 1.100 / 5. 1.100
I/System.out: libswscale 3. 0.100 / 3. 0.100
I/System.out: libswresample 1. 1.100 / 1. 1.100
I/System.out: libpostproc 53. 0.100 / 53. 0.100
I/System.out: Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/IHH_y/147.mp4':
I/System.out: Metadata:
I/System.out: major_brand : mp42
I/System.out: minor_version : 0
I/System.out: compatible_brands: isommp42
I/System.out: creation_time : 2016-06-23 20:00:50
I/System.out: Duration: 00:00:08.92, start: 0.000000, bitrate: 8966 kb/s
I/System.out: Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080, 8983 kb/s, 16.66 fps, 16.67 tbr, 90k tbn, 180k tbc (default)
I/System.out: Metadata:
I/System.out: rotate : 90
I/System.out: creation_time : 2016-06-23 20:00:50
I/System.out: handler_name : VideoHandle
I/System.out: Side data:
I/System.out: displaymatrix: rotation of -90.00 degrees
I/System.out: Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 254 kb/s (default)
I/System.out: Metadata:
I/System.out: creation_time : 2016-06-23 20:00:50
I/System.out: handler_name : SoundHandle
I/System.out: [libx264 @ 0xb5e08800] using cpu capabilities: none!
I/System.out: [libx264 @ 0xb5e08800] profile Constrained Baseline, level 3.2
I/System.out: [libx264 @ 0xb5e08800] 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=16 scenecut=0 intra_refresh=0 rc=abr mbtree=0 bitrate=880 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0
I/System.out: Output #0, mp4, to '/storage/emulated/0/IHH_y/147upload.mp4':
I/System.out: Metadata:
I/System.out: major_brand : mp42
I/System.out: minor_version : 0
I/System.out: compatible_brands: isommp42
I/System.out: encoder : Lavf56.4.101
I/System.out: Stream #0:0(eng): Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 1080x1080, q=-1--1, 880 kb/s, 16.67 fps, 12800 tbn, 16.67 tbc (default)
I/System.out: Metadata:
I/System.out: rotate : 90
I/System.out: creation_time : 2016-06-23 20:00:50
I/System.out: handler_name : VideoHandle
I/System.out: encoder : Lavc56.1.100 libx264
I/System.out: Stream #0:1(eng): Audio: aac ([64][0][0][0] / 0x0040), 48000 Hz, stereo, fltp, 128 kb/s (default)
I/System.out: Metadata:
I/System.out: creation_time : 2016-06-23 20:00:50
I/System.out: handler_name : SoundHandle
I/System.out: encoder : Lavc56.1.100 aac
I/System.out: Stream mapping:
I/System.out: Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
I/System.out: Stream #0:1 -> #0:1 (aac (native) -> aac (native))
I/System.out: Press [q] to stop, [?] for help
I/System.out: frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.96 bitrate= 0.4kbits/s
I/System.out: frame= 7 fps=6.8 q=0.0 size= 0kB time=00:00:01.05 bitrate= 0.4kbits/s
I/System.out: frame= 15 fps=9.7 q=35.0 size= 87kB time=00:00:01.07 bitrate= 660.5kbits/s
I/System.out: frame= 15 fps=7.3 q=35.0 size= 87kB time=00:00:01.88 bitrate= 376.7kbits/s
I/System.out: frame= 25 fps=9.6 q=35.0 size= 154kB time=00:00:02.05 bitrate= 613.4kbits/s
I/System.out: frame= 32 fps= 10 q=35.0 size= 199kB time=00:00:02.07 bitrate= 784.7kbits/s
I/System.out: frame= 32 fps=8.8 q=35.0 size= 199kB time=00:00:02.93 bitrate= 556.4kbits/s
I/System.out: frame= 42 fps= 10 q=35.0 size= 263kB time=00:00:03.06 bitrate= 705.2kbits/s
I/System.out: frame= 49 fps= 10 q=36.0 size= 328kB time=00:00:03.08 bitrate= 870.9kbits/s
I/System.out: frame= 50 fps=9.5 q=36.0 size= 341kB time=00:00:04.06 bitrate= 687.2kbits/s
I/System.out: frame= 59 fps= 10 q=36.0 size= 407kB time=00:00:04.06 bitrate= 821.2kbits/s
I/System.out: frame= 66 fps= 10 q=36.0 size= 462kB time=00:00:04.10 bitrate= 922.7kbits/s
I/System.out: frame= 66 fps=9.7 q=36.0 size= 462kB time=00:00:05.00 bitrate= 757.4kbits/s
I/System.out: frame= 77 fps= 10 q=35.0 size= 534kB time=00:00:05.06 bitrate= 864.0kbits/s
I/System.out: frame= 83 fps= 11 q=34.0 size= 566kB time=00:00:05.44 bitrate= 850.2kbits/s
I/System.out: frame= 89 fps= 11 q=34.0 size= 600kB time=00:00:06.06 bitrate= 810.6kbits/s
I/System.out: frame= 95 fps= 11 q=35.0 size= 636kB time=00:00:06.06 bitrate= 859.0kbits/s
I/System.out: frame= 100 fps= 11 q=34.0 size= 676kB time=00:00:06.28 bitrate= 881.8kbits/s
I/System.out: frame= 104 fps= 11 q=33.0 size= 702kB time=00:00:07.07 bitrate= 812.8kbits/s
I/System.out: frame= 114 fps= 11 q=34.0 size= 765kB time=00:00:07.07 bitrate= 885.7kbits/s
I/System.out: frame= 117 fps= 11 q=33.0 size= 787kB time=00:00:07.26 bitrate= 887.7kbits/s
I/System.out: frame= 117 fps= 10 q=33.0 size= 787kB time=00:00:08.03 bitrate= 802.8kbits/s
I/System.out: frame= 129 fps= 11 q=33.0 size= 857kB time=00:00:08.07 bitrate= 869.1kbits/s
I/System.out: frame= 138 fps= 11 q=34.0 size= 922kB time=00:00:08.07 bitrate= 935.1kbits/s
I/System.out: frame= 140 fps= 11 q=33.0 size= 937kB time=00:00:08.58 bitrate= 894.1kbits/s
I/System.out: frame= 144 fps= 11 q=-1.0 Lsize= 1032kB time=00:00:08.96 bitrate= 943.0kbits/s
I/System.out: video:889kB audio:138kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.512610%
I/System.out: [libx264 @ 0xb5e08800] frame I:1 Avg QP:33.00 size: 21090
I/System.out: [libx264 @ 0xb5e08800] frame P:143 Avg QP:34.49 size: 6217
I/System.out: [libx264 @ 0xb5e08800] mb I I16..4: 100.0% 0.0% 0.0%
I/System.out: [libx264 @ 0xb5e08800] mb P I16..4: 10.3% 0.0% 0.0% P16..4: 21.2% 0.0% 0.0% 0.0% 0.0% skip:68.5%
I/System.out: [libx264 @ 0xb5e08800] final ratefactor: 34.56
I/System.out: [libx264 @ 0xb5e08800] coded y,uvDC,uvAC intra: 16.9% 5.8% 0.1% inter: 6.2% 0.9% 0.0%
I/System.out: [libx264 @ 0xb5e08800] i16 v,h,dc,p: 55% 30% 8% 7%As you can see from the log, the conversion fps is very low
Need help to make it faster.Note : The source file is MP4 and output file is MP4 as well
-
Fast Video Compression on Android
-
stream 0, timescale not set when concat video using ffmpeg
17 février 2018, par no nameI have 2 video which i want to add them together so i make a text file which contains the file names
file No-fade_25fps.mp4
file video.mp4then i start using this command
ffmpeg -f concat -i ffmpeg-sound.txt -c copy final_output.mp4
the problem is i got this from ffmpeg
[mov,mp4,m4a,3gp,3g2,mj2 @ 0561dbc0] stream 0, timescale not set
[mov,mp4,m4a,3gp,3g2,mj2 @ 0561dbc0] Auto-inserting h264_mp4toannexb bitstream filter
Input #0, concat, from 'out.txt':
Duration: N/A, start: 0.000000, bitrate: 464 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 1280x720 [SAR 1:1 DAR 16:9], 464 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc
Metadata:
creation_time : 2018-02-09T10:36:18.000000Z
handler_name : Core Media Video
Stream #0:1: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 1280x720 [SAR 72:72 DAR 16:9], 90k tbr, 90k tbn, 90k tbc
Output #0, mp4, to 'final_output.mp4':
Metadata:
encoder : Lavf58.7.100
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 464 kb/s, 25 fps, 25 tbr, 12800 tbn, 25 tbc
Metadata:
creation_time : 2018-02-09T10:36:18.000000Z
handler_name : Core Media Video
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
[mov,mp4,m4a,3gp,3g2,mj2 @ 05c3e940] Auto-inserting h264_mp4toannexb bitstream filter
frame= 8194 fps=0.0 q=-1.0 Lsize= 2254kB time=46:35:51.68 bitrate= 0.1kbits/s speed=1.19e+006x
video:2157kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 4.486598%the result give me a video mp4 file with a long duration like 46:33:20 and it not work, and iam sure that both videos have same reslution.
what i tried is to use this command to convert the videoffmpeg -y -i No-fade_25fps.mp4 -r 25 -s 1280x720 -c:v libx264 -b:v 3M -strict -2 -movflags faststart destination.mp4
and when i concate them again it worked and give me result mp4 file which have a right duration and worked fine but without a sound, because the first video file i use is muted no sound in it and second one contains a sound.
my question is how to concate those videos togther without this problem also what make the video have the problem of this long duration and when i convert them using the command line it worked ?
first video info which is No-fade_25fps.mp4[mov,mp4,m4a,3gp,3g2,mj2 @ 03e05000] stream 0, timescale not set
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'No-fade_25fps.mp4':
Metadata:
major_brand : M4V
minor_version : 1
compatible_brands: M4V M4A mp42isom
creation_time : 2018-02-09T10:36:18.000000Z
keywords : tunepro,orange
album_artist : Kiran Khan
description : This video is about new tunepro
artist : Kiran Khan
title : new tunepro
Duration: 00:00:06.48, start: 0.000000, bitrate: 497 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 1280x720 [SAR 1:1 DAR 16:9], 464 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc (default)
Metadata:
creation_time : 2018-02-09T10:36:18.000000Z
handler_name : Core Media Video
Stream #0:1: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 1280x720 [SAR 72:72 DAR 16:9], 90k tbr, 90k tbn, 90k tbc
At least one output file must be specifiedsecond video video.mp4
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'video.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.7.100
Duration: 00:05:21.28, start: 0.000000, bitrate: 181 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc), 1280x720 [SAR 1:1 DAR 16:9], 45 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: mp3 (mp4a / 0x6134706D), 44100 Hz, stereo, s16p, 127 kb/s (default)
Metadata:
handler_name : SoundHandlerwhat i want is to add any number of videos togthers without a problems like this they all have same reslution and frame per second is there something else need to be checked before i start merge videos ?
Update
this what i get when i use the command without copy codec[mov,mp4,m4a,3gp,3g2,mj2 @ 058ddb80] stream 0, timescale not set
[mov,mp4,m4a,3gp,3g2,mj2 @ 058ddb80] Auto-inserting h264_mp4toannexb bitstream filter
Input #0, concat, from 'out.txt':
Duration: N/A, start: 0.000000, bitrate: 464 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 1280x720 [SAR 1:1 DAR 16:9], 464 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc
Metadata:
creation_time : 2018-02-09T10:36:18.000000Z
handler_name : Core Media Video
Stream #0:1: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 1280x720 [SAR 72:72 DAR 16:9], 90k tbr, 90k tbn, 90k tbc
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[libx264 @ 05937d00] using SAR=1/1
[libx264 @ 05937d00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 05937d00] profile High, level 3.1
[libx264 @ 05937d00] 264 - core 155 r2901 7d0ff22 - H.264/MPEG-4 AVC codec - Copyleft 2003-2018 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'final_output.mp4':
Metadata:
encoder : Lavf58.7.100
Stream #0:0(und): Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 25 fps, 12800 tbn, 25 tbc
Metadata:
creation_time : 2018-02-09T10:36:18.000000Z
handler_name : Core Media Video
encoder : Lavc58.9.100 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
[mov,mp4,m4a,3gp,3g2,mj2 @ 058ddb80] Auto-inserting h264_mp4toannexb bitstream filtered=3.41x
More than 1000 frames duplicatedand it stop like it’s in infinite loop
-
FFmpeg-Invalid PNG signature,Error while decoding stream,Invalid data found when processing input
27 octobre 2018, par Bhuvnesh VarmaI am using below ffmpeg command to convert images to video-
"-y", "-f", "concat", "-safe", "0", "-i", src.getAbsolutePath(),
"-vsync", "vfr", "-vf",
"scale=1280:720:force_original_aspect_ratio=decrease,pad=1280:720 :(ow-iw)/2 :(oh-ih)/2,format=yuv420p",
dest.getAbsolutePath()But sometimes I get below failure error-
Invalid PNG signature 0x21F904050A000400.\nError while decoding stream
Invalid data found when processing input\n[png @ 0xf0fec400] Invalid
PNG signatureComplete error
ffmpeg version n3.0.1 Copyright (c) 2000-2016 the FFmpeg developers\n
built with gcc 4.8 (GCC)\n 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=\n libavutil 55. 17.103 / 55. 17.103\n libavcodec 57. 24.102 / 57. 24.102\n libavformat 57. 25.100 /
57. 25.100\n libavdevice 57. 0.101 / 57. 0.101\n libavfilter 6. 31.100 / 6. 31.100\n libswscale 4. 0.100 / 4. 0.100\n libswresample 2. 0.101 / 2. 0.101\n libpostproc 54. 0.100 /
54. 0.100\nInput #0, concat, from ’/storage/emulated/0/Movies/videoffmeg.txt’ :\n Duration : N/A, start :
0.000000, bitrate : N/A\n Stream #0:0 : Video : png, rgb24(pc), 1080x1920, 25 tbr, 25 tbn, 25 tbc\n[libx264 @ 0xf0feb000] using cpu
capabilities : none !\n[libx264 @ 0xf0feb000] profile High, level
3.1\n[libx264 @ 0xf0feb000] 264 - core 148 - H.264/MPEG-4 AVC codec - Copyleft 2003-2015 - http://www.videolan.org/x264.html - options :
cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1
psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1
8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2
threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1
interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2
b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250
keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf
mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40
aq=1:1.00\nOutput #0, mp4, to
’/storage/emulated/0/Movies/slideshow_video.mp4’ :\n Metadata :\n
encoder : Lavf57.25.100\n Stream #0:0 : Video : h264
(libx264) ([33][0][0][0] / 0x0021), yuv420p, 1280x720, q=-1—1, 25
fps, 12800 tbn, 25 tbc\n Metadata :\n encoder :
Lavc57.24.102 libx264\n Side data :\n unknown side data type 10
(24 bytes)\nStream mapping :\n Stream #0:0 -> #0:0 (png (native) ->
h264 (libx264))\nPress [q] to stop, [?] for help\n[png @ 0xf0feb800]
Invalid PNG signature 0x474946383961F401.\n[png @ 0xf0febc00] Invalid
PNG signature 0x21F904050A000400.\n[png @ 0xf0fec000] Invalid PNG
signature 0x21F904050A000400.\n[png @ 0xf0fec400] Invalid PNG
signature 0x21F904050A000400.\n[png @ 0xf0fec800] Invalid PNG
signature 0x21F904050A000400.\n[png @ 0xf0fecc00] Invalid PNG
signature 0x21F904050A000400.\n[png @ 0xf0aff000] Invalid PNG
signature 0x21F904050A000400.\nError while decoding stream #0:0 :
Invalid data found when processing input\n[png @ 0xf0feb400] Invalid
PNG signature 0x21F904050A000400.\nError while decoding stream #0:0 :
Invalid data found when processing input\n[png @ 0xf0feb800] Invalid
PNG signature 0x21F904050A000400.\nError while decoding stream #0:0 :
Invalid data found when processing input\n[png @ 0xf0febc00] Invalid
PNG signature 0x21F904050A000400.\nError while decoding stream #0:0 :
Invalid data found when processing input\n[png @ 0xf0fec000] Invalid
PNG signature 0x21F904050A000400.\nError while decoding stream #0:0 :
Invalid data found when processing input\n[png @ 0xf0fec400] Invalid
PNG signature 0x21F904050A000400. input\n[png @ 0xf0aff000] Invalid
PNG signature 0x21F904050A000200.\nError while decoding stream #0:0 :
Invalid data found when processing input\n[png @ 0xf0feb400] Invalid
PNG signature 0x21F904050A000200.\nError while decoding stream #0:0 :
Invalid data found when processing input\n[png @ 0xf0feb800] Invalid
PNG signature 0x21F904050A000200.\nError while decoding stream #0:0 :
Invalid data found when processing input\nframe= 1 fps=0.0 q=28.0
Lsize= 26kB time=00:00:00.04 bitrate=5366.4kbits/s speed=0.0635x
\nvideo:25kB audio:0kB subtitle:0kB other streams:0kB global
headers:0kB muxing overhead : 3.073141%\n[libx264 @ 0xf0feb000] frame
I:1 Avg QP:31.22 size : 25356\n[libx264 @ 0xf0feb000] mb I
I16..4 : 5.9% 79.7% 14.5%\n[libx264 @ 0xf0feb000] 8x8 transform
intra:79.7%\n[libx264 @ 0xf0feb000] coded y,uvDC,uvAC intra : 22.3%
26.6% 14.1%\n[libx264 @ 0xf0feb000] i16 v,h,dc,p : 33% 12% 27% 28%\n[libx264 @ 0xf0feb000] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu : 41% 4% 47%
2% 1% 2% 1% 2% 1%\n[libx264 @ 0xf0feb000] i4
v,h,dc,ddl,ddr,vr,hd,vl,hu : 28% 23% 13% 6% 6% 7% 7% 5%
5%\n[libx264 @ 0xf0feb000] i8c dc,h,v,p : 81% 7% 9% 3%\n[libx264 @
0xf0feb000] kb/s:5071.20\nConversion failed !\nBy what I understand is that there might be some image file which can be corrupt which causes ffmpeg to fail in creating video from images.Is there any way FFmpeg can ignore that corrupt image file and create video from other image files ? Is there any change i can make in command to prevent this failure ?