didierm
User
| Posts: 58 |   |
 



|
Re:Ticket #82 (transcoding unsupported formats) - 2007/03/28 15:19
Here is an overview/summary of the required steps for rudimentary VLC streaming :
- I created a new SC category, "Web", which points to a directory containing pointers to webservers. These pointers are files in a format, identical to the SC Radio URL shortcuts.
- One of those URL's points to a "VLC Livestream" page, located on the same server as SC (could be any server, though).
Example content of "VLC_stream.url" :
URL=http://192.168.1.10/dma/livestream/index.html
- Example content of "livestream/index.html" :
| Code: |
<html>
<body>
<table border="0" width="100%" height="100">
<tr>
<td align="center" valign="middle" height="370">
<!-- Video -->
<a href="live_server1.html" tvid="1" style="width:13" name=start vod="playlist">VLCstream SERVER1</a><br>
<a href="live_server2.html" tvid="1" style="width:13" name=start vod="playlist">VLCstream SERVER2</a><br>
<!-- Video -->
</td>
</tr>
</table>
</body>
</html>
|
- Example content of live_server1.html (in this case, the VLC streaming application is hosted on the SC server) :
VLC Stream from SERVER1|0|0|http://192.168.1.10:8765/?&ext=.mpg|
- Simplified VLC example script vlc.sh :
| Code: | #!/bin/bash
ROOTDIR=/exports/SC
AVIDIR="$ROOTDIR/Video/"
SUBDIR="$ROOTDIR/Data/Subtitles/"
AVIFILE="$AVIDIR/movie.avi"
SUBFILE="$SUBDIR/movie.idx"
vlc -v $AVIFILE --sub-file $SUBFILE -I telnet :file-caching=300 :sout="#transcode{vcodec="mp2v",vb=2048,soverlay}:duplicate{dst=std{mux=ps,access=http,dst=:8765/}}" :sout-all
|
General remarks :
- In this particular case, vlc.sh is hosted on a Linux server, and mixes an .avi file with its vobsub idx/sub subtitles (empirically, this requires at least a P4/2GHz class host).
- vlc.sh should be already running (so VLC is streaming) before an SC connection attempt is made. Ideally, the script should be launched from e.g. an extra button next to each SC media entry. Depending on the media extension (e.g. aac, h264, ...), different scripts with different vlc parameters should be started on demand. (TODO)
- the "-I telnet" parameter prevents VLC from opening a client window on the VLC host, and allows for remote control. (TODO)
- vlc allows for the parameters to be stored in separate text files. This would allow parameterisation on Windows hosts. (TODO)
With VLC, about anything is possible (shoutcast audio & video, podcasts, YouTube?, ...). I think this could be a very worthwhile venture.
|