HOW TO CHECK PROGRAMMATICALLY WHETHER A VIDEO FILE IS CORRUPT IN ANDROID

Jayne Spooner

Total Post:21

Points:147
Posted by  Jayne Spooner
 2551  View(s)
Ratings:
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.
  1. Mayank Tripathi

    Post:397

    Points:3117
    Re: How to check programmatically whether a video file is corrupt in Android

    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.

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!