KMTTG Work in Progress (formerly API changed?)

SamuriHL

Member
That'll be very useful, thanks. My plan is to write some custom powershell scripts for encoding of various content. Right now I'm using ffmpeg directly but I'd like to get away from that. The adscan stuff I do want to revisit at some point and see if I can make it work well using profiles for each show I watch.
 

aaronwt

New member
Will this new change help when running VideoReDo with kmttg?
I just upgraded from suite 5 to suite 6. And VideoreDo does not work properly with the skip table.
I tested three shows with the VideReDo options enabled, and they were all off and cut off parts of the shows. I also tested these same shows with the normal kmttg options, with VideoReDo disabled. And those matched exactly the skip points in every show. Nothing was cut off.

Or is there something that I am missing? I expect VideoReDo to do just as good a job or better than what is built into kmttg. But so far it is not. I am going to have to keep it disabled for now and use the normal kmttg options to decrypt, qsfix, comskip, and ad cut.
 
Last edited:

minimeh

New member
Will this new change help when running VideoReDo with kmttg?
I just upgraded from suite 5 to suite 6. And VideoreDo does not work properly with the skip table.
I tested three shows with the VideReDo options enabled, and they were all off and cut off parts of the shows. I also tested these same shows with the normal kmttg options, with VideoReDo disabled. And those matched exactly the skip points in every show. Nothing was cut off.

Or is there something that I am missing? I expect VideoReDo to do just as good a job or better than what is built into kmttg. But so far it is not. I am going to have to keep it disabled for now and use the normal kmttg options to decrypt, qsfix, comskip, and ad cut.
Update kmttg to the latest release (currently v2.4n) and the vbscripts in the distribution will use VRD6 correctly.
 

SamuriHL

Member
Will this new change help when running VideoReDo with kmttg?
I just upgraded from suite 5 to suite 6. And VideoreDo does not work properly with the skip table.
I tested three shows with the VideReDo options enabled, and they were all off and cut off parts of the shows. I also tested these same shows with the normal kmttg options, with VideoReDo disabled. And those matched exactly the skip points in every show. Nothing was cut off.

Or is there something that I am missing? I expect VideoReDo to do just as good a job or better than what is built into kmttg. But so far it is not. I am going to have to keep it disabled for now and use the normal kmttg options to decrypt, qsfix, comskip, and ad cut.
I responded to you on the other forum but I'll respond here, as well. When you use VRD for QSFIX vs the built in ffmpeg "fix", VRD is doing a MUCH more thorough job of analyzing and fixing each packet of data in the file. The input files you're sending it are corrupt, and VRD is doing its best to fix the corruption in the output file. That means dropping frames in many cases. The VRD log will show you exactly what it did to the file. One of the things VRD focuses on VERY much is keeping audio and video in sync. As such, you'll see a TON of resync messages in the log as VRD repairs the file. ffmpeg (the built in fix tool for kmttg) isn't doing nearly the same level of "fixing". It essentially repackages the file in a new container. It might do slightly more than that but not a lot. Simply repackaging broken packets of video and audio streams is not going to output a proper file. Now you may still be able to edit the file and play it, but, the data is still corrupt. VRD's whole purpose for being is to ensure data integrity. It's one of the MANY reasons I choose to use it.
 

aaronwt

