Could I Run a TV Station on Linux? 321
JesusQuintana asks: "I'm working with a low-power television station to update their playback system. Currently they're using tape and I've been tasked to move them to computerized playback (MPEG-2, etc.) There are proprietary solutions (very expensive) and there are companies that bundle software with Windows and standard x86 hardware. Overall, they are generally unimpressive and won't sell the software without bundling it with their own hardware. (They won't let us buy our own storage.) We have the expertise to build our own infrastructure (NAS, redundancy, etc.), but really just need the equivalent of iTunes for high quality video. There are lots of other pieces needed to complete the work-flow (such as encoding the media), which could be accomplished on Mac or Windows or even Linux. But what about playback? We need something that will play back these files at their scheduled times (perhaps scheduling cron jobs to change playlists) to broadcast quality hardware (SDI or YUV video). Could we run a TV station on Linux?"
answer (Score:4, Funny)
Re:answer (Score:5, Funny)
KFG
Re:answer Yes it been done (Score:2, Informative)
Re: (Score:3, Informative)
No love of their backtimer (understatement), and they have a very limited api that they are willing to publish
for those lurking:
Your BIG issues are going to be "Hard Hits" (particularly if you are an affliate)
Hard Hits are the timing of commercials
Re: (Score:2, Informative)
My webservers when I ran them for an ISP didn't get a reboot, let alone a new kernel install for 6-12 months at a time.
My issue wouldn't be stability (Score:5, Insightful)
Well, I've never run Linux for "years" but I'll share my experiences.
I think in the end it is about setting up any computer system to do the job it is designed for in a way that will continue until hardware wears out or power dies. Kernel patches and Security Updates are the exceptions. Windows has more critical patches but probably doesn't affect me as much as a lot of people, since I pair down my servers to not run software they don't need. For stability I usually use an enterprise system with security updates enabled which translates to almost never needing to reboot for security updates. Almost every security update is about software, not kernels in Windows, Unix, xBSD and Linux as long as you start out with a stable kernel.
Cliff probably would be well served by whatever OS he chooses as long as it supports the choice of software well. The trick will be finding software that serves the purpose well. My approach is to see first if there is OSS that meets the need well and then to look at commercial options if not or if they offer something that offers enough service or time savers to offset the cost. I think that the question that Cliff needs to be asking isn't about the OS but rather about what OSS software is out there for specific tasks and how it compares to propritary offerings.
Of course you can (Score:5, Funny)
Re: (Score:3, Insightful)
Seriously, how much could the proprietary vendor's storage cost that you think it will be cheaper in the long run to string together dozens of programs not meant for the job so as to let you build your own IDE NAS. How much is the constant redevelopment going to cost when you find piece after piece not quite right for the task? How much is support and downtime going to cost?
If the options are rolling your own software system from scratch and buying a
Program in APL (Score:5, Funny)
Re: (Score:2, Funny)
... and its OSS..... (Score:5, Funny)
For instance, you could start with, say GNU/make. Now that is a pretty handy chunk of software but it sadly lacks video playing facilities. You can freely download the source code, spend a few evenings writing the video playback code you need and you're done. And it won't cost you a cent!
Re: (Score:3, Insightful)
Re: (Score:2)
HowTo (Score:5, Funny)
Re:HowTo (Score:5, Funny)
Re:HowTo (Score:4, Funny)
Re: (Score:2)
Mplayer (Score:3, Informative)
Re: (Score:2)
Mplayer is not only a fantastic player, but a nice encoder too.
It does it all, and is very simple. Being a cmdline program makes it perfect for a server.
Re: (Score:2)
Re:Mplayer (Score:4, Informative)
Re: (Score:3, Informative)
Is it frame accurate? If something is to go to air at "midnight" you have to hit it within 1/30th of a second. You cant afford one frame-time error. Ever.
People have mentioned failover. Probbaly overkill as it's really really expensive to get right and the premise is you have a human in the booth than can cut to a "we're experiencing technical difficulties" page, err screen.
Disclaimer: I used to work at Sony and developed the CBC's dubreel
Video Lan Project (Score:5, Informative)
VLC [videolan.org]
Re:Video Lan Project (Score:5, Informative)
VLC has the ability to be controlled from multiple different types of clients/interfaces. There is a command line client (perfect for cron jobs), GUI client, and several network interfaces that would allow you to control it over the network (so you could, for example, roll your own easy-to-use scheduling program, and have the scheduling program control VLC over the network).
However, I'm not entirely sure about VLC being able to playback to special broadcast hardware, but it wouldn't surprise me if there is a way to get it to work.
Re:Video Lan Project (Score:5, Informative)
Re:Video Lan Project (Score:5, Interesting)
Re:Video Lan Project (Score:5, Informative)
I wrote a long response to this, but screwed up and hit command-Q. I won't retype all of that, but here's a much more concise version.
The things you need are a scheduler (to determine which commercials air when), a program format spec file (to tell where in a program file the actual video begins and ends so you don't end up unnecessarily airing several seconds of black as you might if you just paused the playback of a TV show), and a mechanism for crossfading the audio between spots to handle the case where people run it right up to the wire. You need a switcher for the video---the ability to quickly change from one foreground full-screen video window to another without any glitching. This is a lot harder than it sounds. Finally, you need a player that can start pretty much instantaneously and without glitch in the middle of a program. I haven't found that to be true of VLC at all in my experience, but maybe it has improved a lot in the last few months....
For a possible controller UI, you might check out SongCue on SourceForge. I designed it for radio automation, but combine that UI with a preview pane above each controller and show a still frame from 5 seconds into a segment, and you have a UI that would work pretty well for what you're doing, too. Maybe even show live video in the preview panes during playback. (I wouldn't recommend the code from SongCue, though, as it's pretty much raw Xlib, not for the faint of heart.)
If I were writing such a thing, I'd start with a Mac OS X (10.4 Server) box. Xsan provides a supported mechanism for handling your storage needs. QTKit can do your playback, and Quartz Composer should make switching the foreground full screen movie pretty easy. The only potential snag I can think of would be that if you aren't careful, you could mouse over onto the live output signal, but all things considered, it's probably the easiest way to build an app that does what you want, IMHO.
Mmm... not really what you want to do. (Score:3, Informative)
This is what you need:
*) At least one seperate video card monitor output per video channel (Matrox Gxxx, NVidia MVS 440)
*) A decent scan-line converter to convert and interlace the VGA into NTSC (one per sim. channel)
*) Ideally, a programmable, matrixed video switch.
With a decent 3U server you can stuff in a few PCI or PCIe cards and handle 4-7 channels simultaneously on one box without framed
Re: (Score:3, Informative)
You need a switcher for the video---the ability to quickly change from one foreground full-screen video window to another without any glitching. This is a lot harder than it sounds.
Yes, it's hard -- but I don't think it's really necessary.
As long as all of your video streams are digital, you just need to make sure that you're feeding a single, continuous stream of video to the playback engine, and then change the stream you're feeding in, stopping the previous stream after the completion of a frame, th
vlc, mpeg4ip, etc. (Score:2)
Yes (Score:5, Informative)
MySQL database that indexes all content.
Also have a table for the schedule.
Batch job queues up content. As one piece of content finishes, next piece is queued up and plays.
All of this can be made fairly redundant without too much effort. Setting up your schedule can be point & click.
The real work will be if you want to make it fancier to give the advertising department more direct control over what ads run when, as opposed to having the programming manager schedule all of that.
All of this can pretty easily give you a very detailed automated log of what content played when, when you gave your station ID's, what ads played, etc.
Pick one good well known scripting language, learn it well, and use it. I'm not going to enter the holy war of telling you which one to use.
MySQL can be replaced with PostgreSQL if you prefer. Doesn't matter which. You're not keeping your content in the database, just an index of where to find the content on the filesystem plus the broadcast schedule.
The REAL work in all of this is making it resilient so you don't hit dead air. Redundant systems with automated failover, etc. And the cost of entry may be high, but I can't recommend highly enough that your content be stored on a redundant SAN or NAS infrastructure. Most of my long nights repairing things have dealt with failed hard disks. A decent SAN or NAS will allow you to rest easily at night.
Additionally a system like this will allow you to have a much more intelligent content-rich web site.
And I'm also sure there are people at Google who would love to talk to you about your ad delivery system if you put something like this in place. You would like to increase your ad revenue, wouldn't you? Google is working on breaking into this space in a big way. It would be worth making a few calls.
The other challenge (Score:4, Insightful)
Re:The other challenge (Score:5, Funny)
They can set it up in google calendar and the scripts can read the ical feed.
Re: (Score:3, Interesting)
Dear Slashdot (Score:5, Funny)
Thanks!
(I kid! I kid!)
Re: (Score:2)
Re: (Score:2)
I've been wondering the same thing (Score:2, Offtopic)
The real question in doing a TV station, is how to get a license for the LPTV station? THe FCC website talks about having to check the website for when the application window is active, and they only allow license applications when they think it is conve
Re: (Score:2)
run linux...? (Score:2)
Linux in the corporate environment (Score:2)
Please do let us a know what your final solution is.
Given that... (Score:5, Insightful)
Not an expert (Score:2)
I did find this how to on TV output
http://ivtv.writeme.ch/tiki-index.php?page=TvOutHo wto [writeme.ch]
I have no idea if these cards are broadcast quality.
The good thing is you can try out a some solutions without spending a lot of money.
I could be wrong but isn't this going to be a little more complex than just running a play list?
How many playback systems would you use? What kind of switch? What about audio output?
You will also need to worry about the video an
MythTV is great, but doesn't fit this purpose. (Score:2)
I can imagine, however, that most of it (and supporting libraries/packages) is already there for managing the media, and varied hardware. It even has the multiple backend/headend support, which would be ideal for this type of application.
I can imagin
little software available for linux. (Score:2, Informative)
However, you should check out Apple's final cut pro. I've seen it used for small-medium sized TV stations, and it's not too hard to use. I like it.
http://www.apple.com/finalcutstudio/ [apple.com]
http://www.apple.com/uk/pro/profiles/tourdefrance/ [apple.com]
Re: (Score:2)
RTFQ:
"I've been tasked to move them to computerized playback"
Not compositing, editing, and formatting; failsafe, scheduled playback. F
Re: (Score:2)
Re:little software available for linux. (Score:5, Funny)
Mod me up informative!
Do they really need it? (Score:5, Insightful)
Sometimes I have visions of throwing a load of technology at a problem, and then leaving someone with a solution they can't run, maintain, or understand. And then they've leaped back even further in technology when it all becomes inoperative.
The thing you have to ask yourself, is do they really need it, and can they be updated to it without damaging them in the long run?
[ No, I'm not a complete luddite, I just wonder if this is a step they might actually be ready to take ]
Cheers
Re: (Score:2, Interesting)
In working for a doctors office, I was all ready to set them up with a better switch (they are running netgear now) and a couple other high tech solutions... Until I thought about it a bit more, and realized that they are fine.
What might be a better idea is to leave them where they are, and pick away at a new solution that might involve MPEG and CRON and linux stuff, but only for the day that all of the stuff they are using now is broke.
Taking your time might also mean some other solu
Re:Do they really need it? (Score:4, Insightful)
Actually, I took the submission to indicate that a low-power TV station which was already broadcasting was trying to modernize their infrastructure, not build one from scratch.
I was just questioning if COTS components running Linux were what an already-running TV station actually needs. At a minimum, you need to guarantee they can go back to the old system of switching tapes manually. On the other end, you could leave them absolutely dead in the water if things go awry.
A TV station is presumably more complex than setting up a myth TV machine.
Cheers
NTSC Signal (Score:5, Insightful)
Also, let's not forget that he needs to future-proof his solution for digital transmissions. While there's tons of NTSC equipment on the market, what does one use to broadcast in digital? Presumably, he'll need encoders that are well suited to broadcast technology and an advanced digital to analog signal coverter at a minimum. He'll also need to understand whether he will have to support SDTV broadcasts, HDTV broadcasts, or both. If it's both, does his software support anamorphic encoding? If not, what is the hit from multi-encoding?
I'm barely even scratching the surface of the problems he's going to have. Right now, Linux has media software intended for home use. Setting things up for a professional television station is a whole other ball of wax that probably hasn't been considered yet.
Re: (Score:3, Funny)
He said "low-power tv station," so as long as he can either tell that the local used car dealer is still bald or make out the nipple on the feed from the camera he put in his hot neighbor's bookcase, he's probably good.
Re: (Score:2)
Re: (Score:2)
This comes back to the problems he's going to have. He needs his MPEG source to be interlaced as well, OR he can use a 30fps deinterlaced source that gets interlaced in real time. Neither option is very appealing, and most people don't even understand what that entails. If he creates the signal incorrectly, all you're going to get on the screen (presuming you get anything) is a blurry mush of interlacing ar
Sure you can w/ a scan converter (Score:3, Informative)
Re:Sure you can w/ a scan converter (Score:5, Informative)
Trans. coding. Problems.
Just because you can sample an NTSC signal off of VGA, doesn't mean that it will produce the results you want. The equipment you linked to is designed to take a *clean* computer graphics signal, and then resample that for NTSC broadcast. Which makes it useful for stuff like the Superbowl helmets colliding, or digitally filmed/transferred television programs.
This fellow needs to take an interlaced signal from an old tape, encode that to MPEG-2 in an interlaced format (preferrably with no detectable quality loss), then reencode the signal as an interlaced NTSC signal for broadcast. The best way to do that is to keep the signal cohesive at all three steps. If you start transcoding the signal into progressive, then back into interlaced, you're going to get a significant drop in quality.
Re: (Score:2)
Uh huh
Tell that to my first VGA monitor, it loved interlaced video so much I had to get glasses...
Re: (Score:2)
Also, let's not forget that he needs to future-proof his solution for digital transmissions. While there's tons of NTSC equipment on the market, what does one use to broadcast in digital?
I'm no expert in TV broadcasting, but my guess is this would be most easily accomplished by some black box that converts the NTSC broadcast signal into a digital one. Sure you'd only get 480p at best, but remember this is a LOW POWER station. Just getting a digital signal out is probbably more than anyone expects.
Converti
Re: (Score:3, Informative)
Bingo... NTSC broadcast quality.
dont believe me? most of the weather channel boxes and TV guide boxed in CATV headends as well as the locall access channels used to use them and many still do.
linux compatable and works great. problem is that you haveto begin and end EVERY video clip with 1 frame of black or you get wierd artifacting.
using mplayer with it and you can do even more.
Hardest part is to generate a system to insert ad's and do the verification of playback for billin
DTV, HD radio, forced tech adoption and choice (Score:3, Interesting)
And HD radio, gets you more quality (signal quality, not content quality alas, the current signals sound fine, except the music is sorry), but if they hadn't approved it, and allowed more stations, we'd have more choice.
Tuners couldn't handle stations less that 3 slots apart. If 97.1 is a station, 97.3 and 97.5 couldn't be and 97.7 would be the next open one. Then it was down to 2 slots. 97.1 a
Internet TV!!! (Score:3, Interesting)
Long story short I implemented this in 2002 at the University at Albany, SUNY [albany.edu] with a friend.
It requires a dedicated server and a dedicated encoder.
What will make the process easier is going all digital on your content development.
It currently has a barebones site: Albany Student Television [albany.edu]
You can use any number of devices to keep the content automated and going from cron to java scripts to shell scripts and what have you. The challenge is figuring out what you want to do and how you want it managed?
Since 2002 there is a lot more technology out there. Our solution at the time was to use windows explorer with embedded media playing. Two draw backs were an occasional refresh logo in the top, and IE's tendency to be unstable.
Why not? (Score:5, Informative)
Get someone from an OSS video project (Score:2)
Otherwise I recommend getting someone from an OSS video project (mplayer, VLC, whatever) to come and do some work on the gaps you have. Non-compression playback would be one I'd guess. Aside from that it's just about CPU speed and data throughput. Which todays PCs are sufficient for.
Certainly! Just write it yourself! (Score:2)
For the short term, throw together a couple DVD changers and a linux-based controller. (At least two changers so the 'next' program is ready to roll the instant the 'last' one finishes.)
That'll give you time to look into file-based playback options (Mplayer, VLC, dedicated MPEG2 card). Tivo/Media Center/MythTV might actually be useful here; they manage a library of programs for you plus have a playback engine; you just need a plugi
Based on What I See of BBC America... (Score:5, Interesting)
Re: (Score:2)
What the hell?
Re: (Score:2)
Re: (Score:3, Funny)
Re: (Score:2)
The Video Keg! (Score:2)
Short answer: Yes. Long answer... (Score:5, Informative)
If you're running off remote disks, then the NAS MUST be capable of greater output than is required to transmit, as you absolutely must allow for dropped packets and other glitches that force a retransmit. If there's not enough time to fix the problem, then you're going to transmit a picture with noise.
ALWAYS work ahead and cache pre-processed frames. There should be enough processed frames (encoded, digested and all ready to blast to the mast) that in the event of a failover (you DO have failover, don't you?
Your NAS should use a striped RAID array (although each stripe may also be mirrored). Striping is essential in keeping the data flowing fast, and your hardware should be geared to maximizing that throughput. Let the realtime handle the scheduling.
Don't bother using cron, or some other such userland service to start things. Exploit the FIFO queue. It won't run the next thing in the queue until the previous thing is finished. So long as you guarantee the stop time, you implicitly guarantee the next start time. You can then use cron to kill programs that overrun.
Re: (Score:3, Interesting)
Possible solution (Score:2)
In playing around with various video sources, I've come across a couple of very good, high quality pieces of software that are able to transcode video from almost any source. If you do not need client-side playback and just want to pipe re-coded a/v streams to a tv-out device, consider using transcode:
http://www.transcoding.org/cgi-bin/transcode [transcoding.org]
I've never heard of SDI, but transcode's documentation states that it
Depends (Score:5, Informative)
Do you require Frame Accurate playback? The reason that the profesional solutions you briefly mentioned are expensive and require their own storage are that they Garuntee frame accurate playback, no droped frames and everything else needed to playback everything flawlessly. One thing to remember about that, though. So long as you only keep the current days video on the server, you can stick with a video server with under 1/4 terrabyte of storage space (12Mbps vid+aud=~128GB) and have a seperate NAS for the next days video that just gets moved onto the video server throughout the day as what has already been played gets deleted.
The main problem with most consumer video playback I have seen is that it is not frame accurate. Even on a decent computer, most video programs don't run at exactly the framerate of the video using consumer playback programs. Also, unlike the profesional hardware, the consumer programs don't pre-buffer the next file for playback so that there is a delay between the end of one file and the beginning of the next.
We're also going to need to know what kind of outputs you want. Analog? What kind? SDI? HD-SDI What does your video router handle? Theoretically you could use a VGA/DVI output to a VGA/DVI-SDI adapter, if that's what you use. You'd also need to run it through a frame sync, but that's pretty standard for most stations anyway. Most likely you will not want to use the video card ouput of a PC, VGA/DVI/S-Video due to the need for then having a consumer program play it out.
For proffesional level playout you're going to want a card with hardware playback. SkyMicro and ViewCast make some playback cards that will run under linux that it looks like you could use. I'm just listing them as an example that showed up after a quick googling. These capture/playback cards are essentially going to become the heart of your system if you want something resembling a cheap profesional system.
So, as I said. It depends on how high end a system you want. However, it looks like it is possible to get a decent one going. One thing to remember, and I state it as habit, trial test whatever cards you are looking at before buying. Some of these cards can run to $2000 a piece and you're probably going to want redundancy.
Depends on your skill, and what you need to do (Score:2)
Commercials are a complication. Inserting them into the middle of a show would require that you either:
a) Have your scheduler aware of the "break" times in the sh
Isn't this a function of your hardware? (Score:2)
Or is that your qu
Real broadcast software for Linux (Score:5, Informative)
That has support for for example the Bluefish444 SDI cards, and do playout of real broadcast formats, such as DVCPRO, but also regular MPEG formats.
It also provides ShotCut, a really competent Non-linear editor, that can send edited clips directly to playout.
I know it is in use in one of Indias largest broadcasters, and they transmit to millions of viewers. So it would definitely be good enough for a small station like the one you are talking about.
Re:Real broadcast software for Linux (Score:5, Informative)
It depends .... (Score:2)
You should already have the following defined:
1) Playback/Recording video resolution required (Standard broadcast resolution, High Definition (720i, 1040i,
2) Playback/Recording video quality required (What level of compression is considered acceptable?)
3) Audio playback/recording requirements (Number/quality of audio channels)
4) Archival requirements:
You've got this all wrong! (Score:3, Funny)
Go the nostalgic route (Score:2)
I designed something similar.... (Score:3, Interesting)
This is the standard DIY/buy question (Score:2)
Do you want to pay the big bucks, or write code from scratch? The vendors charging the big $$ hope you're forced to buy. Of course, we on
You can run everything! (Score:2)
If you're starting absolutely fresh (no olden software that has to be migrated) I would definitely start with Linux or Mac OS. I would use Mac OS because of the relatively cheap hardware and stability that comes with them and of course the ease of install and management. I would choose Linux as the prim
Deltacast SDI I/O for 2.4 and 2.6 kernels (Score:2)
Disclaimer: I haven't used these, but a quick google turned them up.
Cardinal Systems Head End Linux (Score:2)
How about part linux? (Score:3, Insightful)
I'd stop looking at 1 platform solutions.
Why not consider perhaps Linux for part of the solution? Perhaps Linux based storage system, and maybe Mac / Windows workstations.
When you go 1 platform, no matter which, your limited. When you use standards between the platforms you gain a lot more. That's why you go with SMB over AppleShare for example.
Don't limit yourself to a platform. Just use things that work well together. There aren't many companies that go 100% 1 platform. Especially in media.
some advice (Score:2)
Re: (Score:2)
Do you worry about reporting?
Redundancy?
If this is for a PEG (public / educational / goverment) access channel, you can't go down without running the risk of losing valuable barganing ground at the next cable contract renewal...
Re: (Score:2, Informative)
Re: (Score:2)
Re:Just a thought... (Score:4, Interesting)
Basically turning it into what TiVo had once advertised: controlling my own TV network.
Unfortunately I've been happily employed on other coding tasks and haven't had the time even to put together a system for basic recording tasks let alone learn the source tree of MythTV to gauge how feasible it would be to adapt it for 24-hour scripted network control.
Re:Just a thought... YOU CAN DO IT! (well, kinda) (Score:3, Insightful)
Note that you should have some sort of live switcher for master control upstream of the server, with a camera pointed at a logo (and possibly a live set) for backup.
Re: (Score:2, Insightful)
Re:In for a penny, out for a pound. (Score:4, Interesting)
Anyway, back to the original question. It's not stated whether the output is analog or digital. If digital, then the transport mux and program tables and all the other DVB mandatory content has to be correctly generated. Encoding high quality complient MPEG-2 on the fly requires some pretty serious hardware support in the professional encoders, so there is no way this could be done with a PC - sure you can encode crappy quality MPEG at low resolutions, but trying to produce professional quality video that makes the most out of your bitrate really isn't going to happen (good motion compensation is non-trivial, in a "You may think it's a long way down the road to the chemist, but that's just peanuts to quality motion compensation!" kind of way).
Of course, you can encode offline and store the transport streams on disk, but then when you mux the output with all the other DVB content, you've got to have consistent GOP structures, PCRs (Program Clock References), presentation time stamps, time codes etc, which is immensely difficult to achieve, especially if you're planning on splicing in adverts and other content (hint - this is one reason why satellite and cable broadcasters encode live from SDI inputs).
If you're trying to replace a tape archive (rather than "Run a TV Station on Linux" - which is a whole lot more, as discussed above), then perhaps you can MPEG encode the videos offline with a good quality software encoder and play it back raw (SDI/YUV) to the head-end bits that do the final encoding/modulating, but even then, getting it all synchronised correctly is likely to be non-trivial (you can't just produce your SDI frames willy-nilly you know - it's got to be synced to the rest of the station, just like the original tape system must have been - possibly off a "black and burst" generator).
Really, I think you're in for a very tough time trying to do this with Linux and OSS, unless you're willing to accept very low quality results that might not integrate with a professional broadcast system.
But, good luck nonetheless.
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Re: (Score:2, Funny)