Page 1 of 1

Steaming to file while viewing with jvlc

Posted: 25 Aug 2008 09:59
by wells
Hi all
I have some problems in how to solve it with JVLC,and got some of the way by reading these forums but just need a little help.
I need to create a simple GUI to allow the camera to be trigger to record and stop recording while viewing.

I use following code,but nothing happened.

Code: Select all

libVlc.libvlc_media_add_option(mediaDescriptor, ":sout=#transcode{vcodec=mp4v,vb=768,scale=1,soverlay}:duplicate{dst=display,dst=std{access=file,mux=ts,dst=\"/home/oem/test.mpeg\"}}", exception);
Many thanks


If you need clarification of what I saied please ask.

wells

Re: Steaming to file while viewing with jvlc

Posted: 01 Sep 2008 03:24
by wells
nead helps! :)

Re: Steaming to file while viewing with jvlc

Posted: 10 Sep 2008 04:10
by lefish
This code works for me, but need some change.

Code: Select all

public class JVlm { /** * "--extraintf=logger", */ public static void main(String[] args) { String[] param = new String[] { "-vvv", "--plugin-path=.\\3rd_party\\vlc-0.9.0-test3-20080727-0004\\plugins", "--no-plugins-cache", "--sout-keep" }; JVLC jvlc = new JVLC(param); VLM vlm = jvlc.getVLM(); String dummy[] = new String[0]; String output = "#std{access=file,mux=ts,dst=C:/aaaab.mpg}"; output = "#transcode{vcodec=mp4v,vb=800,scale=1,acodec=mpga,ab=128,channels=2}:duplicate{dst=std{access=file,mux=ts,dst=C:/aaaab.mpg}}"; vlm.addBroadcast("aa", "rtsp://localhost/rm/surf.mp4", output, dummy, true, false); vlm.setMediaOutput("aa", output); vlm.playMedia("aa"); try { Thread.sleep(60000); } catch (InterruptedException e) { e.printStackTrace(); } vlm.stopMedia("aa"); vlm.deleteMedia("aa"); } }

Re: Steaming to file while viewing with jvlc

Posted: 11 Sep 2008 12:33
by wells
your code is very useful.
Thanks!