Page 1 of 1

Saving a network stream with options as xspf

Posted: 20 Aug 2010 21:53
by antont
I want to create a shortcut for input stream from Sopcast. So, the source is http://127.0.0.1:8902/stream , cache is 3000ms, and, for instance, I need a duplicate to be sent to file C:\abc-%M-%S.asf. It's simple and everything is working well when was set via the GUI. But if I save this instance as a xspf playlist, VLC generates the following file:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?> <playlist version="1" xmlns="http://xspf.org/ns/0/" xmlns:vlc="http://www.videolan.org/vlc/playlist/ns/0/"> <title>Playlist</title> <trackList> <track> <location>http://127.0.0.1:8902/stream</location> <extension application="http://www.videolan.org/vlc/playlist/0"> <vlc:id>0</vlc:id> <vlc:option>http-caching=3000</vlc:option> <vlc:option>sout=#:duplicate{dst=display,dst=file{dst='C:\abc-%M-%S.asf'}}</vlc:option> </extension> </track> </trackList> <extension application="http://www.videolan.org/vlc/playlist/0"> <vlc:item tid="0" /> </extension> </playlist>
The problem is when I open this playlist, VLC shows the Sopcast's stream but doesn't save it to the file. I'm not sure if it's an unintentional error, but is there any way to make a shortcut like this and still have a stream written to the file?

Thank you!

Re: Saving a network stream with options as xspf

Posted: 21 Aug 2010 09:10
by Rémi Denis-Courmont
Nope. 'sout' option is ignored in playlist files as a security measure.

Re: Saving a network stream with options as xspf

Posted: 23 Aug 2010 21:03
by antont
Rémi Denis-Courmont,

Thank you for the answer.

For the rest in a case such as this, I would like to post the alternative way to make this shortcut work. The following command takes a Sopcast stream and saves it to a file with timestamp:

Code: Select all

"C:\Program Files\VideoLAN\VLC\VLC.exe" http://127.0.0.1:8902/stream :http-caching=3000 :sout=#:duplicate{dst=display,dst=file{dst="C:\vlc\sopcast-record-01-%Y-%m-%dT%H-%M-%S.asf"}}
This can be placed in a .bat file:

Code: Select all

start "" "C:\Program Files\VideoLAN\VLC\VLC.exe" http://127.0.0.1:8902/stream :http-caching=3000 :sout=#:duplicate{dst=display,dst=file{dst="C:\vlc\sopcast-record-01-%%Y-%%m-%%dT%%H-%%M-%%S.asf"}}