[vlc-devel] sout transcode error when using libvlc.
ChengYQ
crashboat at hotmail.com
Thu Sep 27 10:58:57 CEST 2007
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
Jay
_________________________________________________________________
MSN 中文网,最新时尚生活资讯,白领聚集门户。
http://cn.msn.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20070927/4688fe3a/attachment.html>
More information about the vlc-devel
mailing list