Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash happens for specific videos size with animated image attached #604

Closed
mrkiwi opened this issue Oct 20, 2022 · 7 comments
Closed

Crash happens for specific videos size with animated image attached #604

mrkiwi opened this issue Oct 20, 2022 · 7 comments
Assignees
Labels
ffmpeg-bug Something isn't right in ffmpeg source code fixed-in-v6.0 v5.1 Affects v5.1 release

Comments

@mrkiwi
Copy link

mrkiwi commented Oct 20, 2022

Description
The crash occurs only for specific screen sizes and assets. For example, I'm trying to generated video with size 1026:1824 with animated image. The video size generating from backgroundTemp.jpg. So it's the base size. If size of this image 1026:1824 and gif added - crash happens. For other sizes all works good. I've tried different scenarios and commands, changed ffmpeg versions, checked logs - nothing helps. ndk-stack for the crash below returns only this line /data/app/~~Fp6jpZ6seWQUaCyJ6wRDMw==/com.test.ffmpeg-6Otc5YS0rGcT73jJVqxWUA==/base.apk!libavcodec.so
Also, I've tried to do this with non-gpl version - all works good, so I think the problem with the size and gpl encoder.
I've attached logs and commands that I use.

Expected behavior
No crash when trying to generate video.

Current behavior
Crash happens.

To Reproduce
Run this command

-y -i 'backgroundtemp.png' -i '20221015_102019.jpg' -stream_loop -1 -i '46c0853346d9ade05a71a6b97fe420db_giphy (1)-1653577938131-1.gif' -filter_complex [0]split=2[bg][fg];[bg]drawbox=c=black@1:replace=1:t=fill[bg];[bg][fg]overlay=format=auto[v0];[1:v]scale=2436:1826:flags=neighbor,rotate='0*PI/180:c=none:ow=0.0+2436.0:oh=0.0+1826.0'[t1];[v0][t1]overlay=x=-704.5:y=-1.25[v1];[2:v]scale=512:512:flags=neighbor,rotate='0*PI/180:c=none:ow=0.0+512.0:oh=0.0+512.0'[t1];[v1][t1]overlay=x=256.5:y=655.5[v2] -map [v2] -pix_fmt yuv420p -t 6.1 'tmp.mp4' 

Logs
Crash dump

10-19 12:49:29.919 25885 25885 F DEBUG   : Build fingerprint: 'samsung/beyond2lteeea/beyond2:12/SP1A.210812.016/G975FXXUFHVE1:user/release-keys'
10-19 12:49:29.919 25885 25885 F DEBUG   : Revision: '26'
10-19 12:49:29.919 25885 25885 F DEBUG   : ABI: 'arm64'
10-19 12:49:29.919 25885 25885 F DEBUG   : Processor: '4'
10-19 12:49:29.919 25885 25885 F DEBUG   : Timestamp: 2022-10-19 12:49:29.552629585-0500
10-19 12:49:29.919 25885 25885 F DEBUG   : Process uptime: 17s
10-19 12:49:29.919 25885 25885 F DEBUG   : Cmdline: com.test.ffmpeg
10-19 12:49:29.919 25885 25885 F DEBUG   : pid: 25566, tid: 25882, name: DefaultDispatch  >>> com.test.ffmpeg <<<
10-19 12:49:29.919 25885 25885 F DEBUG   : uid: 10441
10-19 12:49:29.919 25885 25885 F DEBUG   : signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0x72546ec000
10-19 12:49:29.919 25885 25885 F DEBUG   :     x0  00000074204a1ec0  x1  000000725467bc90  x2  0000007254682fe2  x3  0000007254698b82
10-19 12:49:29.919 25885 25885 F DEBUG   :     x4  00000072546ebff2  x5  0000007264b782dc  x6  00000000fffffff9  x7  0000000000000041
10-19 12:49:29.919 25885 25885 F DEBUG   :     x8  0000000000000071  x9  00000072546e8610  x10 0000000000000041  x11 000000729bb25ca8
10-19 12:49:29.919 25885 25885 F DEBUG   :     x12 000000725467f5f0  x13 0000000000000071  x14 0000000000007fff  x15 0000000000000041
10-19 12:49:29.919 25885 25885 F DEBUG   :     x16 0000000000000041  x17 0000000000000041  x18 0000007264088000  x19 0000000000000027
10-19 12:49:29.919 25885 25885 F DEBUG   :     x20 00000075b04a31a0  x21 0000000000001cb1  x22 0000000000000027  x23 00000075b04a90a0
10-19 12:49:29.919 25885 25885 F DEBUG   :     x24 0000007254607f00  x25 0000007254698af2  x26 0000000000000028  x27 000000725467bc00
10-19 12:49:29.919 25885 25885 F DEBUG   :     x28 00000074204a1e40  x29 0000007254695190
10-19 12:49:29.919 25885 25885 F DEBUG   :     lr  000000729ba9855c  sp  0000007264b78290  pc  000000729bb25cbc  pst 0000000080000000
10-19 12:49:29.919 25885 25885 F DEBUG   : backtrace:
10-19 12:49:29.920 25885 25885 F DEBUG   :       #00 pc 0000000000b11cbc  /data/app/~~Fp6jpZ6seWQUaCyJ6wRDMw==/com.test.ffmpeg-6Otc5YS0rGcT73jJVqxWUA==/base.apk!libavcodec.so

FFmpeg logs

10-19 12:49:28.461 25566 25648 D FFMpegRendererImpl: EXECUTING -y -i 'backgroundtemp.png' -i '20221015_102019.jpg' -stream_loop -1 -i '46c0853346d9ade05a71a6b97fe420db_giphy (1)-1653577938131-1.gif' -filter_complex [0]split=2[bg][fg];[bg]drawbox=c=black@1:replace=1:t=fill[bg];
10-19 12:49:28.461 25566 25648 D FFMpegRendererImpl: [bg][fg]overlay=format=auto[v0];[1:v]scale=2436:1826:flags=neighbor,rotate='0*PI/180:c=none:ow=0.0+2436.0:oh=0.0+1826.0'[t1];[v0][t1]overlay=x=-704.5:y=-1.25[v1];[2:v]scale=512:512:flags=neighbor,rotate='0*PI/180:c=none:ow=0.0+512.0:oh=0.0+512.0'[t1];[v1][t1]overlay=x=256.5:y=655.5[v2] -map [v2] -pix_fmt yuv420p -t 6.1 'tmp.mp4' 
10-19 12:49:28.462 25566 25845 I mobile-ffmpeg: ffmpeg version v4.4-dev-416
10-19 12:49:28.462 25566 25845 I mobile-ffmpeg:  Copyright (c) 2000-2020 the FFmpeg developers
10-19 12:49:28.462 25566 25845 I mobile-ffmpeg: 
10-19 12:49:28.462 25566 25845 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)
10-19 12:49:28.462 25566 25845 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-android21-clang --cxx=aarch64-linux-android21-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-libx264 --enable-gpl --enable-libxvid --enable-gpl --enable-libx265 --enable-gpl --enable-libvidstab --enable-gpl --enable-libilbc --enable-libopus --enable-libsnappy --enable-libsoxr --enable-libaom --enable-libtwolame --disable-sdl2 --enable-libvo-amrwbenc --enable-zlib --enable-mediacodec
10-19 12:49:28.462 25566 25845 I mobile-ffmpeg:   libavutil      56. 55.100 / 56. 55.100
10-19 12:49:28.462 25566 25845 I mobile-ffmpeg:   libavcodec     58. 96.100 / 58. 96.100
10-19 12:49:28.463 25566 25845 I mobile-ffmpeg:   libavformat    58. 48.100 / 58. 48.100
10-19 12:49:28.463 25566 25845 I mobile-ffmpeg:   libavdevice    58. 11.101 / 58. 11.101
10-19 12:49:28.463 25566 25845 I mobile-ffmpeg:   libavfilter     7. 87.100 /  7. 87.100
10-19 12:49:28.463 25566 25845 I mobile-ffmpeg:   libswscale      5.  8.100 /  5.  8.100
10-19 12:49:28.463 25566 25845 I mobile-ffmpeg:   libswresample   3.  8.100 /  3.  8.100
10-19 12:49:28.469 25566 25845 I mobile-ffmpeg: Input #0, png_pipe, from 'backgroundtemp.png':
10-19 12:49:28.469 25566 25845 I mobile-ffmpeg:   Duration: 
10-19 12:49:28.469 25566 25845 I mobile-ffmpeg: N/A
10-19 12:49:28.469 25566 25845 I mobile-ffmpeg: , bitrate: 
10-19 12:49:28.469 25566 25845 I mobile-ffmpeg: N/A
10-19 12:49:28.469 25566 25845 I mobile-ffmpeg: 
10-19 12:49:28.469 25566 25845 I mobile-ffmpeg:     Stream #0:0
10-19 12:49:28.470 25566 25845 I mobile-ffmpeg: : Video: png, rgba(pc), 1026x1824
10-19 12:49:28.470 25566 25845 I mobile-ffmpeg: , 
10-19 12:49:28.470 25566 25845 I mobile-ffmpeg: 25 tbr, 
10-19 12:49:28.470 25566 25845 I mobile-ffmpeg: 25 tbn, 
10-19 12:49:28.470 25566 25845 I mobile-ffmpeg: 25 tbc
10-19 12:49:28.470 25566 25845 I mobile-ffmpeg: 
10-19 12:49:28.474 25566 25845 I mobile-ffmpeg: Input #1, image2, from '20221015_102019.jpg':
10-19 12:49:28.474 25566 25845 I mobile-ffmpeg:   Duration: 
10-19 12:49:28.474 25566 25845 I mobile-ffmpeg: 00:00:00.04
10-19 12:49:28.474 25566 25845 I mobile-ffmpeg: , start: 
10-19 12:49:28.474 25566 25845 I mobile-ffmpeg: 0.000000
10-19 12:49:28.474 25566 25845 I mobile-ffmpeg: , bitrate: 
10-19 12:49:28.475 25566 25845 I mobile-ffmpeg: 569530 kb/s
10-19 12:49:28.475 25566 25845 I mobile-ffmpeg: 
10-19 12:49:28.475 25566 25845 I mobile-ffmpeg:     Stream #1:0
10-19 12:49:28.475 25566 25845 I mobile-ffmpeg: : Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 3648x2736
10-19 12:49:28.475 25566 25845 I mobile-ffmpeg: , 
10-19 12:49:28.475 25566 25845 I mobile-ffmpeg: 25 tbr, 
10-19 12:49:28.475 25566 25845 I mobile-ffmpeg: 25 tbn, 
10-19 12:49:28.475 25566 25845 I mobile-ffmpeg: 25 tbc
10-19 12:49:28.475 25566 25845 I mobile-ffmpeg: 
10-19 12:49:28.475 25566 25845 I mobile-ffmpeg: Input #2, gif, from '46c0853346d9ade05a71a6b97fe420db_giphy (1)-1653577938131-1.gif':
10-19 12:49:28.475 25566 25845 I mobile-ffmpeg:   Duration: 
10-19 12:49:28.475 25566 25845 I mobile-ffmpeg: 00:00:02.10
10-19 12:49:28.475 25566 25845 I mobile-ffmpeg: , start: 
10-19 12:49:28.475 25566 25845 I mobile-ffmpeg: 0.000000
10-19 12:49:28.475 25566 25845 I mobile-ffmpeg: , bitrate: 
10-19 12:49:28.475 25566 25845 I mobile-ffmpeg: 507 kb/s
10-19 12:49:28.475 25566 25845 I mobile-ffmpeg: 
10-19 12:49:28.475 25566 25845 I mobile-ffmpeg:     Stream #2:0
10-19 12:49:28.475 25566 25845 I mobile-ffmpeg: : Video: gif, bgra, 480x480
10-19 12:49:28.475 25566 25845 I mobile-ffmpeg: , 
10-19 12:49:28.475 25566 25845 I mobile-ffmpeg: 10 fps, 
10-19 12:49:28.475 25566 25845 I mobile-ffmpeg: 10 tbr, 
10-19 12:49:28.475 25566 25845 I mobile-ffmpeg: 100 tbn, 
10-19 12:49:28.475 25566 25845 I mobile-ffmpeg: 100 tbc
10-19 12:49:28.475 25566 25845 I mobile-ffmpeg: 
10-19 12:49:28.476 25566 25845 I mobile-ffmpeg: Stream mapping:
10-19 12:49:28.476 25566 25845 I mobile-ffmpeg:   Stream #0:0 (png) -> split
10-19 12:49:28.476 25566 25845 I mobile-ffmpeg: 
10-19 12:49:28.476 25566 25845 I mobile-ffmpeg:   Stream #1:0 (mjpeg) -> scale
10-19 12:49:28.476 25566 25845 I mobile-ffmpeg: 
10-19 12:49:28.476 25566 25845 I mobile-ffmpeg:   Stream #2:0 (gif) -> scale
10-19 12:49:28.476 25566 25845 I mobile-ffmpeg: 
10-19 12:49:28.552 25566 25845 W mobile-ffmpeg: [graph 0 input from stream 0:0 @ 0x7430270510] sws_param option is deprecated and ignored
10-19 12:49:28.553 25566 25845 W mobile-ffmpeg: [graph 0 input from stream 1:0 @ 0x7430271950] sws_param option is deprecated and ignored
10-19 12:49:28.553 25566 25845 W mobile-ffmpeg: [graph 0 input from stream 2:0 @ 0x7430272850] sws_param option is deprecated and ignored
10-19 12:49:28.555 25566 25845 W mobile-ffmpeg: [swscaler @ 0x75a04bb280] deprecated pixel format used, make sure you did set range correctly
10-19 12:49:28.759 25566 25845 I mobile-ffmpeg: [libx264 @ 0x74a0369820] using cpu capabilities: ARMv8 NEON
10-19 12:49:28.764 25566 25845 I mobile-ffmpeg: [libx264 @ 0x74a0369820] profile High, level 4.0, 4:2:0, 8-bit
10-19 12:49:28.764 25566 25845 I mobile-ffmpeg: [libx264 @ 0x74a0369820] 264 - core 160 - H.264/MPEG-4 AVC codec - Copyleft 2003-2020 - 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
10-19 12:49:28.764 25566 25845 I mobile-ffmpeg: Output #0, mp4, to 'tmp.mp4':
10-19 12:49:28.764 25566 25845 I mobile-ffmpeg:   Metadata:
10-19 12:49:28.764 25566 25845 I mobile-ffmpeg:     encoder         : 
10-19 12:49:28.764 25566 25845 I mobile-ffmpeg: Lavf58.48.100
10-19 12:49:28.764 25566 25845 I mobile-ffmpeg: 
10-19 12:49:28.764 25566 25845 I mobile-ffmpeg:     Stream #0:0
10-19 12:49:28.764 25566 25845 I mobile-ffmpeg: : Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 1026x1824, q=-1--1
10-19 12:49:28.764 25566 25845 I mobile-ffmpeg: , 
10-19 12:49:28.764 25566 25845 I mobile-ffmpeg: 25 fps, 
10-19 12:49:28.764 25566 25845 I mobile-ffmpeg: 12800 tbn, 
10-19 12:49:28.764 25566 25845 I mobile-ffmpeg: 25 tbc
10-19 12:49:28.764 25566 25845 I mobile-ffmpeg:  (default)
10-19 12:49:28.764 25566 25845 I mobile-ffmpeg: 
10-19 12:49:28.764 25566 25845 I mobile-ffmpeg:     Metadata:
10-19 12:49:28.764 25566 25845 I mobile-ffmpeg:       encoder         : 
10-19 12:49:28.765 25566 25845 I mobile-ffmpeg: Lavc58.96.100 libx264
10-19 12:49:28.765 25566 25845 I mobile-ffmpeg: 
10-19 12:49:28.765 25566 25845 I mobile-ffmpeg:     Side data:
10-19 12:49:28.765 25566 25845 I mobile-ffmpeg:       
10-19 12:49:28.765 25566 25845 I mobile-ffmpeg: cpb: 
10-19 12:49:28.765 25566 25845 I mobile-ffmpeg: bitrate max/min/avg: 0/0/0 buffer size: 0 
10-19 12:49:28.765 25566 25845 I mobile-ffmpeg: vbv_delay: N/A
10-19 12:49:28.765 25566 25845 I mobile-ffmpeg: 
10-19 12:49:29.020 25566 25845 I mobile-ffmpeg: frame=   26 fps=0.0 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A dup=15 drop=0 speed=   0x    

