Skip to content

*.m4a files detected as video instead of audio #118

@ronin

Description

@ronin

Hi

I've been debugging an issue in our app and ended up here. I have *.m4a files containing audio only that are identified as video and this breaks ActiveStorage::Previewer::VideoPreviewer as it tries to extract first frame from non existing video.

I wonder if this is a valid Marcel issue that should be fixed or no? After browsing the source code it looks Marcel philosophy is to just to match magic strings in the content, file extensions or given mime type. To tell if the MP4 container contains actual video, we need to do more processing of the given file I guess.

Or, do something like this: if magic matches video/mp4, but declared type is "audio/x-m4a, then chose the latter. But this does not feel right as well.

I'd appreciate some feedback on this. I can always fix it outside of Marcel by patching video previewer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions