vlm via libvlc

This forum is about all development around libVLC.
d3x0r
Blank Cone
Blank Cone
Posts: 38
Joined: 01 Dec 2008 22:38

vlm via libvlc

Postby d3x0r » 17 Apr 2013 00:52

I have a script that creates a picture-in-picure of two capture devices.....


new channel1 broadcast enabled\n" );
setup channel1 input dshow://\n" );
setup channel1 option dshow-vdev=\"Osprey-100e Video Device 1\"\n" );
setup channel1 option dshow-video-input=0\n" );
setup channel1 option dshow-adev=\"none\"\n" );
setup channel1 option dshow-size=\"320x240\"\n" );
setup channel1 option disc-caching=\"100\"\n" );
setup channel1 output #duplicate{dst=mosaic-bridge{width=320,height=240},select=video}\n" );

new channel2 broadcast enabled\n" );
setup channel2 input dshow://\n" );
setup channel2 option dshow-vdev=\"Osprey-100e Video Device 2\"\n" );
setup channel2 option dshow-video-input=0\n" );
setup channel2 option dshow-adev=\"none\"\n" );
setup channel2 option dshow-size=\"640x480\"\n" );
setup channel2 option disc-caching=\"100\"\n" );
setup channel2 option sout-keep\n" );
setup channel2 option fullscreen\n" );
setup channel2 option no-audio\n" );
setup channel2 option mosaic-keep-picture\n" );
setup channel2 output #transcode{sfilter=mosaic:logo{file=scripts/images/fortunet.png,position=10},vcodec=mp2v,vb=10000,scale=1,fps=24}:bridge-in{delay=400,id-offset=100}:duplicate{dst=display,dst=\"transcode{venc=x264{keyint=60,idrint=2},vcodec=h264,vb=300,acodec=mp4a,ab=32,channels=2,samplerate=22050}:rtp{dst=127.0.0.1,port=50004,caching=1000,sdp=rtsp://%s:8080/vlc.sdp}\"}\n", address );
\n" );
control channel2 play\n" );
control channel1 play\n" );

-------------
Right now, I'm writing that to a file and passing --vlm-conf parameter; but that causes libvlc to open a seperate window that is directshow, instead of going through what I set in libvlc_video_set_callbacks. actually looking maybe it's my bug that I'm expecting an input to get a media_t and a mediaplayer_t....

How do I get the vlm from vlc?

do I have to use the vlm interface and somehow port the above script into compatible programmatic steps?

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37519
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: vlm via libvlc

Postby Jean-Baptiste Kempf » 17 Apr 2013 01:40

It works from main VLC?
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

d3x0r
Blank Cone
Blank Cone
Posts: 38
Joined: 01 Dec 2008 22:38

Re: vlm via libvlc

Postby d3x0r » 17 Apr 2013 18:28

Yes. It also works when launched via libvlc loading, but it creates a seperate display window.

command line is basically

vlc -I dummy -vvv --fullscreen --no-audio --no-osd --video-x=%d --video-y=%d --width=%d --height=%d --mosaic-width=%d --mosaic-height=%d --mosaic-keep-picture --vlm-conf rtpserver.vlm --sout-keep --rtsp-timeout=-1

(the above script would be rtpserver.vlm)


(the above script was copied from code, hence the trailing `\n");`. Those aren't really in the script.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37519
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: vlm via libvlc

Postby Jean-Baptiste Kempf » 17 Apr 2013 19:04

TRy -Vdummy
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

d3x0r
Blank Cone
Blank Cone
Posts: 38
Joined: 01 Dec 2008 22:38

Re: vlm via libvlc

Postby d3x0r » 17 Apr 2013 19:42

Okay; I also learned I wasn't getting a media_player_t; I was using media player from media, and in this mode, I don't pass a media... don't know if that is the fix, but am missing a large chunk of setup.

d3x0r
Blank Cone
Blank Cone
Posts: 38
Joined: 01 Dec 2008 22:38

Re: vlm via libvlc

Postby d3x0r » 17 Apr 2013 19:52

-Vdummy does not open the directshow window, but I don't get any callbacks.

The VLM has a execute method that it uses to handle the vlm-conf parameter.... I could make these commands generate later? Maybe it's because the vlm is initializing its whole operation before I get to finish setting up callbacks, etc?

-----
Took the play commands from the end of the vlm script; added them back in after setting up a media player with callbacks/events. (called libvlc_vlm_play_media( ... channel1 ) ) after...

So without the play at the end, the extra direct draw display did not show.

After adding the call to vlm_media_play, then the direct show window appears again. (this is after setting up a media_player_t )
Last edited by d3x0r on 17 Apr 2013 20:03, edited 1 time in total.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37519
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: vlm via libvlc

Postby Jean-Baptiste Kempf » 17 Apr 2013 19:59

Ok, and if you remove dst=display, from your command?
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

d3x0r
Blank Cone
Blank Cone
Posts: 38
Joined: 01 Dec 2008 22:38

Re: vlm via libvlc

Postby d3x0r » 17 Apr 2013 20:10

Then I get no display popup, but I get no display. The network stream is being sent (with no video, connected a remote to it, and saw the video stream playing)

d3x0r
Blank Cone
Blank Cone
Posts: 38
Joined: 01 Dec 2008 22:38

Re: vlm via libvlc

Postby d3x0r » 17 Apr 2013 20:40

I got a list of output modules, vmem is a 'memory output' not a video output, so that doesn't work.

the dummy interface is actually 'vdummy' tried Vvdummy , but that somehow ended up being the same as -Vdummy, and no output.
I tried wingdi, and it makes a popup like the direct3d.

I tried a combination of removing dst=display and the above, but then I just got no display.

For my application, maybe I'll just leave it with no display, and launch a second VLC on the local box to show the served stream... though would rather it was just one application to track.

d3x0r
Blank Cone
Blank Cone
Posts: 38
Joined: 01 Dec 2008 22:38

Re: vlm via libvlc

Postby d3x0r » 18 Apr 2013 01:09

think can I add something like

?

setup output vmem
setup output vmem-lock=X
setup output vmem-unlock=X

I guess that wouldn't give me events though; and i need those just as much...

been browsing through the sources; would have thought that vlm would use the same primitives as media_player, and it does and doesn't....

not entirely sure what is a valid vlc_object_t to set the parameters on.. but I think I can't get the vlm object or item objects from the API (I could cheat and pull the libvlc_instance_t struct)

Rémi Denis-Courmont
Developer
Developer
Posts: 15148
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: vlm via libvlc

Postby Rémi Denis-Courmont » 18 Apr 2013 17:39

Don't use VLM. Just spawn multiple media player instances from a single LibVLC instance.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

d3x0r
Blank Cone
Blank Cone
Posts: 38
Joined: 01 Dec 2008 22:38

Re: vlm via libvlc

Postby d3x0r » 18 Apr 2013 18:23

I don't see how that would make a picture in picture (mosaic) to send on the network stream? Is there some sample code for such a thing?


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 5 guests