I'm looking for a tool for Linux which can segment a video file into multiple small .ts files.

I know one for Mac OS X called Media File Segmenter which is a simple command line tool - I'm looking for an equivalent tool for Linux.

link|improve this question
feedback

migrated from stackoverflow.com Feb 5 '10 at 23:08

This question came from our site for professional and enthusiast programmers.

4 Answers

Try ffmpeg. It's powerful & cross-platform. It may already exist in your linux distro. To copy 2 minutes of video after the first and convert from mpg to ts:

ffmpeg -vcodec copy -ss 00:01:00 -t 00:03:00 \
       -i input.mpg -vcodec copy -acodec copy \
       -sameq -f mpegts output.ts

It's a good choice if you have lots of videos in essentially random formats. It's a 'swiss army knife' for video.

If you are starting with mpeg, you could also try mpegtx, which includes a variety of mpeg tools including a splitter. Easier IMHO than ffmpeg to split. To split a file into 10 chunks each with a basename of 'chunk':

mpgtx -10 input.mpg -b chunk

You may also be able to use VLC as a splitter, but I never have. There are topics discussing it, however.

link|improve this answer
feedback

if you want to cut video from h264 you should use:

ffmpeg -i Black_Lagoon_E10.mkv -ss 00:08:55 -t 00:00:32 \
-acodec copy -vcodec copy \
-vbsf h264_mp4toannexb -sameq -f mpegts Ostanovites.ts
link|improve this answer
feedback

Try dvbcut if you want something with a UI.

enter image description here

link|improve this answer
feedback

Your Answer

 
or
required, but never shown