You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AVIF image with alpha data is currently being demuxed by FFmpeg as two separate streams. Unfortunately, the first stream may be the alpha layer, with default disposition. Selecting the non-alpha stream by default should give better output.
So as a workaround, I propose a small addition in CLAVFDemuxer::SelectVideoStream():
// workaround for AVIF images where alpha layer is a separate stream
if (m_avFormat->streams[best->pid]->codecpar->codec_id == AV_CODEC_ID_AV1 && m_avFormat->streams[check->pid]->codecpar->codec_id == AV_CODEC_ID_AV1)
{
if (m_avFormat->streams[best->pid]->codecpar->format == AV_PIX_FMT_GRAY8 && m_avFormat->streams[check->pid]->codecpar->format != AV_PIX_FMT_GRAY8)
{
best = check;
continue;
}
}
// prefer default streams
The text was updated successfully, but these errors were encountered:
Example file:
example_with_alpha.zip
AVIF image with alpha data is currently being demuxed by FFmpeg as two separate streams. Unfortunately, the first stream may be the alpha layer, with default disposition. Selecting the non-alpha stream by default should give better output.
So as a workaround, I propose a small addition in
CLAVFDemuxer::SelectVideoStream()
:The text was updated successfully, but these errors were encountered: