Page 1 of 1

How to split sout-recorded files after they reached 4 GB ???

Posted: 21 Jan 2006 10:24
by jackherer
I use to record my MPEG2 Stream from a SAT-Receiver with VLC using this:
C:\Programme\VideoLAN\VLC\vlc.exe http://127.0.0.1:31337 --sout=#duplicate{dst=display,dst=std{access=file,mux=ts,url="j:\TV.mpg"}}

The Problem now is that VLC on that way isn' able to handle a file larger than 4 GB , so my record stops!

Have you any solution ?

4GB

Posted: 25 Jan 2006 19:30
by h2g2bob
Hello,

This 4GB problem sounds like you're saving to a FAT32 format disk (which is standard in WIndows 98 and some others) - if you use a differently formatted drive then you should be able to store more than that (if not, there's a bug somewhere...)

----

If you're still able to access the 4GB file ok, you could try getting vlc to start creating another file when the 4GB file is full.

To do this, you can tell it to re-open the stream and start recording again in a new file, like this:
...vlc.exe http://127.0.0.1:31337 :sout=#duplicate{dst=display,dst=std{access=file,mux=ts,url="j:\TV_1.mpg"}} http://127.0.0.1:31337 :sout=#duplicate{dst=display,dst=std{access=file,mux=ts,url="j:\TV_2.mpg"}}
Some things to notice: use a colon ( : ) and not dashes ( -- ) before sout to limit the sout to one file only (not the whole playlist), and don't forget to change the name of the file (or you'll end up recording over the same file). There's 2 there, but you could keep going.

Please test this out before using it to record something you really want, as I can't test it from my computer (sorry: I would if I could). Also, you'll probably loose a second or two when switching between files.

----

One other thing, If you know how long you want to record, you could use --stop-time=seconds to stop recording after a specified time. You can also use vlc:quit as a playlist item to get vlc to close, if this helps (ie something like this

Code: Select all

vlc http://127.0.0.1:31337 :sout={...} :stop-time=1800 vlc:quit
to get vlc to stop recording and close after 30 minutes.)

----

Finally, you might want to consider using piped output. This is quite a complex solution,

Code: Select all

vlc http://127.0.0.1:31337 --sout='#std{access=file,mux=ts,url=-}'
The dash as a filename makes it output to stdout. You can then pipe this output into another program (using the pipe character, | ) and that program can split and save the input. Linux can do this with the split program, like this

Code: Select all

vlc http://127.0.0.1:31337 --sout='#std{access=file,mux=ts,url=-}' | split --bytes=4000000 - output_file
----

I hope this is helpful,
h2g2bob

ok

Posted: 27 Jan 2006 10:24
by jackherer
thank you h2g2bob!

i'll check this out and let you now , how is the progress!

Posted: 11 Feb 2006 19:47
by cat6man
h2g2bob,

i have a similar problem that i thought might be fixed with your suggestion.
i'm recording TV via firewire from a MOT set top box with the following:

"c:\program files\videolan\vlc\vlc" dshow:// :dshow-vdev="Motorola AV/C Tuner Device" :dshow-adev="" :dshow-size="" :sout=#duplicate{dst=std{access=file,mux=ts,url="d:\media\temp\vlctest.ts"}} :stop-time=20 vlc:quit


however....it never stops......i'm wondering if the 'dshow' device works with the stop-time option.....it works fine for (as an example) play and streaming an audio file

"c:\program files\videolan\vlc\vlc" "d:\media\misc\track%1.wav" :sout=#duplicate{dst=std{access=file,mux=wav,url="d:\vlc%1.wav"}} --stop-time=%2

the above works fine and stops after %2 seconds.......but the dshow source seems to ignore the stop-time, no matter how i set it.

any ideas greatly accepted here.

cheers

Re: How to split sout-recorded files after they reached 4 GB ???

Posted: 24 Apr 2008 20:01
by onehalf
any ideas?