Page 1 of 1

How to take snapshots of rtsp stream without displaying?

Posted: 25 Sep 2017 05:38
by danisein
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!

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

Posted: 27 Sep 2017 09:33
by danisein
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");