Saving a network stream with options as xspf

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
antont
New Cone
New Cone
Posts: 4
Joined: 05 Aug 2010 10:04

Saving a network stream with options as xspf

Postby antont » 20 Aug 2010 21:53

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!

Rémi Denis-Courmont
Developer
Developer
Posts: 15326
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Saving a network stream with options as xspf

Postby Rémi Denis-Courmont » 21 Aug 2010 09:10

Nope. 'sout' option is ignored in playlist files as a security measure.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

antont
New Cone
New Cone
Posts: 4
Joined: 05 Aug 2010 10:04

Re: Saving a network stream with options as xspf

Postby antont » 23 Aug 2010 21:03

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"}}


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 50 guests