Konstrukt::Plugin::vdr - Plugin for a website managing some videorecording features on your server.
You may simply integrate it by putting <& vdr / &> somewhere in your website.
Nothing special here
You have to do some configuration in your konstrukt.settings to let the plugin know where to get its data, which layout to use and how to record videos:
#vdr vdr/backend DBI vdr/backend/DBI/source dbi:mysql:database:host vdr/backend/DBI/user user vdr/backend/DBI/pass pass #layout vdr/layout_directory /layout/ vdr/messages_directory /messages/ #recording config vdr/log_file /path/to/videorecorder/_vdr.log vdr/storage_path /path/to/videorecorder/ vdr/fps 25 vdr/command_line v4lctl setstation "$station$"; v4lctl volume mute off; v4lctl volume 100%; transcode -i /dev/video0 -p /dev/dsp -x v4l2,v4l2 -J denoise3d=luma=4:luma_strength=6:chroma=3:chroma_strength=8:pre=1 -y ffmpeg -F mpeg4 -w 1536 -b 128,1,5,0 -e 32000,16,2 -u 128 -o $file$ -g 384x288 -V -c $length$ --progress_off 1>>$log$ 2>&1 vdr/xawtv_config /etc/X11/xawtvrc vdr/local_ips 192.168.0.10 192.168.0.11 vdr/local_user local vdr/local_pass local_pass194 vdr/userlevel_write 2
Note, that the strgin vdr/command_line has variables $station$, $file$, $length$ and $log$, which will be substituted by the name of the selected tv station, the filename of the output file, the length of the video (frames count = seconds * fps) and the path to a file where the vdr activity will be logged.
You also have to configure the usermanagement plugin, since all non-LAN access will only be permitted after login.
Constructor of this class
Yes, this plugin may return dynamic nodes (i.e. template nodes).
Initializes this object. Sets $self->{backend} and $self->{layout_path}. init will be called by the constructor.
We cannot prepare anything as the input data may be different on each request. The result is completely dynamic.
All the work is done in the execute step.
Takes the HTTP form input and adds a new event.
Returns a confirmation of the successful addition or error messages otherwise.
Deletes the specified event
Returns a confirmation of the successful removal or error messages otherwise.
Show an overview of the tv shows and a form to add new shows.
Returns an overview or error messages otherwise.
The copyrights of this file are property of Thomas Wittek, tw@zentrifuge.biz
You may not alter or sell this piece of code without my permission.