<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 9pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>Hi,<BR>
<BR>
I got a problem streaming video by udp using libvlc.When I run vlc(0.8.6c) from command:<BR>
"vlc v4l:/dev/video0:size=320x240 --sout '#transcode{vcodec=mp4v,vb=1024,scale=1}:duplicate{dst=display,dst=std{access=udp,mux=ts,dst=192.168.0.231:1234}}',the sout works fine and stream the video, I think the drivers and my Gentoo Linux system environment is fine.<BR>
<BR>
But when I follow the example <A href="http://wiki.videolan.org/LibVLC_Tutorial_086c">http://wiki.videolan.org/LibVLC_Tutorial_086c</A>, and changed the code a little bit to stream video out by UDP.it says that: <BR>
"main private error: no sout stream module mathched 'transcode' <BR>
main stream output error:stream chain failed for 'transcode{vcodec=mp4v,vb=1024,scale=1}:duplicate{dst=display,dst=std{access=udp,mux=ts,dst=192.168.0.231:1234}}'" <BR>
<BR>
My code is as following:<BR>
#include <stdio.h><BR>#include <stdlib.h><BR>#include <vlc/libvlc.h><BR><BR>static void quit_on_exception (libvlc_exception_t *excp) {<BR> if (libvlc_exception_raised (excp)) {<BR> fprintf(stderr, "error: %s\n", libvlc_exception_get_message(excp));<BR> exit(-1);<BR> }<BR>}<BR>
int main(int argc, char **argv){<BR>
libvlc_exception_t excp;<BR> libvlc_instance_t *inst;<BR> char *myarg0 = "test";<BR> char *myarg1 = "v4l://";<BR> char *myarg2 = ":v4l-vdev=/dev/video0";<BR> char *myarg3 = ":v4l-adev=";<BR> char *myarg4 = ":sout=#transcode{vcodec=mp4v,vb=1024,scale=1}:duplicate{dst=display,dst=std{access=udp,mux=ts,dst=192.168.0.231:1234}}";<BR> char *myargs[5] = {myarg0,myarg1,myarg2,myarg3,myarg4};<BR> libvlc_exception_init (&excp);<BR> inst = libvlc_new (5, myargs, &excp);<BR> quit_on_exception (&excp);<BR> libvlc_playlist_play (inst, -1, 0, NULL, &excp); <BR> usleep (20000000);<BR> libvlc_destroy (inst);<BR> return 0;<BR>} <BR>
<BR>
If I feed only the first 4 args, the video display fine without streaming. Is that because I missed some arguments or I need to link some more modules, or ...?<BR>
<BR>
Please help!!!<BR>
<BR>
Thanks a lot!<BR>
Yours<BR>
Jay <BR>
<BR><br /><hr />不登录就能管理多个邮件帐户,试试 Windows Live Mail。 <a href='http://get.live.com/wl/all' target='_new'>立即尝试!</a></body>
</html>