
Recherche avancée
Autres articles (111)
-
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs -
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
Soumettre bugs et patchs
10 avril 2011Un logiciel n’est malheureusement jamais parfait...
Si vous pensez avoir mis la main sur un bug, reportez le dans notre système de tickets en prenant bien soin de nous remonter certaines informations pertinentes : le type de navigateur et sa version exacte avec lequel vous avez l’anomalie ; une explication la plus précise possible du problème rencontré ; si possibles les étapes pour reproduire le problème ; un lien vers le site / la page en question ;
Si vous pensez avoir résolu vous même le bug (...)
Sur d’autres sites (11560)
-
android crop square video android compress to upload like instagram
27 février 2018, par Mehdi ShojaeianI had an android application which like instagram& now I want to crop selected video in square and compress it.
I tested ffmpeg with FFmpegAndroid by this command :{"-y", "-ss", "" + (startTime / 1000), "-t", "" + ((endTime - startTime) / 1000), "-i", srcFilePath, "-vcodec", "libx264", "-crf", "35", dstFilePath}
The problem is ffmpeg run too mush slowly about 15 minute for just 30 sec video.
I also test silicompressorr but it just resize in standard video size and not compress final video.
How instagram cut, crop and scale down video files too fast ?
please help me !!!
Edit
Ffmpef log for above is :D/BHUVNESH: Progress command : ffmpeg ffmpeg version n3.0.1 Copyright (c) 2000-2016 the FFmpeg developers
02-27 20:29:36.402 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg built with gcc 4.8 (GCC)
02-27 20:29:36.402 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg 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=
02-27 20:29:36.402 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg libavutil 55. 17.103 / 55. 17.103
02-27 20:29:36.402 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg libavcodec 57. 24.102 / 57. 24.102
02-27 20:29:36.402 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg libavformat 57. 25.100 / 57. 25.100
02-27 20:29:36.403 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg libavdevice 57. 0.101 / 57. 0.101
02-27 20:29:36.403 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg libavfilter 6. 31.100 / 6. 31.100
02-27 20:29:36.403 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg libswscale 4. 0.100 / 4. 0.100
02-27 20:29:36.403 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg libswresample 2. 0.101 / 2. 0.101
02-27 20:29:36.403 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg libpostproc 54. 0.100 / 54. 0.100
02-27 20:29:37.526 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/9016-4EF8/movie/compress_video_new14.mp4':
02-27 20:29:37.527 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg Metadata:
02-27 20:29:37.527 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg major_brand : isom
02-27 20:29:37.527 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg minor_version : 512
02-27 20:29:37.527 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg compatible_brands: isomiso2avc1mp41
02-27 20:29:37.528 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg encoder : Lavf57.25.100
02-27 20:29:37.528 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg Duration: 00:00:20.01, start: 0.000000, bitrate: 48020 kb/s
02-27 20:29:37.528 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, smpte170m), 3840x2160, 47857 kb/s, 28.58 fps, 30 tbr, 90k tbn, 180k tbc (default)
02-27 20:29:37.528 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg Metadata:
02-27 20:29:37.528 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg rotate : 90
02-27 20:29:37.528 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg handler_name : VideoHandler
02-27 20:29:37.528 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg Side data:
02-27 20:29:37.529 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg displaymatrix: rotation of -90.00 degrees
02-27 20:29:37.529 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 155 kb/s (default)
02-27 20:29:37.529 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg Metadata:
02-27 20:29:37.529 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg handler_name : SoundHandler
02-27 20:29:37.541 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg [swscaler @ 0xf47ef000] deprecated pixel format used, make sure you did set range correctly
02-27 20:29:37.594 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg [swscaler @ 0xf47e4000] deprecated pixel format used, make sure you did set range correctly
02-27 20:29:37.594 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg No pixel format specified, yuvj420p for H.264 encoding chosen.
02-27 20:29:37.594 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg Use -pix_fmt yuv420p for compatibility with outdated media players.
02-27 20:29:37.594 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg [libx264 @ 0xf506d400] using cpu capabilities: none!
02-27 20:29:37.674 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg [libx264 @ 0xf506d400] profile High, level 3.1
02-27 20:29:37.674 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg [libx264 @ 0xf506d400] 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=6 lookahead_threads=1 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
02-27 20:29:37.674 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg Output #0, mp4, to '/storage/emulated/0/Movies/compress_video_new21.mp4':
02-27 20:29:37.674 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg Metadata:
02-27 20:29:37.674 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg major_brand : isom
02-27 20:29:37.674 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg minor_version : 512
02-27 20:29:37.674 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg compatible_brands: isomiso2avc1mp41
02-27 20:29:37.675 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg encoder : Lavf57.25.100
02-27 20:29:37.675 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg Stream #0:0(eng): Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuvj420p(pc), 1280x720, q=-1--1, 30 fps, 15360 tbn, 30 tbc (default)
02-27 20:29:37.676 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg Metadata:
02-27 20:29:37.676 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg handler_name : VideoHandler
02-27 20:29:37.676 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg encoder : Lavc57.24.102 libx264
02-27 20:29:37.676 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg Side data:
02-27 20:29:37.676 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg unknown side data type 10 (24 bytes)
02-27 20:29:37.676 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg Stream #0:1(eng): Audio: aac (LC) ([64][0][0][0] / 0x0040), 48000 Hz, stereo, 155 kb/s (default)
02-27 20:29:37.676 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg Metadata:
02-27 20:29:37.676 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg handler_name : SoundHandler
02-27 20:29:37.676 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg Stream mapping:
02-27 20:29:37.676 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
02-27 20:29:37.676 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg Stream #0:1 -> #0:1 (copy)
02-27 20:29:37.676 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg Press [q] to stop, [?] for help
02-27 20:29:38.359 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg frame= 1 fps=0.0 q=0.0 size= 0kB time=00:00:00.16 bitrate= 2.3kbits/s speed=0.247x
02-27 20:29:39.053 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg frame= 4 fps=2.9 q=0.0 size= 0kB time=00:00:00.27 bitrate= 1.4kbits/s speed=0.197x
02-27 20:29:39.752 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg frame= 7 fps=3.4 q=0.0 size= 0kB time=00:00:00.35 bitrate= 1.1kbits/s speed=0.173x
02-27 20:29:40.466 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg frame= 10 fps=3.6 q=0.0 size= 0kB time=00:00:00.46 bitrate= 0.8kbits/s speed=0.167x
02-27 20:29:40.990 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg frame= 12 fps=3.6 q=0.0 size= 0kB time=00:00:00.52 bitrate= 0.7kbits/s speed=0.159x
02-27 20:29:41.672 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg frame= 15 fps=3.8 q=0.0 size= 0kB time=00:00:00.63 bitrate= 0.6kbits/s speed=0.16x
02-27 20:29:42.408 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg frame= 18 fps=3.8 q=0.0 size= 0kB time=00:00:00.72 bitrate= 0.5kbits/s speed=0.153x
02-27 20:29:42.917 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg frame= 20 fps=3.8 q=0.0 size= 0kB time=00:00:00.80 bitrate= 0.5kbits/s speed=0.154x
02-27 20:29:43.660 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg frame= 23 fps=3.8 q=0.0 size= 0kB time=00:00:00.89 bitrate= 0.4kbits/s speed=0.149x
02-27 20:29:44.392 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg frame= 26 fps=3.9 q=0.0 size= 0kB time=00:00:00.99 bitrate= 0.4kbits/s speed=0.149x
02-27 20:29:44.904 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg frame= 28 fps=3.9 q=0.0 size= 0kB time=00:00:01.06 bitrate= 0.4kbits/s speed=0.147x
02-27 20:29:45.467 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg frame= 30 fps=3.9 q=0.0 size= 0kB time=00:00:01.12 bitrate= 0.3kbits/s speed=0.145x
02-27 20:29:46.014 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg frame= 32 fps=3.8 q=0.0 size= 0kB time=00:00:01.19 bitrate= 0.3kbits/s speed=0.143x
02-27 20:29:46.533 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg frame= 34 fps=3.8 q=0.0 size= 0kB time=00:00:01.25 bitrate= 0.3kbits/s speed=0.142x
02-27 20:29:47.094 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg frame= 36 fps=3.8 q=0.0 size= 0kB time=00:00:01.33 bitrate= 0.3kbits/s speed=0.142x
02-27 20:29:47.681 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg frame= 38 fps=3.8 q=0.0 size= 0kB time=00:00:01.40 bitrate= 0.3kbits/s speed=0.14x
02-27 20:29:48.191 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg frame= 40 fps=3.8 q=0.0 size= 0kB time=00:00:01.48 bitrate= 0.3kbits/s speed=0.142x
02-27 20:29:48.752 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg frame= 42 fps=3.8 q=0.0 size= 0kB time=00:00:01.57 bitrate= 0.2kbits/s speed=0.142x
02-27 20:29:49.531 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg frame= 45 fps=3.8 q=0.0 size= 0kB time=00:00:01.68 bitrate= 0.2kbits/s dup=1 drop=0 speed=0.142x
02-27 20:29:51.327 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg frame= 46 fps=3.4 q=0.0 size= 0kB time=00:00:01.74 bitrate= 0.2kbits/s dup=1 drop=0 speed=0.128x
02-27 20:29:52.108 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg frame= 49 fps=3.4 q=0.0 size= 0kB time=00:00:01.83 bitrate= 0.2kbits/s dup=2 drop=0 speed=0.127x
02-27 20:29:52.755 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg frame= 51 fps=3.4 q=29.0 size= 70kB time=00:00:01.89 bitrate= 301.9kbits/s dup=3 drop=0 speed=0.126x
02-27 20:29:53.826 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg frame= 52 fps=3.2 q=29.0 size= 93kB time=00:00:01.93 bitrate= 391.3kbits/s dup=3 drop=0 speed=0.12x
02-27 20:29:54.884 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg frame= 54 fps=3.1 q=29.0 size= 117kB time=00:00:01.97 bitrate= 482.4kbits/s dup=4 drop=0 speed=0.115x
02-27 20:29:55.448 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg frame= 55 fps=3.1 q=29.0 size= 121kB time=00:00:02.04 bitrate= 484.1kbits/s dup=4 drop=0 speed=0.115x
02-27 20:29:55.643 12094-12116/videoeditor.bhuvnesh.com.ffmpegvideoeditor I/MediaPlayer: message received msg=6, ext1=0, ext2=0
02-27 20:29:56.328 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg frame= 57 fps=3.1 q=29.0 size= 146kB time=00:00:02.08 bitrate= 571.8kbits/s dup=5 drop=0 speed=0.112x
02-27 20:29:57.838 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg frame= 58 fps=2.9 q=29.0 size= 165kB time=00:00:02.12 bitrate= 633.4kbits/s dup=5 drop=0 speed=0.106x
02-27 20:29:58.733 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg frame= 60 fps=2.9 q=29.0 size= 189kB time=00:00:02.19 bitrate= 707.6kbits/s dup=6 drop=0 speed=0.104x
02-27 20:29:59.497 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg frame= 61 fps=2.8 q=29.0 size= 194kB time=00:00:02.23 bitrate= 712.0kbits/s dup=6 drop=0 speed=0.102x
02-27 20:30:00.706 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg frame= 63 fps=2.7 q=29.0 size= 220kB time=00:00:02.29 bitrate= 782.9kbits/s dup=7 drop=0 speed=0.0999x
02-27 20:30:02.546 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg frame= 64 fps=2.6 q=29.0 size= 240kB time=00:00:02.34 bitrate= 840.0kbits/s dup=7 drop=0 speed=0.0942x
02-27 20:30:03.278 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg frame= 66 fps=2.6 q=29.0 size= 265kB time=00:00:02.38 bitrate= 908.4kbits/s dup=8 drop=0 speed=0.0932x
02-27 20:30:03.877 12094-12094/videoeditor.bhuvnesh.com.ffmpegvideoeditor D/BHUVNESH: Progress command : ffmpeg frame= 67 fps=2.6 q=29.0 size= 270kB time=00:00:02.44 bitrate= 902.0kbits/s dup=8 drop=0 speed=0.0936x -
Concatenating video using FFMPEG wrapper class [duplicate]
21 décembre 2017, par alan samuelThis question already has an answer here :
I am trying to concatenate video using NReco.VideoConverter wrapper class made for FFMPEG.
I have three video files with the same frame rate and same frame size.
Here is what I have done.
string toconcatfile = @"C:\Users\Alan\Desktop\Black.mp4";
string output1 = @"C:\Users\Alan\Desktop\output1.mp4";
string output2 = @"C:\Users\Alan\Desktop\output2.mp4";
string finaloutput = @"C:\Users\Alan\Desktop\finaloutput.mp4";All the three videos have a frame rate of 25 and Video frame size yet it fails when I add in toconcatfile to the final conversion method.
It works when its just output1 and output2 meaning there must be a different setting in toconcatfile.
Here is what I have tried.
FFMpegConverter fFMpeg = new FFMpegConverter();
//Slices first video
ConvertSettings settings = new ConvertSettings
{
VideoFrameRate = 25,
VideoFrameSize = FrameSize.hd480,
MaxDuration = startcut,
AudioSampleRate = 44100
};
//Slices second video
ConvertSettings settings2 = new ConvertSettings
{
VideoFrameRate = 25,
VideoFrameSize = FrameSize.hd480,
Seek = endcut,
AudioSampleRate = 44100
};
//Copies framerate and size from the previous video to the concatenation video
ConvertSettings settings3 = new ConvertSettings
{
VideoFrameRate = 25,
VideoFrameSize = FrameSize.hd480,
MaxDuration = 4,
AppendSilentAudioStream = true,
AudioSampleRate = 44100
};
string newblack = @"C:\Users\Alan\Desktop\newblack.mp4";
//Slice method called
fFMpeg.ConvertMedia(pathtofile, Format.mp4, output1, Format.mp4, settings);
fFMpeg.ConvertMedia(pathtofile, Format.mp4, output2, Format.mp4, settings2);
fFMpeg.ConvertMedia(toconcatfile, Format.mp4, newblack, Format.mp4, settings3);
String[] inputfiles = new String[2];
inputfiles[0] = output1;
inputfiles[1] = newblack;
//inputfiles[1] = output2;
ConcatSettings concatSettings = new ConcatSettings
{
//CustomOutputArgs = output1+" "+ toconcatfile+ " "+output2+ " -filter_complex \"[0:v:0][0:a:0][1:v:0][1:a:0][2:v:0][2:a:0]concat=n=3:v=1:a=1[outv][outa]\" -map \"[outv]\" - map \"[outa]\""
};
fFMpeg.ConcatMedia(inputfiles, finaloutput, Format.mp4, concatSettings);Can anyone help ?
Edit : I get the exception message - "Invalid argument (exit code : 1)",
Here is the output log of FFMPEG
FFMPEG LOG ITEM - ffmpeg version 3.2.2 Copyright (c) 2000-2016 the
FFmpeg developers
FFMPEG LOG ITEM - built with gcc 5.4.0 (GCC)
FFMPEG LOG ITEM - configuration: --enable-gpl --enable-version3 --enable-
dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --
enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
FFMPEG LOG ITEM - libavutil 55. 34.100 / 55. 34.100
FFMPEG LOG ITEM - libavcodec 57. 64.101 / 57. 64.101
FFMPEG LOG ITEM - libavformat 57. 56.100 / 57. 56.100
FFMPEG LOG ITEM - libavdevice 57. 1.100 / 57. 1.100
FFMPEG LOG ITEM - libavfilter 6. 65.100 / 6. 65.100
FFMPEG LOG ITEM - libswscale 4. 2.100 / 4. 2.100
FFMPEG LOG ITEM - libswresample 2. 3.100 / 2. 3.100
FFMPEG LOG ITEM - libpostproc 54. 1.100 / 54. 1.100
FFMPEG LOG ITEM - Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\Users\Alan\Desktop\output1.mp4':
FFMPEG LOG ITEM - Metadata:
FFMPEG LOG ITEM - major_brand : isom
FFMPEG LOG ITEM - minor_version : 512
FFMPEG LOG ITEM - compatible_brands: isomiso2avc1mp41
FFMPEG LOG ITEM - encoder : Lavf57.56.100
FFMPEG LOG ITEM - Duration: 00:00:30.02, start: 0.000000, bitrate: 543 kb/s
FFMPEG LOG ITEM - Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 852x480 [SAR 3893:2872 DAR 276403:114880], 407 kb/s, SAR 12800:9443 DAR 320:133, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
FFMPEG LOG ITEM - Metadata:
FFMPEG LOG ITEM - handler_name : VideoHandler
FFMPEG LOG ITEM - Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 129 kb/s (default)
FFMPEG LOG ITEM - Metadata:
FFMPEG LOG ITEM - handler_name : SoundHandler
FFMPEG LOG ITEM - Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\Users\Alan\Desktop\newblack.mp4':
FFMPEG LOG ITEM - Metadata:
FFMPEG LOG ITEM - major_brand : isom
FFMPEG LOG ITEM - minor_version : 512
FFMPEG LOG ITEM - compatible_brands: isomiso2avc1mp41
FFMPEG LOG ITEM - encoder : Lavf57.56.100
FFMPEG LOG ITEM - Duration: 00:00:04.02, start: 0.000000, bitrate: 19 kb/s
FFMPEG LOG ITEM - Stream #1:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 852x480 [SAR 160:213 DAR 4:3], 7 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
FFMPEG LOG ITEM - Metadata:
FFMPEG LOG ITEM - handler_name : VideoHandler
FFMPEG LOG ITEM - Stream #1:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 2 kb/s (default)
FFMPEG LOG ITEM - Metadata:
FFMPEG LOG ITEM - handler_name : SoundHandler
FFMPEG LOG ITEM - Input #2, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\Users\Alan\Desktop\output2.mp4':
FFMPEG LOG ITEM - Metadata:
FFMPEG LOG ITEM - major_brand : isom
FFMPEG LOG ITEM - minor_version : 512
FFMPEG LOG ITEM - compatible_brands: isomiso2avc1mp41
FFMPEG LOG ITEM - encoder : Lavf57.56.100
FFMPEG LOG ITEM - Duration: 00:01:34.22, start: 0.000000, bitrate: 1058 kb/s
FFMPEG LOG ITEM - Stream #2:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 852x480 [SAR 3893:2872 DAR 276403:114880], 923 kb/s, SAR 12800:9443 DAR 320:133, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
FFMPEG LOG ITEM - Metadata:
Exception thrown: 'NReco.VideoConverter.FFMpegException' in NReco.VideoConverter.dll
FFMPEG LOG ITEM - handler_name : VideoHandler
FFMPEG LOG ITEM - Stream #2:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)
FFMPEG LOG ITEM - Metadata:
FFMPEG LOG ITEM - handler_name : SoundHandler
FFMPEG LOG ITEM - [Parsed_concat_0 @ 04ded5e0] Input link in1:v0 parameters (size 852x480, SAR 160:213) do not match the corresponding output link in0:v0 parameters (852x480, SAR 12800:9443)
FFMPEG LOG ITEM - [Parsed_concat_0 @ 04ded5e0] Failed to configure output pad on Parsed_concat_0
FFMPEG LOG ITEM - Error configuring complex filters.
FFMPEG LOG ITEM - Invalid argument -
How can I run command line FFMPEG and accept multiple pipes (video and audio) without blocking on the first input ?
18 février 2016, par Version135bI’m trying to mux h264 and aac created with MediaCodec using FFMPEG, and also use FFMPEG’s RTMP support to send to youtube. I’ve created two pipes, and am writing from java (android) through WriteableByteChannels. I can send to one pipe just fine (accepting null audio) like this :
./ffmpeg -f lavfi -i aevalsrc=0 -i "files/camera-test.h264" -acodec aac -vcodec copy -bufsize 512k -f flv "rtmp://a.rtmp.youtube.com/live2/XXXX"
YouTube streaming works perfectly (but I have no audio). Using two pipes this is my command :
./ffmpeg \
-i "files/camera-test.h264" \
-i "files/audio-test.aac" \
-vcodec copy \
-acodec copy \
-map 0:v:0 -map 1:a:0 \
-f flv "rtmp://a.rtmp.youtube.com/live2/XXXX""The pipes are created with mkfifo , and opened from java like this :
pipeWriterVideo = Channels.newChannel(new FileOutputStream(outputFileVideo.toString()));
The order of execution (for now in my test phase) is creation of the files, starting ffmpeg (through adb shell) and then starting recording which opens the channels. ffmpeg will immediately open the h264 stream and then wait, since it is reading from the pipe the first channel open (for video) will successfully run. When it comes to trying to open the audio the same way, it fails because ffmpeg has not actually started reading from the pipe. I can open a second terminal window and cat the audio file and my app spits out what i hope is encoded aac, but ffmpeg fails, usually just sitting there waiting. Here is the verbose output :
ffmpeg version N-78385-g855d9d2 Copyright (c) 2000-2016 the FFmpeg
developers
built with gcc 4.8 (GCC)
configuration: --prefix=/home/dev/svn/android-ffmpeg-with-rtmp/src/ffmpeg/android/arm
--enable-shared --disable-static --disable-doc --disable-ffplay
--disable-ffprobe --disable-ffserver --disable-symver
--cross-prefix=/home/dev/dev/android-ndk-r10e/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-
--target-os=linux --arch=arm --enable-cross-compile
--enable-librtmp --enable-pic --enable-decoder=h264
--sysroot=/home/dev/dev/android-ndk-r10e/platforms/android-19/arch-arm
--extra-cflags='-Os -fpic -marm'
--extra-ldflags='-L/home/dev/svn/android-ffmpeg-with-rtmp/src/openssl-android/libs/armeabi '
--extra-ldexeflags=-pie --pkg-config=/usr/bin/pkg-config
libavutil 55. 17.100 / 55. 17.100
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
matched as AVOption 'debug' with argument 'verbose'.
Trailing options were found on the commandline.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option async (audio sync method) with argument 1.
Successfully parsed a group of options.
Parsing a group of options: input file files/camera-test.h264.
Successfully parsed a group of options.
Opening an input file: files/camera-test.h264.
[file @ 0xb503b100] Setting default whitelist 'file'I think if I could just get ffmpeg to start listening to both pipes, the rest would work out !
Thanks for your time.
EDIT :
I’ve made progress by decoupling the audio pipe connection and encoding, but now as soon as the video stream has been passed it errors on audio. I started a separate thread to create the WriteableByteChannel for audio and it never gets passed the FileOutputStream creation.matched as AVOption 'debug' with argument 'verbose'.
Trailing options were found on the commandline.
Finished splitting the commandline.
Parsing a group of options: global .
Successfully parsed a group of options.
Parsing a group of options: input file files/camera-test.h264.
Successfully parsed a group of options.
Opening an input file: files/camera-test.h264.
[file @ 0xb503b100] Setting default whitelist 'file'
[h264 @ 0xb503c400] Format h264 probed with size=2048 and score=51
[h264 @ 0xb503c400] Before avformat_find_stream_info() pos: 0 bytes read:15719 seeks:0
[h264 @ 0xb5027400] Current profile doesn't provide more RBSP data in PPS, skipping
[h264 @ 0xb503c400] max_analyze_duration 5000000 reached at 5000000 microseconds st:0
[h264 @ 0xb503c400] After avformat_find_stream_info() pos: 545242 bytes read:546928 seeks:0 frames:127
Input #0, h264, from 'files/camera-test.h264':
Duration: N/A, bitrate: N/A
Stream #0:0, 127, 1/1200000: Video: h264 (Baseline), 1 reference frame, yuv420p(left), 854x480 (864x480), 1/50, 25 fps, 25 tbr, 1200k tbn, 50 tbc
Successfully opened the file.
Parsing a group of options: input file files/audio-test.aac.
Applying option vcodec (force video codec ('copy' to copy stream)) with argument copy.
Successfully parsed a group of options.
Opening an input file: files/audio-test.aac.
Unknown decoder 'copy'
[AVIOContext @ 0xb5054020] Statistics: 546928 bytes read, 0 seeksHere is where I attempt to open the audio pipe.
new Thread(){
public void run(){
Log.d("Audio", "pre thread");
FileOutputStream fs = null;
try {
fs = new FileOutputStream("/data/data/android.com.android.grafika/files/audio-test.aac");
} catch (FileNotFoundException e) {
e.printStackTrace();
}
Log.d("Audio", "made fileoutputstream"); //never hits here
mVideoEncoder.pipeWriterAudio = Channels.newChannel(fs);
Log.d("Audio", "made it past opening audio pipe");
}
}.start();Thanks.