views:

1066

answers:

2

Q: How to split MPEGTS(H264) video stream into file chunks?

Searching the way of splitting MPEGTS video stream encoded to H264 into accurate file chunks. The challenge is that the stream need to be saved 24/7 and no data should be lost.

Thinking about split(1), but there is a problem with video frames. If video frame will be cut in the middle, than video data will be lost.

Another problem is the keyframes...

For now I am thinking about some fork of split(1) which is react on marker (the beginning of keyframe) and cut after only that.

+1  A: 

From here:

Mencoder makes it easy to trim the end or the beginning of a file, or split it in several parts.

Mencoder can be found here.

lothar
Bet you can't do it yourself without loosing video seconds.
kzing
A: 

Its actually can be done with segmenter easily http://svn.assembla.com/svn/legend/segmenter/segmenter.c

kzing