Audio-only webm files sometimes incorrectly identified as video
Using latest VLC apk from the playstore. Some webm audio-only files are incorrectly identified as video by VLC. Such files contain a single opus audio track and no video track. In the folder view, they are shown with the ic_browser_video_normal
icon. Trying to play them results in the black video playback screen to temporary pop up and right then the audio playback continues as normal.
However, when playing such incorrectly identified media files in android auto as part of a playlist, the whole playback gets stuck. This may be related to #616 (closed) . Changing the file extension from .webm
to .opus
fixes such problem.
Most webm files located in music folders with other webm/mp3 files are properly recognized as audio files. However, by copying a single webm in a separate folder, the same file which was previously recognized as audio is now incorrectly recognized as video.
By looking at the code (https://code.videolan.org/videolan/vlc-android/blob/5a979420319fd5a7416e223e78b50ca328b52c22/medialibrary/src/org/videolan/medialibrary/media/MediaWrapper.java#L234), I suspect that this may be a race condition in the media type detection logic of VLC, as it performs a track based detection on "parsed" media, whereas it falls back to the extension-based matching on "non-parsed" media. The '.webm' is reported as a video file extension (https://code.videolan.org/videolan/vlc-android/blob/master/libvlc/src/org/videolan/libvlc/util/Extensions.java).