I am writing a webcam recording application using VLCj API. I need some help regarding motion detection in the video stream from the webcam. If there is no motion detected in the video stream, then recording shall stop.
I have tried to use the --video-filter=motion in sout chain but that didn't detected any motion.
My sout chain:
String[] options = {
":sout=#transcode{vcodec=mp2v,vb=4096,scale=1,acodec=mpga,ab=128,channels=2,samplerate=44100}:duplicate{dst=file{dst=" + fileName + "},dst=display,select=noaudio,video-filter=motion} --video-filter=motion",":input-slave=alsa://hw:0,0" };
Looking forward to your response. Thanks in advance.