I need to cut off 3 seconds from the end of video and keep all subtitle streams, but it does not work.
video length: 1:33:34
Code:ffmpeg -ss 0:00:00 -t 1:33:31 -i 111.mp4 -c copy 1111.mp4 ffmpeg -ss 0:00:00 -t 1:33:31 -i 111.mp4 -map 0:s -c copy 1111.mp4
+ Reply to Thread
Results 1 to 6 of 6
-
-
FFmpeg is accurate when it comes to cutting videos but you have to understand its method. You get a different result if you specify your -ss and -t before the video name or after it. You will get the closest results if you specify both after the -i video. This is because FFMpeg must cut on a Key frame or 'I' frame. If you ask it to start somewhere in between 'I' frames it will start there but usually gives a static frame until it meets a new key frame.
Close Method
Code:ffmpeg -i 111.mp4 -ss 0 -t 1:33:31 -c copy 1111.mp4
Code:ffmpeg -i 111.mp4 -ss 0 -t 5611 -c copy 1111.mp4
Code:ffmpeg -i 111.mp4 -ss 0 -vframes <xxxxxxxxx> -c copy 1111.mp4
-
Notice in the example below, the end cut is made 1 frames in front of the 'P' frame 14176 because FFMpeg usually requires 1 frame to stop.
Code:ffmpeg -ss 0.000000 -i "C:\Users\Bud\Desktop\cgop.mp4" -vframes 14176 -c:v copy -c:a copy -y "C:\Users\Bud\Desktop\3_0_cgop.mp4"
[Attachment 54283 - Click to enlarge] -
Hi Budman1,
Perhaps I did not express myself clearly.
This method cuts video exactly as it should(3 seconds form the end) but does not keep subtitle streams.
Code:ffmpeg -ss 0:00:00 -t 1:33:31 -i 111.mp4 -c copy 1111.mp4
What you suggest...
Code:ffmpeg -i 111.mp4 -ss 0 -t 1:33:31 -c copy 1111.mp4
My problem is not the cut itself, but how to convince ffmpeg not to remove subtitles.
Similar Threads
-
Is Cut point a bug in ffmpeg?
By Budman1 in forum EditingReplies: 2Last Post: 9th May 2018, 15:43 -
Cannot cut at I frame with FFMPEG
By Budman1 in forum EditingReplies: 11Last Post: 30th Apr 2018, 07:15 -
FFMPEG - fade in logo independent of fade in video and subtitles
By EasyFeet in forum EditingReplies: 2Last Post: 16th May 2017, 00:59 -
Subtitles cut, only partially seen
By chermesh in forum EditingReplies: 8Last Post: 17th Apr 2017, 03:30 -
Cut Video and subtitles
By Tylerr in forum EditingReplies: 10Last Post: 9th Oct 2015, 02:28