Jump to content

Check integrity of video files


242Movies

Recommended Posts

242Movies

Can the developers please add a feature to verify the integrity of video files?

 

I have over 6,000 movies in my collection and most of them play okay but I just tried to play Casper tonight and it stopped after about 6 minutes.

 

The file itself is corrupt on the hard drive not because of an issue with Emby.

 

I looked online to see if the entire collection can be scanned through to see which files need replacing and found it can be done with ffmpeg.

 

 

I'm not familiar enough with ffmpeg to know if this works but i found this code on StackExchange by a user called Adrian.

find . -regex ".*\.\(avi\|mkv\)" | while read f; do
ffmpeg_out=$(ffmpeg -hide_banner -nostdin -v error -i "$f" -f null - 2>&1)
[[ $ffmpeg_out ]] && echo -e "==> ERROR in $f\n${ffmpeg_out}"
done

Would this actually work to find and report corrupted video files?

 

Can this feature please be implemented?

Edited by 242Movies
  • Like 3
  • Agree 1
Link to comment
Share on other sites

I guess that will look for what ffmpeg thinks is an error in your files, so yes it might provide some useful information.

Link to comment
Share on other sites

negativzeroe

Can the developers please add a feature to verify the integrity of video files?

 

I have over 6,000 movies in my collection and most of them play okay but I just tried to play Casper tonight and it stopped after about 6 minutes.

 

The file itself is corrupt on the hard drive not because of an issue with Emby.

 

I looked online to see if the entire collection can be scanned through to see which files need replacing and found it can be done with ffmpeg.

 

 

I'm not familiar enough with ffmpeg to know if this works but i found this code on StackExchange by a user called Adrian.

find . -regex ".*\.\(avi\|mkv\)" | while read f; do
ffmpeg_out=$(ffmpeg -hide_banner -nostdin -v error -i "$f" -f null - 2>&1)
[[ $ffmpeg_out ]] && echo -e "==> ERROR in $f\n${ffmpeg_out}"
done
Would this actually work to find and report corrupted video files?

 

Can this feature please be implemented?

Thanks for this. I'm saving.
Link to comment
Share on other sites

  • 7 months later...
chef

I have noticed that if I have a corrupted  video file (usually because it was interupted during a copy) the thumb images in Emby will be blank, or emby will show a generic black film thumb images.

Wonder if that could be used to flag the file with an issue? 😶

  • Like 2
Link to comment
Share on other sites

  • 2 years later...
katbyte

echoing a request for this feature, it would be easy to implement and provide users with large libraries a huge benefit, and could even leverage the existing thumbnail extraction process by saving errors encountered & providing a report page. 

i was able to script something up to check a questionable series but its annoying and hard to properly parse the output

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

Baenwort

This would a useful non-automated task to be able to run. Even better if you could toggle it to either scan the entire library or just run for new files.

  • Agree 1
  • Thanks 1
Link to comment
Share on other sites

  • 3 weeks later...
visproduction

If this becomes a new feature, it may be nice to have a 'nice' setting to add a timer pause between file checking.  Some other 'nice'  options discussed here: https://askubuntu.com/questions/365163/how-to-minimize-usage-of-cpu-memory-by-ffmpeg-when-recording-video

Maybe ffmpeg file check is so lite-weight, that you don't need it, but some setups may work smoother to deliver media to other users, if the check has timer pauses.

  • Agree 1
Link to comment
Share on other sites

  • 4 months later...

+1. Just noticed a video wasn't playing right last night. Would be nice if Emby would let me know beforehand. In the meantime I'm just automating that externally.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...