I have an MKV video with a few out-of-sync points caused, probably, by a 3rd-party program, used to remove some commercials from it directly from the MKV.
So watched the video several times in VLC manually adjusting the delay while taking notes of the different amounts needed.
Then I started the slicing proccess, but first, because Premiere is "cocky" and don't handle MKV files directly, I converted it to an MP4 with FFmpeg:
ffmpeg -i /path/to/video.mkv -c:v copy -c:a copy /path/to/save/video.mp4
After slicing all pieces needed and creating Subclips from them, I exported them all, manually instead of using Adobe Media Encore, with the exact same settings.
However, analyzing them with MediaInfo, although most of the files where in CBR, a few were in VBR.
I ignored this and applied the delays, individually, with FFMPEG again:
ffmpeg.exe -i "/path/to/slice.mp4" -itsoffset 0.05 -i "/path/to/slice.mp4" \
-map 0:v -map 1:a -c:v copy -c:a copy "/path/to/sliced.mp4"
(Being 0.05 an advancing of +50ms)
Since I already used FFmpeg to join files in past, for commodity, I used it again to concatenate the modified files:
ffmpeg -f concat -i list.txt -c:v copy -c:a copy "video.mp4"
(Being list.txt a list of each adjusted file, one per line)
Some of the cuts occurred during action scenes and when joined with concat
it's pretty noticeable a "click" where two of the clips were concatenated. Other than that the result was perfectly synced.
But those "clicks" were annoying me so much that I imported this file into Premiere again and added a centered Constant Power Audio Effect at the junction of the two clips to get rid of them.
At first, I didn't notice and rendered this faded audio file. But when watching it on VLC, going straight to the first junction, it was completely out-of-sync-again.
Then I watched it on Premiere and found the problem in there.
I've searched for a solution and one of them suggested me to use Handbrake to convert it from VBR to CBR, but didn't show how <_<
The other suggested to rename the file changing the .MP4 extension to .MOV to counteract an apparent bug in Premiere Importer. This didn't work for me, perhaps because I'm using the CC version and the "tutorial" was with the Pro version (if there was indeed a bug, it might've be fixed between versions).
And now I don't know what to do because the meticulously adjusted clip segments can't be fine tuned in Premiere because it is undoing all this hard work.