Skip to content

.avi with DIV3 FourCC and no audio track gets no preview and no thumbnail #203

Description

@kickmeagainlater

3.10 on macOS 26.5.2 (25F84), Apple Silicon.

A video-only AVI tagged DIV3 gets neither a preview nor a thumbnail (QuickTime says "not compatible"). Retagging the same bitstream to MP43 fixes it:

ffmpeg -f lavfi -i "testsrc2=size=640x480:rate=25:duration=20" \
  -c:v msmpeg4 -vtag DIV3 -b:v 1204k div3.avi
ffmpeg -i div3.avi -c copy -vtag MP43 mp43.avi   # works
tag audio result
DIV3 none no preview, no thumbnail
DIV3 mp3 ok
MP43 (retag, same bitstream) none ok
XVID none ok
MP42 none ok

Same at 624x352/29.97 as at 640x480/25, so it isn't geometry.

With no audio track the formatreader is never invoked at all — zero output on subsystem == "uk.org.marginal.qlvideo" so AVFoundation is demuxing and the track gets identified by FourCC. DIV3 isn't in videodecoder/Info.plist (or anywhere in the repo); DIVX, MP41, MP42, MP43, FMP4 are. Add an audio track and the formatreader does get the file, resolves it to MP43 via the catch-all after extract_extradata bails on msmpeg4v3, and it plays.

Possibly the same underlying thing as #180, though the symptom differs: XVID files with audio like that one preview fine here, and this fails with no thumbnail rather than a spinner. I assume it's #175 territory, and I realize you've said it's usually too late by the time AVFoundation gives up. What made me file anyway: the tag alone decides it on a byte-identical bitstream. If AVFoundation were claiming the codec I'd expect MP43 to fail the same way. Does it special-case DIV3 in particular?DIV3 is the common tag in the wild and MP43 is rare, so that would explain it,otherwise this may just be a missing registration:

<key>CodecType</key>
<string>DIV3</string>
0x4449_5633: AV_CODEC_ID_MSMPEG4V3,  // 'DIV3'

Untested unfortunately, as it seems mediaextension entitlements can't be provisioned on a personal team, and an ad-hoc build registers but never launches. 🥲

riff.c also maps MPG3, DIV4, DIV5, DIV6, DVX3, AP41, COL0, COL1 to msmpeg4v3, and DIV2 to msmpeg4v2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions