caydey / ffshare

An android app to compress image, video and audio files through ffmpeg before sharing them
GNU General Public License v3.0
615 stars 30 forks source link

Video conversion keep crashing on Pixel 8 Pro #85

Closed h4gh closed 5 months ago

h4gh commented 5 months ago

Right after selection of the video (made by Pixel camera) the app crashes completely. Is I try to open video from other source then the camera itself (downloaded from web), it seems to be working just fine. Trying on latest version of the app, with latest available official Android for P8P.

caydey commented 5 months ago

Enabling the logs and including them in the ticket or uploading the video in question would help

ssdd28561 commented 5 months ago

Device: Pixel 8 pro Android: 14, build AP2A.240605.024

Example video: link to a Google photos shared file https://photos.app.goo.gl/RJAjanXVWuSiSFsr6

Ffshare version: 1.28 a - working great with a default settings (only video crf is set to 25)

Logs of normal behavior:

Command: ffmpeg -y -i PXL_20240614_144911521.mp4 -preset fast -crf 25 -vf format=yuv420p -c:v h264 -vf scale=-1:1080,setsar=1 43b119d4-1dda-42fb-8dc7-caaea6918830.mp4 Output: ffmpeg version n5.1.2 Copyright (c) 2000-2022 the FFmpeg developers built with Android (7155654, based on r399163b1) clang version 11.0.5 (https://android.googlesource.com/toolchain/llvm-project 87f1315dfbea7c137aa2e6d362dbb457e388158d) configuration: --cross-prefix=aarch64-linux-android- --sysroot=/files/android-sdk/ndk/22.1.7171670/toolchains/llvm/prebuilt/linux-x86_64/sysroot --prefix=/home/taner/Projects/ffmpeg-kit/prebuilt/android-arm64/ffmpeg --pkg-config=/usr/bin/pkg-config --enable-version3 --arch=aarch64 --cpu=armv8-a --target-os=android --enable-neon --enable-asm --enable-inline-asm --ar=aarch64-linux-android-ar --cc=aarch64-linux-android24-clang --cxx=aarch64-linux-android24-clang++ --ranlib=aarch64-linux-android-ranlib --strip=aarch64-linux-android-strip --nm=aarch64-linux-android-nm --extra-libs='-L/home/taner/Projects/ffmpeg-kit/prebuilt/android-arm64/cpu-features/lib -lndk_compat' --disable-autodetect --enable-cross-compile --enable-pic --enable-jni --enable-optimizations --enable-swscale --disable-static --enable-shared --enable-pthreads --enable-v4l2-m2m --disable-outdev=fbdev --disable-indev=fbdev --enable-small --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-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-libdav1d --enable-libkvazaar --enable-libx264 --enable-libxvid --enable-libx265 --enable-libvidstab --enable-libilbc --enable-libopus --enable-libsnappy --enable-libsoxr --enable-libtwolame --disable-sdl2 --enable-libvo-amrwbenc --enable-libzimg --disable-openssl --enable-zlib --enable-mediacodec --enable-gpl libavutil 57. 28.100 / 57. 28.100 libavcodec 59. 37.100 / 59. 37.100 libavformat 59. 27.100 / 59. 27.100 libavdevice 59. 7.100 / 59. 7.100 libavfilter 8. 44.100 / 8. 44.100 libswscale 6. 7.100 / 6. 7.100 libswresample 4. 7.100 / 4. 7.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'saf:11.mp4': Metadata: major_brand : isom minor_version : 131072 compatible_brands: isomiso2mp41 creation_time : 2024-06-14T14:49:19.000000Z com.android.manufacturer: Google com.android.model: Pixel 8 Pro com.android.capture.fps: 60.000000 Duration: 00:00:07.03, start: 0.000000, bitrate: 62524 kb/s Stream #0:0[0x1](eng): Data: none (mett / 0x7474656D), 95 kb/s (default) Metadata: creation_time : 2024-06-14T14:49:19.000000Z handler_name : MetaHandle Stream #0:1[0x2](eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 192 kb/s (default) Metadata: creation_time : 2024-06-14T14:49:19.000000Z handler_name : SoundHandle vendor_id : [0][0][0][0] Stream #0:2[0x3](eng): Video: hevc (hvc1 / 0x31637668), yuvj420p(pc, bt709), 3840x2160, 62224 kb/s, SAR 1:1 DAR 16:9, 60.01 fps, 60 tbr, 90k tbn (default) Metadata: creation_time : 2024-06-14T14:49:19.000000Z handler_name : VideoHandle vendor_id : [0][0][0][0] Multiple -filter, -af or -vf options specified for stream 0, only the last option '-filter:v scale=-1:1080,setsar=1' will be used. Stream mapping: Stream #0:2 -> #0:0 (hevc (native) -> h264 (libx264)) Stream #0:1 -> #0:1 (aac (native) -> aac (native)) Press [q] to stop, [?] for help [swscaler @ 0xb400007649a8c1e0] [swscaler @ 0xb400007649a6c1c0] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0xb400007649a8c1e0] [swscaler @ 0xb4000076499ec140] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0xb400007649a8c1e0] [swscaler @ 0xb400007649a4c1a0] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0xb400007649a8c1e0] [swscaler @ 0xb400007649b8c2e0] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0xb400007649a8c1e0] [swscaler @ 0xb400007649bac300] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0xb400007649a8c1e0] [swscaler @ 0xb400007649b9c2f0] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0xb400007649a8c1e0] [swscaler @ 0xb400007649b7c2d0] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0xb400007649a8c1e0] [swscaler @ 0xb400007649b4c2a0] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0xb400007649a8c1e0] [swscaler @ 0xb400007649b2c280] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0xb400007649a8c1e0] [swscaler @ 0xb400007649b3c290] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0xb400007649a8c1e0] [swscaler @ 0xb400007649b3c290] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0xb400007649a8c1e0] [swscaler @ 0xb4000076499ec140] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0xb400007649a8c1e0] [swscaler @ 0xb400007649a6c1c0] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0xb400007649a8c1e0] [swscaler @ 0xb400007649b2c280] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0xb400007649a8c1e0] [swscaler @ 0xb400007649b4c2a0] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0xb400007649a8c1e0] [swscaler @ 0xb400007649b7c2d0] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0xb400007649a8c1e0] [swscaler @ 0xb400007649b9c2f0] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0xb400007649a8c1e0] [swscaler @ 0xb400007649bac300] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0xb400007649a8c1e0] [swscaler @ 0xb400007649b8c2e0] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0xb400007649a8c1e0] [swscaler @ 0xb400007649b5c2b0] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0xb400007649a8c1e0] [swscaler @ 0xb400007649b5c2b0] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0xb400007649a8c1e0] [swscaler @ 0xb4000076499ec140] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0xb400007649a8c1e0] [swscaler @ 0xb400007649a4c1a0] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0xb400007649a8c1e0] [swscaler @ 0xb400007649b8c2e0] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0xb400007649a8c1e0] [swscaler @ 0xb400007649bac300] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0xb400007649a8c1e0] [swscaler @ 0xb400007649b9c2f0] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0xb400007649a8c1e0] [swscaler @ 0xb400007649b7c2d0] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0xb400007649a8c1e0] [swscaler @ 0xb400007649b4c2a0] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0xb400007649a8c1e0] [swscaler @ 0xb400007649b2c280] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0xb400007649a8c1e0] [swscaler @ 0xb400007649b3c290] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0xb400007649a8c1e0] [swscaler @ 0xb400007649b3c290] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0xb400007649a8c1e0] [swscaler @ 0xb4000076499ec140] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0xb400007649a8c1e0] [swscaler @ 0xb400007649a6c1c0] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0xb400007649a8c1e0] [swscaler @ 0xb400007649b2c280] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0xb400007649a8c1e0] [swscaler @ 0xb400007649b4c2a0] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0xb400007649a8c1e0] [swscaler @ 0xb400007649b7c2d0] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0xb400007649a8c1e0] [swscaler @ 0xb400007649b9c2f0] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0xb400007649a8c1e0] [swscaler @ 0xb400007649bac300] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0xb400007649a8c1e0] [swscaler @ 0xb400007649b8c2e0] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0xb400007649a8c1e0] [swscaler @ 0xb400007649b5c2b0] deprecated pixel format used, make sure you did set range correctly [libx264 @ 0xb4000076299dee80] using SAR=1/1 [libx264 @ 0xb4000076299dee80] using cpu capabilities: ARMv8 NEON [libx264 @ 0xb4000076299dee80] profile High, level 4.2, 4:2:0, 8-bit [libx264 @ 0xb4000076299dee80] 264 - core 164 - H.264/MPEG-4 AVC codec - Copyleft 2003-2022 - http://www.videolan.org/x264.html - options: cabac=1 ref=2 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=6 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=13 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=30 rc=crf mbtree=1 crf=25.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00 Output #0, mp4, to 'saf:12.mp4': Metadata: major_brand : isom minor_version : 131072 compatible_brands: isomiso2mp41 com.android.capture.fps: 60.000000 com.android.manufacturer: Google com.android.model: Pixel 8 Pro encoder : Lavf59.27.100 Stream #0:0(eng): Video: h264 (avc1 / 0x31637661), yuvj420p(pc, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 60 fps, 15360 tbn (default) Metadata: creation_time : 2024-06-14T14:49:19.000000Z handler_name : VideoHandle vendor_id : [0][0][0][0] encoder : Lavc59.37.100 libx264 Side data: cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default) Metadata: creation_time : 2024-06-14T14:49:19.000000Z handler_name : SoundHandle vendor_id : [0][0][0][0] encoder : Lavc59.37.100 aac frame= 52 fps= 31 q=33.0 size= 0kB time=00:00:00.03 bitrate= 11.5kbits/s speed=0.0199x frame= 64 fps= 29 q=33.0 size= 0kB time=00:00:00.98 bitrate= 0.4kbits/s speed=0.445x frame= 75 fps= 27 q=33.0 size= 256kB time=00:00:00.98 bitrate=2120.2kbits/s speed=0.358x frame= 88 fps= 27 q=33.0 size= 256kB time=00:00:00.98 bitrate=2120.2kbits/s speed= 0.3x frame= 101 fps= 27 q=33.0 size= 256kB time=00:00:00.98 bitrate=2120.2kbits/s speed=0.26x frame= 113 fps= 26 q=33.0 size= 512kB time=00:00:01.05 bitrate=3994.7kbits/s speed=0.242x frame= 127 fps= 26 q=33.0 size= 512kB time=00:00:03.03 bitrate=1380.9kbits/s speed=0.627x frame= 138 fps= 26 q=33.0 size= 768kB time=00:00:03.03 bitrate=2071.3kbits/s speed=0.568x frame= 150 fps= 25 q=33.0 size= 768kB time=00:00:03.03 bitrate=2071.3kbits/s speed=0.515x frame= 163 fps= 25 q=33.0 size= 1024kB time=00:00:03.03 bitrate=2761.7kbits/s speed=0.473x frame= 170 fps= 24 q=33.0 size= 1024kB time=00:00:03.03 bitrate=2761.7kbits/s speed=0.434x frame= 181 fps= 24 q=33.0 size= 1024kB time=00:00:04.06 bitrate=2065.4kbits/s speed=0.541x frame= 195 fps= 24 q=33.0 size= 1280kB time=00:00:04.06 bitrate=2581.7kbits/s speed=0.506x frame= 209 fps= 24 q=33.0 size= 1280kB time=00:00:04.06 bitrate=2581.7kbits/s speed=0.474x frame= 221 fps= 24 q=33.0 size= 1280kB time=00:00:04.06 bitrate=2581.7kbits/s speed=0.448x frame= 236 fps= 25 q=33.0 size= 1536kB time=00:00:04.06 bitrate=3098.1kbits/s speed=0.424x frame= 249 fps= 25 q=33.0 size= 1536kB time=00:00:05.08 bitrate=2474.3kbits/s speed=0.504x frame= 261 fps= 25 q=33.0 size= 1536kB time=00:00:05.08 bitrate=2474.3kbits/s speed=0.48x frame= 276 fps= 25 q=33.0 size= 1536kB time=00:00:05.08 bitrate=2474.3kbits/s speed=0.455x frame= 289 fps= 25 q=33.0 size= 1792kB time=00:00:05.08 bitrate=2886.7kbits/s speed=0.435x frame= 301 fps= 25 q=33.0 size= 1792kB time=00:00:05.53 bitrate=2653.0kbits/s speed=0.454x frame= 310 fps= 24 q=31.0 size= 1792kB time=00:00:06.10 bitrate=2402.8kbits/s speed=0.478x frame= 326 fps= 24 q=33.0 size= 1792kB time=00:00:06.10 bitrate=2402.8kbits/s speed=0.457x frame= 339 fps= 24 q=33.0 size= 2048kB time=00:00:06.10 bitrate=2746.1kbits/s speed=0.44x frame= 351 fps= 24 q=33.0 size= 2048kB time=00:00:06.10 bitrate=2746.1kbits/s speed=0.422x frame= 363 fps= 24 q=33.0 size= 2304kB time=00:00:06.34 bitrate=2975.1kbits/s speed=0.423x frame= 377 fps= 24 q=33.0 size= 2304kB time=00:00:06.98 bitrate=2702.5kbits/s speed=0.451x frame= 387 fps= 24 q=33.0 size= 2304kB time=00:00:06.98 bitrate=2702.5kbits/s speed=0.435x frame= 399 fps= 24 q=33.0 size= 2560kB time=00:00:06.98 bitrate=3002.7kbits/s speed=0.422x frame= 411 fps= 24 q=33.0 size= 2560kB time=00:00:06.98 bitrate=3002.7kbits/s speed=0.407x frame= 422 fps= 23 q=-1.0 Lsize= 3171kB time=00:00:07.02 bitrate=3697.2kbits/s speed=0.38x video:3047kB audio:112kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.392792% frame= 422 fps= 23 q=-1.0 Lsize=N/A time=00:00:07.02 bitrate=N/A speed=0.38x video:3047kB audio:112kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown [libx264 @ 0xb4000076299dee80] frame I:5 Avg QP:23.51 size: 17258 [libx264 @ 0xb4000076299dee80] frame P:119 Avg QP:25.97 size: 11053 [libx264 @ 0xb4000076299dee80] frame B:298 Avg QP:26.72 size: 5763 [libx264 @ 0xb4000076299dee80] consecutive B-frames: 4.3% 2.8% 5.7% 87.2% [libx264 @ 0xb4000076299dee80] mb I I16..4: 38.0% 61.4% 0.6% [libx264 @ 0xb4000076299dee80] mb P I16..4: 16.0% 15.9% 0.1% P16..4: 25.9% 2.2% 0.9% 0.0% 0.0% skip:38.9% [libx264 @ 0xb4000076299dee80] mb B I16..4: 5.1% 4.1% 0.0% B16..8: 15.4% 1.1% 0.0% direct:12.4% skip:61.9% L0:43.2% L1:54.1% BI: 2.7% [libx264 @ 0xb4000076299dee80] 8x8 transform intra:48.6% inter:95.1% [libx264 @ 0xb4000076299dee80] coded y,uvDC,uvAC intra: 10.3% 15.2% 0.7% inter: 4.8% 7.6% 0.0% [libx264 @ 0xb4000076299dee80] i16 v,h,dc,p: 37% 30% 16% 17% [libx264 @ 0xb4000076299dee80] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 11% 15% 61% 1% 4% 2% 3% 1% 2% [libx264 @ 0xb4000076299dee80] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 19% 14% 35% 5% 7% 7% 5% 4% 3% [libx264 @ 0xb4000076299dee80] i8c dc,h,v,p: 77% 12% 11% 1% [libx264 @ 0xb4000076299dee80] Weighted P-Frames: Y:16.0% UV:11.8% [libx264 @ 0xb4000076299dee80] ref P L0: 66.2% 33.8% [libx264 @ 0xb4000076299dee80] ref B L0: 81.2% 18.8% [libx264 @ 0xb4000076299dee80] ref B L1: 95.3% 4.7% [libx264 @ 0xb4000076299dee80] kb/s:3547.65 [aac @ 0xb4000076299d7e60] Qavg: 1967.333 Result: SUCCESS App Version: 1.2.8a

Ffshare 1.3 fresh installed.

After selecting the video, spp crashes without logs getting saved in the app. If you need device logs, I'll generate them after a fresh reboot in the next message

ssdd28561 commented 5 months ago

Ffshare version 1:30 full from github

device logs

After reboot. 18:12 local time (gmt+3) I open the app, select the video from the previous comment, app crashes. I repeat yhe same action for another crash.

bugreport-husky-AP2A.240605.024-2024-06-14-18-12-20.zip

caydey commented 5 months ago

Found the issue, the files metadata does not include the width/height of the video (according to ffmpeg that is) which resulted in a null pointer exception due to my code checking if the width is divisible by 2 #72