Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Aug 2014 13:02:29 +0200
From:      Polytropon <freebsd@edvax.de>
To:        FreeBSD Questions <freebsd-questions@freebsd.org>
Subject:   Time code and hourly files with mencoder
Message-ID:  <20140818130229.80e2e06e.freebsd@edvax.de>

next in thread | raw e-mail | index | archive | help
The following complex of questions primarily aims at those
participants of the questions list who have experience with
mplayer, mencoder, and state security. ;-)

I'm searching for some input regarding a FreeBSD-based
surveillance project. The basic setting: a PC-type system
equipped with a Hauppauge / BrookTree PCI TV card (with
excellent support) connected to a video source (camera
attached to "video in" cinch connector), and a sound card
(onboard version) connected to a microphone. The computer
has sufficient power (Intel Core2, 2 GB RAM, nVidia GPU).
Designated software: mencoder. There will be no external
signals, instead the recording will be started once, and
then continue until ^C.

I've done this in the past, but I'd like some fresh ideas
and new input, especially because there are obstacles which
I haven't encountered (and therefore solved) yet.

What I need:



1. TC

In a corner (for example top right) there should be
a time code with a precision of one second, like this:

	2014-08-18 12:50:32

The video source cannot supply it. It doesn't have to
be a high quality font. If it looks like a 7 segment
display, it's fully sufficient. More than date and time
is not needed.

How can this be added to the video "on the fly", during
creation?



2. File separation

For easier postprocessing, I need one file per hour
of the day (24 files for one day) and a directory
for each day, like this:

	2014-08-16/
	2014-08-17/
	2014-08-18/
		2014-08-18_00.avi
		2014-08-18_01.avi
		2014-08-18_02.avi
		...
		2014-08-18_12.avi
		2014-08-18_13.avi
		2014-08-18_14.avi
			(contains 14:00:00 - 14:59:59)
		2014-08-18_15.avi
		...
		2014-08-18_23.avi
	2014-08-19/
	2014-08-20/

How is this to be implemented? How would you start
mencoder every hour for one hour? What is the optimal
way to keep track of the time in the controlling shell
script?



3. File format

The videos don't need to be high quality. 800x600 or the
like would be sufficient (even less is okay). The audio
also doesn't need to be HiFi. MP3 or maybe even GSM codecs
are sufficient.

What encoding options do you recommend?




Comments and suggestions are highly welcome!


-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140818130229.80e2e06e.freebsd>