Environment

  • Platform: Android
  • Architecture: ARMv8-A (Samsung s10+)
  • Version: 4.5.1-1.LTS
  • Android Studio version: 4.0
  • Android NDK version: 25.1.8937393
@tanersener
Copy link
Collaborator

A similar issue coming from x264 was reported in #394 and addressed in v5.1. Have you tried running the same command in ffmpeg-kit v5.1?

@mrkiwi
Copy link
Author

mrkiwi commented Oct 21, 2022

@tanersener Hi. Yes, I've tried v5.1 but with this version I have next error every time I try to run some commands

2022-10-21 10:49:36.317 32006-32093/com.test.ffmpeg.A/libc: Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 in tid 32093 (DefaultDispatch), pid 32006 
2022-10-21 10:49:36.685 32231-32231/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
2022-10-21 10:49:36.685 32231-32231/? A/DEBUG: Build fingerprint: 'google/oriole/oriole:13/TP1A.221005.002/9012097:user/release-keys'
2022-10-21 10:49:36.685 32231-32231/? A/DEBUG: Revision: 'MP1.0'
2022-10-21 10:49:36.685 32231-32231/? A/DEBUG: ABI: 'arm64'
2022-10-21 10:49:36.685 32231-32231/? A/DEBUG: Timestamp: 2022-10-21 10:49:36.487845731+0200
2022-10-21 10:49:36.685 32231-32231/? A/DEBUG: Process uptime: 16s
2022-10-21 10:49:36.685 32231-32231/? A/DEBUG: Cmdline: com.test.ffmpeg
2022-10-21 10:49:36.685 32231-32231/? A/DEBUG: pid: 32006, tid: 32093, name: DefaultDispatch  >>> com.test.ffmpeg <<<
2022-10-21 10:49:36.685 32231-32231/? A/DEBUG: uid: 10529
2022-10-21 10:49:36.685 32231-32231/? A/DEBUG: tagged_addr_ctrl: 0000000000000001 (PR_TAGGED_ADDR_ENABLE)
2022-10-21 10:49:36.685 32231-32231/? A/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0000000000000000
2022-10-21 10:49:36.685 32231-32231/? A/DEBUG: Cause: null pointer dereference
2022-10-21 10:49:36.685 32231-32231/? A/DEBUG:     x0  0000000000000001  x1  0000000000000000  x2  0000000000000000  x3  0000000000000000
2022-10-21 10:49:36.685 32231-32231/? A/DEBUG:     x4  0000000000000438  x5  0000000000000780  x6  00000073f99820ac  x7  0000000000000000
2022-10-21 10:49:36.686 32231-32231/? A/DEBUG:     x8  0000000000000000  x9  0000000000000000  x10 0000000000000000  x11 0000000000000000
2022-10-21 10:49:36.686 32231-32231/? A/DEBUG:     x12 0000000000000000  x13 0000000000000000  x14 0000000000000000  x15 0000000000000000
2022-10-21 10:49:36.686 32231-32231/? A/DEBUG:     x16 00000073f6c8b210  x17 0000007772496f50  x18 000000742642c000  x19 00000073f99820ac
2022-10-21 10:49:36.686 32231-32231/? A/DEBUG:     x20 0000000000000000  x21 b4000073ced6dff0  x22 b400007546b2da10  x23 b4000073ced6dff3
2022-10-21 10:49:36.686 32231-32231/? A/DEBUG:     x24 0000000000000000  x25 0000000000000004  x26 0000000000000438  x27 0000000000000000
2022-10-21 10:49:36.686 32231-32231/? A/DEBUG:     x28 0000000000000000  x29 0000000000000000
2022-10-21 10:49:36.686 32231-32231/? A/DEBUG:     lr  00000073f9981dec  sp  000000742807e8e0  pc  00000073f9981dfc  pst 0000000080001000
2022-10-21 10:49:36.686 32231-32231/? A/DEBUG: backtrace:
2022-10-21 10:49:36.686 32231-32231/? A/DEBUG:       #00 pc 000000000033adfc  /data/app/~~7OLkg0MvWnYtc6jPoNs4Cw==/com.test.ffmpeg-qOuGkwvfSbDQy6kRlxlRlA==/base.apk!libavfilter.so

