aspose file tools
The moose likes Java in General and the fly likes validating media files Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "validating media files" Watch "validating media files" New topic
Author

validating media files

Jyoti karva
Greenhorn

Joined: Nov 07, 2008
Posts: 5
I am trying to validate the media files like .avi, .wav, .mpeg as valid before the customer uploads. I looked at the sound API and JMF and googled but could not find any suitable answers. Is there any way / packages/ 3rd party software to validate the media files in java ? I looked at the reading the header information for each type as one of the techniques? Any suggestions.

I read in the Java Sound API the following but is the considered as standard practice to detect valid media file?

If the file being inspected (fileIn in this example) is not a sound file, or is a sound file of some unsupported type, an UnsupportedAudioFileException exception is thrown. This behavior is convenient, in that the application programmer need not be bothered with testing file attributes, nor with adhering to any file-naming conventions. Instead, the getAudioInputStream method takes care of all the low-level parsing and verification that is required to validate the input file.


Thanks.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: validating media files
 
Similar Threads
Java Sound API
File validation after File Upload
How to play sound files from remote client in browser
splitting mp3 file into pieces
reading audio metadata via JAVA API ?