a914-gowtham / android-video-trimmer

Helps to trim local videos with compress option on Android applications using Exoplayer 2 and FFmpeg.
Other
372 stars 117 forks source link

Mime type of trimmed video is null #54

Open isroilov-sh opened 3 years ago

isroilov-sh commented 3 years ago

after trimming video, mime type of result video is null

isroilov-sh commented 3 years ago

tried with compress and without compress

a914-gowtham commented 3 years ago

@isroilov-sh few metadata of the video is removed by the FFmpeg like rotation, mimetype. #14 is also related to this. you could try this as a workaround. I have found this solution , will check it and update in the next release if everything goes well

a914-gowtham commented 3 years ago

Can you share code that you used to get mimeType

isroilov-sh commented 3 years ago

private fun checkMimeType(uri: Uri): String? { val contentResolver = requireContext().contentResolver val mime = MimeTypeMap.getSingleton() return mime.getExtensionFromMimeType(contentResolver.getType(uri)) }