<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>

CC BY-SA 4.0
2019-02-26T02:15:37.460Z
Welcome! How was the original file split in two?
Michael Liebman
CC BY-SA 4.0
2019-02-26T08:08:43.873Z
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
David
CC BY-SA 4.0
2019-02-27T00:04:38.610Z
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.
Michael Liebman
<linux><mpeg>
Joining video files together getting gray/scrambled frames at transition point
David
# 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

