Premiere Pro 2021 XML shift script
If you load your source videos and they don't match the Calibration marks you can use these scripts to quickly adjust the project to match your videos. For instance a video from Amazon or Netflix will probably have a slightly longer intro than a BluRay source because they add their logos at the start of the video - so by using this script you can make the project work with any source video as long as it's the same version (e.g. Theatrical cut vs Extended cut wouldn't be an issue you could solve by slightly shifting the edit since they're completely different versions of the movie).
 
 
There are two different ways to use the script. The first and most simple way will adjust all the videos in the project by the same number of frames. The second way allows you to adjust each video in an edit file independently.
1. Determine how many frames off your video is from the calibration marks. See the Calibration tutorial if you need more info about this process. Then enter this value in the appropriate line in the shift script and run it on the XML file and it will quickly recalculate all the cuts for you.
Enter number of frames to shift
2a. The second option is more complicated but gives you more granular control - each video file in an edit can be shifted independently by a different number of frames. To use this option you first want to run the list-project-file-indexes script on the XML file to get a list of the index value for each video. These are different in ever XML file, so LOTR: Fellowship may be index 141 in this project and index 185 in another project.
List the video file indexes
2b. Once you know what index number corresponds to which video file you can enter those values in the shift script so that it knows how much to shift each one by, and run it on your XML file. (Make sure to set the frames_to_adjust value to zero or it won't use your more granular adjustment values!)
Enter the video file indexes into the shift array