PDA

View Full Version : Script for combining split tystreams



OvitivO
12-05-2002, 12: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

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

jeffcoat
12-05-2002, 01: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?

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

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

-lloyd-

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

(Insertion)