Fix Broken .srt Files

Maybe after knowing how to adjust SRT file timing in VLC cannot fix the trouble because of the instability. Therefore, a group of individuals is keen to add captions to video permanently. Since we have all been through a difficult job of how to open SRT file in VLC and make adjustments, I would like to seek other easier media player programs. .srt Fix Synchronize your subtitle files. It's free, it's instant and you don't have to install anything on your pc.

napraw-kodowanie.js
/*
* Source:
* https://gist.github.com/CezaryDanielNowak/357e526b759e4614b859
*
* Why do I need it:
* When using NapiProjekt or OpenSubtitles on non-polish Windows machine,
* subtitles has wrong encoding and are hard to read.
*
* How to use:
* - save fix.js somewhere on your drive
* - copy subtitles.(txt/srt) to the same directory
* - run `node fix.js`. Now use subtitles.(txt/srt) file is fixed.
* - orig_subtitles.(txt/srt) is a backup, just in case.
*/
varfs=require('fs');
varpath=require('path');
functionwalk(currentDirPath,callback){
fs.readdirSync(currentDirPath).forEach(function(name){
varfilePath=path.join(currentDirPath,name);
varstat=fs.statSync(filePath);
if(stat.isFile()){
callback(filePath,stat);
}
});
}
varfindReplace={
'ñ': 'ń',
'³': 'ł',
'¿': 'ż',
'Ÿ': 'ź',
'¯': 'Ż',
'£': 'Ł',
'Ÿ': 'ź',
'æ': 'ć',
'ê': 'ę',
'¿': 'ż',
'¹': 'ą',
'Œ': 'Ś',
'œ': 'ś'
};
walk('./',function(filePath,stat){
if(['txt','srt'].indexOf(filePath.substr(-3)) ! -1&&filePath.substr(0,5) ! 'orig_'){
varcontents=fs.readFileSync(filePath,'utf8')
Object.keys(findReplace).forEach(function(key){
constval=findReplace[key];
contents=contents.replace(newRegExp('['+key+']','g'),val);
});
fs.renameSync(filePath,'orig_'+filePath);
console.log('[ write '+filePath+' ]');
fs.writeFileSync(filePath,contents);//write as UTF8
}
});
console.log('[ DONE ]');

commented Sep 11, 2017

commented Nov 5, 2020

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Although MKV video format are gaining popularity these days as you can find many movie rips and HD camcorder records in MKV, AVI video format that was very popular many years back are still commonly being used today. One of a good reason to use AVI format is the built-in Windows Media Player 12 that is built in to Windows 7 can most of the time play AVI files without installing any third party codecs. There are also many screen recording software such as CamStudio, HyperCam 2 and Bandicam that saves the video recording to AVI only.

It is possible to encounter a corrupted AVI file where it doesn’t play on any media player software at all including VLC Media Player. One example is the popular CamStudio that outputs a corrupted AVI file when the result file is at several gigabytes. Opening on Windows Media Player would prompt an error window saying “Windows Media Player encountered a problem while playing the file“.

Here are 5 free methods that you can use to repair or fix the corrupted AVI video file.

1. BandiFix

BandiFix is an AVI repair module that comes with the popular screen recording software Bandicam. Although Bandicam is a shareware with limited functionality, but thankfully the AVI recovery program is offered for free without limitations.

After installing Bandicam, you can run BandiFix from the start menu shortcut and a program with a simple user interface will launch. All you need to do is select the corrupt AVI file that you want to fix, and BandiFix will automatically start to process and repair the damaged file. The repaired AVI file will be saved to a new file at the same location of where the corrupted AVI.

Download Bandicam

2. Remo Repair AVI

Remo Repair AVI is actually a shareware that comes with powerful and latest algorithm to repair corrupted AVI files that you cannot even play. The good thing about Remo Repair AVI is the demo version attempts to fix the broken AVI file, then let you preview to see and decide if the repair is successful. The ability to save the repaired AVI will only be unlocked by purchasing a license that cost $69.

