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
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: