tanersener / mobile-ffmpeg

FFmpeg for Android, iOS and tvOS. Not maintained anymore. Superseded by FFmpegKit.
https://tanersener.github.io/mobile-ffmpeg
GNU General Public License v3.0
3.85k stars 787 forks source link

mediacodec inconsistency - "error while decoding stream" #707

Closed Vigrond closed 3 years ago

Vigrond commented 3 years ago

Description

Using mediacodec sometimes works, but most of the time fails. When it fails, no frames are decoded.

Here's my code, which simply downloads a Blender test mp4 video, decodes it using mediacodec, and re-encodes it using libx264.

       val filePath: kotlin.String = getFilesDir().getPath().toString().toString() + "/fileName.mp4"

        var executionId = FFmpeg.executeAsync("-y -hwaccel mediacodec -c:v h264_mediacodec -r 30 -i \"https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4\" -r 30 -c:v libx264 -b:v 6000k -minrate 6000k -maxrate 6000k -bufsize 24500k -preset veryfast -c:a copy -flvflags no_duration_filesize -f flv $stream ") { executionId, returnCode ->

        if (returnCode === com.arthenica.mobileffmpeg.Config.RETURN_CODE_SUCCESS) {
                Log.i(Config.TAG, "Async command execution completed successfully.")
            } else if (returnCode === com.arthenica.mobileffmpeg.Config.RETURN_CODE_CANCEL) {
                Log.i(Config.TAG, "Async command execution cancelled by user.")
            } else {
                Log.i(Config.TAG, String.format("Async command execution failed with rc=%d.", returnCode))
            }
        }

Expected behavior mediacodec to initialize and decode frames consistently

Current behavior Same code will fail most of the time on either an emulator or a real device. Every now and then the same code will begin decoding successfully.

Screenshots If applicable, add screenshots to help explain your problem.

Logs

Log when ran successfully on an emulator:

D/mobile-ffmpeg: ffmpeg version v4.4-dev-416
D/mobile-ffmpeg:  Copyright (c) 2000-2020 the FFmpeg developers
D/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)
D/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-android16-clang --cxx=i686-linux-android16-clang++ --extra-libs='-L/storage/light/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-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
D/mobile-ffmpeg:   libavutil      56. 55.100 / 56. 55.100
      libavcodec     58. 96.100 / 58. 96.100
D/mobile-ffmpeg:   libavformat    58. 48.100 / 58. 48.100
      libavdevice    58. 11.101 / 58. 11.101
      libavfilter     7. 87.100 /  7. 87.100
D/mobile-ffmpeg:   libswscale      5.  8.100 /  5.  8.100
      libswresample   3.  8.100 /  3.  8.100
D/mobile-ffmpeg: Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4':
D/mobile-ffmpeg:   Metadata:
D/mobile-ffmpeg:     major_brand     : 
    mp42
        minor_version   : 
    0
D/mobile-ffmpeg:     compatible_brands: 
    isomavc1mp42
        creation_time   : 
    2010-01-10T08:29:06.000000Z
D/mobile-ffmpeg:   Duration: 
    00:09:56.47
    , start: 
    0.000000
    , bitrate: 
    2119 kb/s
D/mobile-ffmpeg:     Stream #0:0
    (und)
    : Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 125 kb/s
D/mobile-ffmpeg:  (default)
        Metadata:
D/mobile-ffmpeg:       creation_time   : 
    2010-01-10T08:29:06.000000Z
          handler_name    : 
    (C) 2007 Google Inc. v08.13.2007.
D/mobile-ffmpeg:     Stream #0:1
    (und)
    : Video: h264 (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 1991 kb/s
    , 
D/mobile-ffmpeg: 24 fps, 
    24 tbr, 
    24k tbn, 
    48 tbc
     (default)
        Metadata:
D/mobile-ffmpeg:       creation_time   : 
    2010-01-10T08:29:06.000000Z
          handler_name    : 
    (C) 2007 Google Inc. v08.13.2007.
D/mobile-ffmpeg: [h264_mediacodec @ 0xed0089d0] Using surface 0x0
I/VideoCapabilities: Unsupported profile 4 for video/mp4v-es
I/OMXClient: IOmx service obtained
D/mobile-ffmpeg: [h264_mediacodec @ 0xed0089d0] Output crop parameters top=0 bottom=719 left=0 right=1279, resulting dimensions width=1280 height=720
D/mobile-ffmpeg: [h264_mediacodec @ 0xed0089d0] MediaCodec started successfully: codec = OMX.android.goldfish.h264.decoder, ret = 0
    Stream mapping:
      Stream #0:1 -> #0:0
     (h264 (h264_mediacodec) -> h264 (libx264))
D/mobile-ffmpeg:   Stream #0:0 -> #0:1
     (copy)
    Press [q] to stop, [?] for help
W/ACodec: [OMX.android.goldfish.h264.decoder] BAD CODEC: Output format changed unexpectedly from (diff) AMessage(what = 0x00000000) = {
        } to (diff) AMessage(what = 0x00000000) = {
          int32_t color-range = 2
        }
D/mobile-ffmpeg: [h264_mediacodec @ 0xed0089d0] Output MediaFormat changed to {crop-right=1279, color-format=19, crop-bottom=719, slice-height=720, image-data=java.nio.HeapByteBuffer[pos=0 lim=104 cap=104], mime=video/raw, crop-left=0, width=1280, stride=1280, color-range=2, crop-top=0, height=720}
D/mobile-ffmpeg: [h264_mediacodec @ 0xed0089d0] Output crop parameters top=0 bottom=719 left=0 right=1279, resulting dimensions width=1280 height=720
D/mobile-ffmpeg: [graph 0 input from stream 0:1 @ 0xf33547c0] sws_param option is deprecated and ignored
D/mobile-ffmpeg: [libx264 @ 0xed00d990] using SAR=1/1
D/mobile-ffmpeg: [libx264 @ 0xed00d990] using cpu capabilities: none!
D/mobile-ffmpeg: [libx264 @ 0xed00d990] profile High, level 3.2, 4:2:0, 8-bit
D/mobile-ffmpeg: [libx264 @ 0xed00d990] 264 - core 160 - H.264/MPEG-4 AVC codec - Copyleft 2003-2020 - http://www.videolan.org/x264.html - options: cabac=1 ref=1 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=2 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=6 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=1 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=10 rc=cbr mbtree=1 bitrate=6000 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=6000 vbv_bufsize=24500 nal_hrd=none filler=0 ip_ratio=1.40 aq=1:1.00
D/mobile-ffmpeg: Output #0, flv, to '/data/user/0/com.example.rigobs/files/fileName.mp4':
      Metadata:
D/mobile-ffmpeg:     major_brand     : 
    mp42
        minor_version   : 
    0
D/mobile-ffmpeg:     compatible_brands: 
    isomavc1mp42
        encoder         : 
    Lavf58.48.100
D/mobile-ffmpeg:     Stream #0:0
    (und)
    : Video: h264 (libx264) ([7][0][0][0] / 0x0007), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 6000 kb/s
D/mobile-ffmpeg: , 
    30 fps, 
    1k tbn, 
    30 tbc
     (default)
D/mobile-ffmpeg:     Metadata:
          creation_time   : 
    2010-01-10T08:29:06.000000Z
          handler_name    : 
D/mobile-ffmpeg: (C) 2007 Google Inc. v08.13.2007.
          encoder         : 
    Lavc58.96.100 libx264
D/mobile-ffmpeg:     Side data:

D/mobile-ffmpeg: cpb: 
    bitrate max/min/avg: 6000000/0/6000000 buffer size: 24500000 
    vbv_delay: N/A
D/mobile-ffmpeg:     Stream #0:1
    (und)
    : Audio: aac ([10][0][0][0] / 0x000A), 44100 Hz, stereo, fltp, 125 kb/s
     (default)
D/mobile-ffmpeg:     Metadata:
          creation_time   : 
    2010-01-10T08:29:06.000000Z
D/mobile-ffmpeg:       handler_name    : 
    (C) 2007 Google Inc. v08.13.2007.
D/mobile-ffmpeg: frame=   23 fps=0.0 q=6.0 size=       6kB time=00:00:00.99 bitrate=  51.1kbits/s speed=1.87x    
D/mobile-ffmpeg: frame=   36 fps= 34 q=0.0 size=     130kB time=00:00:01.53 bitrate= 692.5kbits/s speed=1.43x    
D/mobile-ffmpeg: frame=   48 fps= 29 q=0.0 size=     512kB time=00:00:02.04 bitrate=2053.0kbits/s speed=1.23x    
D/mobile-ffmpeg: frame=   60 fps= 28 q=2.0 size=    1024kB time=00:00:02.53 bitrate=3314.3kbits/s speed=1.17x    
D/mobile-ffmpeg: frame=   71 fps= 26 q=3.0 size=    1792kB time=00:00:03.04 bitrate=4825.8kbits/s speed=1.12x    
D/mobile-ffmpeg: frame=   83 fps= 26 q=5.0 size=    2560kB time=00:00:03.55 bitrate=5902.5kbits/s speed= 1.1x    
D/mobile-ffmpeg: frame=  102 fps= 26 q=16.0 size=    3584kB time=00:00:04.57 bitrate=6418.9kbits/s speed=1.18x    
D/mobile-ffmpeg: frame=  118 fps= 26 q=16.0 size=    4096kB time=00:00:05.08 bitrate=6598.7kbits/s speed=1.11x    
D/mobile-ffmpeg: frame=  134 fps= 26 q=18.0 size=    4608kB time=00:00:05.59 bitrate=6745.7kbits/s speed=1.07x    
D/mobile-ffmpeg: frame=  148 fps= 26 q=17.0 size=    4864kB time=00:00:06.61 bitrate=6020.8kbits/s speed=1.15x    
D/mobile-ffmpeg: frame=  158 fps= 25 q=18.0 size=    5376kB time=00:00:06.61 bitrate=6654.6kbits/s speed=1.06x    
D/mobile-ffmpeg: frame=  169 fps= 25 q=18.0 size=    5632kB time=00:00:07.12 bitrate=6471.8kbits/s speed=1.05x    
D/mobile-ffmpeg: frame=  181 fps= 25 q=18.0 size=    6144kB time=00:00:07.63 bitrate=6588.8kbits/s speed=1.04x    
D/mobile-ffmpeg: frame=  193 fps= 24 q=18.0 size=    6400kB time=00:00:08.15 bitrate=6433.0kbits/s speed=1.03x    
D/mobile-ffmpeg: frame=  212 fps= 24 q=20.0 size=    6912kB time=00:00:09.17 bitrate=6173.5kbits/s speed=1.06x    
D/mobile-ffmpeg: frame=  228 fps= 24 q=19.0 size=    7424kB time=00:00:09.68 bitrate=6280.8kbits/s speed=1.04x    
D/mobile-ffmpeg: frame=  243 fps= 24 q=21.0 size=    7936kB time=00:00:10.19 bitrate=6377.4kbits/s speed=1.02x    
D/mobile-ffmpeg: frame=  256 fps= 24 q=20.0 size=    8192kB time=00:00:10.72 bitrate=6255.5kbits/s speed=1.02x    
D/mobile-ffmpeg: frame=  268 fps= 24 q=19.0 size=    8704kB time=00:00:11.21 bitrate=6357.8kbits/s speed=1.02x    
D/mobile-ffmpeg: frame=  278 fps= 24 q=21.0 size=    9216kB time=00:00:11.72 bitrate=6438.5kbits/s speed=1.01x    
D/mobile-ffmpeg: frame=  292 fps= 24 q=19.0 size=    9472kB time=00:00:12.26 bitrate=6329.1kbits/s speed=1.01x    
D/mobile-ffmpeg: frame=  308 fps= 24 q=23.0 size=    9984kB time=00:00:13.25 bitrate=6168.6kbits/s speed=1.05x    
D/mobile-ffmpeg: frame=  321 fps= 24 q=18.0 size=   10240kB time=00:00:13.76 bitrate=6092.4kbits/s speed=1.04x    
D/mobile-ffmpeg: frame=  330 fps= 24 q=18.0 size=   10496kB time=00:00:13.76 bitrate=6244.7kbits/s speed=1.01x    
D/mobile-ffmpeg: frame=  348 fps= 25 q=19.0 size=   11264kB time=00:00:14.79 bitrate=6238.6kbits/s speed=1.04x    
D/mobile-ffmpeg: frame=  353 fps= 24 q=19.0 size=   11264kB time=00:00:14.79 bitrate=6238.6kbits/s speed=1.01x    
D/mobile-ffmpeg: frame=  363 fps= 24 q=20.0 size=   11776kB time=00:00:15.30 bitrate=6304.3kbits/s speed=   1x    
D/mobile-ffmpeg: frame=  379 fps= 24 q=17.0 size=   12032kB time=00:00:15.81 bitrate=6233.2kbits/s speed=0.994x    
D/mobile-ffmpeg: frame=  386 fps= 24 q=17.0 size=   12288kB time=00:00:16.32 bitrate=6166.6kbits/s speed=0.995x    
D/mobile-ffmpeg: frame=  405 fps= 24 q=18.0 size=   12800kB time=00:00:16.85 bitrate=6220.0kbits/s speed=0.992x    
D/mobile-ffmpeg: frame=  436 fps= 25 q=17.0 size=   13312kB time=00:00:18.36 bitrate=5937.4kbits/s speed=1.04x    
D/mobile-ffmpeg: frame=  451 fps= 25 q=14.0 size=   13568kB time=00:00:18.87 bitrate=5887.8kbits/s speed=1.04x    
D/mobile-ffmpeg: frame=  471 fps= 25 q=13.0 size=   14080kB time=00:00:19.90 bitrate=5796.1kbits/s speed=1.07x    
D/mobile-ffmpeg: frame=  499 fps= 26 q=8.0 size=   14848kB time=00:00:20.92 bitrate=5814.0kbits/s speed=1.08x    
D/mobile-ffmpeg: frame=  514 fps= 26 q=13.0 size=   15360kB time=00:00:21.45 bitrate=5864.8kbits/s speed=1.07x    
D/mobile-ffmpeg: frame=  526 fps= 26 q=8.0 size=   15872kB time=00:00:21.96 bitrate=5919.3kbits/s speed=1.07x    
D/mobile-ffmpeg: Cancelling com.arthenica.mobileffmpeg.FFmpegExecution@c052418.executionId
D/mobile-ffmpeg: frame=  536 fps= 25 q=-1.0 Lsize=   16690kB time=00:00:22.45 bitrate=6089.2kbits/s speed=1.06x    
D/mobile-ffmpeg: video:16318kB audio:345kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 
    0.161968%
D/mobile-ffmpeg: [libx264 @ 0xed00d990] frame I:4     Avg QP: 8.91  size:142506
    [libx264 @ 0xed00d990] frame P:194   Avg QP: 8.45  size: 53457
D/mobile-ffmpeg: [libx264 @ 0xed00d990] frame B:338   Avg QP:12.87  size: 17066
    [libx264 @ 0xed00d990] consecutive B-frames: 11.0% 10.1% 14.0% 64.9%
    [libx264 @ 0xed00d990] mb I  I16..4: 36.3% 13.4% 50.2%
D/mobile-ffmpeg: [libx264 @ 0xed00d990] mb P  I16..4: 10.4%  5.5%  2.5%  P16..4: 33.3%  9.8% 10.3%  0.0%  0.0%    skip:28.3%
D/mobile-ffmpeg: [libx264 @ 0xed00d990] mb B  I16..4:  2.7%  1.5%  0.2%  B16..8: 27.9%  8.2%  3.6%  direct:12.7%  skip:43.1%  L0:46.3% L1:36.3% BI:17.4%
D/mobile-ffmpeg: [libx264 @ 0xed00d990] 8x8 transform intra:29.8% inter:40.2%
    [libx264 @ 0xed00d990] coded y,uvDC,uvAC intra: 27.9% 39.7% 24.0% inter: 21.5% 30.6% 11.5%
D/mobile-ffmpeg: [libx264 @ 0xed00d990] i16 v,h,dc,p: 73% 19%  6%  2%
    [libx264 @ 0xed00d990] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 18% 25% 51%  1%  1%  1%  1%  1%  1%
D/mobile-ffmpeg: [libx264 @ 0xed00d990] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 24% 21% 16%  3%  9%  6%  7%  6%  7%
D/mobile-ffmpeg: [libx264 @ 0xed00d990] i8c dc,h,v,p: 57% 22% 16%  4%
    [libx264 @ 0xed00d990] Weighted P-Frames: Y:10.3% UV:5.7%
    [libx264 @ 0xed00d990] kb/s:5985.32
D/mobile-ffmpeg: Exiting normally, received cancel signal.
I/mobile-ffmpeg: Async command execution cancelled by user.

Log when fails on emulator:

D/mobile-ffmpeg: ffmpeg version v4.4-dev-416
D/mobile-ffmpeg:  Copyright (c) 2000-2020 the FFmpeg developers
D/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)
D/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-android16-clang --cxx=i686-linux-android16-clang++ --extra-libs='-L/storage/light/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-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
D/mobile-ffmpeg:   libavutil      56. 55.100 / 56. 55.100
      libavcodec     58. 96.100 / 58. 96.100
