source type file

Discussions related to the 1.36.x series of ZoneMinder
Post Reply
jimp180
Posts: 4
Joined: Sun Mar 07, 2021 10:00 am

source type file

Post by jimp180 »

I have a couple old cameras i would like to add to my zoneminder setup. I also have some old Hauppauge WinTV PVR USB2 capture devices. after trying several attempts to get this to work with zoneminder and other applications I have finally got it working with mplayer. now I even am able to save images from mplayer

Code: Select all

mplayer -vo jpeg:outdir=/path/to/output/dir -sstep 3 -vf pp=lb /dev/video0
which saves a file every 3 seconds to the directory, but the way i understand source type file I need to have it output to a single file. does anyone know how to make mplayer just overwrite the file for each snapshot?
User avatar
iconnor
Posts: 3362
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: source type file

Post by iconnor »

Why not use the local v4l2 type?
jimp180
Posts: 4
Joined: Sun Mar 07, 2021 10:00 am

Re: source type file

Post by jimp180 »

I am game for trying anything but i am not sure how to, it took me a lot of searching and testing to get mplayer to output anything useful from these hardware mpeg cards.
jimp180
Posts: 4
Joined: Sun Mar 07, 2021 10:00 am

Re: source type file

Post by jimp180 »

iconnor wrote: Fri Oct 06, 2023 9:39 pm Why not use the local v4l2 type?
OK, when i first read this I thought you were saying to use v4l2 to capture an image but now realize you meant to use local type. I have tried this but so far am unable to get it to work.
v4l2-ctl -d /dev/video0 --all returns

Code: Select all

Video input : 2 (Composite 1: ok)
Audio input : 1 (Line In 1)
Video Standard = 0x00001000
	NTSC-M
Format Video Capture:
	Width/Height      : 720/480
	Pixel Format      : 'MPEG' (MPEG-1/2/4)
	Field             : Interlaced
	Bytes per Line    : 0
	Size Image        : 131072
	Colorspace        : SMPTE 170M
	Transfer Function : Default (maps to Rec. 709)
	YCbCr/HSV Encoding: Default (maps to ITU-R 601)
	Quantization      : Default (maps to Full Range)
There is no Capture Pallet option for "MPEG" in Zoneminder list i have tried auto and mjpeg but neither work
I found this https://wiki.zoneminder.com/Hauppauge_WinTV-PVR_150/160 and it says "This card (ivtv version) can be used if the monitor is set up to use a file source, and secondary scripts are used to generate an updated JPEG image."
User avatar
iconnor
Posts: 3362
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: source type file

Post by iconnor »

Ok. In 1.37 you can use ffmpeg type with a url that looks like v4l2://dev/video0 maybe try that.
Post Reply