The good news is, we found that the repaired file that you preview can actually be retrieved manually. First you need to go to Control Panel > Folder Options > View tab and select “Show hidden files, folders and drives” option and click OK. Then go to C:Program FilesRemo Repair AVI and open the hidden $tp folder where you will find a file avi.avi. That file is the repaired AVI file by Remo Repair AVI.

Download Remo Repair AVI

3. Digital Video Repair

Digital Video Repair is another free tool that comes with quite a few number of algorithms to repair unplayable AVI files. It is able to fix the common AVI index corruption like what VLC media player does, and also fixing large AVI files created by CamStudio. To use it, click on the Input File button, browse for the corrupted file and click the Repair! button. You can check the file status message after loading the file to see if it is damaged that requires fixing or if it is OK.

Digital Video Repair tool is actually a very small and portable program at only 121KB in size but we hated the installer as it comes with an adware. If you do not accept the installation of the adware, the Digital Video Repair tool will not be installed. A way to go around this restriction is to download the latest version of Inno Setup Unpacker, extract the binary file to Universal Extractor’sbin folder and use Universal Extractor to unpack the installer where you will get program’s application dvr.exe at the {app} folder. Alternatively, you can download the program that we’ve extracted from the link below.

Download Digital Video Repair

4. DivFix++

DivFix++ is a well known tool to fix bad AVI files that has been published at many websites. It is a complete rewrite from the old DivFix but the program itself is badly outdated as well. The program generated tons of “can’t find current position” errors and eventually crashing when we tried fixing a corrupt AVI that is nearly 3GB in size. DivFix++ is free and open source.

Download DivFix++

5. KMPlayer

Although KMPlayer is a media player and not an AVI fixing utility, but in our experience it has managed to force play many bad and corrupted video files even when it has failed to play in VLC media player and many others. The other good thing about using KMPlayer is it comes with internal codecs that enables to play many different video formats without installing codec packs. Do pay extra attention during installation because it prompts to install unnecessary toolbars and adware.

Download KMPlayer

Editors Note: We would rate Bandicam as our favorite AVI repair program because it is free and also the program is actively being maintained. We also highly recommend Remo Repair AVI because it is new and most importantly managed to repair one of our unplayable AVI file. Digital Video Repair works as well except we didn’t really like the “adware” that comes with it but using the “stripped” version solved the problem. As for DivFix++, it is an old program and not updated for years which may not have the latest technologies in fixing today’s corrupted AVI file.

You might also like:

5 Tools to Repair Corrupted JPEG Photos and Images8 Free Tools to Repair and Extract Invalid ZIP FilesHow to Manually Preview Video or Audio from Rapidgator Links2 Tools to Convert Audio or Video Files Into Self Contained Auto Playing Executables5 Tools to Remove or Repair Broken Codecs and Filters and Fix Video Playback Problems

John1 week ago

none of them worked. Wondershare Video Repair worked partially.

Reply

This website content is more helpful. And thanks for share the information.

Reply
Ryan Thornton-Calladine1 year ago

I have a video recorded in Bandicam, and BandiFix cannot seem to fix it. It appears that MP4Fix.org can fix it, however I cannot afford to pay so much money for me to be able to recover the footage. What could I do if FFMPeg, VLC, or other paid MP4 repair software doesen’t work?

Reply

I gave BandiFix and Remo a try. Neither one of them worked. Trying to repair a couple of corrupted AVI files, both pieces of software failed in recovery.

OK… Fair enough. Perhaps the AVI files were just too “far gone” to be repaired.

Curious, I then tried running both BandiFix and Remo on a few AVI files that were running smoothly to begin with and showed no signs of corruption. Once again, however, both BandiFix and Remo produced messages saying the AVI files could not be repaired.

I’m not convinced any of these pieces of AVI repair software actually work.

Reply
HAL9000 Admin1 year ago

They do work up to a point, I used to use Divfix on occasion many years ago and it usually got the AVI to a point where it would at least play the video. But they are by no means magic fixes.

Reply

Digital Video Repair did the job just fine! I had broken sound in an older .avi file and now my problem is resolved.

Reply
Michelle McCown2 years ago

