After recording a live show, there are several tasks I need to do before I can render out the video file to different formats. I need to trim the file, and then resync the audio as well. After this I render the video file out to WAV, MP3 and MP4. I created a script like the one below (omitting the command for mp3, as this is just an example).
I'm obviously not very well versed in ffmpeg commands. The way this script works I first create a trimmed version, and then a second version that has the audio synced, before it finally does the encoding to other formats. Since I often have to do several massive files, I run into serious disk space problems with all the intermediary files being rendered out first.
Is there a way to combine the trim and resync command into one, so I can render out a trimmed and resynced master file?
ffmpeg -i ORIGINAL_TRIM.mxf -itsoffset 0.200 -i ORIGINAL_TRIM.mxf -map 0:v -map 1:a -c copy ORIGINAL_RESYNC.mxf
ffmpeg -i ORIGINAL_RESYNC.mxf -vn ORIGINAL.wav
ffmpeg -i ORIGINAL_RESYNC.mxf -c:v libx264 -preset slow -crf 22 -c:a aac ORIGINAL.mp4
Pause