How to cut video and audio without re-encoding using ffmpeg

ffmpeg -i source_video.mp4 -t 50 -c copy output_video.mp4

This cuts the first 50 seconds of the video named source_video.mp4 and outputs them without any re-encoding to output_video.mp4

Another example for audio files:

ffmpeg -i input_file.mp3 -ss 00:00:05 -t 00:00:21 -c copy output_file.mp3

This cuts the audio file from the 5th second to the 21st second and places it in a file named output_file.mp3, no re-encoding done whatsoever.



About SoCRaT

Systems Engineer, OSS & Linux Geek
This entry was posted in Linux and tagged , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s