A fine atsc library and some related tools.
Here in America, there's a quite nice over-the-air standard for dtv called ATSC, but you probably already knew this.
ATSC is entirely compatible with DVB (the European standard), except for the Electronic Program Guide (afaik).
All those nice dvb tools? Useless, if you're asking the question, what's on TV.
For all you programmers out there, I've been working for quite a while in my spare time on this thing I call "libdtv" for fun - it's a horrible name, but it works. Inside are a ton of useful functions that can help you get started with programming for ATSC streams in no time. That's right, I did all the hard parts, you get to do the fun stuff!
Along with this "libdtv", I'm also putting up two sample programs that I've found useful:
- "justfox": I wrote this because my local fox station, WNYW, has the local My Network station, WWOR, on its second subchannel, and vice versa. getatsc, a nice program by Jack Kelliher, works well for what it is, but if you want to watch a particular station, it's useless - getatsc gets the whole 19.3mbps channel, and playing it becomes a matter of which channel's packets show up first. justfox lets you choose a channel and a subchannel, and gets you just the main video and audio streams (if anyone bothers, I could add different audio streams and subtitles and such) for that subchannel. Some programs don't play it correctly, but I've always had luck with mplayer. Usages: justfox <rf channel> <subchannel>. rf channel is the physical channel (based on frequency) on which the channel is sitting - scan for this (btw, I'll make a scan tool if anyone wants it), and subchannel is rough - it's not the real subchannel number, it's where the subchannel is in the stream (for example, WNBC has 4.1, 4.2 and 4.4 - you use justfox 28 3 to get 4.4). MAKE SURE you touch delme in your current directory first (because I'm lazy ;) ). You run the program, unless you uncomment some lines, it doesn't tell you much, but while it's (silently) running, it's dumping to a file named delme. mplayer this file, and watch some tv.
- "simpguide": What's on the TV right now? Simply run simpguide <rf channel> <subchannel> to find out. rf channel is the same as before, but this time, subchannel refers to the "actual" subchannel - for WNBC 4.4 you'd use simpguide 28 4. This will probably take a bit of time to get all the necessary information, and sometimes simply doesn't work. Give it some patience, and I hope it'll help you out in a few cases.
That's it for now, I hope someone takes me up on the opportunity to mess around with the code. In particular, I'd really like to see an xmltv interface using this - I'm sure it's possible, but I have no patience for perl.
The code:
libdtv.c and libdtv.h: the actually "library".
justfox.c: compile with gcc -o justfox justfox.c libdtv.c
simpguide.c: compile with gcc -o simpguide simpguide.c libdtv.c