Body: <p>I have an MPEG-TS video file of 60 seconds that was split in half (30 sec x 2 files). When I concatenate back (cat unix) the two video parts, during the play of the video   right at the moment when there's the transition from first half to the second half of the video, I'm getting a gray frame and frames get scrambled for ~1 second until the video continues to play normally.</p>
  
  <p>Could someone tell me why is this happening ? I only want to understand why it happens and how to theoretically avoid such thing, nothing more. </p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-02-26T02:15:37.460Z
Comments.Text: Welcome! How was the original file split in two?
Comments.UserDisplayName: Michael Liebman
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-02-26T08:08:43.873Z
Comments.Text: Thanks @Michael Liebman. Video file was split using ffmpeg basic cut command with audio and video copying so there was no re enconding during the process. I used -ss 00:00:00 and -t for duration. It is worth mentioning that the concatenation was not made through ffmpeg but with a programming language in wich I simply took the bytes of the 2 files then joined together in a array of bytes that I wrote back to the file system. Thanks for your help
Comments.UserDisplayName: David
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-02-27T00:04:38.610Z
Comments.Text: Please share the full ffmpeg command. But in all likelihood, ffmpeg didn't just split the file into 2 like Unix `split`. It actually created two separate TSs that have the header info, so just `cat`ing them back together isn't the inverse function. One TS ending and another starting within a file would do what you describe.
Comments.UserDisplayName: Michael Liebman
Tags: <linux><mpeg>
Title: Joining video files together getting gray/scrambled frames at transition point
UserDisplayName: David
ThreadText: # Joining video files together getting gray/scrambled frames at transition point
  
  (Asked by: username_0 on 2019-02-25)
  
  I have an MPEG-TS video file of 60 seconds that was split in half (30 sec x 2 files). When I concatenate back (cat unix) the two video parts, during the play of the video right at the moment when there's the transition from first half to the second half of the video, I'm getting a gray frame and frames get scrambled for ~1 second until the video continues to play normally.
  
  Could someone tell me why is this happening ? I only want to understand why it happens and how to theoretically avoid such thing, nothing more.
  
  **Tags:** linux, mpeg
  
  > **Comments:**
  > **username_1**: Welcome! How was the original file split in two?  
  > **username_0**: Thanks @username_1. Video file was split using ffmpeg basic cut command with audio and video copying so there was no re enconding during the process. I used -ss 00:00:00 and -t for duration. It is worth mentioning that the concatenation was not made through ffmpeg but with a programming language in wich I simply took the bytes of the 2 files then joined together in a array of bytes that I wrote back to the file system. Thanks for your help  
  > **username_1**: Please share the full ffmpeg command. But in all likelihood, ffmpeg didn't just split the file into 2 like Unix `split`. It actually created two separate TSs that have the header info, so just `cat`ing them back together isn't the inverse function. One TS ending and another starting within a file would do what you describe.  
  
  ---
  
  ## 0 answers
  
  