D/mobile-ffmpeg:   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
D/mobile-ffmpeg:   libswresample   3.  8.100 /  3.  8.100
D/mobile-ffmpeg: Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4':
D/mobile-ffmpeg:   Metadata:
        major_brand     : 
D/mobile-ffmpeg: mp42
        minor_version   : 
    0
D/mobile-ffmpeg:     compatible_brands: 
    isomavc1mp42
        creation_time   : 
    2010-01-10T08:29:06.000000Z
D/mobile-ffmpeg:   Duration: 
    00:09:56.47
    , start: 
    0.000000
D/mobile-ffmpeg: , bitrate: 
    2119 kb/s
        Stream #0:0
    (und)
D/mobile-ffmpeg: : Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 125 kb/s
     (default)
D/mobile-ffmpeg:     Metadata:
          creation_time   : 
    2010-01-10T08:29:06.000000Z
D/mobile-ffmpeg:       handler_name    : 
    (C) 2007 Google Inc. v08.13.2007.
        Stream #0:1
D/mobile-ffmpeg: (und)
    : Video: h264 (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 1991 kb/s
    , 
    24 fps, 
D/mobile-ffmpeg: 24 tbr, 
    24k tbn, 
    48 tbc
     (default)
D/mobile-ffmpeg:     Metadata:
          creation_time   : 
    2010-01-10T08:29:06.000000Z
          handler_name    : 
D/mobile-ffmpeg: (C) 2007 Google Inc. v08.13.2007.
    [h264_mediacodec @ 0xed00b1b0] Using surface 0x0
I/VideoCapabilities: Unsupported profile 4 for video/mp4v-es
I/OMXClient: IOmx service obtained
D/mobile-ffmpeg: [h264_mediacodec @ 0xed00b1b0] Output crop parameters top=0 bottom=719 left=0 right=1279, resulting dimensions width=1280 height=720
D/mobile-ffmpeg: [h264_mediacodec @ 0xed00b1b0] MediaCodec started successfully: codec = OMX.android.goldfish.h264.decoder, ret = 0
D/mobile-ffmpeg: Stream mapping:
      Stream #0:1 -> #0:0
     (h264 (h264_mediacodec) -> h264 (libx264))
D/mobile-ffmpeg:   Stream #0:0 -> #0:1
     (copy)
    Press [q] to stop, [?] for help
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10156(com.example.rigobs) Thread-2 identical 20 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
W/ACodec: [OMX.android.goldfish.h264.decoder] BAD CODEC: Output format changed unexpectedly from (diff) AMessage(what = 0x00000000) = {
        } to (diff) AMessage(what = 0x00000000) = {
          int32_t color-range = 2
        }
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10156(com.example.rigobs) Thread-2 identical 28 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
    Too many packets buffered for output stream 0:1.
D/mobile-ffmpeg: Conversion failed!
I/mobile-ffmpeg: Async command execution failed with rc=1.

Log when fails on device:

03/26 19:36:58: Launching 'app' on Google Pixel 4a.
Install successfully finished in 772 ms.
$ adb shell am start -n "com.example.rigobs/com.example.rigobs.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -D
Waiting for application to come online: com.example.rigobs.test | com.example.rigobs
Waiting for application to come online: com.example.rigobs.test | com.example.rigobs
Waiting for application to come online: com.example.rigobs.test | com.example.rigobs
Connecting to com.example.rigobs
Capturing and displaying logcat messages from application. This behavior can be disabled in the "Logcat output" section of the "Debugger" settings page.
W/ActivityThread: Application com.example.rigobs is waiting for the debugger on port 8100...
I/System.out: Sending WAIT chunk
I/System.out: Debugger has connected
    waiting for debugger to settle...
Connected to the target VM, address: 'localhost:38021', transport: 'socket'
I/System.out: waiting for debugger to settle...
I/System.out: waiting for debugger to settle...
I/System.out: waiting for debugger to settle...
I/chatty: uid=10317(com.example.rigobs) identical 1 line
I/System.out: waiting for debugger to settle...
I/System.out: waiting for debugger to settle...
I/System.out: debugger has settled (1356)
D/ApplicationLoaders: Returning zygote-cached class loader: /system/framework/android.test.base.jar
D/NetworkSecurityConfig: No Network Security Config specified, using platform default
D/NetworkSecurityConfig: No Network Security Config specified, using platform default
W/.example.rigob: Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (greylist, reflection, allowed)
W/.example.rigob: Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (greylist, reflection, allowed)
I/mobile-ffmpeg: Loading mobile-ffmpeg.
I/mobile-ffmpeg: Loaded mobile-ffmpeg-full-gpl-arm64-v8a-4.4-lts-20210207.
D/mobile-ffmpeg: Callback thread started.
I/AdrenoGLES-0: QUALCOMM build                   : 85da404, I46ff5fc46f
    Build Date                       : 11/30/20
    OpenGL ES Shader Compiler Version: EV031.31.04.01
    Local Branch                     : promo490_3_Google
    Remote Branch                    : 
    Remote Branch                    : 
    Reconstruct Branch               : 
    Build Config                     : S P 10.0.4 AArch64
    Driver Path                      : /vendor/lib64/egl/libGLESv2_adreno.so
I/AdrenoGLES-0: PFP: 0x016ee189, ME: 0x00000000
W/AdrenoUtils: <ReadGpuID_from_sysfs:197>: Failed to open /sys/class/kgsl/kgsl-3d0/gpu_model
    <ReadGpuID:221>: Failed to read chip ID from gpu_model. Fallback to use the GSL path
I/Gralloc4: mapper 4.x is not supported
D/mobile-ffmpeg: ffmpeg version v4.4-dev-416
D/mobile-ffmpeg:  Copyright (c) 2000-2020 the FFmpeg developers
D/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)
D/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/storage/light/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
D/mobile-ffmpeg:   libavutil      56. 55.100 / 56. 55.100
D/mobile-ffmpeg:   libavcodec     58. 96.100 / 58. 96.100
D/mobile-ffmpeg:   libavformat    58. 48.100 / 58. 48.100
D/mobile-ffmpeg:   libavdevice    58. 11.101 / 58. 11.101
D/mobile-ffmpeg:   libavfilter     7. 87.100 /  7. 87.100
D/mobile-ffmpeg:   libswscale      5.  8.100 /  5.  8.100
D/mobile-ffmpeg:   libswresample   3.  8.100 /  3.  8.100
D/mobile-ffmpeg: Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4':
D/mobile-ffmpeg:   Metadata:
D/mobile-ffmpeg:     major_brand     : 
D/mobile-ffmpeg: mp42
D/mobile-ffmpeg:     minor_version   : 
D/mobile-ffmpeg: 0
D/mobile-ffmpeg:     compatible_brands: 
D/mobile-ffmpeg: isomavc1mp42
D/mobile-ffmpeg:     creation_time   : 
D/mobile-ffmpeg: 2010-01-10T08:29:06.000000Z
D/mobile-ffmpeg:   Duration: 
D/mobile-ffmpeg: 00:09:56.47
D/mobile-ffmpeg: , start: 
D/mobile-ffmpeg: 0.000000
D/mobile-ffmpeg: , bitrate: 
D/mobile-ffmpeg: 2119 kb/s
D/mobile-ffmpeg:     Stream #0:0
D/mobile-ffmpeg: (und)
D/mobile-ffmpeg: : Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 125 kb/s
D/mobile-ffmpeg:  (default)
D/mobile-ffmpeg:     Metadata:
D/mobile-ffmpeg:       creation_time   : 
D/mobile-ffmpeg: 2010-01-10T08:29:06.000000Z
D/mobile-ffmpeg:       handler_name    : 
D/mobile-ffmpeg: (C) 2007 Google Inc. v08.13.2007.
D/mobile-ffmpeg:     Stream #0:1
D/mobile-ffmpeg: (und)
D/mobile-ffmpeg: : Video: h264 (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 1991 kb/s
D/mobile-ffmpeg: , 
D/mobile-ffmpeg: 24 fps, 
D/mobile-ffmpeg: 24 tbr, 
D/mobile-ffmpeg: 24k tbn, 
D/mobile-ffmpeg: 48 tbc
D/mobile-ffmpeg:  (default)
D/mobile-ffmpeg:     Metadata:
D/mobile-ffmpeg:       creation_time   : 
D/mobile-ffmpeg: 2010-01-10T08:29:06.000000Z
D/mobile-ffmpeg:       handler_name    : 
D/mobile-ffmpeg: (C) 2007 Google Inc. v08.13.2007.
D/mobile-ffmpeg: [h264_mediacodec @ 0x7cdae0c450] Using surface 0x0
W/VideoCapabilities: Unsupported mime image/vnd.android.heic
D/CCodec: allocate(c2.qti.avc.decoder)
I/Codec2Client: Available Codec2 services: "default" "software"
I/CCodec: setting up 'default' as default (vendor) store
I/CCodec: Created component [c2.qti.avc.decoder]
D/CCodecConfig: read media type: video/avc
D/ReflectedParamUpdater: extent() != 1 for single value type: output.buffers.pool-ids.values
D/CCodecConfig: ignoring local param raw.size (0xd2001800) as it is already supported
D/CCodecConfig: ignoring local param raw.color (0xd2001809) as it is already supported
    ignoring local param raw.hdr-static-info (0xd200180a) as it is already supported
I/CCodecConfig: query failed after returning 17 values (BAD_INDEX)
D/CCodecConfig: c2 config diff is Dict {
      c2::i32 algo.priority.value = -1
      c2::float algo.rate.value = 30
      c2::u32 algo.secure-mode.value = 0
      c2::float coded.frame-rate.value = 30
      c2::u32 coded.pl.level = 20480
      c2::u32 coded.pl.profile = 20480
      c2::u32 coded.vui.color.matrix = 0
      c2::u32 coded.vui.color.primaries = 0
      c2::u32 coded.vui.color.range = 0
      c2::u32 coded.vui.color.transfer = 0
      c2::u32 default.color.matrix = 0
      c2::u32 default.color.primaries = 0
      c2::u32 default.color.range = 0
      c2::u32 default.color.transfer = 0
      c2::u32 input.buffers.max-size.value = 13271040
      c2::u32 input.delay.value = 0
      string input.media-type.value = "video/avc"
      c2::u32 output.delay.value = 18
      string output.media-type.value = "video/raw"
      c2::u32 raw.color.matrix = 0
      c2::u32 raw.color.primaries = 0
      c2::u32 raw.color.range = 0
      c2::u32 raw.color.transfer = 0
      c2::float raw.hdr-static-info.mastering.blue.x = 0
      c2::float raw.hdr-static-info.mastering.blue.y = 0
      c2::float raw.hdr-static-info.mastering.gree
W/ColorUtils: expected specified color aspects (0:0:0:0)
D/CCodec: [c2.qti.avc.decoder] buffers are bound to CCodec for this session
D/CCodecConfig: no c2 equivalents for csd-1
    no c2 equivalents for flags
D/CCodecConfig: c2 config diff is   c2::u32 raw.pixel-format.value = 842094169
      c2::u32 raw.size.height = 720
      c2::u32 raw.size.width = 1280
W/ColorUtils: expected specified color aspects (0:0:0:0)
W/Codec2Client: query -- param skipped: index = 1107298332.
D/CCodec: setup formats input: AMessage(what = 0x00000000) = {
      int32_t feature-secure-playback = 0
      int32_t frame-rate = 30
      int32_t height = 720
      int32_t level = 1
      int32_t max-input-size = 13271040
      string mime = "video/avc"
      int32_t priority = 1
      int32_t profile = 1
      int32_t width = 1280
      Rect crop(0, 0, 1279, 719)
    } and output: AMessage(what = 0x00000000) = {
      int32_t android._video-scaling = 1
      Rect crop(0, 0, 1279, 719)
      int32_t color-standard = 0
      int32_t color-range = 0
      int32_t color-transfer = 0
      int32_t android._dataspace = 0
      int32_t width = 1280
      int32_t feature-secure-playback = 0
      int32_t frame-rate = 30
      int32_t height = 720
      int32_t max-height = 2160
      int32_t max-width = 4096
      string mime = "video/raw"
      int32_t priority = 1
      int32_t rotation-degrees = 0
      int32_t sar-height = 1
      int32_t sar-width = 1
      Buffer hdr-static-info = {
        00000000:  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
        00000010:  00 00 00 00 00 00 00 00  00                       .
W/Codec2Client: query -- param skipped: index = 1342179345.
    query -- param skipped: index = 2415921170.
    query -- param skipped: index = 1610614798.
D/CCodecBufferChannel: [c2.qti.avc.decoder#152] Query input allocators returned 0 params => BAD_INDEX (6)
E/FMQ: grantorIdx must be less than 3
    grantorIdx must be less than 3
D/CCodecBufferChannel: [c2.qti.avc.decoder#152] Created input block pool with allocatorID 16 => poolID 17 - OK (0)
    [c2.qti.avc.decoder#152] Query output allocators returned 0 params => BAD_INDEX (6)
    [c2.qti.avc.decoder#152] Configured output block pool ids 1 => OK
E/ion: ioctl c0044901 failed with code -1: Inappropriate ioctl for device
E/FMQ: grantorIdx must be less than 3
D/mobile-ffmpeg: [h264_mediacodec @ 0x7cdae0c450] Output crop parameters top=0 bottom=719 left=0 right=1279, resulting dimensions width=1280 height=720
D/mobile-ffmpeg: [h264_mediacodec @ 0x7cdae0c450] MediaCodec started successfully: codec = c2.qti.avc.decoder, ret = 0
D/mobile-ffmpeg: Stream mapping:
D/mobile-ffmpeg:   Stream #0:1 -> #0:0
D/mobile-ffmpeg:  (h264 (h264_mediacodec) -> h264 (libx264))
D/mobile-ffmpeg:   Stream #0:0 -> #0:1
D/mobile-ffmpeg:  (copy)
D/mobile-ffmpeg: Press [q] to stop, [?] for help
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 1 line
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/CCodecConfig: c2 config diff is   c2::u32 raw.crop.height = 720
      c2::u32 raw.crop.left = 0
      c2::u32 raw.crop.top = 0
      c2::u32 raw.crop.width = 1280
W/ColorUtils: expected specified color aspects (0:0:0:0)
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/CCodecBuffers: [c2.qti.avc.decoder#152:Output[N]] updating image-data
    [c2.qti.avc.decoder#152:Output[N]] updating stride = 1280
    [c2.qti.avc.decoder#152:Output[N]] updating vstride = 720
    [c2.qti.avc.decoder#152:Output[N]] popFromStashAndRegister: output format changed to AMessage(what = 0x00000000) = {
      int32_t android._video-scaling = 1
      Rect crop(0, 0, 1279, 719)
      int32_t color-standard = 0
      int32_t color-range = 0
      int32_t color-transfer = 0
      int32_t android._dataspace = 0
      int32_t width = 1280
      int32_t feature-secure-playback = 0
      int32_t frame-rate = 30
      int32_t height = 720
      int32_t max-height = 2160
      int32_t max-width = 4096
      string mime = "video/raw"
      int32_t priority = 1
      int32_t rotation-degrees = 0
      int32_t sar-height = 1
      int32_t sar-width = 1
      Buffer hdr-static-info = {
        00000000:  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
        00000010:  00 00 00 00 00 00 00 00  00                       .........
      }
      int32_t android._color-format = 2135033992
      int32_t color-format = 19
    }
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 3 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 2 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 1 line
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 1 line
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 1 line
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 1 line
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 1 line
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 1 line
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 2 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 2 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 1 line
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 1 line
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 2 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 2 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 1 line
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 3 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/CCodecBufferChannel: [c2.qti.avc.decoder#152] MediaCodec discarded an unknown buffer
I/chatty: uid=10317(com.example.rigobs) MediaCodec_loop identical 5 lines
D/CCodecBufferChannel: [c2.qti.avc.decoder#152] MediaCodec discarded an unknown buffer
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/hw-BpHwBinder: onLastStrongRef automatically unlinking death recipients
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/mobile-ffmpeg: Async command execution failed with rc=1.
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 5 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 1 line
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 1 line
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 2 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 2 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 1 line
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 1 line
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 2 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 1 line
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 3 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 1 line
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 2 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 3 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 2 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 2 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 1 line
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 3 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 2 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 2 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 1 line
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 2 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 2 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 2 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 8 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 3 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 3 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 1 line
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 3 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 3 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 2 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 2 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 2 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 3 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 2 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 2 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 2 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 2 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 2 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 2 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 2 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 4 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 8 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 2 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 5 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 1 line
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 14 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 4 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 3 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 3 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 5 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 5 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 3 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 8 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 4 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 5 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 6 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 2 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 3 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 3 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 5 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 1 line
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 2 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 3 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 4 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 5 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 4 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 5 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 5 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 4 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 9 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 7 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 6 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 1 line
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 5 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 4 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 1 line
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 8 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 5 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 5 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 3 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 3 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 1 line
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 7 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 5 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 5 lines
D/mobile-ffmpeg: Error while decoding stream #0:1: Try again
D/mobile-ffmpeg: Too many packets buffered for output stream 0:1.
D/mobile-ffmpeg: Conversion failed!
D/BufferPoolAccessor2.0: bufferpool2 0x7cbadf33e8 : 0(0 size) total buffers - 0(0 size) used buffers - 0/6 (recycle/alloc) - 6/6 (fetch/transfer)
    evictor expired: 1, evicted: 1

Environment

plugins {
    id 'com.android.application'
    id 'kotlin-android'
}

android {
    compileSdkVersion 29
    buildToolsVersion "30.0.3"

    defaultConfig {
        applicationId "com.example.rigobs"
        minSdkVersion 28
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    kotlinOptions {
        jvmTarget = '1.8'
    }
    ndkVersion '21.4.7075529'
}

dependencies {

    implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
    implementation 'androidx.core:core-ktx:1.3.2'
    implementation 'androidx.appcompat:appcompat:1.2.0'
    implementation 'com.google.android.material:material:1.3.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
    implementation 'com.arthenica:mobile-ffmpeg-full-gpl:4.4.LTS'
    testImplementation 'junit:junit:4.+'
    androidTestImplementation 'androidx.test.ext:junit:1.1.2'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
}

Other Sorry if this should be posted over at FFmpeg, figured I'd try here first.

tanersener commented 3 years ago

Do you have the same issue when you use a local file?

Vigrond commented 3 years ago

Do you have the same issue when you use a local file?

Yes. Tried today to decode from local app storage and encode back to it on the Pixel 4A:

kotlin code:

        val filePath: kotlin.String = getExternalFilesDir(Environment.DIRECTORY_DOWNLOADS).toString() + "/Big_Buck_Bunny_1080_10s_30MB.mp4"
        val testPath = getExternalFilesDir(Environment.DIRECTORY_DOWNLOADS).toString() + "/test.mp4"

        var executionId = FFmpeg.executeAsync("-y -hwaccel mediacodec -c:v h264_mediacodec -i \"$filePath\" -r 30 -c:v libx264 -b:v 6000k -minrate 6000k -maxrate 6000k -bufsize 24500k -preset veryfast -c:a copy -flvflags no_duration_filesize -f flv $testPath ") { executionId, returnCode ->

        if (returnCode === com.arthenica.mobileffmpeg.Config.RETURN_CODE_SUCCESS) {
                Log.i(Config.TAG, "Async command execution completed successfully.")
            } else if (returnCode === com.arthenica.mobileffmpeg.Config.RETURN_CODE_CANCEL) {
                Log.i(Config.TAG, "Async command execution cancelled by user.")
            } else {
                Log.i(Config.TAG, String.format("Async command execution failed with rc=%d.", returnCode))
            }
        }

log:

04/02 12:35:49: Launching 'app' on Google Pixel 4a.
Install successfully finished in 2 s 498 ms.
$ adb shell am start -n "com.example.rigobs/com.example.rigobs.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -D
Waiting for application to come online: com.example.rigobs.test | com.example.rigobs
Waiting for application to come online: com.example.rigobs.test | com.example.rigobs
Connected to process 15954 on device 'google-pixel_4a-11131JEC204565'.
Capturing and displaying logcat messages from application. This behavior can be disabled in the "Logcat output" section of the "Debugger" settings page.
W/ActivityThread: Application com.example.rigobs is waiting for the debugger on port 8100...
I/System.out: Sending WAIT chunk
Waiting for application to come online: com.example.rigobs.test | com.example.rigobs
Connecting to com.example.rigobs
Connected to the target VM, address: 'localhost:45709', transport: 'socket'
Capturing and displaying logcat messages from application. This behavior can be disabled in the "Logcat output" section of the "Debugger" settings page.
I/.example.rigob: Late-enabling -Xcheck:jni
I/.example.rigob: Unquickening 12 vdex files!
W/ActivityThread: Application com.example.rigobs is waiting for the debugger on port 8100...
I/System.out: Sending WAIT chunk
I/System.out: Debugger has connected
    waiting for debugger to settle...
I/System.out: waiting for debugger to settle...
I/chatty: uid=10317(com.example.rigobs) identical 2 lines
I/System.out: waiting for debugger to settle...
I/System.out: waiting for debugger to settle...
I/System.out: waiting for debugger to settle...
I/System.out: debugger has settled (1416)
D/ApplicationLoaders: Returning zygote-cached class loader: /system/framework/android.test.base.jar
D/NetworkSecurityConfig: No Network Security Config specified, using platform default
D/NetworkSecurityConfig: No Network Security Config specified, using platform default
W/.example.rigob: Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (greylist, reflection, allowed)
W/.example.rigob: Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (greylist, reflection, allowed)
I/mobile-ffmpeg: Loading mobile-ffmpeg.
I/mobile-ffmpeg: Loaded mobile-ffmpeg-full-gpl-arm64-v8a-4.4-lts-20210207.
D/mobile-ffmpeg: Callback thread started.
I/AdrenoGLES-0: QUALCOMM build                   : 85da404, I46ff5fc46f
    Build Date                       : 11/30/20
    OpenGL ES Shader Compiler Version: EV031.31.04.01
    Local Branch                     : promo490_3_Google
    Remote Branch                    : 
    Remote Branch                    : 
    Reconstruct Branch               : 
    Build Config                     : S P 10.0.4 AArch64
    Driver Path                      : /vendor/lib64/egl/libGLESv2_adreno.so
I/AdrenoGLES-0: PFP: 0x016ee189, ME: 0x00000000
W/AdrenoUtils: <ReadGpuID_from_sysfs:197>: Failed to open /sys/class/kgsl/kgsl-3d0/gpu_model
    <ReadGpuID:221>: Failed to read chip ID from gpu_model. Fallback to use the GSL path
I/Gralloc4: mapper 4.x is not supported
D/mobile-ffmpeg: ffmpeg version v4.4-dev-416
D/mobile-ffmpeg:  Copyright (c) 2000-2020 the FFmpeg developers
D/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)
D/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/storage/light/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
D/mobile-ffmpeg:   libavutil      56. 55.100 / 56. 55.100
D/mobile-ffmpeg:   libavcodec     58. 96.100 / 58. 96.100
D/mobile-ffmpeg:   libavformat    58. 48.100 / 58. 48.100
D/mobile-ffmpeg:   libavdevice    58. 11.101 / 58. 11.101
D/mobile-ffmpeg:   libavfilter     7. 87.100 /  7. 87.100
D/mobile-ffmpeg:   libswscale      5.  8.100 /  5.  8.100
D/mobile-ffmpeg:   libswresample   3.  8.100 /  3.  8.100
D/mobile-ffmpeg: Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/Android/data/com.example.rigobs/files/Download/Big_Buck_Bunny_1080_10s_30MB.mp4':
D/mobile-ffmpeg:   Metadata:
D/mobile-ffmpeg:     major_brand     : 
D/mobile-ffmpeg: isom
D/mobile-ffmpeg:     minor_version   : 
D/mobile-ffmpeg: 512
D/mobile-ffmpeg:     compatible_brands: 
D/mobile-ffmpeg: isomiso2avc1mp41
D/mobile-ffmpeg:     title           : 
D/mobile-ffmpeg: Big Buck Bunny, Sunflower version
D/mobile-ffmpeg:     artist          : 
D/mobile-ffmpeg: Blender Foundation 2008, Janus Bager Kristensen 2013
D/mobile-ffmpeg:     composer        : 
D/mobile-ffmpeg: Sacha Goedegebure
D/mobile-ffmpeg:     encoder         : 
D/mobile-ffmpeg: Lavf57.63.100
D/mobile-ffmpeg:     comment         : 
D/mobile-ffmpeg: Creative Commons Attribution 3.0 - http://bbb3d.renderfarming.net
D/mobile-ffmpeg:     genre           : 
D/mobile-ffmpeg: Animation
D/mobile-ffmpeg:   Duration: 
D/mobile-ffmpeg: 00:00:10.00
D/mobile-ffmpeg: , start: 
D/mobile-ffmpeg: 0.000000
D/mobile-ffmpeg: , bitrate: 
D/mobile-ffmpeg: 24563 kb/s
D/mobile-ffmpeg:     Stream #0:0
D/mobile-ffmpeg: (und)
D/mobile-ffmpeg: : Video: h264 (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 24559 kb/s
D/mobile-ffmpeg: , 
D/mobile-ffmpeg: 30 fps, 
D/mobile-ffmpeg: 30 tbr, 
D/mobile-ffmpeg: 15360 tbn, 
D/mobile-ffmpeg: 60 tbc
D/mobile-ffmpeg:  (default)
D/mobile-ffmpeg:     Metadata:
D/mobile-ffmpeg:       handler_name    : 
D/mobile-ffmpeg: VideoHandler
D/mobile-ffmpeg: [h264_mediacodec @ 0xb400006ff96e2970] Using surface 0x0
W/VideoCapabilities: Unsupported mime image/vnd.android.heic
D/CCodec: allocate(c2.qti.avc.decoder)
I/Codec2Client: Available Codec2 services: "default" "software"
I/CCodec: setting up 'default' as default (vendor) store
I/CCodec: Created component [c2.qti.avc.decoder]
D/CCodecConfig: read media type: video/avc
D/ReflectedParamUpdater: extent() != 1 for single value type: output.buffers.pool-ids.values
D/CCodecConfig: ignoring local param raw.size (0xd2001800) as it is already supported
    ignoring local param raw.color (0xd2001809) as it is already supported
    ignoring local param raw.hdr-static-info (0xd200180a) as it is already supported
I/CCodecConfig: query failed after returning 17 values (BAD_INDEX)
D/CCodecConfig: c2 config diff is Dict {
      c2::i32 algo.priority.value = -1
      c2::float algo.rate.value = 30
      c2::u32 algo.secure-mode.value = 0
      c2::float coded.frame-rate.value = 30
      c2::u32 coded.pl.level = 20480
      c2::u32 coded.pl.profile = 20480
      c2::u32 coded.vui.color.matrix = 0
      c2::u32 coded.vui.color.primaries = 0
      c2::u32 coded.vui.color.range = 0
      c2::u32 coded.vui.color.transfer = 0
      c2::u32 default.color.matrix = 0
      c2::u32 default.color.primaries = 0
      c2::u32 default.color.range = 0
      c2::u32 default.color.transfer = 0
      c2::u32 input.buffers.max-size.value = 13271040
      c2::u32 input.delay.value = 0
      string input.media-type.value = "video/avc"
      c2::u32 output.delay.value = 18
      string output.media-type.value = "video/raw"
      c2::u32 raw.color.matrix = 0
      c2::u32 raw.color.primaries = 0
      c2::u32 raw.color.range = 0
      c2::u32 raw.color.transfer = 0
      c2::float raw.hdr-static-info.mastering.blue.x = 0
      c2::float raw.hdr-static-info.mastering.blue.y = 0
      c2::float raw.hdr-static-info.mastering.gree
W/ColorUtils: expected specified color aspects (0:0:0:0)
D/CCodec: [c2.qti.avc.decoder] buffers are bound to CCodec for this session
D/CCodecConfig: no c2 equivalents for csd-1
    no c2 equivalents for flags
    c2 config diff is   c2::u32 raw.pixel-format.value = 842094169
W/ColorUtils: expected specified color aspects (0:0:0:0)
W/Codec2Client: query -- param skipped: index = 1107298332.
D/CCodec: setup formats input: AMessage(what = 0x00000000) = {
      int32_t feature-secure-playback = 0
      int32_t frame-rate = 30
      int32_t height = 1080
      int32_t level = 1
      int32_t max-input-size = 13271040
      string mime = "video/avc"
      int32_t priority = 1
      int32_t profile = 1
      int32_t width = 1920
      Rect crop(0, 0, 1919, 1079)
    } and output: AMessage(what = 0x00000000) = {
      int32_t android._video-scaling = 1
      Rect crop(0, 0, 1919, 1079)
      int32_t color-standard = 0
      int32_t color-range = 0
      int32_t color-transfer = 0
      int32_t android._dataspace = 0
      int32_t width = 1920
      int32_t feature-secure-playback = 0
      int32_t frame-rate = 30
      int32_t height = 1080
      int32_t max-height = 2160
      int32_t max-width = 4096
      string mime = "video/raw"
      int32_t priority = 1
      int32_t rotation-degrees = 0
      int32_t sar-height = 1
      int32_t sar-width = 1
      Buffer hdr-static-info = {
        00000000:  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
        00000010:  00 00 00 00 00 00 00 00  00                    
W/Codec2Client: query -- param skipped: index = 1342179345.
    query -- param skipped: index = 2415921170.
    query -- param skipped: index = 1610614798.
D/CCodecBufferChannel: [c2.qti.avc.decoder#688] Query input allocators returned 0 params => BAD_INDEX (6)
E/FMQ: grantorIdx must be less than 3
    grantorIdx must be less than 3
D/CCodecBufferChannel: [c2.qti.avc.decoder#688] Created input block pool with allocatorID 16 => poolID 17 - OK (0)
    [c2.qti.avc.decoder#688] Query output allocators returned 0 params => BAD_INDEX (6)
D/CCodecBufferChannel: [c2.qti.avc.decoder#688] Configured output block pool ids 1 => OK
E/ion: ioctl c0044901 failed with code -1: Inappropriate ioctl for device
E/FMQ: grantorIdx must be less than 3
D/CCodecBuffers: Increasing local buffer pool capacity from 37748736 to 75497472
D/mobile-ffmpeg: [h264_mediacodec @ 0xb400006ff96e2970] Output crop parameters top=0 bottom=1079 left=0 right=1919, resulting dimensions width=1920 height=1080
D/mobile-ffmpeg: [h264_mediacodec @ 0xb400006ff96e2970] MediaCodec started successfully: codec = c2.qti.avc.decoder, ret = 0
D/mobile-ffmpeg: Stream mapping:
D/mobile-ffmpeg:   Stream #0:0 -> #0:0
D/mobile-ffmpeg:  (h264 (h264_mediacodec) -> h264 (libx264))
D/mobile-ffmpeg: Press [q] to stop, [?] for help
D/mobile-ffmpeg: Error while decoding stream #0:0: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 22 lines
D/mobile-ffmpeg: Error while decoding stream #0:0: Try again
D/mobile-ffmpeg: Error while decoding stream #0:0: Try again
D/mobile-ffmpeg: Error while decoding stream #0:0: Try again
D/CCodecConfig: c2 config diff is   c2::u32 raw.crop.height = 1080
      c2::u32 raw.crop.left = 0
      c2::u32 raw.crop.top = 0
      c2::u32 raw.crop.width = 1920
D/mobile-ffmpeg: Error while decoding stream #0:0: Try again
W/ColorUtils: expected specified color aspects (0:0:0:0)
D/CCodecBuffers: [c2.qti.avc.decoder#688:Output[N]] updating image-data
D/CCodecBuffers: [c2.qti.avc.decoder#688:Output[N]] updating stride = 1920
    [c2.qti.avc.decoder#688:Output[N]] updating vstride = 1080
    [c2.qti.avc.decoder#688:Output[N]] popFromStashAndRegister: output format changed to AMessage(what = 0x00000000) = {
      int32_t android._video-scaling = 1
      Rect crop(0, 0, 1919, 1079)
      int32_t color-standard = 0
      int32_t color-range = 0
      int32_t color-transfer = 0
      int32_t android._dataspace = 0
      int32_t width = 1920
      int32_t feature-secure-playback = 0
      int32_t frame-rate = 30
      int32_t height = 1080
      int32_t max-height = 2160
      int32_t max-width = 4096
      string mime = "video/raw"
      int32_t priority = 1
      int32_t rotation-degrees = 0
      int32_t sar-height = 1
      int32_t sar-width = 1
      Buffer hdr-static-info = {
        00000000:  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
        00000010:  00 00 00 00 00 00 00 00  00                       .........
      }
      int32_t android._color-format = 2135033992
      int32_t color-format = 19
    }
D/mobile-ffmpeg: Error while decoding stream #0:0: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 5 lines
D/mobile-ffmpeg: Error while decoding stream #0:0: Try again
D/mobile-ffmpeg: Error while decoding stream #0:0: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 67 lines
D/mobile-ffmpeg: Error while decoding stream #0:0: Try again
D/mobile-ffmpeg: Error while decoding stream #0:0: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 13 lines
D/mobile-ffmpeg: Error while decoding stream #0:0: Try again
D/mobile-ffmpeg: Error while decoding stream #0:0: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 17 lines
D/mobile-ffmpeg: Error while decoding stream #0:0: Try again
I/hw-BpHwBinder: onLastStrongRef automatically unlinking death recipients
D/mobile-ffmpeg: Error while decoding stream #0:0: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 8 lines
D/mobile-ffmpeg: Error while decoding stream #0:0: Try again
I/mobile-ffmpeg: Async command execution failed with rc=69.
D/mobile-ffmpeg: Error while decoding stream #0:0: Try again
I/chatty: uid=10317(com.example.rigobs) Thread-2 identical 146 lines
D/mobile-ffmpeg: Error while decoding stream #0:0: Try again
D/mobile-ffmpeg: [h264_mediacodec @ 0xb400006ff96e2970] Output MediaFormat changed to {crop-right=1919, max-height=2160, sar-width=1, color-format=19, slice-height=1080, image-data=java.nio.HeapByteBuffer[pos=0 lim=104 cap=104], mime=video/raw, hdr-static-info=java.nio.HeapByteBuffer[pos=0 lim=25 cap=25], priority=1, stride=1920, color-standard=0, feature-secure-playback=0, color-transfer=0, sar-height=1, crop-bottom=1079, max-width=4096, crop-left=0, width=1920, color-range=0, crop-top=0, frame-rate=30, rotation-degrees=0, height=1080}
D/mobile-ffmpeg: [h264_mediacodec @ 0xb400006ff96e2970] Output crop parameters top=0 bottom=1079 left=0 right=1919, resulting dimensions width=1920 height=1080
D/mobile-ffmpeg: [graph 0 input from stream 0:0 @ 0xb400006f89690d10] sws_param option is deprecated and ignored
D/mobile-ffmpeg: [libx264 @ 0xb400006ff96bc0c0] using SAR=1/1
D/mobile-ffmpeg: [libx264 @ 0xb400006ff96bc0c0] using cpu capabilities: ARMv8 NEON
D/mobile-ffmpeg: [libx264 @ 0xb400006ff96bc0c0] profile High, level 4.0, 4:2:0, 8-bit
D/mobile-ffmpeg: [libx264 @ 0xb400006ff96bc0c0] 264 - core 160 - H.264/MPEG-4 AVC codec - Copyleft 2003-2020 - http://www.videolan.org/x264.html - options: cabac=1 ref=1 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=2 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=12 lookahead_threads=4 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=1 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=10 rc=cbr mbtree=1 bitrate=6000 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=6000 vbv_bufsize=24500 nal_hrd=none filler=0 ip_ratio=1.40 aq=1:1.00
D/mobile-ffmpeg: Output #0, flv, to '/storage/emulated/0/Android/data/com.example.rigobs/files/Download/test.mp4':
D/mobile-ffmpeg:   Metadata:
D/mobile-ffmpeg:     major_brand     : 
D/mobile-ffmpeg: isom
D/mobile-ffmpeg:     minor_version   : 
D/mobile-ffmpeg: 512
D/mobile-ffmpeg:     compatible_brands: 
D/mobile-ffmpeg: isomiso2avc1mp41
D/mobile-ffmpeg:     title           : 
D/mobile-ffmpeg: Big Buck Bunny, Sunflower version
D/mobile-ffmpeg:     artist          : 
D/mobile-ffmpeg: Blender Foundation 2008, Janus Bager Kristensen 2013
D/mobile-ffmpeg:     composer        : 
D/mobile-ffmpeg: Sacha Goedegebure
D/mobile-ffmpeg:     genre           : 
D/mobile-ffmpeg: Animation
D/mobile-ffmpeg:     comment         : 
D/mobile-ffmpeg: Creative Commons Attribution 3.0 - http://bbb3d.renderfarming.net
D/mobile-ffmpeg:     encoder         : 
D/mobile-ffmpeg: Lavf58.48.100
D/mobile-ffmpeg:     Stream #0:0
D/mobile-ffmpeg: (und)
D/mobile-ffmpeg: : Video: h264 (libx264) ([7][0][0][0] / 0x0007), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 6000 kb/s
D/mobile-ffmpeg: , 
D/mobile-ffmpeg: 30 fps, 
D/mobile-ffmpeg: 1k tbn, 
D/mobile-ffmpeg: 30 tbc
D/mobile-ffmpeg:  (default)
D/mobile-ffmpeg:     Metadata:
D/mobile-ffmpeg:       handler_name    : 
D/mobile-ffmpeg: VideoHandler
D/mobile-ffmpeg:       encoder         : 
D/mobile-ffmpeg: Lavc58.96.100 libx264
D/mobile-ffmpeg:     Side data:
D/mobile-ffmpeg:       
D/mobile-ffmpeg: cpb: 
D/mobile-ffmpeg: bitrate max/min/avg: 6000000/0/6000000 buffer size: 24500000 
D/mobile-ffmpeg: vbv_delay: N/A
D/mobile-ffmpeg: frame=    4 fps=0.0 q=-1.0 Lsize=     469kB time=00:00:09.96 bitrate= 385.5kbits/s speed=19.5x    
D/mobile-ffmpeg: video:468kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 
D/mobile-ffmpeg: 0.135929%
D/mobile-ffmpeg: [libx264 @ 0xb400006ff96bc0c0] frame I:1     Avg QP:21.15  size:448158
D/mobile-ffmpeg: [libx264 @ 0xb400006ff96bc0c0] frame P:1     Avg QP:25.21  size: 16655
D/mobile-ffmpeg: [libx264 @ 0xb400006ff96bc0c0] frame B:2     Avg QP:24.32  size:  7050
D/mobile-ffmpeg: [libx264 @ 0xb400006ff96bc0c0] consecutive B-frames: 25.0%  0.0% 75.0%  0.0%
D/mobile-ffmpeg: [libx264 @ 0xb400006ff96bc0c0] mb I  I16..4:  0.4%  8.0% 91.6%
D/mobile-ffmpeg: [libx264 @ 0xb400006ff96bc0c0] mb P  I16..4:  0.0%  0.6%  0.1%  P16..4: 25.3% 11.7%  6.4%  0.0%  0.0%    skip:55.9%
D/mobile-ffmpeg: [libx264 @ 0xb400006ff96bc0c0] mb B  I16..4:  0.0%  0.0%  0.0%  B16..8: 14.0%  4.0%  0.6%  direct: 5.5%  skip:75.9%  L0:55.2% L1:17.7% BI:27.1%
D/mobile-ffmpeg: [libx264 @ 0xb400006ff96bc0c0] 8x8 transform intra:8.5% inter:31.0%
D/mobile-ffmpeg: [libx264 @ 0xb400006ff96bc0c0] coded y,uvDC,uvAC intra: 99.0% 99.3% 92.5% inter: 5.2% 2.0% 0.1%
D/mobile-ffmpeg: [libx264 @ 0xb400006ff96bc0c0] i16 v,h,dc,p:  8% 19% 28% 44%
D/mobile-ffmpeg: [libx264 @ 0xb400006ff96bc0c0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 25% 17% 13%  5%  8%  7%  6% 10% 11%
D/mobile-ffmpeg: [libx264 @ 0xb400006ff96bc0c0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 17% 13% 16%  5% 13%  8%  8% 10% 10%
D/mobile-ffmpeg: [libx264 @ 0xb400006ff96bc0c0] i8c dc,h,v,p: 49% 24% 15% 12%
D/mobile-ffmpeg: [libx264 @ 0xb400006ff96bc0c0] Weighted P-Frames: Y:0.0% UV:0.0%
D/mobile-ffmpeg: [libx264 @ 0xb400006ff96bc0c0] kb/s:28734.78
D/mobile-ffmpeg: Conversion failed!
tanersener commented 3 years ago

This project will be retired. Please consider switching to FFmpegKit.