Body: <p>I am trying to find the best way to automatically concatenate a large number of files that have been recorded with an overlap within them.
  In the process of 'glueing' the video files together, to get a smooth playback, I need to strip 5 frames from the end (or from the beginning) of each clip.</p>
  <p><a href="https://stackoverflow.com/questions/7333232/how-to-concatenate-two-mp4-files-using-ffmpeg">This post</a> suggests a few ways of concatenating the files, and <a href="https://video.stackexchange.com/questions/20881/how-do-i-remove-night-footage-from-300-days-of-time-lapse-video">this post</a> on processing a timelapse video has an excellent advise on using filters for truncating media. But I am wondering
  whether I could avoid re-encoding at all? All files are in the same format.</p>
  <p>The ideal answer would include an ffmpeg command.</p>
  <p>Thank you in advance!</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-11-17T06:54:04.623Z
Comments.Text: See https://video.stackexchange.com/q/25096/
Comments.UserDisplayName: Gyan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-11-18T14:28:42.543Z
Comments.Text: Thank you, @Gyan, that is very close. I looked through the manual and couldn't find a way to specify a relative ("from beginning to 3 frames from the last frame") way of defining the outpoint. Is that possible if you don't know the duration of the clip?
Comments.UserDisplayName: Tony Sepia
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-11-18T14:47:44.750Z
Comments.Text: No, outpoint has to be measured in seconds from start.
Comments.UserDisplayName: Gyan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-11-18T14:49:30.497Z
Comments.Text: OK, thank you! Will use workarounds and assumptions ;)
Comments.UserDisplayName: Tony Sepia
Tags: <ffmpeg><concatenation>
Title: ffmpeg - concatenate files, BUT strip the last few frames from the end of each one
UserDisplayName: Tony Sepia
ThreadText: # ffmpeg - concatenate files, BUT strip the last few frames from the end of each one
  
  (Asked by: username_0 on 2020-11-16)
  
  I am trying to find the best way to automatically concatenate a large number of files that have been recorded with an overlap within them.
  In the process of 'glueing' the video files together, to get a smooth playback, I need to strip 5 frames from the end (or from the beginning) of each clip.
  
  [This post](https://stackoverflow.com/questions/7333232/how-to-concatenate-two-mp4-files-using-ffmpeg) suggests a few ways of concatenating the files, and [this post](https://video.stackexchange.com/questions/20881/how-do-i-remove-night-footage-from-300-days-of-time-lapse-video) on processing a timelapse video has an excellent advise on using filters for truncating media. But I am wondering
  whether I could avoid re-encoding at all? All files are in the same format.
  
  The ideal answer would include an ffmpeg command.
  
  Thank you in advance!
  
  **Tags:** ffmpeg, concatenation
  
  > **Comments:**
  > **username_1**: See https://video.stackexchange.com/q/25096/  
  > **username_0**: Thank you, @username_1, that is very close. I looked through the manual and couldn't find a way to specify a relative ("from beginning to 3 frames from the last frame") way of defining the outpoint. Is that possible if you don't know the duration of the clip?  
  > **username_1**: No, outpoint has to be measured in seconds from start.  
  > **username_0**: OK, thank you! Will use workarounds and assumptions ;)  
  
  ---
  
  ## 0 answers
  
  