[FFmpeg-trac] #11178(avcodec:new): MediaCodec: Hardware decode wrong crop values on MediaTek SOC (width=319 height=239)
FFmpeg
trac at avcodec.org
Sat Sep 7 14:32:31 EEST 2024
#11178: MediaCodec: Hardware decode wrong crop values on MediaTek SOC (width=319
height=239)
-------------------------------------+-------------------------------------
Reporter: littux | Type: defect
Status: new | Priority: important
Component: avcodec | Version: git-
Keywords: mediacodec | master
hwaccel hw_decode android avcodec | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Summary of the bug:
When using {{{-hwaccel mediacodec}}} on Android, the output resolution is
always 319x239 on my phone with a MediaTek SOC (MediaTek Helio G80). The
video is improperly cropped and there's a green line on the bottom of the
video (See "mtk_wrong_crop_result.mkv" attachment)
Meanwhile, it works fine on my other phone which has a Snapdragon 680
(Same ffmpeg build).
How to reproduce:
Just use {{{-hwaccel mediacodec}}} on any file (On a phone with a MediaTek
SOC)
{{{
% ffmpeg -hwaccel mediacodec -i file -f null -
}}}
Additional info:
Android version: 13
FFmpeg configuration:
{{{
ffmpeg version git-2024-08-22-cfe0a36 Copyright (c) 2000-2024 the FFmpeg
developers
built with clang version 18.1.8
configuration: --cpu=host --disable-debug --disable-decoder=opus
--disable-decoder=vorbis --disable-encoder=opus --disable-encoder=vorbis
--disable-ffplay --disable-indevs --disable-outdevs --disable-static
--disable-symver --enable-gnutls --enable-gpl --enable-
indev=android_camera --enable-indev=lavfi --enable-indev=v4l2 --enable-jni
--enable-libass --enable-libbluray --enable-libcaca --enable-libcodec2
--enable-libdav1d --enable-libdvdnav --enable-libdvdread --enable-libfdk-
aac --enable-libfontconfig --enable-libfreetype --enable-libfribidi
--enable-libgme --enable-libharfbuzz --enable-libjxl --enable-libmp3lame
--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenmpt
--enable-libopus --enable-libpulse --enable-libqrencode --enable-librtmp
--enable-librubberband --enable-libsmbclient --enable-libsoxr --enable-
libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-
libtheora --enable-libtwolame --enable-libvidstab --enable-libvmaf
--enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264
--enable-libx265 --enable-libxml2 --enable-libzimg --enable-lto --enable-
mediacodec --enable-neon --enable-nonfree --enable-opencl --enable-
outdev=caca --enable-outdev=pulse --enable-shared --enable-version3
--enable-vulkan --extra-cflags='-march=native -pipe' --extra-libs
=-landroid-glob --prefix=/data/data/com.termux/files/usr --target-
os=android
libavutil 59. 34.100 / 59. 34.100
libavcodec 61. 11.100 / 61. 11.100
libavformat 61. 5.101 / 61. 5.101
libavdevice 61. 2.100 / 61. 2.100
libavfilter 10. 2.102 / 10. 2.102
libswscale 8. 2.100 / 8. 2.100
libswresample 5. 2.100 / 5. 2.100
libpostproc 58. 2.100 / 58. 2.100
}}}
Attached logs, the original and the transcoded files
--
Ticket URL: <https://trac.ffmpeg.org/ticket/11178>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list