Alter Timestamps, Remove Audio Tracks, and M2TS Files using FFmpeg
In this article, we will learn how to use FFmpeg to alter timestamps, remove audio tracks, and work with M2TS files. FFmpeg is a powerful, open-source tool for handling multimedia files, offering an extensive range of features for manipulating video and audio formats.
What are M2TS files?
M2TS (Multi2layer Transport Stream) files are typically used for storing high-definition video content, such as Blu-ray discs, AVCHD camcorders, and playback devices. These files can contain multiple video, audio, and subtitle streams.
Installing FFmpeg
Before getting started, download and install the latest version of FFmpeg for your operating system from the official website. Make sure to install the command-line version.
Altering Timestamps
You can alter timestamps in a video file using the setpts filter in FFmpeg. For example, to increase the timestamp of a video by 3 hours, you can use the following command:
ffmpeg -i input.mp4 -vf "setpts=PTS+3*60*60" output.mp4
In this command, -i input.mp4 specifies the input file, and -vf "setpts=PTS+3\*60\*6