<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>
Really sorry about last post of this topic, the mail content is a mess, I don't know why, it was ok when I sent it.<BR>
<BR>
I quoted the mail and formated it again<hope this time no mess>: <BR>
<BR>
When I pass the "--module-path=/...." to libvlc_new, the segment error occurs.<BR>So I changed the module to "--plugin-path=/usr/local/lib/vlc/stream_out/libstream_out_transcode_plugin.so"<BR>and I also add "--plugin-path=/usr/local/lib/vlc/codec/libffmpeg_plugin.so".<BR>When I put the "--plugin-path="to a directory, the segment error comes, so I put the path to the certain *.so files, is this ok?<BR><BR>The message is still:<BR>main private error: no sout stream module matched "transcode"<BR>main stream output error: stream chain failed for 'transcode{vcodec=mp4v,vb=1024,scale=1}:duplicated{dst=display,dst=<BR>std{access=udp,mux=ts,dst=192.168.0.2:1234}}'<BR>main input error: cannot start stream output instance, aborting<BR>main playlist: nothing to play<BR> <BR>I attached the c file and makefile here, could you help me to identify the problem?<BR>------------------myvlc.c------------------------<BR>#include <stdio.h><BR>#include <stdlib.h><BR>#include <vlc/libvlc.h><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=143.53.20.231:1234}}";<BR> char *myarg5 = "--plugin-path=/usr/local/lib/vlc/codec/ffmpeg/libffmpeg_plugin.so";<BR> char *myarg6 = "--plugin-path=/usr/local/lib/vlc/stream_out/libstream_out_transcode_plugin.so";<BR> char *myargs[7] = {myarg0,myarg1,myarg2,myarg3,myarg4,myarg5,myarg6};<BR> libvlc_exception_init (&excp);<BR> inst = libvlc_new (7, myargs, &excp);<BR> quit_on_exception (&excp);//<BR> libvlc_playlist_play (inst, -1, 0, NULL, &excp); <BR> quit_on_exception (&excp);<BR> usleep (10000000);<BR> libvlc_destroy (inst);<BR> return 0;<BR>}<BR> <BR>--------------Makefile-------------------------<BR>VLC_SRC=/usr/src/vlc-0.8.6c/vlc-0.8.6c/src<BR>KERNELV = `uname -r`<BR>CC=gcc<BR>INS=install<BR>INSDIR=/usr/local/bin<BR>LIBDIR=-L/usr/local/lib/vlc/stream_out -L/usr/local/lib/vlc/codec<BR>includes=-I/usr/src/linux-$(KERNELV)/include -I${VLC_SRC}/include/<BR>LIBS=-lvlc -lstream_out_transcode_plugin -lffmpeg_plugin<BR>SRC=myvlc.c<BR>OBJS=myvlc.o<BR>PROG=myvlc<BR>libusbtest: ${OBJS}<BR> ${CC} $(includes) -o ${PROG} ${SRC} ${LIBDIR} ${LIBS}<BR>install:${PROG}<BR> ${INS} -g root -o root ${PROG} ${INSDIR}<BR>-------------------------------------------------<BR>
<BR>
Yours<BR>
Jay<BR><BR><BR><br /><hr />使用新一代 Hotmail,更强大、更安全、更多存储空间! <a href='http://mail.live.com' target='_new'>立刻体验!</a></body>
</html>