Steaming to file while viewing with jvlc

About encoding, codec settings, muxers and filter usage
wells
Blank Cone
Blank Cone
Posts: 15
Joined: 12 Aug 2008 08:53
Location: china
Contact:

Steaming to file while viewing with jvlc

Postby wells » 25 Aug 2008 09:59

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

wells
Blank Cone
Blank Cone
Posts: 15
Joined: 12 Aug 2008 08:53
Location: china
Contact:

Re: Steaming to file while viewing with jvlc

Postby wells » 01 Sep 2008 03:24

nead helps! :)

lefish
Blank Cone
Blank Cone
Posts: 32
Joined: 23 Jun 2008 04:58

Re: Steaming to file while viewing with jvlc

Postby lefish » 10 Sep 2008 04:10

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"); } }

wells
Blank Cone
Blank Cone
Posts: 15
Joined: 12 Aug 2008 08:53
Location: china
Contact:

Re: Steaming to file while viewing with jvlc

Postby wells » 11 Sep 2008 12:33

your code is very useful.
Thanks!


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 35 guests