Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

ERROR: [FFmpeg] Your platform doesn't support hardware accelerated AV1 decoding. #4744

Closed
2 tasks done
BPplays opened this issue Mar 8, 2024 · 2 comments
Closed
2 tasks done

Comments

@BPplays
Copy link

BPplays commented Mar 8, 2024

  • I have read the FAQ.
  • I have searched in existing issues.

Environment

  • OS: windows 10
  • scrcpy version: 2.4
  • installation method: Windows release
  • device model: samsung SM-F946U1
  • Android version: 14

Describe the bug
it seems to want hardware av1 decoding and wont use software decoding

command output:

-> .\scrcpy --video-bit-rate 1500k --video-codec=av1
scrcpy 2.4 <https://github.com/Genymobile/scrcpy>
INFO: ADB device found:
INFO:     -->   (usb)  RFCW71HBS5P                     device  SM_F946U1
C:\Users\suzuko\Programs\misc\scrcpy-win64-v2.4\scrcpy... pushed, 0 skipped. 126.7 MB/s (69007 bytes in 0.001s)
[server] INFO: Device: [samsung] samsung SM-F946U1 (Android 14)
[server] ERROR: Encoding error: java.lang.IllegalArgumentException:
[server] INFO: Retrying with -m1920...
[server] INFO: Retrying...
INFO: Renderer: direct3d
INFO: Texture: 1808x2176
ERROR: [FFmpeg] Your platform doesn't support hardware accelerated AV1 decoding.
ERROR: [FFmpeg] Failed to get pixel format.
ERROR: Decoder 'video': could not send video packet: -40
ERROR: Demuxer error


--list-encoders:

-> .\scrcpy --list-encoders
scrcpy 2.4 <https://github.com/Genymobile/scrcpy>
INFO: ADB device found:
INFO:     -->   (usb)  RFCW71HBS5P                     device  SM_F946U1
C:\Users\suzuko\Programs\misc\scrcpy-win64-v2.4\scrcpy...e pushed, 0 skipped. 90.3 MB/s (69007 bytes in 0.001s)
[server] INFO: Device: [samsung] samsung SM-F946U1 (Android 14)
[server] INFO: List of video encoders:
    --video-codec=h264 --video-encoder='c2.qti.avc.encoder'
    --video-codec=h264 --video-encoder='OMX.qcom.video.encoder.avc'
    --video-codec=h264 --video-encoder='c2.android.avc.encoder'
    --video-codec=h264 --video-encoder='OMX.google.h264.encoder'
    --video-codec=h265 --video-encoder='c2.qti.hevc.encoder'
    --video-codec=h265 --video-encoder='OMX.qcom.video.encoder.hevc'
    --video-codec=h265 --video-encoder='c2.qti.hevc.encoder.cq'
    --video-codec=h265 --video-encoder='OMX.qcom.video.encoder.hevc.cq'
    --video-codec=h265 --video-encoder='c2.qti.hevc.encoder.hdr'
    --video-codec=h265 --video-encoder='c2.android.hevc.encoder'
    --video-codec=av1 --video-encoder='c2.android.av1.encoder'
[server] INFO: List of audio encoders:
    --audio-codec=opus --audio-encoder='c2.android.opus.encoder'
    --audio-codec=aac --audio-encoder='c2.android.aac.encoder'
    --audio-codec=aac --audio-encoder='OMX.google.aac.encoder'
    --audio-codec=aac --audio-encoder='c2.sec.aac.encoder'
    --audio-codec=flac --audio-encoder='c2.android.flac.encoder'
    --audio-codec=flac --audio-encoder='OMX.google.flac.encoder'
@rom1v
Copy link
Collaborator

rom1v commented Mar 8, 2024

On Windows, it probably requires to build dav1d for Windows and to enable libdav1d in ffmpeg builds:

diff --git a/app/deps/ffmpeg.sh b/app/deps/ffmpeg.sh
index 19fb2991d..9e1a809ac 100755
--- a/app/deps/ffmpeg.sh
+++ b/app/deps/ffmpeg.sh
@@ -67,6 +67,7 @@ else
         --disable-network \
         --disable-everything \
         --enable-swresample \
+        --enable-libdav1d \
         --enable-decoder=h264 \
         --enable-decoder=hevc \
         --enable-decoder=av1 \

rom1v added a commit to rom1v/scrcpy that referenced this issue Dec 9, 2024
Scrcpy supports AV1, but no encoder was provided in binary releases.

Include dav1d: <https://code.videolan.org/videolan/dav1d>

Fixes Genymobile#4744 <Genymobile#4744>
@rom1v
Copy link
Collaborator

rom1v commented Dec 9, 2024

Please test #5644.

@rom1v rom1v closed this as completed in aca6d30 Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants