split sout mpeg file

About encoding, codec settings, muxers and filter usage
mich
New Cone
New Cone
Posts: 8
Joined: 20 Oct 2006 13:22
Contact:

split sout mpeg file

Postby mich » 24 Oct 2006 15:42

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.

onehalf
New Cone
New Cone
Posts: 4
Joined: 24 Apr 2008 19:19

Re: split sout mpeg file

Postby onehalf » 24 Apr 2008 19:42

any ideas?

dionoea
Cone Master
Cone Master
Posts: 5157
Joined: 03 Dec 2003 23:09
Location: Paris, France

Re: split sout mpeg file

Postby dionoea » 25 Apr 2008 10:24

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
Antoine Cellerier
dionoea
(Please do not use private messages for support questions)


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: Google [Bot] and 12 guests