Skip to content

Instantly share code, notes, and snippets.

@sguzman
Created July 6, 2020 22:48
Show Gist options
  • Save sguzman/0171a11bc928708421750afcc386b990 to your computer and use it in GitHub Desktop.
Save sguzman/0171a11bc928708421750afcc386b990 to your computer and use it in GitHub Desktop.
Concatenate ts files using ffmpeg
#!/bin/bash
cat segment1_0_av.ts segment2_0_av.ts segment3_0_av.ts > all.ts
ffmpeg -i all.ts -acodec copy -vcodec copy all.mp4
@tokland
Copy link

tokland commented May 13, 2023

Same, using a pipe: cat segment1_0_av.ts segment2_0_av.ts segment3_0_av.ts | ffmpeg -i pipe: -acodec copy -vcodec copy all.mp4

@sguzman
Copy link
Author

sguzman commented May 13, 2023

@tokland I found that out recently haha! Thanks for the comment!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment