Mailing List Archive

[ANN]: tvpvrd-1.2.5 Recording and transcoding daemon for ivtv
ANNOUNCEMENT - tvpvrd 1.2.5
=========================
This is to announce the release of the GPL 3.0 published multi-threaded
recording/transcoding GNU-Linux daemon 'tvpvrd' - TV Personal Video recorder
for ivtv. Which is now believed to be feature rich enough and stable for a wider
audience.

Release: v1.2.5 (stable)
Sourceforge: http://sourceforge.net/projects/tvpvrd/

(The daemon is available as a traditional tar-package source and as prebuilt RPM
for OpenSuSE 11.1 and 11.2)

NOTE: This is only for GNU-Linux NOT for any versions of Windows.

CREDITS:
========
To all developers of ivtv-driver that has made this possible.

GOAL OF PROJECT
================
To provide the most stable and user friendly client/server command line based
recorder/transcoder for ivtv-supported capture cards available on GNU-Linux.

RATIONALE
==========
In mailing lists and on the ivtv-wiki there are questions on how to do scheduled
recording using a capture card. Usually the reply on the wiki and on the mailing
lists is to use either a) some cron/at shell script or b) install a full fledged
media center (e.g. MythTV).

This daemon solves this recording/scheduling problem by offering a clean method
to schedule both recording and optional transcodings (using ffmpeg) by the means
of a resident Unix/Linux daemon for those who do no want/need a full fledged
media center but still wants more easy of use and flexibility than is possible
with amnually added cron jobs.

The daemon manage an internal database of recordings. By starting the daemon one
can then add/delete/modify/transcode recordings and files by the means of a
standard TCP/IP connection to the server.

The dameon is capable of making use of multiple cards and will automatically
choose the first free card at the specified time for a recording

This offers an alternative to have to install a large and complex media center
server and focus on the recording process and gives much more flexibility than a
manually crafted shell script. This also easily give the added benefit of
controlling recording while "on-the-road" as long as a normal TVP/IP connection
can be established to the server.

BENEFITS
========
* Client server architecture with automatic client arbitration
* Multi threaded, multi process architecture
* Basic master /slave option for how to run the server which makes it possible
to run as a slave to do transcoding on a server that doesnät have a capture
card.
* Full UTF-8 support for names of recordings
* Very small footprint
* Simultaneous recording using multiple capture cards
* Multi transcoding of the same video with user defined profiles
* Self contained XML based recording database (no need to install or setup a
separate database)
* Intelligent load balancing for transcoding
* Small footprint and efficient TCP/IP port command interface.
* Recordings can be manipulated from anywhere as long as it is possible to login
to the server running tvpvrd.
* Large File Support (LFS) to enable recorded files with sizes >2GB
* Easy to use support for recurring recordings, daily, weekly, workdays, etc
* Intelligent time/date specification
* Extensive Unix manpage documentation (as well as PDF version)
* Extensive customization possible via INI-file
* Supports transcoding of previous recorded video

EXAMPLE1
=========
To schedule a recording for the coming Wed at 20:00 on BBC1 one gives the
command (after logging in to the daemon for example via telnet) with the default
name, duration and transcoding profile

>a BBC1 wed 20:00

This will schedule a recording for the next Wednesday with default recording
time (0:59 min) and a name based on the channel, date and time and use the
default transcoding profile.

EXAMPLE2
=========
To schedule a recording of the news at 06:00-06:30 every workday and use the
base name "Morning news" on channel3 and transcode to a suitable format for a
mobile phones one could use the command

>ar f 50 channel3 06:00 06:30 Morning news @mobile

This command should be interpreted

ar - Add recurrent recording
f - Every Mon.-Fri
50 - 50 Occurrences
06:00 - Start time
06:30 - End time
Morning ...- Base name of recording
@mobile - Use the 'mobile' profile for transcoding


DETAILS
========
As an example of the possibilities with the server the list below shows the
currently supported commands by the server.

Commands:
a - Add recording
ar - Add repeated recording
d - delete single recording
dp - display all settings for specified profile
dr - delete all repeated recording
h - help
i - print detailed information on recording
kt - kill all ongoing transcoding(s)
ktf - set/unset kill transcoding flag at shutdown
l - list all pending recordings
lc - list all controls for the capture card
log n -show the last n lines of the logfile
ls - list all stations
lp - list all profiles
lq n - list queued transcodings
n - list the immediate next recording on each video
o - list the ongoing recording(s)
ot - list the ongoing transcoding(s)
q - quick recording
rst - reset all statistics
rp - refresh transcoding profiles from file
s - print server status
sp - set transcoding profile for specified recording
st - print profile statistics
t - print server time
tf - transcode specified file
tl - read list of videos to transcode from file
td - transcode all videos in directory
u - force update of database with recordings
v - print version
vc <n> - print information on TV-Card <n>
x - view database (in XML format) with recordings
z - display all settings from ini-file
! <n> - cancel ongoing recording
Type h <cmd> for syntax of each command

TECHNICAL INFORMATION
======================

'tvpvrd' is a threaded (pthreads) GNU-Linux daemon consisting of ~13k LOC C-code
with GNU C-source extensions. It has been written in a traditional Unix daemon
style with a heavy focus on stability, memory usage minimization and safety from
malicious users.

The build structure is a traditonal autoconf/automake which should make it easy
to compile and install.

The source code has been manually and programatically checked for possible
memory leaks or safety issues by the means of static code analyzers and v1.2.5
is to date believed to have no major vulnerabilities or memory issues.

Happy Recording!
Johan


_______________________________________________
ivtv-users mailing list
ivtv-users@ivtvdriver.org
http://ivtvdriver.org/mailman/listinfo/ivtv-users
Re: [ANN]: tvpvrd-1.2.5 Recording and transcoding daemon for ivtv [ In reply to ]
On 16/02/2010, at 12:31 AM, Johan Persson wrote:
> ANNOUNCEMENT - tvpvrd 1.2.5
> =========================
> This is to announce the release of the GPL 3.0 published multi-
> threaded
> recording/transcoding GNU-Linux daemon 'tvpvrd' - TV Personal Video
> recorder
> for ivtv.

Nice. I had been using cron jobs and shell scripts to operate the pvr
card on my computer, but have thought a deamon would be a nice way to
go, particularly after bad experiences trying to install that awful
mythtv ediface. So I installed tvpvrd last night to try it out. I
noted the following problems:

After compiling, then entering "make distclean", rerunning configure
and recompiling, one gets compilation errors. The "make distclean"
must be leaving something behind. It certainly is not returning the
directory to being "distribution clean".

The profiles directory is hardcoded to be /etc/tvpvrd/profiles so even
if all other files in /etc/tvpvrd are configured to be elsewhere (the
default configuration gives /usr/local/etc/tvpvrd) the profiles
directory is still /etc/tvpvrd/profiles.

It does not just read *.profile files from the profiles directory but
editor backup files as well.

If you modify the configuration files (eg etc/tvpvrd/tvpvrd.conf) and
then find you have to reinstall, the installation overwrites the
modified configuration files!!! If a configuration file is present it
absolutely should *NOT* overwrite it on install.

The exit command to quit the telnet session is not documented.

Entering recurring recordings with the 'ar' command does not work. It
always replies with "Error:1:Syntax Error". I even cut and pasted an
example from the documentation and that also generated the same error!!!

If one sets up the server with no transcoding it leaves the recorded
files in the vtmp directory and doesn't shift them to the mp2
directory. Actually shifting files is not a good idea. It means
looking in different places for the recording dependent on when one
starts playback. Why not just record directly to the mp2 directory
and if it is ordered that the original should be deleted after
transcoding then delete it from the mp2 directory when transcoding is
done?

I also have some feature requests:

Putting recordings in separate directories for each profile is
_really_ annoying if one only records with a single profile. It would
be nice to optionally get rid of the silly profile subdirectories in
the mp2 and mp4 directories.

When entering a recording that clashes with another recording it would
be nice if it printed out what the clash is instead of just printing
"Error:5:No free video resource at specified time."

It would be nice when listing scheduled recordings to list the day of
the week as well as the date. (I hazard a guess, though, that you want
to keep the format fairly rigid and controlled so that it is easy for
a higher level program to drive the daemon via the telnet port?)

It would be nice to be able to input times and see times displayed in
English format with AM and PM rather than the militaristic 24 hour
clock.

