View Full Version : Script for combining split tystreams

12-05-2002, 01:39 PM
Will the following work for recombining a split tystream or is there a more effective shell script already available?

#cat stream4.ty >> stream3.ty
#cat stream3.ty >> stream2.ty
#cat stream2.ty >> stream1.ty

12-05-2002, 01:58 PM
Yes. Though try:
cat stream2.ty stream3.ty stream4.ty >> stream1.ty

12-05-2002, 02:09 PM
Assuming you're going to do something with the combined stream immediately, try this:

mkfifo streamtmp
cat stream1.ty stream2.ty stream3.ty > streamtmp &
split streamtmp audio.mp2 video.mpv
rm streamtmp

This way, streamtmp is only created as you need it; it doesn't have to be written and read from disk. With big files (and when we're talking about video, they're all big files), this can be a huge win.

Isn't Unix cool?

12-05-2002, 02:10 PM
Very cool. Thanks.

12-05-2002, 03:03 PM
why are you keeping your ty streams split ?


12-05-2002, 04:20 PM
why are you keeping your ty streams split ?
I have a very short attention span. ;)