New member
I responded to you on the other forum but I'll respond here, as well. When you use VRD for QSFIX vs the built in ffmpeg "fix", VRD is doing a MUCH more thorough job of analyzing and fixing each packet of data in the file. The input files you're sending it are corrupt, and VRD is doing its best to fix the corruption in the output file. That means dropping frames in many cases. The VRD log will show you exactly what it did to the file. One of the things VRD focuses on VERY much is keeping audio and video in sync. As such, you'll see a TON of resync messages in the log as VRD repairs the file. ffmpeg (the built in fix tool for kmttg) isn't doing nearly the same level of "fixing". It essentially repackages the file in a new container. It might do slightly more than that but not a lot. Simply repackaging broken packets of video and audio streams is not going to output a proper file. Now you may still be able to edit the file and play it, but, the data is still corrupt. VRD's whole purpose for being is to ensure data integrity. It's one of the MANY reasons I choose to use it.
If it's corrupt then I don't get why the built in kmttg stuff had zero issues with it. It uses the Skip table and cuts the commercials out at the same spot on my TiVos. But with VideoReDO, it was cutting things in the middle of commercials and in the show. With both the Kmttg tools and VRD the audio and video was in sync though
.
And if I just viewed the original file transferred, after decrypting, there were no visible or audible issues present. At least on the parts I looked at. But that is typical with all my TiVo transfers. I had never run QFix on them until recently when I started using the ad cutting feature in kmttg(which I had read was recommended). Then I remembered I had VideoReDo and wanted to try that. And then I realized there was a new version, which is why I upgraded from 5 to 6.
 

Dan203

Senior Developer
Staff member
The corruption is at the container level. Basically as the file is downloading the TiVo just starts sending seemingly random bits. If you QSF the file first, rather then just use tivolibre's method of just chopping out the random bits, VideoReDo can sometime find actual video frames in those random bits and save them. So the corruption isn't quite as bad. However when you QSF a file in VideoReDo it's resetting the timecodes, so if you then apply a cut based on TiVo's skip data those may not line up at all to the fixed file.

You can try editing the file without QSFing it first, but that could potentially cause other issues and may not do as good of a job at correcting the errors as QSF. But the timecodes should lineup so the skip data matches properly.
 

SamuriHL

Member
Well, the container remuxing that KMTTG does with ffmpeg doesn't entirely fix these corruption issues. I've compared what it outputs vs what QSFIX outputs with my own Xfinity terrorized files and the ffmpeg output files are still wildly corrupt.
 

aaronwt

New member
I just gave up on using VideoReDo 6 with kmttg. I'll either use the built in stuff, or not even bother with cutting any commercials. Since the built in stuff does cut the commercials at the proper points, unlike VideoReDo. But with QSfix from the built in stuff or VideoReDo, it sometimes causes issues. While if I just transfer the file and decrypt, everything ends up being fine when I play things back. (unlike from some of he shows where QSfix ran on them)

I did try using VideoReDo for just decrypting. But if I choose VideoReDo to decrypt, it always wants to do a QS fix on the title. While the built in tools, will just decrypt without running QSfix.

Or is there a way to stop VideoReDO from always running QSfix on a TiVo transfer?
 

SamuriHL

Member
The qsfix script is simply opening the TiVo file with VRD and then saving it as a new file using a profile to change the container. VRD by default is going to try to fix the contents of the file as it's saving. I know you don't desire that, but, those of us who don't want broken files very much appreciate what it's doing. Basically, afaik, there's no way to tell VRD to output broken data.
 

Dan203

Senior Developer
Staff member
The qsfix script is simply opening the TiVo file with VRD and then saving it as a new file using a profile to change the container. VRD by default is going to try to fix the contents of the file as it's saving. I know you don't desire that, but, those of us who don't want broken files very much appreciate what it's doing. Basically, afaik, there's no way to tell VRD to output broken data.
Not quite true. QSF recalculates all timecodes when saving, a simple save does not. You should use the QSF function if you want the best results when not editing or recodin.
 

SamuriHL

Member
Not quite true. QSF recalculates all timecodes when saving, a simple save does not. You should use the QSF function if you want the best results when not editing or recodin.
Then they could change the qsfix script that ships with kmttg:

openFlag = VideoReDo.FileOpen(sourceFile, true)

to

openFlag = VideoReDo.FileOpen(sourceFile, false)

if that's what they really wanted. It'd probably give them similar results to what kmttg is doing without vrd in the mix.
 
Top Bottom