@tanersener
Copy link
Collaborator

I tried reproducing this issue locally using 2 images and 1 gif file but didn't receive any errors. Everything worked fine.

If you can share your images, I can try with them as well.

@mrkiwi
Copy link
Author

mrkiwi commented Oct 22, 2022

@tanersener Yes, sure.
Here's the example code that produce crash on all my devices

-y -i 'backgroundtemp.png' 
-stream_loop -1 -i 'STICKER_46c0853346d9ade05a71a6b97fe420db_giphy (1)-1653577938131-1.gif' 
-filter_complex [0]split=2[bg][fg];[bg]drawbox=c=black@1:replace=1:t=fill[bg];  [bg][fg]overlay=format=auto[v0];[1:v]scale=512:512:flags=neighbor,rotate='0*PI/180:c=none:ow=0.0+512.0:oh=0.0+512.0'[t1];[v0][t1]overlay=x=256.5:y=655.5[v1] 
-map [v1] -pix_fmt yuv420p -t 6.1 'tmp.mp4'

backgroundtemp.png (only this size, other sizes for backgroundtemp works well)
backgroundtemp
STICKER_46c0853346d9ade05a71a6b97fe420db_giphy (1)-1653577938131-1.gif
STICKER_46c0853346d9ade05a71a6b97fe420db_giphy (1)-1653577938131-1