The lc command for listing the video controls looks like it just calls
the v4l2-ctl command and displays its output. Unfortunately the v4l2-
ctl presents the information in a verbose and ugly format. Surely you
could do better! Please. I grimace every time I have to use v4l2-ctl.

It would be _really_ _really_ _fantastic_ if this daemon could also
record from DVB devices! I have both an analogue PVR card and a
digital DVB-T card; using the same daemon to manage both of them would
be just wonderful!

Cheers
Michael.


_______________________________________________
ivtv-users mailing list
ivtv-users@ivtvdriver.org
http://ivtvdriver.org/mailman/listinfo/ivtv-users
Re: [ANN]: tvpvrd-1.2.5 Recording and transcoding daemon for ivtv [ In reply to ]
Hi,

In the new release tvpvrd v1.3.1 (on sourceforge)have addressed most of your comments.

>On 16/02/2010, at 12:31 AM, Johan Persson wrote:

>>ANNOUNCEMENT - tvpvrd 1.2.5
>>=========================
>>This is to announce the release of the GPL 3.0 published
>>multi- threaded recording/transcoding GNU-Linux daemon 'tvpvrd' - TV Personal
>>Video recorder for ivtv.

>Nice. I had been using cron jobs and shell scripts to operate the pvr card on
>my computer, but have thought a deamon would be a nice way to go, particularly
>after bad experiences trying to install that awful mythtv ediface. So I
>installed tvpvrd last night to try it out. I noted the following problems:

Thanks for your comments. Much appreciated. In the new release (1.3.1) I believe
I have improved on most (if not all) of your comments and then some more.

>After compiling, then entering "make distclean", rerunning configure and
>recompiling, one gets compilation errors. The "make distclean" must be leaving
>something behind. It certainly is not returning the directory to being
>"distribution clean".

What I do believe is happening to you is the following. The manpage is written
in XML using docbook and the manpage stylesheet to be able to provide both a
PDF, HTML and a traditional Unix man page format from the same source. In the
distribution I have included a pre-built man page for the HTML, PDF and man so
that not to force users to have a full docbook build environment setup. When you
do a "make distclean" it will remove all those pre-built

>The profiles directory is hardcoded to be /etc/tvpvrd/profiles so even if all
>other files in /etc/tvpvrd are configured to be elsewhere (the default
>configuration gives /usr/local/etc/tvpvrd) the profiles directory is still
>/etc/tvpvrd/profiles.

This is now been changed to follow the specified directory at configure time

>It does not just read *.profile files from the profiles directory but editor
>backup files as well.

This has also been fixed in the new release (an oversight from me)

>If you modify the configuration files (eg etc/tvpvrd/tvpvrd.conf) and then find
>you have to reinstall, the installation overwrites the modified configuration
>files!!! If a configuration file is present it absolutely should *NOT*
>overwrite it on install.

This installation issue remains. I simply don't have enough black-magic-automake
skills to address this and not enough time to become automake expert (I just
know enough to make a basic build system work). But if someone can give a tip on
the best way to add such a check I'm more than willing to listen.

>The exit command to quit the telnet session is not documented.

This has been added in the manpage.

>Entering recurring recordings with the 'ar' command does not work. It always
>replies with "Error:1:Syntax Error". I even cut and pasted an example from the
>documentation and that also generated the same error!!!

I'm not sure exactly what this problem was since I cannot repeat any such
issues. Can you give an example of a command line that doesnät work ? I use this
all the time without any issue

>If one sets up the server with no transcoding it leaves the recorded files in
>the vtmp directory and doesn't shift them to the mp2 directory. Actually
>shifting files is not a good idea. It meanslooking in different places for the
>recording dependent on when one starts playback. Why not just record directly
>to the mp2 directory and if it is ordered that the original should be deleted
>after transcoding then delete it from the mp2 directory when transcoding
>is done?

When no transcoding is done the recorded file will be moved from the "vtmp/"
directory to the corresponding profile directy under "mp2/". If it isn't moved
please look at the logfile for an error message. Most likely there might be some
file permission problem. Again, I use this all the time and I haven't been able
to see this problem.

> I also have some feature requests:

>Putting recordings in separate directories for each profile is _really_
>annoying if one only records with a single profile. It would be nice to
>optionally get rid of the silly profile subdirectories in the mp2 and mp4
>directories.

