---
title: "How to check programmatically whether a video file is corrupt in Android"  
description: "How to check programmatically whether a video file is corrupt in Android"  
author: "Anonymous User"  
published: 2015-10-29  
updated: 2015-10-29  
canonical: https://www.mindstick.com/forum/33541/how-to-check-programmatically-whether-a-video-file-is-corrupt-in-android  
category: "android"  
tags: ["android", "media player"]  
reading_time: 1 minute  

---

# How to check programmatically whether a video file is corrupt in Android

I want to [check](https://yourviews.mindstick.com/story/2248/never-forget-to-check-these-specifications-before-buying-a-mobile-phone) in my app whether a mp4 or 3gp or any other [android](https://www.mindstick.com/articles/13046/10-reasons-why-i-prefer-android-vs-iphone-ios) supportable [format](https://www.mindstick.com/forum/162083/how-to-convert-ost-files-into-pst-format) is corrupt or not, its is playable by Android [system](https://www.mindstick.com/articles/23411/the-most-effective-method-to-find-the-perfect-small-business-phone-system-for-your-business) or not.

## Replies

### Reply by Anonymous User

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.


---

Original Source: https://www.mindstick.com/forum/33541/how-to-check-programmatically-whether-a-video-file-is-corrupt-in-android

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
