my CC continuity check failed at pos: 0x2F98C (CC is = C in your file but should be a 4)
and finally there are 56 times where a TS header that starts with 4703e8 continues not with 1X but something else. This is ok for the last TS-packet of a frame when the frame data does not fill the 184 byte completely.
I attached a file where all those 56 parts are listed and marked the correct tails. all the other packets should be 4703e81x.
I hope this helps to improve your tools further.
Shanuson, thank you very much for that feedback, I have updated my tool to fix the issues you found, and I now feel it's ready for release.
I've decided to post my "tsrepair" program here for a few reasons - firstly, I feel bad about the amount of data we're uploading to the server here! Also it is hard to see the difference between edits, and it's hard to merge them too. It also makes it hard for us to crowd-source the work.
The tsrepair program accepts a "-fix" command line argument in a similar way as the "-mmb" option in ffmpeg. It allows people to take one of the TS files and apply some changes to it using a simple text string that can be posted here or on the wiki. Example usage is like this:
tsrepair rawsplit_part_9.ts -fix:203,noaf/205,pay,8 rawsplit_part_9_fixed.ts > fix.txt
The first filename is the name of the input file, the second filename is the name of the output TS file. The program produces one line of output per packet, which in the example above is redirected to the file "fix.txt".
The program will take the input file, apply any manual fixes that you specify, and then run some automatic fix passes to do the bulk of the heavy lifting. This can be suppressed with the "-nofix" option. In fact, the way I work is to use the -nofix option to analyse the file first:
tsrepair rawsplit_part_9.ts -nofix > nofix.txt
Then run a repair pass (as detailed above), and show the differences between the two log files using a visual diff program like meld (on Linux) or WinDiff or something:
meld nofix.txt fix.txt
The program is written in C++ and I've developed it in Linux, but it should port easily to Windows for those people that need it.
The fix options that I currently have are:
Part 3:
-fix:114,pid,3e8/114,pay,5/114,noaf/133,noaf/160,pay,2/162,
pcr,5913898/162,ptsauto/162,pes/162,pframe/178,noaf/199,pid,3e8/199,pay,7/199,af,66/
199,nopcr/200,pid,1fff/200,pay,4/243,pid,1fff/243,pay,15/
255,noaf/257,noaf/321,pcr,5925910/321,ptsauto/323,pay,12/349,
noaf/364,pay,11/405,pes/405,ptsauto/405,pframe/
720,pes/720,pframe/815,noaf/945,noaf/947,pay,2/1124,ptsauto/1245,noaf[
Part 4:
-fix:195,noaf/326,pes/326,pcr,6046030/326,pframe/361,noaf/364,noaf/
402,pes/402,pframe/818,noaf/863,noaf/907,noaf/955,pid,1fff/956,pcr,6094078/1275,pes/1275,pcr,6118102/
1316,noaf/1387,noaf/1415,pid,1fff/1415,pay,7/1511,pay,15/1529,noaf/1530,noaf/1535,noaf
Part 5:
-fix:175,pid,3e8/175,pay,11/176,pay,12/311,pay,5/366,pid,3e8/419,noaf/
451,noaf/506,pid,3e8/506,pay,0/506,noaf/508,pay,1/535,af,137/654,noaf/715,ptsauto/
715,pframe/767,af,43/801,noaf/828,noaf/829,noaf/959,noaf/1047
,noaf/1057,noaf/1247,pid,1fff/1247,pay,8/1371,noaf/1434,noaf/1539,noaf
Part 6:
-fix:4,noaf/39,noaf/500,noaf/1042,pay,7/1042,pid,3e8/1043,pay,8/1043,pid,1fff/
1044,pid,3e8/1044,noaf/1044,pay,8/1046,noaf/1272,pay,15/1274
,pay,1/1462,noaf/1505,pid,1fff/1507,pid,3e8/1507,pay,12/1604,noaf/1622,noaf/1644,noafPart 7:
-fix:44,noaf/131,pay,7/131,pid,3e8/132,pay,8/351,noaf/419,pay,12/451,pid,1fff/
547,noaf/683,pay,9/741,noaf/759,noaf/789,noaf/826,noaf/955,pid,3e8/955,pay,5/956,pid,1fff/
956,pay,13/978,pid,1fff/978,pay,3/979,pid,3e8/
979,pay,6/979,pes/979,pcr,6460444/979,ptsauto/
979,pframe/1056,pid,1fff/1056,pay,11/1173,noaf/1328,pid,3e8/1328,pay,3/1329,pid,1fff/
1329,pay,1/1403,noaf/1466,noaf/1474,noaf/1493,noaf/1534,pid,1fff/1534,pay,9
Part 8:
-fix:0,pid,1fff/105,pid,03e8/106,pid,1fff/163,pay,10/163,pes/163,
pcr,6514498/163,ptsauto/163,pframe/187,noaf/412,pid,03e8/412,pay,4/412,noaf/601,noaf/816,pid,03e8/
816,pay,8/817,pid,03e8/818,pid,03e8/898,noaf/907,noaf/977,noaf/1158,pay,11
Part 9:
-fix:203,noaf/205,pay,8/227,noaf/371,noaf/400,pes/400,pcr,6652636/400,
ptsauto/400,pframe/478,pid,1fff/576,pay,2/576,noaf/691,pid,1fff/691,noaf/702,pid,1fff/
1115,pes/1115,ptsauto/1115,pframe/1119,noaf/1238,noaf/1285,noaf/1418,noaf
Part 10:
-fix:75,noaf/474,noaf/710,noaf/726,af,7/726,pcr,6796780/726,ptsauto/726,pes/
726,pframe/765,noaf/755,noaf/1037,pframe/1065,pay,6/1077,noaf
Part 11:
-fix:103,noaf/164,pes/164,pcr,6874858/164,pframe/887,noaf/920,noaf/962,noaf
/966,noaf/980,noaf/1037,pay,4/1037,pes/1037,pcr,6940924/1037,ptsauto/1037,pframe/
1065,noaf/1113,pid,1fff/1114,pay,7/1116,pay,9/1117,pes/1117,
pcr,6946930/1117,ptsauto/1117,pframe/1141,noaf/1322,pid,3e8/1324,pay,2/1324,noaf/1515,ptsauto
Part 14:
-fix:718,pes/718,ptsauto/719,pay,11/912,pid,3e8/912,pay,9/913,pid
,3e8/915,pay,12/1214,noaf/1240,pid,3e8/1241,pay,15/1274,pay,0/1322,pay,15/1505,pay,8/1506,pay,9
Part 15:
-fix:22,pid,3e8/27,pay,15/108,pid,3e8/108,pay,14/108,pes/
108,pcr,7349332/108,ptsauto/108,pframe/124,pid,3e8/127,pid,3e8
I'll update the Wiki and if anyone needs me to describe the -fix options I can do that too. Please take a look and let me know what you think. The code is in the public domain, no copyright is asserted and you're free to do what you like with the code.