If you just use one profile you can just remove the other profile spec files and
the coresponding directories. Then you will just have a two level structure,
"mp2/profile" and "mp4/profile".

The design with separate directories for each profile is absolutely necessary
since the file will have the same name when transcoded with multiple profiles.
For example, when I record some documentaries I usually transcode both for
stationry viewing as well as mobile phone (while commuting).

>When entering a recording that clashes with another recording it would be nice
>if it printed out what the clash is instead of just printing "Error:5:No free
>video resource at specified time."
I have just released v1.3.1 which has some improvements which I believe
addresses some of your issues.
In the new version the error message now states which recording that collides.

>It would be nice when listing scheduled recordings to list the day of the week
>as well as the date. (I hazard a guess, though, that you want to keep the
>format fairly rigid and controlled so that it is easy for a higher level
>program to drive the daemon via the telnet port?)

The weekday has been added to the listing format.

>It would be nice to be able to input times and see times displayed in English
>format with AM and PM rather than the militaristic 24 hour clock.

This has not been implemented, and I don't believe I will add the complexity and
all the tests necessary to add this type of cosmetic change. Especially since
there will be a WEB-Gui (sometimes :-) ) for the daemon.


>The lc command for listing the video controls looks like it just calls the
>v4l2-ctl command and displays its output. Unfortunately the v4l2- ctl presents
>the information in a verbose and ugly format. Surely you could do better!
>Please. I grimace every time I have to use v4l2-ctl.

Well, it doesnät. It actually reads all the individual controls. I just modeled
the output (for good and bad) after the output format used in v4l2. In any case
this is nothing that any "normal" user would use anyway, this is more or less
for advanced users and debugging and for that purpose I do believe that the
format is fairly readable while still being compact.

But if you have some suggestion on a better format, while maintaining all the
information it's just a matter of a few hours to update the output format.

>It would be _really_ _really_ _fantastic_ if this daemon could also record from
>DVB devices! I have both an analogue PVR card and a digital DVB-T card; using
>the same daemon to manage both of them would be just wonderful!
>Cheers
>Michael.

Unfortunately, I have no access to a DVB device so I cannot really implement this.
It is my understanding that the received format is quite a different beast and requires
different controls and since I cannot experiment with this myself I'm afraid this will
not be implemented.

Rgds
Johan

On the 2010-02-15 you wrote:
> ANNOUNCEMENT - tvpvrd 1.2.5
> =========================
> This is to announce the release of the GPL 3.0 published multi-threaded
> recording/transcoding GNU-Linux daemon 'tvpvrd' - TV Personal Video recorder
> for ivtv. Which is now believed to be feature rich enough and stable for a
wider
> audience.
>
> Release: v1.2.5 (stable)
> Sourceforge: http://sourceforge.net/projects/tvpvrd/
>
> (The daemon is available as a traditional tar-package source and as prebuilt
RPM
> for OpenSuSE 11.1 and 11.2)
>
> NOTE: This is only for GNU-Linux NOT for any versions of Windows.
>
> CREDITS:
> ========
> To all developers of ivtv-driver that has made this possible.
>
> GOAL OF PROJECT
> ================
> To provide the most stable and user friendly client/server command line based
> recorder/transcoder for ivtv-supported capture cards available on GNU-Linux.
>
> RATIONALE
> ==========
> In mailing lists and on the ivtv-wiki there are questions on how to do
scheduled
> recording using a capture card. Usually the reply on the wiki and on the
mailing
> lists is to use either a) some cron/at shell script or b) install a full
fledged
> media center (e.g. MythTV).
>
> This daemon solves this recording/scheduling problem by offering a clean
method
> to schedule both recording and optional transcodings (using ffmpeg) by the
means
> of a resident Unix/Linux daemon for those who do no want/need a full fledged
> media center but still wants more easy of use and flexibility than is possible
> with amnually added cron jobs.
>
> The daemon manage an internal database of recordings. By starting the daemon
one
> can then add/delete/modify/transcode recordings and files by the means of a
> standard TCP/IP connection to the server.
>
> The dameon is capable of making use of multiple cards and will automatically
> choose the first free card at the specified time for a recording
>
> This offers an alternative to have to install a large and complex media
center
> server and focus on the recording process and gives much more flexibility than
a
> manually crafted shell script. This also easily give the added benefit of
> controlling recording while "on-the-road" as long as a normal TVP/IP
connection
> can be established to the server.
>
> BENEFITS
> ========
> * Client server architecture with automatic client arbitration
> * Multi threaded, multi process architecture
> * Basic master /slave option for how to run the server which makes it possible
> to run as a slave to do transcoding on a server that doesnät have a capture
> card.
> * Full UTF-8 support for names of recordings
> * Very small footprint
> * Simultaneous recording using multiple capture cards
> * Multi transcoding of the same video with user defined profiles
> * Self contained XML based recording database (no need to install or setup a
> separate database)
> * Intelligent load balancing for transcoding
> * Small footprint and efficient TCP/IP port command interface.
> * Recordings can be manipulated from anywhere as long as it is possible to
login
> to the server running tvpvrd.
> * Large File Support (LFS) to enable recorded files with sizes >2GB
> * Easy to use support for recurring recordings, daily, weekly, workdays, etc
> * Intelligent time/date specification
> * Extensive Unix manpage documentation (as well as PDF version)
> * Extensive customization possible via INI-file
> * Supports transcoding of previous recorded video
>
> EXAMPLE1
> =========
> To schedule a recording for the coming Wed at 20:00 on BBC1 one gives the
> command (after logging in to the daemon for example via telnet) with the
default
> name, duration and transcoding profile
>
> >a BBC1 wed 20:00
>
> This will schedule a recording for the next Wednesday with default recording
> time (0:59 min) and a name based on the channel, date and time and use the
> default transcoding profile.
>
> EXAMPLE2
> =========
> To schedule a recording of the news at 06:00-06:30 every workday and use the
> base name "Morning news" on channel3 and transcode to a suitable format for a
> mobile phones one could use the command
>
> >ar f 50 channel3 06:00 06:30 Morning news @mobile
>
> This command should be interpreted
>
> ar - Add recurrent recording
> f - Every Mon.-Fri
> 50 - 50 Occurrences
> 06:00 - Start time
> 06:30 - End time
> Morning ...- Base name of recording
> @mobile - Use the 'mobile' profile for transcoding
>
>
> DETAILS
> ========
> As an example of the possibilities with the server the list below shows the
> currently supported commands by the server.
>
> Commands:
> a - Add recording
> ar - Add repeated recording
> d - delete single recording
> dp - display all settings for specified profile
> dr - delete all repeated recording
> h - help
> i - print detailed information on recording
> kt - kill all ongoing transcoding(s)
> ktf - set/unset kill transcoding flag at shutdown
> l - list all pending recordings
> lc - list all controls for the capture card
> log n -show the last n lines of the logfile
> ls - list all stations
> lp - list all profiles
> lq n - list queued transcodings
> n - list the immediate next recording on each video
> o - list the ongoing recording(s)
> ot - list the ongoing transcoding(s)
> q - quick recording
> rst - reset all statistics
> rp - refresh transcoding profiles from file
> s - print server status
> sp - set transcoding profile for specified recording
> st - print profile statistics
> t - print server time
> tf - transcode specified file
> tl - read list of videos to transcode from file
> td - transcode all videos in directory
> u - force update of database with recordings
> v - print version
> vc <n> - print information on TV-Card <n>
> x - view database (in XML format) with recordings
> z - display all settings from ini-file
> ! <n> - cancel ongoing recording
> Type h <cmd> for syntax of each command
>
> TECHNICAL INFORMATION
> ======================
>
> 'tvpvrd' is a threaded (pthreads) GNU-Linux daemon consisting of ~13k LOC C-
code
> with GNU C-source extensions. It has been written in a traditional Unix daemon
> style with a heavy focus on stability, memory usage minimization and safety
from
> malicious users.
>
> The build structure is a traditonal autoconf/automake which should make it
easy
> to compile and install.
>
> The source code has been manually and programatically checked for possible
> memory leaks or safety issues by the means of static code analyzers and v1.2.5
> is to date believed to have no major vulnerabilities or memory issues.
>
> Happy Recording!
> Johan
>
>
> _______________________________________________
> ivtv-users mailing list
> ivtv-users@ivtvdriver.org
> http://ivtvdriver.org/mailman/listinfo/ivtv-users
>