I have never known KMPlayer can repair corrupted files even though I have used it for years. Besides the tools mentioned in the review, WonderFox HD Video Converter Factory is also a good tool to repair files. I once used it to recovery some MP4 files and the results are fine.

Reply

Digital video repair worked like gold! Thank you so much for the list!

Reply
Patrick4 years ago

I use VLC a lot and when I download or save an AVI file, VLC always wants to FIX it and that takes time.
The time is OK but VLC does not seem to FIX it permanently as every time I play them, it “re-fixes” them again.
It does not say why it fixes them so does anyone know why? And what programs fixes them the best?

Reply

Patrick, you have to use the Menu > Convert option and feed the corrupt video there. Choose any of the MP4 options as output. The original file won’t be affected. If the damage is not huge, VLC usually will do the job.

Reply
adam5 years ago

with remo the file output into the $tp folder is just labled $tp. but ig you rename it with .avi it works just fine

Reply

I use bandicam and did bandifix on many of my files, but they turn into just music files when i play them. Help plz

ReplyFix
Roger5 years ago

I tried Bandifix on a large AVI file that plays alright in VLC but chokes in other players at a few minutes in. Bandifix only saved the early portion that is playable in other players. Next I tried the trial version of Remo, an have yet to find an AVI file that does not return “The fie is too large to be processed.” —- worthless in trial form anyway Although these files play most times in VLC I like to convert the files to FLV to save space. I wish VLC would offer option to correct and save the repaired header file..
I tried Digitial Video Recorder and the although it did recover the previously unplayable portions of the AVI, the corrupt portions of the video was marred by video spectres and the audio had a monotonous clock tick tick sound?
What did work for me: Bandicam recommends if all else fails to use VLC to play the video and re-record with Bandicam Well, all is good until you each the 10-minute limitation on the trial version of Bandicam. But using VLC to replay and using the original recording SW (Hypercam 2) to re-record using the ‘Region’ function of Hypercam (so I could do this unhindered on a second monitor) I achieved the end goal – a complete AVI fiie I could convert to FLV.

Reply

Curious Apprentice, I tried the trick of re-encoding the thing as mp4 in the hope htat I could re-encode it back to AVI after it got fixed. That, too stopped at 21 out of 130 minutes.
It’s binned.
Thanks, everyone. Even though it didn’t work, I’ve learned stuff and had fun.

Reply
Peter6 years ago

Thanks so much for the article and for making it us easy to find adware free programs.

For my test, I found that Remo fixed my file with a lot of forced slow motion parts, so just ok. Digital Video Repair seemed to do a great job. Another program repair Video Master did an alright job but the end video was a little more unstable.

ReplyFix broken .srt files google drive

Thanks a million for the list. Very helpful indeed.

Reply
GuccizBud6 years ago

Fix Broken .srt Files Recovery Software

Thanks for this article, you fixed my problem. I had an .Avi file that showed absolutely no codec information, video or audio. Despite this, VLC was still able to play it, with the provision that it rebuild the index first, and which I did. Unfortunately it doesn’t encode this new info in the file, it just does it temporarily for its own purpose. I was looking more to fix the file permanently, not just be able to play it.

To make a long story a bit shorter… I ran through the first 4 of the 5 tools you presented, and the only one that managed to do what I wanted, which is fix to file permanently as if it never had any problems at all to begin with, was DivFix++, which I got from SourceForge. Rebuilt the index permanently and all codec info is now readable by any tool that can do so.

Fix broken .srt files recovery software

Fix Broken .srt Files File

So thx again, very useful article. Too bad DivFix++ wasn’t closer to the top of the list though, heh-heh. :)

Reply

Thanks for the article. Was helpful!

Reply
Curious Apprentice7 years ago

I normally use “AviDemux” or “Kirara Encoder” to re-encode the corrupted file (Most probably any other Video Converter will do).

Most of the time I get satisfactory result irrespective of the codec and the container previously used to encode the file.

Reply

WOW…..great trick of finding the preview file in the hidden folder in Remo Repair AVI,in free of cost without registering….you are rocking raymond blog….Thanks a lot

Fix Broken .srt Files Recovery

Reply

Fix Broken .srt Files Google Drive

Leave a Reply