Home > DeveloperSection > Forums > How to check programmatically whether a video file is corrupt in Android
Jayne Spooner
Jayne Spooner

Total Post:21

Posted on    October-29-2015 3:12 AM

 Android Android  Media Player 

 1 Reply(s)
 2470  View(s)
Rate this:
I want to check in my app whether a mp4 or 3gp or any other android supportable format is corrupt or not, its is playable by Android system or not.

Mayank Tripathi
Mayank Tripathi

Total Post:397

Posted on    October-29-2015 7:17 AM

There is no way to find out unless you decode the file completely. You can decode and not display. So use something like ffmpeg to decode into /dev/null. If there are no error messages and it did not abort in the middle everything is fine. if there are you know you have corruption in the file of some sort.

Generally if they are recoverable errors ffmpeg will continue. So you can get a sense of amount of errors or severity depending on number of error messages and ability to continue till the end.

Don't want to miss updates? Please click the below button!

Follow MindStick