Here is the wrapper for WinTVCap_GUI to record in VLC, if anyone else needs it. Written in autohotkey, so Windows only.
Instruction:
1. Set up the channels in tv-browser + WinTVCap_GUI as usual so that when the user schedules in tv-browser then WinTVCap_GUI is passed a command that includes filename, channel, starttime, duration and so on.
2. install VLC (
http://www.videolan.org/vlc/ )
3. in WinTVCap_GUI: options > applications edit > add:
name: vlc_ahk_wintvcap
path: [some folder]\vlc_ahk.exe
parameters: "%channel%_____%file%_____%seconds%"
4. save the code below to as plain text file named vlc_ahk_wintvcap.ahk in [some folder] (same folder as above!)
5. open a new textfile in notepad.
On line 1 put the path to VLC.
On line 2 put the folder to save recordings in.
On line 3,4,5... put each TV channels frequency, program number and (optionally) channel name. Separate them with tabs (must use tabs, not press space multiple times). Put them in the same order as in WinTVCap_GUI !
Example:
C:\Program Files\VideoLAN\VLC\vlc.exe
C:\my recordings\
522000 5840 SVT1
522000 5640 SVT2
Frequency and program values varies with your geographical location. I found them by installing another TV-recording program, ProgDVB, and doing a channel scan. The values were then visible on each channels properties. But there's likely some other easier way to get them.
Save the notepad file to [some folder] as vlc_ahk_wintvcap.ini
6. install autohotkey. Then right click vlc_ahk_wintvcap.ahk and choose compile. You then get vlc_ahk_wintvcap.exe . You can now de-install autohotkey if you
wish.
end of instruction
Code: Alles auswählen
#singleinstance, force
#Persistent
;-- expected command line input: %channel%_____%file%_____%seconds%
StringReplace, 1, 1, _____,£, All
StringSplit, xx, 1,£
xx2 := RegExReplace(xx2, "\d\d\d\d_\d\d_\d\d_\d\d_\d\d_\d\d_(.*)", "$1_"A_YYYY A_MM A_DD "_" A_Hour A_Min)
;-- change WinTVCap defaul no-name file name format to a shorter one
Loop, Read, %A_Scriptdir%\vlc_ahk_wintvcap.ini
{
if A_index = 1
vlcpath = %A_LoopReadLine%
if A_index = 2
savefolder = %A_LoopReadLine%
if A_index < 3
continue
StringSplit, y, A_LoopReadLine,%A_Tab%
indexvar := A_index - 2
c%indexvar% = :dvb-frequency=%y1% :dvb-bandwidth=-1 :program=%y2%
}
ch := c%xx1%
; ---- check variables ----
ifnotexist %vlcpath%
{
msgbox, error: set vlcpath on line 1 in vlc_ahk_wintvcap.ini`n`nVLC path = %vlcpath%`nsavefolder = %savefolder%
exitapp
}
ifnotexist %savefolder%
{
msgbox, error: set savefolder on line 2 in vlc_ahk_wintvcap.ini`n`nVLC path = %vlcpath%`nsavefolder = %savefolder%
exitapp
}
if InStr(savefolder, "\") != StrLen(savefolder) ;-- if path end backslash missing, add it
savefolder = %savefolder%\
if xx2 =
xx2 := A_now
if xx1 =
{
msgbox, error: no channel number!
exitapp
}
runwait "%vlcpath%" vlc://quit ;-- shut down previous
run, "%vlcpath%" dvb-t:// %ch% :sout=#duplicate{dst=std{access=file`,mux=ps`,dst="%savefolder%%xx2%.mpg"}} , , Min, pidvar
WinWait ahk_pid %pidvar%
if xx3 != ;-- If parameters included duration in seconds, then start a timer. Else record until manual stop
if xx3 != `%seconds`%
SetTimer, rectimer, 1000
return
rectimer:
IfWinNotExist, ahk_pid %pidvar%
exitapp
xcount += 1
if xcount < %xx3%
return
run "%vlcpath%" vlc://quit ;-- close program, WinTVCap autocloses thereafter
exitapp
return