
Recherche avancée
Médias (3)
-
Elephants Dream - Cover of the soundtrack
17 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Image
-
Valkaama DVD Label
4 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Image
-
Publier une image simplement
13 avril 2011, par ,
Mis à jour : Février 2012
Langue : français
Type : Video
Autres articles (73)
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
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 -
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.
Sur d’autres sites (8147)
-
Not able to trim video using "com.arthenica:mobile-ffmpeg-full:4.4"
20 avril 2021, par UMESH GARGI need help in trimming the video in android using : 'mobile-FFmpeg


I posted my code below, which I used to trim the video but every time it goes to the else block(every it fails for android:11,9).
Please help me out.
Thanks in advance


Code :
val cmd = arrayOf("-i", trimmerData.srcPath, "-ss", startTime, "-t", endTime,
"-s", "320x240", "-r", "25", "-vcodec", "mpeg4", "-b:v", "2097152", "-b:a", "48000", "-ac", "2", "-ar", "22050",
"-c", "copy", trimmerData.dstPath)


val rc = FFmpeg.execute(cmd)

 if (rc == RETURN_CODE_SUCCESS) {
 Log.i(Config.TAG, "Command execution completed successfully.")
 scanTrimFile(trimmerData)
 } else if (rc == RETURN_CODE_CANCEL) {
 Log.i(Config.TAG, "Command execution cancelled by user.")
 } else {
 Log.i(Config.TAG, String.format("Command execution failed with rc=%d and the output below.", rc))
 Config.printLastCommandOutput(Log.INFO)
 showTrimmingError()
 }

private fun scanTrimFile(trimmerData: TrimmerData) {
mediaScannerConnection = MediaScannerConnection(this,
object : MediaScannerConnection.MediaScannerConnectionClient {
override fun onMediaScannerConnected() {
mediaScannerConnection.scanFile(trimmerData.dstPath, "video/*")
}

 override fun onScanCompleted(path: String?, uri: Uri?) {
 mediaScannerConnection.disconnect()
 dismissWaitingDialog()
 getResult(Uri.parse(trimmerData.dstPath))
 }

 })
 mediaScannerConnection.connect()
}



Logs :


2021-04-20 13:05:12.869 27051-27051/org.xyz.abc I/mobile-ffmpeg: Loading mobile-ffmpeg.
2021-04-20 13:05:12.880 27051-27051/org.xyz.abc I/mobile-ffmpeg: Loaded mobile-ffmpeg-full-arm64-v8a-4.4-20200725.
2021-04-20 13:05:12.880 27051-30377/org.xyz.abc D/mobile-ffmpeg: Callback thread started.
2021-04-20 13:05:12.881 27051-30377/org.xyz.abc I/mobile-ffmpeg: ffmpeg version v4.4-dev-416
2021-04-20 13:05:12.881 27051-30377/org.xyz.abc I/mobile-ffmpeg: Copyright (c) 2000-2020 the FFmpeg developers
2021-04-20 13:05:12.881 27051-30377/org.xyz.abc I/mobile-ffmpeg: built with Android (6454773 based on r365631c2) clang version 9.0.8 (https://android.googlesource.com/toolchain/llvm-project 98c855489587874b2a325e7a516b99d838599c6f) (based on LLVM 9.0.8svn)
2021-04-20 13:05:12.881 27051-30377/org.xyz.abc I/mobile-ffmpeg: configuration: --cross-prefix=aarch64-linux-android- --sysroot=/files/android-sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/linux-x86_64/sysroot --prefix=/home/taner/Projects/mobile-ffmpeg/prebuilt/android-arm64/ffmpeg --pkg-config=/usr/bin/pkg-config --enable-version3 --arch=aarch64 --cpu=armv8-a --cc=aarch64-linux-android24-clang --cxx=aarch64-linux-android24-clang++ --extra-libs='-L/home/taner/Projects/mobile-ffmpeg/prebuilt/android-arm64/cpu-features/lib -lndk_compat' --target-os=android --enable-neon --enable-asm --enable-inline-asm --enable-cross-compile --enable-pic --enable-jni --enable-optimizations --enable-swscale --enable-shared --enable-v4l2-m2m --disable-outdev=fbdev --disable-indev=fbdev --enable-small --disable-openssl --disable-xmm-clobber-test --disable-debug --enable-lto --disable-neon-clobber-test --disable-programs --disable-postproc --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --disable-sndio --disable-schannel --disable-securetransport --disable-xlib --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --disable-videotoolbox --disable-audiotoolbox --disable-appkit --disable-alsa --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-gmp --enable-gnutls --enable-libmp3lame --enable-libass --enable-iconv --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libxml2 --enable-libopencore-amrnb --enable-libshine --enable-libspeex --enable-libwavpack --enable-libkvazaar --enable-libilbc --enable-libopus --enable-libsnappy --enable-libsoxr --enable-libaom --enable-libtwolame --disable-sdl2 --enable-libvo-amrwbenc --enable-zlib --enable-mediacodec
2021-04-20 13:05:12.881 27051-30377/org.xyz.abc I/mobile-ffmpeg: libavutil 56. 55.100 / 56. 55.100
2021-04-20 13:05:12.881 27051-30377/org.xyz.abc I/mobile-ffmpeg: libavcodec 58. 96.100 / 58. 96.100
2021-04-20 13:05:12.881 27051-30377/org.xyz.abc I/mobile-ffmpeg: libavformat 58. 48.100 / 58. 48.100
2021-04-20 13:05:12.881 27051-30377/org.xyz.abc I/mobile-ffmpeg: libavdevice 58. 11.101 / 58. 11.101
2021-04-20 13:05:12.881 27051-30377/org.xyz.abc I/mobile-ffmpeg: libavfilter 7. 87.100 / 7. 87.100
2021-04-20 13:05:12.881 27051-30377/org.xyz.abc I/mobile-ffmpeg: libswscale 5. 8.100 / 5. 8.100
2021-04-20 13:05:12.881 27051-30377/org.xyz.abc I/mobile-ffmpeg: libswresample 3. 8.100 / 3. 8.100
2021-04-20 13:05:12.897 27051-30377/org.xyz.abc I/mobile-ffmpeg: Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/Android/data/org.xyz.abc/files/Tch Plus Recorder/tch_video_1618904094681.mp4':
2021-04-20 13:05:12.897 27051-30377/org.xyz.abc I/mobile-ffmpeg: Metadata:
2021-04-20 13:05:12.897 27051-30377/org.xyz.abc I/mobile-ffmpeg: major_brand : 
2021-04-20 13:05:12.897 27051-30377/org.xyz.abc I/mobile-ffmpeg: mp42
2021-04-20 13:05:12.897 27051-30377/org.xyz.abc I/mobile-ffmpeg: minor_version : 
2021-04-20 13:05:12.897 27051-30377/org.xyz.abc I/mobile-ffmpeg: 0
2021-04-20 13:05:12.897 27051-30377/org.xyz.abc I/mobile-ffmpeg: compatible_brands: 
2021-04-20 13:05:12.897 27051-30377/org.xyz.abc I/mobile-ffmpeg: isommp42
2021-04-20 13:05:12.897 27051-30377/org.xyz.abc I/mobile-ffmpeg: creation_time : 
2021-04-20 13:05:12.897 27051-30377/org.xyz.abc I/mobile-ffmpeg: 2021-04-20T07:35:06.000000Z
2021-04-20 13:05:12.897 27051-30377/org.xyz.abc I/mobile-ffmpeg: com.android.version: 
2021-04-20 13:05:12.897 27051-30377/org.xyz.abc I/mobile-ffmpeg: 11
2021-04-20 13:05:12.897 27051-30377/org.xyz.abc I/mobile-ffmpeg: Duration: 
2021-04-20 13:05:12.897 27051-30377/org.xyz.abc I/mobile-ffmpeg: 00:00:10.07
2021-04-20 13:05:12.897 27051-30377/org.xyz.abc I/mobile-ffmpeg: , start: 
2021-04-20 13:05:12.897 27051-30377/org.xyz.abc I/mobile-ffmpeg: 0.000000
2021-04-20 13:05:12.897 27051-30377/org.xyz.abc I/mobile-ffmpeg: , bitrate: 
2021-04-20 13:05:12.897 27051-30377/org.xyz.abc I/mobile-ffmpeg: 12089 kb/s
2021-04-20 13:05:12.897 27051-30377/org.xyz.abc I/mobile-ffmpeg: Stream #0:0
2021-04-20 13:05:12.897 27051-30377/org.xyz.abc I/mobile-ffmpeg: (eng)
2021-04-20 13:05:12.897 27051-30377/org.xyz.abc I/mobile-ffmpeg: : Video: h264 (avc1 / 0x31637661), yuv420p(tv, bt709), 1280x720, 11998 kb/s
2021-04-20 13:05:12.897 27051-30377/org.xyz.abc I/mobile-ffmpeg: , SAR 1:1 DAR 16:9
2021-04-20 13:05:12.897 27051-30377/org.xyz.abc I/mobile-ffmpeg: , 
2021-04-20 13:05:12.897 27051-30377/org.xyz.abc I/mobile-ffmpeg: 29.81 fps, 
2021-04-20 13:05:12.897 27051-30377/org.xyz.abc I/mobile-ffmpeg: 30 tbr, 
2021-04-20 13:05:12.897 27051-30377/org.xyz.abc I/mobile-ffmpeg: 90k tbn, 
2021-04-20 13:05:12.897 27051-30377/org.xyz.abc I/mobile-ffmpeg: 180k tbc
2021-04-20 13:05:12.897 27051-30377/org.xyz.abc I/mobile-ffmpeg: (default)
2021-04-20 13:05:12.897 27051-30377/org.xyz.abc I/mobile-ffmpeg: Metadata:
2021-04-20 13:05:12.897 27051-30377/org.xyz.abc I/mobile-ffmpeg: rotate : 
2021-04-20 13:05:12.897 27051-30377/org.xyz.abc I/mobile-ffmpeg: 90
2021-04-20 13:05:12.897 27051-30377/org.xyz.abc I/mobile-ffmpeg: creation_time : 
2021-04-20 13:05:12.897 27051-30377/org.xyz.abc I/mobile-ffmpeg: 2021-04-20T07:35:06.000000Z
2021-04-20 13:05:12.897 27051-30377/org.xyz.abc I/mobile-ffmpeg: handler_name : 
2021-04-20 13:05:12.897 27051-30377/org.xyz.abc I/mobile-ffmpeg: VideoHandle
2021-04-20 13:05:12.897 27051-30377/org.xyz.abc I/mobile-ffmpeg: Side data:
2021-04-20 13:05:12.898 27051-30377/org.xyz.abc I/mobile-ffmpeg: 
2021-04-20 13:05:12.898 27051-30377/org.xyz.abc I/mobile-ffmpeg: displaymatrix: rotation of -90.00 degrees
2021-04-20 13:05:12.898 27051-30377/org.xyz.abc I/mobile-ffmpeg: Stream #0:1
2021-04-20 13:05:12.898 27051-30377/org.xyz.abc I/mobile-ffmpeg: (eng)
2021-04-20 13:05:12.898 27051-30377/org.xyz.abc I/mobile-ffmpeg: : Audio: aac (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 96 kb/s
2021-04-20 13:05:12.898 27051-30377/org.xyz.abc I/mobile-ffmpeg: (default)
2021-04-20 13:05:12.898 27051-30377/org.xyz.abc I/mobile-ffmpeg: Metadata:
2021-04-20 13:05:12.898 27051-30377/org.xyz.abc I/mobile-ffmpeg: creation_time : 
2021-04-20 13:05:12.898 27051-30377/org.xyz.abc I/mobile-ffmpeg: 2021-04-20T07:35:06.000000Z
2021-04-20 13:05:12.898 27051-30377/org.xyz.abc I/mobile-ffmpeg: handler_name : 
2021-04-20 13:05:12.898 27051-30377/org.xyz.abc I/mobile-ffmpeg: SoundHandle
2021-04-20 13:05:12.898 27051-30377/org.xyz.abc E/mobile-ffmpeg: /storage/emulated/0/TchTrimVideo/tch_trim_Video1618904108454.mp4: No such file or directory
2021-04-20 13:05:12.898 27051-27051/org.xyz.abc I/mobile-ffmpeg: Command execution failed with rc=1 and the output below.
2021-04-20 13:05:12.899 27051-27051/org.xyz.abc I/mobile-ffmpeg: ffmpeg version v4.4-dev-416 Copyright (c) 2000-2020 the FFmpeg developers
 built with Android (6454773 based on r365631c2) clang version 9.0.8 (https://android.googlesource.com/toolchain/llvm-project 98c855489587874b2a325e7a516b99d838599c6f) (based on LLVM 9.0.8svn)
 configuration: --cross-prefix=aarch64-linux-android- --sysroot=/files/android-sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/linux-x86_64/sysroot --prefix=/home/taner/Projects/mobile-ffmpeg/prebuilt/android-arm64/ffmpeg --pkg-config=/usr/bin/pkg-config --enable-version3 --arch=aarch64 --cpu=armv8-a --cc=aarch64-linux-android24-clang --cxx=aarch64-linux-android24-clang++ --extra-libs='-L/home/taner/Projects/mobile-ffmpeg/prebuilt/android-arm64/cpu-features/lib -lndk_compat' --target-os=android --enable-neon --enable-asm --enable-inline-asm --enable-cross-compile --enable-pic --enable-jni --enable-optimizations --enable-swscale --enable-shared --enable-v4l2-m2m --disable-outdev=fbdev --disable-indev=fbdev --enable-small --disable-openssl --disable-xmm-clobber-test --disable-debug --enable-lto --disable-neon-clobber-test --disable-programs --disable-postproc --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --disable-sndio --disable-schannel --disable-securetransport --disable-xlib --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --disable-videotoolbox --disable-audiotoolbox --disable-appkit --disable-alsa --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-gmp --enable-gnutls --enable-libmp3lame --enable-libass --enable-iconv --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libxml2 --enable-libopencore-amrnb --enable-libshine --enable-libspeex --enable-libwavpack --enable-libkvazaar --enable-libilbc --enable-libopus --enable-libsnappy --enable-libsoxr --enable-libaom --enable-libtwolame --disable-sdl2 --enable-libvo-amrwbenc --enable-zlib --enable-mediacodec
 libavutil 56. 55.100 / 56. 55.100
 libavcodec 58. 96.100 / 58. 96.100
 libavformat 58. 48.100 / 58. 48.100
 libavdevice 58. 11.101 / 58. 11.101
 libavfilter 7. 87.100 / 7. 87.100
 libswscale 5. 8.100 / 5. 8.100
 libswresample 3. 8.100 / 3. 8.100
 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/Android/data/org.xyz.abc/files/Tch Plus Recorder/tch_video_1618904094681.mp4':
 Metadata:
 major_brand : mp42
 minor_version : 0
 compatible_brands: isommp42
 creation_time : 2021-04-20T07:35:06.000000Z
 com.android.version: 11
 Duration: 00:00:10.07, start: 0.000000, bitrate: 12089 kb/s
 Stream #0:0(eng): Video: h264 (avc1 / 0x31637661), yuv420p(tv, bt709), 1280x720, 11998 kb/s, SAR 1:1 DAR 16:9, 29.81 fps, 30 tbr, 90k tbn, 180k tbc (default)
 Metadata:
 rotate : 90
 creation_time : 2021-04-20T07:35:06.000000Z
 handler_name : VideoHandle
 Side data:
 displaymatrix: rotation of -90.00 degrees
 Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 96 kb/s (default)
 Metadata:
 creation_time : 2021-04-20T07:35:06.000000Z
 handler_name : SoundHandle
 /storage/emulated/0/TchTrimVideo/tch_trim_Video1618904108454.mp4: No such file or directory



-
why it is taking a lot of time to convert image via HTTP to video in ffmpeg ?
20 avril 2021, par al pacinoBelow is the ffmpeg i am using to convert images into videos but It is taking around 3 minutes to convert image to 5 second video.
If I run the command on Image present on a directory then it converts images to videos very swiftly.


can anyone tell what I am doing wrong ?


ffmpeg -loop 1 -i 'https://cdn.pixabay.com/photo/2020/10/23/12/03/arch-5678549__340.jpg' -t 5 -vf scale=1280:780 output.mp4 

ffmpeg version n4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
 built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
 configuration: --prefix= --prefix=/usr --disable-debug --disable-doc --disable-static --enable-cuda --enable-cuda-sdk --enable-cuvid --enable-libdrm --enable-ffplay --enable-gnutls --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfontconfig --enable-libfreetype --enable-libmp3lame --enable-libnpp --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopus --enable-libpulse --enable-sdl2 --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libv4l2 --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxvid --enable-nonfree --enable-nvenc --enable-omx --enable-openal --enable-opencl --enable-runtime-cpudetect --enable-shared --enable-vaapi --enable-vdpau --enable-version3 --enable-xlib
 libavutil 56. 51.100 / 56. 51.100
 libavcodec 58. 91.100 / 58. 91.100
 libavformat 58. 45.100 / 58. 45.100
 libavdevice 58. 10.100 / 58. 10.100
 libavfilter 7. 85.100 / 7. 85.100
 libswscale 5. 7.100 / 5. 7.100
 libswresample 3. 7.100 / 3. 7.100
 libpostproc 55. 7.100 / 55. 7.100
Input #0, image2, from 'https://cdn.pixabay.com/photo/2021/04/17/18/26/woman-6186493__340.jpg':
 Duration: 00:00:00.04, start: 0.000000, bitrate: 5538 kb/s
 Stream #0:0: Video: mjpeg (Progressive), yuvj420p(pc, bt470bg/unknown/unknown), 511x340 [SAR 1:1 DAR 511:340], 25 fps, 25 tbr, 25 tbn, 25 tbc
Stream mapping:
 Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[swscaler @ 0x5580ac8e7c40] deprecated pixel format used, make sure you did set range correctly
[libx264 @ 0x5580ac186b40] using SAR=1034/1129
[libx264 @ 0x5580ac186b40] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2 AVX512
[libx264 @ 0x5580ac186b40] profile High, level 3.2
[libx264 @ 0x5580ac186b40] 264 - core 152 r2854 e9a5903 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - 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 'output.mp4':
 Metadata:
 encoder : Lavf58.45.100
 Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuvj420p(pc), 1280x780 [SAR 19929:21760 DAR 511:340], q=-1--1, 25 fps, 12800 tbn, 25 tbc
 Metadata:
 encoder : Lavc58.91.100 libx264
 Side data:
 cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
frame= 100 fps=0.0 q=28.0 size= 0kB time=00:00:01.64 bitrate= 0.2kbits/frame= 125 fps=0.0 q=-1.0 Lsize= 90kB time=00:00:04.88 bitrate= 151.7kbits/s speed=6.79x 
video:88kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 2.618829%
[libx264 @ 0x5580ac186b40] frame I:1 Avg QP:16.31 size: 75247
[libx264 @ 0x5580ac186b40] frame P:31 Avg QP:16.13 size: 314
[libx264 @ 0x5580ac186b40] frame B:93 Avg QP:31.33 size: 49
[libx264 @ 0x5580ac186b40] consecutive B-frames: 0.8% 0.0% 0.0% 99.2%
[libx264 @ 0x5580ac186b40] mb I I16..4: 10.6% 77.6% 11.8%
[libx264 @ 0x5580ac186b40] mb P I16..4: 0.0% 0.0% 0.0% P16..4: 2.5% 0.2% 0.2% 0.0% 0.0% skip:97.2%
[libx264 @ 0x5580ac186b40] mb B I16..4: 0.0% 0.0% 0.0% B16..8: 0.4% 0.0% 0.0% direct: 0.0% skip:99.6% L0: 8.3% L1:91.7% BI: 0.0%
[libx264 @ 0x5580ac186b40] 8x8 transform intra:77.5% inter:98.7%
[libx264 @ 0x5580ac186b40] coded y,uvDC,uvAC intra: 88.4% 95.3% 79.5% inter: 0.1% 0.5% 0.0%
[libx264 @ 0x5580ac186b40] i16 v,h,dc,p: 2% 3% 0% 95%
[libx264 @ 0x5580ac186b40] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 21% 18% 7% 6% 11% 10% 10% 8% 8%
[libx264 @ 0x5580ac186b40] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 24% 18% 7% 5% 16% 11% 9% 6% 4%
[libx264 @ 0x5580ac186b40] i8c dc,h,v,p: 33% 21% 22% 24%
[libx264 @ 0x5580ac186b40] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x5580ac186b40] ref P L0: 85.7% 0.1% 13.2% 1.0%
[libx264 @ 0x5580ac186b40] ref B L0: 53.6% 46.4%
[libx264 @ 0x5580ac186b40] ref B L1: 92.8% 7.2%
[libx264 @ 0x5580ac186b40] kb/s:143.20
aman@aman:~/Desktop/a$ ffmpeg -loop 1 -i 'https://cdn.pixabay.com/photo/2021/04/17/18/26/woman-6186493__340.jpg' -t 5 -vf scale=1280:780 output.webm
ffmpeg version n4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
 built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
 configuration: --prefix= --prefix=/usr --disable-debug --disable-doc --disable-static --enable-cuda --enable-cuda-sdk --enable-cuvid --enable-libdrm --enable-ffplay --enable-gnutls --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfontconfig --enable-libfreetype --enable-libmp3lame --enable-libnpp --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopus --enable-libpulse --enable-sdl2 --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libv4l2 --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxvid --enable-nonfree --enable-nvenc --enable-omx --enable-openal --enable-opencl --enable-runtime-cpudetect --enable-shared --enable-vaapi --enable-vdpau --enable-version3 --enable-xlib
 libavutil 56. 51.100 / 56. 51.100
 libavcodec 58. 91.100 / 58. 91.100
 libavformat 58. 45.100 / 58. 45.100
 libavdevice 58. 10.100 / 58. 10.100
 libavfilter 7. 85.100 / 7. 85.100
 libswscale 5. 7.100 / 5. 7.100
 libswresample 3. 7.100 / 3. 7.100
 libpostproc 55. 7.100 / 55. 7.100
Input #0, image2, from 'https://cdn.pixabay.com/photo/2021/04/17/18/26/woman-6186493__340.jpg':
 Duration: 00:00:00.04, start: 0.000000, bitrate: 5538 kb/s
 Stream #0:0: Video: mjpeg (Progressive), yuvj420p(pc, bt470bg/unknown/unknown), 511x340 [SAR 1:1 DAR 511:340], 25 fps, 25 tbr, 25 tbn, 25 tbc
File 'output.webm' already exists. Overwrite? [y/N] y
Stream mapping:
 Stream #0:0 -> #0:0 (mjpeg (native) -> vp9 (libvpx-vp9))
Press [q] to stop, [?] for help
[swscaler @ 0x5630553879c0] deprecated pixel format used, make sure you did set range correctly
[libvpx-vp9 @ 0x563054cd2500] v1.7.0
[libvpx-vp9 @ 0x563054cd2500] Neither bitrate nor constrained quality specified, using default CRF of 32
Output #0, webm, to 'output.webm':
 Metadata:
 encoder : Lavf58.45.100
 Stream #0:0: Video: vp9 (libvpx-vp9), yuv420p, 1280x780 [SAR 19929:21760 DAR 511:340], q=-1--1, 25 fps, 1k tbn, 25 tbc
 Metadata:
 encoder : Lavc58.91.100 libvpx-vp9
 Side data:
 cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
frame= 57 fps=0.0 q=0.0 size= 1kB time=00:00:01.28 bitrate= 3.3kbits/sframe= 103 fps=102 q=0.0 size= 1kB time=00:00:03.12 bitrate= 1.3kbits/sframe= 125 fps= 85 q=0.0 Lsize= 51kB time=00:00:04.96 bitrate= 84.0kbits/s speed=3.37x 
video:50kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 2.571023%



-
How to include audio in an overlay ffmpeg command ?
27 avril 2021, par gilad sUsing ffmpeg I add a video overlay successfully over an origin video (origin has audio, overlay doesn't). However the audio of the origin video doesn't appear in the result video.


ffmpeg -i source.mp4 -i overlay.mp4 -filter_complex "[0:v]setpts=PTS-STARTPTS, scale=1280x720[top]; 
 [1:v]setpts=PTS-STARTPTS, scale=1280x720, format=yuva420p, 
 colorchannelmixer=aa=0.2[bottom]; [top][bottom]overlay=shortest=1" 
 -shortest -acodec copy -vcodec libx264 result1.mp4



Even if I execute the following separate command on the result of the previous command - still no audio appears in the new result video.


ffmpeg -i result1.mp4 -i audio.mp3 -c:v copy -c:a aac result2.mp4



Here is the log :


ffmpeg version 4.4 Copyright (c) 2000-2021 the FFmpeg developers
 built with Apple clang version 11.0.0 (clang-1100.0.33.17)
 configuration: --prefix=/usr/local/Cellar/ffmpeg/4.4 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox
 libavutil 56. 70.100 / 56. 70.100
 libavcodec 58.134.100 / 58.134.100
 libavformat 58. 76.100 / 58. 76.100
 libavdevice 58. 13.100 / 58. 13.100
 libavfilter 7.110.100 / 7.110.100
 libavresample 4. 0. 0 / 4. 0. 0
 libswscale 5. 9.100 / 5. 9.100
 libswresample 3. 9.100 / 3. 9.100
 libpostproc 55. 9.100 / 55. 9.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'course/final_video/3008_01_01_01_audio.mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf58.76.100
 Duration: 00:06:01.48, start: 0.000000, bitrate: 215 kb/s
 Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 141 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
 Metadata:
 handler_name : VideoHandler
 vendor_id : [0][0][0][0]
 Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 22050 Hz, mono, fltp, 70 kb/s (default)
 Metadata:
 handler_name : SoundHandler
 vendor_id : [0][0][0][0]
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'images/overlay.mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf58.76.100
 Duration: 00:24:00.38, start: 0.000000, bitrate: 575 kb/s
 Stream #1:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1280x720 [SAR 1:1 DAR 16:9], 442 kb/s, 24 fps, 24 tbr, 12288 tbn, 48 tbc (default)
 Metadata:
 handler_name : ISO Media file produced by Google Inc. Created on: 11/22/2020.
 vendor_id : [0][0][0][0]
 Stream #1:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 127 kb/s (default)
 Metadata:
 handler_name : ISO Media file produced by Google Inc. Created on: 11/22/2020.
 vendor_id : [0][0][0][0]
Stream mapping:
 Stream #0:0 (h264) -> setpts
 Stream #1:0 (h264) -> setpts
 overlay -> Stream #0:0 (libx264)
 Stream #1:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[swscaler @ 0x10c590000] No accelerated colorspace conversion found from yuva420p to argb.
[libx264 @ 0x7fc532813200] using SAR=1/1
[libx264 @ 0x7fc532813200] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x7fc532813200] profile High, level 3.1, 4:2:0, 8-bit
[libx264 @ 0x7fc532813200] 264 - core 161 r3049 55d517b - H.264/MPEG-4 AVC codec - Copyleft 2003-2021 - 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
Output #0, mp4, to 'course/final_video/3008_01_01_01_overlay.mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf58.76.100
 Stream #0:0: Video: h264 (avc1 / 0x31637661), yuv420p(progressive), 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 25 fps, 12800 tbn (default)
 Metadata:
 encoder : Lavc58.134.100 libx264
 Side data:
 cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
 Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 127 kb/s (default)
 Metadata:
 handler_name : ISO Media file produced by Google Inc. Created on: 11/22/2020.
 vendor_id : [0][0][0][0]

Stream mapping:
 Stream #0:0 (h264) -> setpts
 Stream #1:0 (h264) -> setpts
 overlay -> Stream #0:0 (libx264)
 Stream #1:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[swscaler @ 0x10c590000] No accelerated colorspace conversion found from yuva420p to argb.
[libx264 @ 0x7fc532813200] using SAR=1/1
[libx264 @ 0x7fc532813200] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x7fc532813200] profile High, level 3.1, 4:2:0, 8-bit
[libx264 @ 0x7fc532813200] 264 - core 161 r3049 55d517b - H.264/MPEG-4 AVC codec - Copyleft 2003-2021 - 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
Output #0, mp4, to 'course/final_video/3008_01_01_01_overlay.mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf58.76.100
 Stream #0:0: Video: h264 (avc1 / 0x31637661), yuv420p(progressive), 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 25 fps, 12800 tbn (default)
 Metadata:
 encoder : Lavc58.134.100 libx264
 Side data:
 cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
 Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 127 kb/s (default)
 Metadata:
 handler_name : ISO Media file produced by Google Inc. Created on: 11/22/2020.
 vendor_id : [0][0][0][0]
frame= 9037 fps= 32 q=-1.0 Lsize= 20954kB time=00:06:01.62 bitrate= 474.7kbits/s speed=1.26x 
video:15006kB audio:5651kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.439596%
[libx264 @ 0x7fc532813200] frame I:37 Avg QP:14.51 size:123799
[libx264 @ 0x7fc532813200] frame P:2277 Avg QP:16.97 size: 3221
[libx264 @ 0x7fc532813200] frame B:6723 Avg QP:24.31 size: 513
[libx264 @ 0x7fc532813200] consecutive B-frames: 0.8% 0.0% 0.0% 99.2%
[libx264 @ 0x7fc532813200] mb I I16..4: 8.3% 64.9% 26.9%
[libx264 @ 0x7fc532813200] mb P I16..4: 0.5% 1.1% 0.2% P16..4: 16.1% 3.1% 2.3% 0.0% 0.0% skip:76.7%
[libx264 @ 0x7fc532813200] mb B I16..4: 0.0% 0.0% 0.0% B16..8: 10.5% 0.1% 0.0% direct: 0.2% skip:89.2% L0:45.2% L1:54.7% BI: 0.1%
[libx264 @ 0x7fc532813200] 8x8 transform intra:63.6% inter:83.0%
[libx264 @ 0x7fc532813200] coded y,uvDC,uvAC intra: 56.4% 61.0% 42.7% inter: 1.9% 1.9% 0.0%
[libx264 @ 0x7fc532813200] i16 v,h,dc,p: 29% 18% 18% 35%
[libx264 @ 0x7fc532813200] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 24% 19% 31% 4% 4% 4% 4% 5% 5%
[libx264 @ 0x7fc532813200] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 32% 22% 15% 4% 5% 6% 5% 5% 5%
[libx264 @ 0x7fc532813200] i8c dc,h,v,p: 51% 29% 14% 6%
[libx264 @ 0x7fc532813200] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x7fc532813200] ref P L0: 66.0% 6.9% 17.0% 10.1%
[libx264 @ 0x7fc532813200] ref B L0: 77.2% 20.6% 2.2%
[libx264 @ 0x7fc532813200] ref B L1: 90.2% 9.8%
[libx264 @ 0x7fc532813200] kb/s:340.06