How do I add a custom thumbnail to a .mp4 file using ffmpeg? #442
Labels
duplicate
This issue or pull request already exists
ffmpeg-question
Question about using ffmpeg
no-issue-activity
**The command I use is
ffmpeg -i old.mp4 -i a_01.jpg -map 1 -map 0 -c copy -disposition:0 attached_pic -y new.mp4**
I/System.out: =====
I/System.out: -i /storage/emulated/0/Movies/video-1653972366600.mp4 -i /storage/emulated/0/Pictures/1653978560903.jpg -map 0 -map 1 -c copy -c:v:1 png -disposition:v:1 attached_pic -threads 0 -preset ultrafast -max_muxing_queue_size 1024 /data/user/0/com.killer.watermark.app/files/1653982511304.mp4
I/System.out: =====
I/mobile-ffmpeg: ffmpeg version v4.4-dev-416
I/mobile-ffmpeg: Copyright (c) 2000-2020 the FFmpeg developers
I/mobile-ffmpeg:
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)
I/mobile-ffmpeg: configuration: --cross-prefix=i686-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-x86/ffmpeg --pkg-config=/usr/bin/pkg-config --enable-version3 --arch=i686 --cpu=i686 --cc=i686-linux-android24-clang --cxx=i686-linux-android24-clang++ --extra-libs='-L/home/taner/Projects/mobile-ffmpeg/prebuilt/android-x86/cpu-features/lib -lndk_compat' --target-os=android --disable-neon --disable-asm --disable-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-libx264 --enable-gpl --enable-libxvid --enable-gpl --enable-libx265 --enable-gpl --enable-libvidstab --enable-gpl --disable-sdl2 --enable-zlib --enable-mediacodec
I/mobile-ffmpeg: libavutil 56. 55.100 / 56. 55.100
I/mobile-ffmpeg: libavcodec 58. 96.100 / 58. 96.100
I/mobile-ffmpeg: libavformat 58. 48.100 / 58. 48.100
I/mobile-ffmpeg: libavdevice 58. 11.101 / 58. 11.101
I/mobile-ffmpeg: libavfilter 7. 87.100 / 7. 87.100
I/mobile-ffmpeg: libswscale 5. 8.100 / 5. 8.100
I/mobile-ffmpeg: libswresample 3. 8.100 / 3. 8.100
I/mobile-ffmpeg: Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/Movies/video-1653972366600.mp4':
I/mobile-ffmpeg: Metadata:
I/mobile-ffmpeg: major_brand :
I/mobile-ffmpeg: isom
I/mobile-ffmpeg:
I/mobile-ffmpeg: minor_version :
I/mobile-ffmpeg: 512
I/mobile-ffmpeg:
I/mobile-ffmpeg: compatible_brands:
I/mobile-ffmpeg: isomiso2avc1mp41
I/mobile-ffmpeg:
I/mobile-ffmpeg: comment :
I/mobile-ffmpeg: vid:v02033g10000ca696mrc77udrlli1900
I/mobile-ffmpeg:
I/mobile-ffmpeg: encoder :
I/mobile-ffmpeg: Lavf58.45.100
I/mobile-ffmpeg:
I/mobile-ffmpeg: Duration:
I/mobile-ffmpeg: 00:00:16.05
I/mobile-ffmpeg: , start:
I/mobile-ffmpeg: 0.000000
I/mobile-ffmpeg: , bitrate:
I/mobile-ffmpeg: 3394 kb/s
I/mobile-ffmpeg:
I/mobile-ffmpeg: Stream #0:0
I/mobile-ffmpeg: (und)
I/mobile-ffmpeg: : Video: h264 (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 3333 kb/s
I/mobile-ffmpeg: ,
I/mobile-ffmpeg: 25 fps,
I/mobile-ffmpeg: 25 tbr,
I/mobile-ffmpeg: 12800 tbn,
I/mobile-ffmpeg: 50 tbc
I/mobile-ffmpeg: (default)
I/mobile-ffmpeg:
I/mobile-ffmpeg: Metadata:
I/mobile-ffmpeg: handler_name :
I/mobile-ffmpeg: VideoHandler
I/mobile-ffmpeg:
I/mobile-ffmpeg: Stream #0:1
I/mobile-ffmpeg: (und)
I/mobile-ffmpeg: : Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 64 kb/s
I/mobile-ffmpeg: (default)
I/mobile-ffmpeg:
I/mobile-ffmpeg: Metadata:
I/mobile-ffmpeg: handler_name :
I/mobile-ffmpeg: SoundHandler
I/mobile-ffmpeg:
I/mobile-ffmpeg: Input #1, image2, from '/storage/emulated/0/Pictures/1653978560903.jpg':
I/mobile-ffmpeg: Duration:
I/mobile-ffmpeg: 00:00:00.04
I/mobile-ffmpeg: , start:
I/mobile-ffmpeg: 0.000000
I/mobile-ffmpeg: , bitrate:
I/mobile-ffmpeg: 9614 kb/s
I/mobile-ffmpeg:
I/mobile-ffmpeg: Stream #1:0
I/mobile-ffmpeg: : Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 1920x1080 [SAR 1:1 DAR 16:9]
I/mobile-ffmpeg: ,
I/mobile-ffmpeg: 25 tbr,
I/mobile-ffmpeg: 25 tbn,
I/mobile-ffmpeg: 25 tbc
I/mobile-ffmpeg:
I/mobile-ffmpeg: Stream mapping:
I/mobile-ffmpeg: Stream #0:0 -> #0:0
I/mobile-ffmpeg: (copy)
I/mobile-ffmpeg:
I/mobile-ffmpeg: Stream #0:1 -> #0:1
I/mobile-ffmpeg: (copy)
I/mobile-ffmpeg:
I/mobile-ffmpeg: Stream #1:0 -> #0:2
I/mobile-ffmpeg: (mjpeg (native) -> png (native))
I/mobile-ffmpeg:
I/mobile-ffmpeg: Press [q] to stop, [?] for help
W/mobile-ffmpeg: [graph 0 input from stream 1:0 @ 0xbed3b700] sws_param option is deprecated and ignored
W/mobile-ffmpeg: [swscaler @ 0xbf9c9000] deprecated pixel format used, make sure you did set range correctly
W/mobile-ffmpeg: [swscaler @ 0xbf9c9000] No accelerated colorspace conversion found from yuv420p to rgb24.
I/mobile-ffmpeg: Output #0, mp4, to '/data/user/0/com.killer.watermark.app/files/1653982511304.mp4':
I/mobile-ffmpeg: Metadata:
I/mobile-ffmpeg: major_brand :
I/mobile-ffmpeg: isom
I/mobile-ffmpeg:
I/mobile-ffmpeg: minor_version :
I/mobile-ffmpeg: 512
I/mobile-ffmpeg:
I/mobile-ffmpeg: compatible_brands:
I/mobile-ffmpeg: isomiso2avc1mp41
I/mobile-ffmpeg:
I/mobile-ffmpeg: comment :
I/mobile-ffmpeg: vid:v02033g10000ca696mrc77udrlli1900
I/mobile-ffmpeg:
I/mobile-ffmpeg: encoder :
I/mobile-ffmpeg: Lavf58.48.100
I/mobile-ffmpeg:
I/mobile-ffmpeg: Stream #0:0
I/mobile-ffmpeg: (und)
I/mobile-ffmpeg: : Video: h264 (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 3333 kb/s
I/mobile-ffmpeg: ,
I/mobile-ffmpeg: 25 fps,
I/mobile-ffmpeg: 25 tbr,
I/mobile-ffmpeg: 12800 tbn,
I/mobile-ffmpeg: 12800 tbc
I/mobile-ffmpeg: (default)
I/mobile-ffmpeg:
I/mobile-ffmpeg: Metadata:
I/mobile-ffmpeg: handler_name :
I/mobile-ffmpeg: VideoHandler
I/mobile-ffmpeg:
I/mobile-ffmpeg: Stream #0:1
I/mobile-ffmpeg: (und)
I/mobile-ffmpeg: : Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 64 kb/s
I/mobile-ffmpeg: (default)
I/mobile-ffmpeg:
I/mobile-ffmpeg: Metadata:
I/mobile-ffmpeg: handler_name :
I/mobile-ffmpeg: SoundHandler
I/mobile-ffmpeg:
I/mobile-ffmpeg: Stream #0:2
I/mobile-ffmpeg: : Video: png (mp4v / 0x7634706D), rgb24, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s
I/mobile-ffmpeg: ,
I/mobile-ffmpeg: 25 fps,
I/mobile-ffmpeg: 12800 tbn,
I/mobile-ffmpeg: 25 tbc
I/mobile-ffmpeg: (attached pic)
I/mobile-ffmpeg:
I/mobile-ffmpeg: Metadata:
I/mobile-ffmpeg: encoder :
I/mobile-ffmpeg: Lavc58.96.100 png
I/mobile-ffmpeg:
I/mobile-ffmpeg: frame= 0 fps=0.0 q=-1.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
I/mobile-ffmpeg: frame= 9 fps=0.0 q=-1.0 q=0.0 size= 0kB time=00:00:00.25 bitrate= 1.5kbits/s speed=0.414x
I/mobile-ffmpeg: frame= 88 fps= 76 q=-1.0 q=0.0 size= 0kB time=00:00:03.41 bitrate= 0.1kbits/s speed=2.96x
I/mobile-ffmpeg: frame= 208 fps=113 q=-1.0 q=0.0 size= 0kB time=00:00:08.21 bitrate= 0.0kbits/s speed=4.45x
I/mobile-ffmpeg: frame= 353 fps=148 q=-1.0 q=0.0 size= 2048kB time=00:00:14.00 bitrate=1198.4kbits/s speed=5.87x
I/mobile-ffmpeg: frame= 400 fps=156 q=-1.0 Lq=-0.0 size= 7393kB time=00:00:15.99 bitrate=3785.5kbits/s speed=6.25x
I/mobile-ffmpeg: video:7253kB audio:126kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead:
I/mobile-ffmpeg: 0.191575%
I/mobile-ffmpeg:
I/mobile-ffmpeg: Command execution completed successfully.
The command was executed successfully, but the video thumbnail was not modified successfully.....
The text was updated successfully, but these errors were encountered: