kzing
kzing

Reputation: 79

split video stream MPEGTS(H264) into file chunks under unix

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.

Upvotes: 2

Views: 3787

Answers (2)

kzing
kzing

Reputation: 79

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

Upvotes: 1

lothar
lothar

Reputation: 20257

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.

Upvotes: 1

Related Questions