dlflannery
Moderator
Two files to support post process trimming of output files for VAP6 are contained in attached postProcessTrim.zip
The files are:
VapPostProcessTrim.cmd
trimEnds.vbs
These scripts implement trimming of the start and end of the output video file using the COM function toolsTrimAndCopy
Instructions:
1. Place the two files in the folder where VAP6 will place output video files you want to trim (which could be a meta-renamed folder),,
2. Rename the .cmd file to VapPostProcess.cmd
3. Edit trimEnds.vbs and adjust the three user-specified values to set the (approximate) bit rate of the output video and the desired start and end trim times.
4. Edit vapPostProcess.cmd noting the choices to be made regarding the pause command and whether to delete the untrimmed output file.
5. Trimmed output video file name will be the untrimmed video file name with "trimmed_" prepended. You can edit the .cmd file to change this as desired.
Notes:
1. The trimAndCopy function used (either in the TVS6 UI or the COM versioin used in these files) does not produce viable output files for .mp4 files but does do so for .mpg files. This is a known behavior and has to do with whether the file has a header. I have not tested .ts files or .mkv files or any other file types in this regard.
2. You can configure VAP6 to do nothing but trim an input file by unchecking both do QSF and do Adscan (and checking do Postprocess). The input file will be copied to the output folder and the trim postprocess scripts will trim it.
3. As always postProcessing can be customized to file categories using meta-renamed output folders and profile match strings.
4. Several messages are logged as a result of these scripts running. They don't appear in the log until after the postProcess completes however.
EDIT 4 Dec 2021:
A vapPostProcess.cmd /VBScript file set that will trim any type video file, including .mp4 is now available:
The file is loaded into TVS6 then automatically edited to define a selection excluding cuts at the two ends then saved with an output profile automatically determined based on the input file extension. It's set to trim 5 secs off each end but you can see in trim5.vbs where simple editing can adjust those amounts. For a 43 minute PlayOn file it took 34 seconds to do the trim on my PC, which is not the swiftest. It actually trimmed a total of 12 secs, probably due to slight discrepancies in TVS6 determining total duration. The postProcess .cmd file deletes the original file then renames the trimmed file to the original name (all in the VAP output folder). This obviously can be changed as desired.
The files are:
VapPostProcessTrim.cmd
trimEnds.vbs
These scripts implement trimming of the start and end of the output video file using the COM function toolsTrimAndCopy
Instructions:
1. Place the two files in the folder where VAP6 will place output video files you want to trim (which could be a meta-renamed folder),,
2. Rename the .cmd file to VapPostProcess.cmd
3. Edit trimEnds.vbs and adjust the three user-specified values to set the (approximate) bit rate of the output video and the desired start and end trim times.
4. Edit vapPostProcess.cmd noting the choices to be made regarding the pause command and whether to delete the untrimmed output file.
5. Trimmed output video file name will be the untrimmed video file name with "trimmed_" prepended. You can edit the .cmd file to change this as desired.
Notes:
1. The trimAndCopy function used (either in the TVS6 UI or the COM versioin used in these files) does not produce viable output files for .mp4 files but does do so for .mpg files. This is a known behavior and has to do with whether the file has a header. I have not tested .ts files or .mkv files or any other file types in this regard.
2. You can configure VAP6 to do nothing but trim an input file by unchecking both do QSF and do Adscan (and checking do Postprocess). The input file will be copied to the output folder and the trim postprocess scripts will trim it.
3. As always postProcessing can be customized to file categories using meta-renamed output folders and profile match strings.
4. Several messages are logged as a result of these scripts running. They don't appear in the log until after the postProcess completes however.
EDIT 4 Dec 2021:
A vapPostProcess.cmd /VBScript file set that will trim any type video file, including .mp4 is now available:
The file is loaded into TVS6 then automatically edited to define a selection excluding cuts at the two ends then saved with an output profile automatically determined based on the input file extension. It's set to trim 5 secs off each end but you can see in trim5.vbs where simple editing can adjust those amounts. For a 43 minute PlayOn file it took 34 seconds to do the trim on my PC, which is not the swiftest. It actually trimmed a total of 12 secs, probably due to slight discrepancies in TVS6 determining total duration. The postProcess .cmd file deletes the original file then renames the trimmed file to the original name (all in the VAP output folder). This obviously can be changed as desired.
Attachments
-
1.4 KB Views: 2
Last edited: