How to take snapshots of rtsp stream without displaying?

This forum is about all development around libVLC.
danisein
New Cone
New Cone
Posts: 2
Joined: 25 Sep 2017 05:23

How to take snapshots of rtsp stream without displaying?

Postby danisein » 25 Sep 2017 05:38

I need to take snapshots of a stream periodically in background.
And i found that the commands follows in command line may solve my problem.

Code: Select all

vlc --video-filter=scene --vout=dummy --aout=dummy --scene-path=$path
However, when i apply it as options of playing media, it doesn't work.

Code: Select all

headlessMediaplayer.playMedia($STREAM_URL, "video-filter=scene","vout=dummy","aout=dummy","scene-path=$PATH");
By the way, i'm using vljc to implement it.
Is there something wrong with my options?
Thanks!

danisein
New Cone
New Cone
Posts: 2
Joined: 25 Sep 2017 05:23

Re: How to take snapshots of rtsp stream without displaying?

Postby danisein » 27 Sep 2017 09:33

Solution was found!
Options should be add to the MediaPlayerFactory's constructor.

Code: Select all

MediaPlayerFactory factory = new MediaPlayerFactory("--video-filter=scene", "--vout=dummy", "--aout=dummy", "--scene-path=$path"); MediaPlayer player = factory.newHeadlessMediaplayer(); player.playMedia("$url");


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 22 guests