Also, I've tried to run this code directly with ffmpeg on my laptop, without android library, and it works good.
And thanks for helping with this issue!

@tanersener tanersener added ffmpeg-bug Something isn't right in ffmpeg source code fixed-on-development Fixed on the development branch. Not released yet. v5.1 Affects v5.1 release labels Oct 22, 2022
@tanersener tanersener self-assigned this Oct 22, 2022
@tanersener
Copy link
Collaborator

Thanks for the files.

Well, we must correct a few things first. The logs in the first post belong to mobile-ffmpeg v4.4, which was released more than two years ago. So, hard to say what the issue is there, since a lot has changed in ffmpeg since then.

With regard to other logs you shared for the same command on ffmpeg-kit v5.1, I managed to reproduce that one locally. My tests show that this crash originates from ffmpeg. And, desktop ffmpeg v5.1.2 also has the same crash (verified this on macOS). So, this is a ffmpeg bug. Good news is it is fixed on master branch of ffmpeg. I updated the development branch to use the new ffmpeg version. So, if you build ffmpeg-kit from the development branch created libraries won't have this issue. We will include updated ffmpeg in our next release.

@tanersener tanersener moved this from Done to Test Again Before Publishing The Release in Next FFmpegKit Release Oct 23, 2022
@mrkiwi
Copy link
Author

mrkiwi commented Oct 25, 2022

@tanersener Big thanks for help!
I've build an .aar lib from development branch and added it as a dependency. Now it works like a charm, without any crashes or issues.

@tanersener tanersener moved this from Test Again Before Publishing The Release to Done in Next FFmpegKit Release Sep 10, 2023
@tanersener tanersener added fixed-in-v6.0 and removed fixed-on-development Fixed on the development branch. Not released yet. labels Sep 10, 2023
@tanersener
Copy link
Collaborator

Fixed in ffmpg-kit v6.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ffmpeg-bug Something isn't right in ffmpeg source code fixed-in-v6.0 v5.1 Affects v5.1 release
Projects
No open projects
Development

No branches or pull requests

2 participants