microsoft / WSA

Developer-related issues and feature requests for Windows Subsystem for Android
MIT License
1.47k stars 804 forks source link

mediacodec hwaccel availability #324

Open ghost opened 1 year ago

ghost commented 1 year ago

Steps to reproduce

install termux

pkg install git nasm yasm autoconf automake bc make clang lld openjdk-17 ffmpeg
git clone https://github.com/FFmpeg/FFmpeg.git
cd FFmpeg
./configure --target-os=android --enable-jni --enable-mediacodec
make -j$(nproc)
./ffmpeg -init_hw_device mediacodec=mc,create_window=1 -hwaccel mediacodec -i $video -an -f null -

✔️ Expected Behavior

Decoding can be done normally

❌ Actual Behavior

ffmpeg not responding

Other Software

Termux FFmpeg

Please specify the version of Windows Subsystem for Android

2305.40000.2.0

kevinkieselbach commented 1 year ago

WSA removes proprietary Google codecs from AOSP for licensing reasons and makes Windows codecs available to the VM instead. FFmpeg typically just wraps system codecs, so it is likely relying on the Google codecs that do not exist, and your PC doesn't have an equivalent Windows codec installed. We'll investigate the repro to confirm.