[vlc-devel] sout transcode error when using libvlc

ChengYQ crashboat at hotmail.com
Sat Sep 29 13:52:27 CEST 2007


Hi,
 
Anybod can help me?
 
Thanks a lot!
 
 
Message: 4> Date: Thu, 27 Sep 2007 08:58:57 +0000> From: ChengYQ <crashboat at hotmail.com>> Subject: [vlc-devel] sout transcode error when using libvlc.> To: <vlc-devel at videolan.org>> Message-ID: <BAY144-W39534FAB43606527E1195FBCB10 at phx.gbl>> Content-Type: text/plain; charset="gb2312"
Hi,
I got a problem streaming video by udp using libvlc.When I run vlc(0.8.6c) from command:"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.But when I follow the example http://wiki.videolan.org/LibVLC_Tutorial_086c, and changed the code a little bit to stream video out by UDP.it says that: "main private error: no sout stream module mathched 'transcode' 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}}'" My code is as following:#include <stdio.h>#include <stdlib.h>#include <vlc/libvlc.h>static void quit_on_exception (libvlc_exception_t *excp) {   if (libvlc_exception_raised (excp)) {         fprintf(stderr, "error: %s\n", libvlc_exception_get_message(excp));         exit(-1);   }}int main(int argc, char **argv){libvlc_exception_t excp; libvlc_instance_t *inst; char *myarg0 = "test"; char *myarg1 = "v4l://"; char *myarg2 = ":v4l-vdev=/dev/video0"; char *myarg3 = ":v4l-adev="; 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}}"; char *myargs[5] = {myarg0,myarg1,myarg2,myarg3,myarg4}; libvlc_exception_init (&excp); inst = libvlc_new (5, myargs, &excp); quit_on_exception (&excp); libvlc_playlist_play (inst, -1, 0, NULL, &excp);  usleep (20000000); libvlc_destroy (inst); return 0;} 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 ...?Please help!!!Thanks a lot!Yours
_________________________________________________________________
Windows Live Custom Domain,您的免费电子邮局。
https://domains.live.com/default.aspx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20070929/5b22dedc/attachment.html>


More information about the vlc-devel mailing list