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

Fix AV1 demuxing #4487

Merged
merged 1 commit into from
Dec 2, 2023
Merged

Fix AV1 demuxing #4487

merged 1 commit into from
Dec 2, 2023

Conversation

rom1v
Copy link
Collaborator

@rom1v rom1v commented Dec 1, 2023

Pixel 8 devices have AV1 encoders:

$ scrcpy --list-encoders
scrcpy 2.3 <https://github.com/Genymobile/scrcpy>

[server] INFO: Device: [Google] google Pixel 8 (Android 14)
[server] INFO: List of video encoders:
    --video-codec=h264 --video-encoder='c2.exynos.h264.encoder'
    --video-codec=h264 --video-encoder='c2.android.avc.encoder'
    --video-codec=h264 --video-encoder='OMX.google.h264.encoder'
    --video-codec=h265 --video-encoder='c2.exynos.hevc.encoder'
    --video-codec=h265 --video-encoder='c2.android.hevc.encoder'
    --video-codec=av1 --video-encoder='c2.google.av1.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=flac --audio-encoder='c2.android.flac.encoder'
    --audio-codec=flac --audio-encoder='OMX.google.flac.encoder'

In practice, it is not very usable (unless you limit resolution and frame rate), but it is sufficient to detect that AV1 demuxing was broken:

$ scrcpy --video-codec=av1

INFO: [FFmpeg] libdav1d 1.3.0
ERROR: [FFmpeg] Unknown OBU type 0 of size 29393
ERROR: [FFmpeg] Error parsing OBU data
ERROR: Decoder 'video': could not send video packet: -1094995529

For AV1, the config packet must not be merged with the next non-config packet.

For AV1, the config packet must not be merged with the next non-config
packet.

This fixes the following error when passing --video-codec=av1:

> INFO: [FFmpeg] libdav1d 1.3.0
> ERROR: [FFmpeg] Unknown OBU type 0 of size 29393
> ERROR: [FFmpeg] Error parsing OBU data
> ERROR: Decoder 'video': could not send video packet: -1094995529

PR #4487 <#4487>
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

Successfully merging this pull request may close these issues.

1 participant