How to cut part of mp4 video using ffmpeg without losing quality?

user1788736 picture user1788736 · Mar 26, 2013 · Viewed 23.3k times · Source

hi all i got an mp4 video using ffmpeg but now i want to cut part of this mp4 . For example i only want first 25 min of the mp4 video from 40 min video. could you guys tell me what command i can use in ffmpeg for windows to achieve this task ?

ffmpeg 40minvideo.mp4

Answer

Multimedia Mike picture Multimedia Mike · Mar 26, 2013
ffmpeg -i 40minvideo.mp4 -t 1500 -acodec copy -vcodec copy 25minvideo.mp4

-t 1500 processes the first 1500 seconds (25 min * 60 sec/min)

-acodec copy and -vcodec copy copy the codec data without transcoding (which would incur quality loss).