[vlc] VLC Python Bindings and --sout.

Rick Sterling rick__sterling at hotmail.com
Wed Feb 28 17:39:58 CET 2007


I am creating a little program in Python using the VLC Python Bindings.  One 
thing I can not get to work is streaming.  From a command line if I use the 
following command line streaming works as expected:

.../vlc/bin/vlc -I rc --sout 
'#standard{access=udp,mux=ts,dst=239.254.254.250}'  test.mp3

In my Python application the following code will not work, and I cannot 
figure out why:

-----------
import vlc
import vlcwrapper

SLEEP = 3

mc=vlc.MediaControl([ "--verbose", "2", 
"--sout","#standard{access=udp,mux=ts,dst=239.254.254.250}" ])
mc.playlist_add_item("test.mp3")

quit = 0
while (quit == 0):
         time.sleep(SLEEP)
----------

I get the following output from VLC:

[00000248] main playlist debug: creating new input thread
[00000252] main input debug: waiting for thread completion
[00000252] main input debug: creating statistics handler
[00000254] main stream output debug: stream=`standard'
[00000255] main private debug: looking for sout stream module: 1 candidate
[00000252] main input debug: thread 3052288928 (input) created at priority 0 
(input/input.c:265)
[00000255] main private debug: set sout option: sout-standard-access to udp
[00000255] main private debug: set sout option: sout-standard-mux to ts
[00000255] main private debug: set sout option: sout-standard-dst to 
239.254.254.250
[00000255] stream_out_standard private debug: creating 
`udp/ts://239.254.254.250'
[00000255] stream_out_standard private debug: extension is 250
[00000255] stream_out_standard private debug: extension -> mux=(null)
[00000255] stream_out_standard private debug: using 
`udp/ts://239.254.254.250'
[00000257] main private debug: looking for sout access module: 1 candidate
[00000257] main private debug: net: connecting to 239.254.254.250 port 1234
[00000259] main private debug: thread 3043896224 (sout write thread) created 
at priority 0 (udp.c:268)
[00000257] access_output_udp private debug: udp access output 
opened(239.254.254.250:1234)
[00000257] main private debug: using sout access module "access_output_udp"
[00000255] stream_out_standard private debug: access opened
[00000260] main private debug: looking for sout mux module: 0 candidates
[00000260] main private error: no sout mux module matched "ts"
[00000255] stream_out_standard private error: no suitable sout mux module 
for `udp/ts://239.254.254.250'
[00000259] main private debug: thread 3043896224 joined (udp.c:316)
[00000257] access_output_udp private debug: udp access output closed
[00000257] main private debug: removing module "access_output_udp"
[00000255] main private warning: no sout stream module matching "standard" 
could be loaded
[00000255] main private debug: destroying chain... (name=standard)
[00000255] main private debug: destroying chain done
[00000254] main stream output error: stream chain failed for 
`standard{access=udp,mux=ts,dst=239.254.254.250}'
[00000252] main input error: cannot start stream output instance, aborting
[00000252] main input debug: thread 3052288928 joined (input/input.c:412)
[00000248] main playlist debug: creating new input thread
[00000261] main input debug: waiting for thread completion
[00000261] main input debug: thread 3052288928 (input) created at priority 0 
(input/input.c:265)
[00000262] main stream output debug: stream=`standard'
[00000263] main private debug: looking for sout stream module: 1 candidate
[00000263] main private debug: set sout option: sout-standard-access to udp
[00000263] main private debug: set sout option: sout-standard-mux to ts
[00000263] main private debug: set sout option: sout-standard-dst to 
239.254.254.250
[00000263] stream_out_standard private debug: creating 
`udp/ts://239.254.254.250'
[00000263] stream_out_standard private debug: extension is 250
[00000263] stream_out_standard private debug: extension -> mux=(null)
[00000263] stream_out_standard private debug: using 
`udp/ts://239.254.254.250'
[00000264] main private debug: looking for sout access module: 1 candidate
[00000264] main private debug: net: connecting to 239.254.254.250 port 1234
[00000265] main private debug: thread 3043896224 (sout write thread) created 
at priority 0 (udp.c:268)
[00000264] access_output_udp private debug: udp access output 
opened(239.254.254.250:1234)
[00000264] main private debug: using sout access module "access_output_udp"
[00000263] stream_out_standard private debug: access opened
[00000266] main private debug: looking for sout mux module: 0 candidates
[00000266] main private error: no sout mux module matched "ts"
[00000263] stream_out_standard private error: no suitable sout mux module 
for `udp/ts://239.254.254.250'
[00000265] access_output_udp private debug: packet has been sent too late 
(1172680607021870)
[00000265] main private debug: thread 3043896224 joined (udp.c:316)
[00000264] access_output_udp private debug: udp access output closed
[00000264] main private debug: removing module "access_output_udp"
[00000263] main private warning: no sout stream module matching "standard" 
could be loaded
[00000263] main private debug: destroying chain... (name=standard)
[00000263] main private debug: destroying chain done
[00000262] main stream output error: stream chain failed for 
`standard{access=udp,mux=ts,dst=239.254.254.250}'
[00000261] main input error: cannot start stream output instance, aborting
[00000261] main input debug: thread 3052288928 joined (input/input.c:412)
[00000248] main playlist: nothing to play

I feel it has something to do with the way I am passing the --sout options.  
I have tried formatting the --sout options different but haven't been able 
to make it work.

If anyone knows where I am going wrong and can point it out I would 
appreciate it.

rick

_________________________________________________________________
http://local.live.com/default.aspx?v=2&cp=43.658648~-79.383962&style=r&lvl=15&tilt=-90&dir=0&alt=-1000&scene=3702663&cid=7ABE80D1746919B4!1329

-- 
This is the vlc mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://www.videolan.org/support/lists.html



More information about the vlc mailing list