From the VDR's INSTALL file:
"Executing commands before and after a recording: ------------------------------------------------
You can use the '-r' option to define a program or script that gets called before and after a recording is performed, and after an editing process has finished.
The program will be called with two string parameters. The first parameter is one of
before if this is *before* a recording starts after if this is *after* a recording has finished edited if this is after a recording has been *edited*
and the second parameter contains the full name of the recording's directory (which may not yet exists at that moment in the "before" case). In the "edited" case it will be the name of the edited version.
Within this program you can do anything you would like to do before and/or after a recording or after an editing process. However, the program must return as soon as possible, because otherwise it will block further execution of VDR. Be especially careful to make sure the program returns before the watchdog timeout you may have set up with the '-w' option! If the operation you want to perform will take longer, you will have to run it as a background job. "
On 2010.10.14. 13:01, Arturo Martinez wrote:
I have the following bash script: chinapod.sh
#!/bin/sh
/usr/bin/ffmpeg -i $1 -s 320x240 -r 23.97 -vcodec wmv2 -acodec wmav2 -ab 160k ${1%.*}.asf
From a bash prompt I run chinapod 000001.ts and it converts the recording happily to the desired format.
Could somebody tell me how could I implement this within vdr, so I select 'Commands' and then the file to be converted and either it calls the bash script to do the job or otherwise converts it using the same parameters?
I am using vdr 1.7.15
vdr mailing list vdr@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr