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
 FFmpeg can also use total seconds:Code:ffmpeg -i 111.mp4 -ss 0 -t 1:33:31 -c copy 1111.mp4 
 You can get even closer if you specify the number of frames:Code:ffmpeg -i 111.mp4 -ss 0 -t 5611 -c copy 1111.mp4 
 If you specify time BEFORE the -i video, ffmpeg will seek to the key frame BEFORE the start point. If you specify time AFTER the -i video, it will seek to the Key Frame AFTER the cut point. It also likes to end on a non- 'B' Frame so your end point may not be exact. If you use the -vframes method FFMpeg will throw a 'P' frame at the end if needed as close as it can to your cut point.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. 
 
 The above string will cut from time 0.000000 through 447.985342 exactlyCode: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...
 ...does not work , it cuts 3 seconds of video from the beginning, audio is playing and removes subtitles.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, 16:43
- 
  Cannot cut at I frame with FFMPEGBy Budman1 in forum EditingReplies: 11Last Post: 30th Apr 2018, 08:15
- 
  FFMPEG - fade in logo independent of fade in video and subtitlesBy EasyFeet in forum EditingReplies: 2Last Post: 16th May 2017, 01:59
- 
  Subtitles cut, only partially seenBy chermesh in forum EditingReplies: 8Last Post: 17th Apr 2017, 04:30
- 
  Cut Video and subtitlesBy Tylerr in forum EditingReplies: 10Last Post: 9th Oct 2015, 03:28


 
		
		 View Profile
				View Profile
			 View Forum Posts
				View Forum Posts
			 Private Message
				Private Message
			 
 
			
			
 Quote
 Quote 
			
