I am working on a Java based media management platform where users can upload media files and preview them. Preview generation is done using xuggler and based on the following logic:
if (can be played in a browser) {
directly upload
} else {
transcode into supported formats(mp4,avi)
}
Even though mp4 is supported by browsers, some of the mp4 videos cannot be played directly.
- Can this be due to unsupported codecs?
- If so, how can I determine not only the media type, but the codec type of a media file as well?