[mythtv] Re: Using an external program for scheduled recordings

Joe Venzon mythtv-dev@snowman.net
Mon Jan 13 10:31:19 EST 2003

Thanks for the response Erik, it seems most of the people that use 
MythTV would have no use for what I want to do with it.  But, thanks to 
spending my entire weeking slashing and burning through the MythTV 0.7 
code, I did manage to get exactly what I want.  It actually wasn't too 
hard... I just had to change a lot of tv.cpp (and bits various other 
files) so that when MythTV decided it wanted to start a recording, it 
wouldn't open the V4L drivers and start up its NUV buffers, but rather 
execute my code -- I just had it fork and exec v4lctl to set the input 
and channel on the card, and then fork and exec divx4rec (the divx4 
recording binary from the nvtv project) to do the recording in a 
seperate process.  There were a lot of little bugs that I had to work 
out, I ended up modifying the behaviour of nvtv to not constantly output 
its capture status (for the sake of console cleanliness), I broke 
MythTV's ability to play recorded programs inside the frontend, and I 
probably (I haven't actually tried) also broke MythTV's live TV watching 

The result, however, is great (for me, anyway -- hooray for open 
source!).  I mainly use the MythWeb interface to schedule recordings 
(which I spruced up a bit and added some basic abilities to delete 
programs and list already recorded programs -- all of that jazz), and 
then viola -- the modified MythTV correctly does all of the recording 
(on both of my capture cards) and I end up with avi's (which I made have 
more readable names that include the program's title) in my /vid folder 
(which is samba shared so that I can view videos directly off of the 
server from other computers, whether they be windows or linux) with divx 
compressed video and mp3 compressed audio .

Anyway, I think it's pretty cool, and if anyone else is interested (from 
erik's response, though, it sounds like no one would be) in getting my 
modified source, feel free to send e-mail to me or to the list in 
response to this and I'll put it somewhere on my site.  It's actually a 
pretty poorly done hack, and the code I added is fairly messy (truly a 
shame, given how well written the MythTV source is) and would have to be 
slightly modified if you wanted to use different options for some 
programs (I hardcoded a few things in there)... but (for me, anyway) 
it's functional.

Joe Venzon

More information about the mythtv-dev mailing list