Page 1 of 1

split sout mpeg file

Posted: 24 Oct 2006 15:42
by mich
Hello, everyone.

Can I split MPEG file for maximum time duration ? For example I need to make new file each 15 minutes, when I save it with command '--sout file/ts:stream.xyz'.

Thank you.

Re: split sout mpeg file

Posted: 24 Apr 2008 19:42
by onehalf
any ideas?

Re: split sout mpeg file

Posted: 25 Apr 2008 10:24
by dionoea
You could do something like this using shell scripting and VLC: (where 12345 is greater than the length of the movie in seconds)

Code: Select all

step=900 for i in $(seq 0 $step 12345) do vlc -I dummy input.mpg --start-time $i --stop-time $(($i+$step)) --sout file/ts:output-$(($i/$step)).ts done
If that doesn't work, make sure that you can seek in the input file when playing it back normally. If you can't, you'll need to remux it into something else first (like MPEG-PS) using vlc -I dummy input.mpg --sout file/ps:output.mpg