Notes On The Future of Video on Linux 126
Dina's Dream points out two interesting articles currently running on LinuxPower, and linked from Gnotices (GNOME news site) as well. "The first article is a really good
summary of the current state of affairs of video under Linux and the direction we should take. Questions are bounced back between a few very knowledgeable people, including
GStreamer developers, SGI people and Alan Cox. The second article is
a set of lessons learned by Chris Pirazzi while working at SGI. Chris was involved in a lot of Video API programming at Silicon Graphics, and raises a few very good points based on his experience. All people even remotely working on video drivers or software should read these points and take them to heart."
Awesome (Score:1, Interesting)
I love this philosophy. Cut the crap, focus
on what's important, and you end up with the
right facilities to build higher-layer stuff
on top of later.
DivX ;-) (Score:2, Offtopic)
The #1 problem is ease of software installation and configuration. Sure rpms are great, until you get some that depend on something else. Which depends on somethign else, which dependson the rpm you were trying to install in the first place. Not to mention when you try to install something from source, and it wont compile. I don't have the time or the patience to figure out what is wrong with someone else's code.
I know how to code yes. But when I donwload a DivX player and it fails to make, make install. I have no clue how to fix it. That's why I'm downloading a DivX player, and not writing my own. So far Tribes 2 server, and Netscape/Mozilla are the only linux programs that I've seen (there are probably more) that have windows style installations. This means it can be done. Do it more often. Like all the time. Then maybe I wont have to reboot my computer to watch movies.
Re:DivX ;-) (Score:1)
Re:DivX ;-) (Score:1)
Re:DivX ;-) (Score:5, Informative)
Something like VP3.2 holds more promise (and hey I got the lib to actually -compile- on a non windows/mac box two days ago)
Now combine VP3.2 video with Ogg audio and you have a credible media format. Add xhtml navigation and you have something really cool
Re:DivX ;-) (Score:3, Interesting)
I notice their license is derived from the Mozilla Public License 1.1
Can anyone comment on whether that is good or bad news? eg. will the gstreamer folks be able to include vp3.2 codec support and distribute it as a plugin?
Grave licensing issue with VP3 (Score:2, Insightful)
The problem lies herein [vp3.com]:
(e) Notwithstanding Sections 2.1 (a), (b), and (c) above, no license
is granted to You, under any intellectual property rights including patent
rights, to modify the code in such a way as to create or accept data that is
incompatible with data produced or accepted by the Original Code. By way of
example but not limitation, a Modification that adds support for other
compression data such as MPEG-1 or MPEG-2 would be permissible, but only if the
resulting Larger Work continues to support playback of VP3.2 data.
Modifications that provide only playback or encode support are also permissible.
However, a Modification that adds support for encoding or playback of any non-
VP3.2 compatible files or bitstreams without complementary support for VP3.2
encoding or playback would not be permissible, and no license is granted for
such Modification(s).
Basically, this is denying users the right to modify the source code to produce binaries that produce a stream incompatible with the original software. It may sound good to some, but I urge developers to think twice before releasing modifications or compiled versions of the VP3 codec because, even if unintended, a compiler bug or error in your modifications to the software could mean that the stream your modified VP3 codec produces is unintentionally incompatible with the VP3 specification, opening you to legal procedure from On2 Technologies, the proprietors of the codec.
The VP3 codec licensing terms are not only not Open Source, they are a threat to developers, contribuors and distributers of VP3 both in source code and compiled form. Please contact On2 Technologies and try to convince them to update their license to remove this dangerous clause, and spread the word to your friends!
Re:DivX ;-) (Score:2)
What they should do is give the patent to a conservancy, like collabnet's [collab.net] or the Knowledge Conservancy [cmu.edu].
Re:DivX ;-) (Score:1)
It's great people are donating all this time, but if Linux is ever to suceed on the desktop outside its niche audieneces, than this simple problem must be addressed. Plus in terms of downloading, I do not mind waiting for a large download with all the dependacies included, rather than searching the net like a lunatic just so I can get this app to work. By the time I eventually give up, I'm ready to go back to Windows.
Oh yeah - video editing on Linux would be fantastic. (waves wand - poof - there it is)
Re:DivX ;-) (Score:1)
Then you'd just end up in "DLL Hell". Each program would install it's own slightly customized version of a lib breaking another program which would in turn be broken by another install with it's own custom libs. Be carefull what you wish for. There's no easy answer. Besides, compiling a program yourself will yield better performance.
---
Extra! Extra! Read all about it [slashdot.org]! Slashdot editors censor dissenters [slashdot.org].
Re:DivX ;-) (Score:1, Troll)
Ok, don't get me wrong. I love linux just as much as everyone else here does, I use it all day long at work, by choice. But I must say that installing software, in general, is a pain in the ass. Am I blaming anyone? no. Is microsoft the answer? no. But they sure as hell do have the installation part down pat.
Re:DivX ;-) (Score:2, Informative)
IIRC, Win2k and recent installation generators partially avoid the DLL hell problem by encouraging applications to install their own DLLs in their own separate installation directory. This negates many of the advantages of DLLs.
DLL hell has been a genuine problem for a considerable time (>2 years), even if you haven't seen it in Win2k in the past 2 years. Try setting up a Win95 machine and install some old software if you are feeling masochistic!
rebooting to watch movies (Score:2, Funny)
I also reboot my computer to watch movies, but in the opposite direction.
On my computer, the only things I do is to play games (mainly quake3 and total annihilation) and watch movies and music.
I usally run windows, but when I want to watch a movie, I just can't face the crappy windows media player. (Yes, I tried others. bsplayer, microdvd, etc. no one satisfied me.)
Then I boot linux to watch it on MPlayer [mplayerhq.hu], by far the best player i have seen.
By the way, MPlayer is only avaiable as source code, but I never had any problem compiling it.
Re:rebooting to watch movies (Score:2)
Re:rebooting to watch movies (Score:2)
He is right: mplayer is great! (Score:1)
./configure [options]
make
make install
And on my matrox card I get hardware scaling and other good stuff.
Re:DivX ;-) (Score:3, Informative)
It contains non-free rpms for mandrake, installable with urpmi/rpmdrake.
Only mplayer is not available in binary rpm, just source.rpm.
PLF is actually built on a current cooker distro (cooker-mandrake-devel), but there is someone recompiling them against mdk 8.1.
Just try them.
Re:DivX ;-) (Score:2, Informative)
DivX for Linux is still in the development stage. There are no mature players, and until there are, it will not be super simple to install.
That being said, you should take a look at mplayer (see freshmeat.net). Mplayer has step by step instructions on how to compile and install avifile, libdvdread and other tools that come together to make a really great player. Yes, you do have to
Give it a try, it works.
Re:DivX ;-) (Score:1)
Ok, so it may take many long hours of work to get it to support your hardware, but then you can just apt-get install and get all the dependencies as well.
Or use one of many graphical frontends -- it beats the hell out of windows installation.
Re:DivX ;-) (Score:1)
However, I don't think we'd have such a vibrant open source scene without shared libraries like zlib and libjpeg.
If you are releasing a stable version of your code try to depend on as much as possible, the version of whatever libraries you need which came with the latest RedHat.
If people did this and RedHat had an extension to rpm...
`libpng not found, insert redhat cd 1 to install'
I think dependency problems would be much reduced.
Other than that, you want to live on the bleedin' edge, you're gonna have to do some work (or use Debian
Or we go XBox-like and statically link everything
Re:DivX ;-) (Score:3, Informative)
urpmi (in Mandrake) already does exactly what you request from rpm. It resolves all the dependencies and will either download the RPMS from an online source or ask you to insert your installation CDs. Hopefully Redhat will snarf it into their next distro. (That would actually be quite appropriate given how much Mandrake has snarfed from RedHat. Both distros would benefit from some cross-pollenation.)
Most video utilities apt-gettable from Freshrpms (Score:3, Informative)
Or you could just get apt-get and let it sort out the dependencies in your rpms for you automatically. The Freshrpms apt archive (for Red Hat 7.2) has packages for
And all you need to install them is type apt-get installl (whatever) to fetch the rpms, whatever dependencies they need to install, and install the packages.
Re:DivX ;-) (Score:1)
http://www.mplayerhq.hu/
It support *nearly all* video formats available today!
The Future Is Here for me already (Score:5, Informative)
Re:The Future Is Here for me already (Score:1, Redundant)
See http://cheema.com/vcr (Score:1)
I use NVrec/ffmpeg for recording and grab the TV guide data from tvguide.com.
I had hoped to release the software under GPL but now that I am working on a very related product at work, it may not be kosher with my employer.
Re:See http://cheema.com/vcr (Score:1)
Re:The Future Is Here for me already (Score:2)
Do you use the ADVC-100 for output to TV as well?
Thanks.
--dan
Re:The Future Is Here for me already (Score:1)
http://www.schirmacher.de/arne/dvgrab [schirmacher.de]
SSSCA (Score:4, Insightful)
Re:SSSCA (Score:2, Interesting)
If the SSSCA passes there won't be any linux. Not in the US anyway.
Re:SSSCA (Score:1)
What are they going to do, search the entire world to find and destroy machines/archives with linux video software? Because that's what it would take for there to be no "video on linux."
Complete MultiMedia Architecture (Score:3, Informative)
Quote from the web-page:
"The goal of this project is to design and implement a network-integrated multimedia infrastructure for Linux as well as other operating systems. Since many low-level parts of such a system already exist (like en-/decoders, de-/compression, multimedia networking APIs, CORBA, and others), our primary goal is the development of an architecture, which integrates these usually isolated modules. This unified architecture will offer a simple and easy to use interface for applications to integrate multimedia functionality. Therefore, it can be used as enabling technology for traditional multimedia applications, but also for ubiquitous computing and mobile computing.The result of our work will be made available as OpenSource."
- Jarman
Thin on details (Score:1)
off their architecture.
SDL? SDL. (Score:2, Informative)
Re:SDL? SDL. (Score:1, Informative)
SDL doesn't do video. It does still images, blitting, etc., and it can provide an encapsulation for OpenGL contexts, but it doesn't do Video. There's a callable smpeg player that can play mpeg movies from an SDL app, but that's much more simplistic than what he's talking about.
Video, in this context, is movies, not computer graphics.
Re:SDL? SDL. (Score:1)
Whatever happened to Broadcast 2000? (Score:2, Interesting)
Re:Whatever happened to Broadcast 2000? (Score:5, Interesting)
From: http://heroinewarrior.com/bcast2000.php3 [heroinewarrior.com]
After a long period of deliberation on the matter, Broadcast 2000 has been removed from public access due to excessive liability.
We've already seen several organizations win lawsuits against GPL/ warranty free software writers because of damage that software caused to the organization. Several involved the RIAA vs mp3/p2p software writers. Several involved the MPAA vs media player authors. You might say that warranty exemption has become quite meaningless in today's economy.
Fucking dmca....
Re:Whatever happened to Broadcast 2000? (Score:1)
But, it is only a small loss in my book, since Broadcast 2000 was pretty awefull. They went all out optimizing it for Linux on Intel (and/or AMD) without first working out all the bugs or making an less optimized version in plain platform independent C that could be ported to other platforms (like Irix since O2s with video IO are pretty cheap).
The other major flaw of Broadcast 2000 was that it kept trying to produce flashy effects without focussing on the basics (which are extremely important for making fancy effects work and blend into the project).
Basically, it seemed to suffer from the by programmers for programmers problem, which is bad when one is trying to make software for artists.
Kino (http://www.schirmacher.de/arne/kino/) looks superior. Sure, it doesn't have the same feature list, but from the descriptions, the workflow is more usefull. But, I haven't tried it since they work only with firewire style DV, and some of us prefer to capture video on a dedicated capture machine through high end capture cards from professional grade analog tape rather than stick firewire in a machine, so I can't use Kino either until they see the light.
Re:Whatever happened to Broadcast 2000? (Score:1)
Kino is cuts only. So, it really is quite basic.
One of these days, some people will write something better and GPL it. I'm sure of that.
Re:Whatever happened to Broadcast 2000? (Score:1)
I thought they just had some lame tools like Windows Movie Maker in XP. Do they have real professional editting products?
Re:Whatever happened to Broadcast 2000? (Score:1)
Re:Whatever happened to Broadcast 2000? (Score:1)
It's as pro/hardcore as you want. US$999 and uses all the After Effects plug ins.
slashdot effect (Score:1)
slashdotted (Score:1)
(sigh)
video focus (Score:4, Insightful)
Re:video focus (Score:5, Insightful)
On the contrary, syncing video output to the audio is much easier, since audio resampling is a big pain. It's much easier to just watch the soundcard buffer and decide approximately when to show the frame as you imply. You only run into big difficulties when you want to sync audio to the video (or more accurately, sync video blits and audio output to the vertical refresh rate of your output device).
There are times when this is a very important. You imply that video framerates are between 20-30fps, which is quite small. For playback of video sources we need to handle framerates of 50fps and 59.94fps. At such a high framerate, the monitor refresh must track the video input in order to achieve smooth video. See the link to Dave Marsh's faq on judder I mention in the article.
In these cases, you need to set the monitor to the correct refresh rate and then watch the error between the refresh and the sound card clock, and resample the audio when necessary: playing with the refresh rate on the fly would cause a monitor resync and disturb playback!
If video cards let applications drive the refresh of the monitor (software genlock), we could run it based on the audio clock and get the advantages you describe. However given the current state of the hardware it's better to do these small resamplings. That said, actually doing this in linux is still infeasible without some updates to the APIs and drivers, which we are working on.
-Billy Biggs
Re:video focus (Score:2)
Re:video focus (Score:1)
Resampling video real-time should be rather easy since we're not talking about reformatting the video or editting the frames, just changing the time they are displayed. But there are probably other reasons it wouldn't work that way, refresh rate, etc.
I don't know how we encode audio/video data today, but shouldn't we add some metadata that shows which audio frame syncs up to which video frame for every few seconds of video? Something as simple as 2 frame numbers every 2 seconds shouldn't take up that much space. And resampling audio to sync up with video using the popular algorithms that don't change the pitch would kick ass, IMO.
Re:video focus (Score:3, Insightful)
GStreamer is indeed an infrastructure for building multimedia apps. Absolutely everything it does is under the auspices of the elements that it loads and connects together. Claiming that GStreamer has no means of inter-application communication is false, as there are already numerous elements both for communication with sound servers and other applications (network source/sinks, etc.). A set of Jack elements are being written, as well.
GStreamer also has nothing to do with the GUI whatsoever. Elements are GObjects that have no GUI in them at all, they focus on doing what they're supposed to. Any GUI exists as a seperate entity on top of the processing pipeline as managed by GStreamer.
If your worry is that LADSPA won't be used, don't. LADSPA plugins are fully supported with a shim under GStreamer.
As for whether to sync to audio or video, you actually have it quite backwards. First of all, the most difficult situation is not with progressive video, but with field-based video (which both NTSC and PAL are, BTW), where the vertical rates are 50 or 59.95Hz. Compare this to a CRT, and you have significant problems finding a decent match between them.
As for the "content" business somehow making video more important than audio, you're ignoring the fact that video *is* more important than audio when both are present together in the same stream. There are several order of magnitude more bits in the video than than the audio, anyway.
Now, to the technical reasons it makes vastly more sense to absorb changes in the audio clock:
1) 90+% of computers have sound cards with clocks that can be best described as "kinda sorta correct". They vary wildly around the real 44.1k baseline. If anyone notices this, there's not much they can do about it. More fundamentally, how are you going to maintain any kind of stream clock when the audio rate is changing during the presentation (as it will when temperature and other things change in your computer, since the clock is susceptable to this)?
2) The quanta of video playout is much greater than that of audio, on the order of 500+ times larger. The goal of any good video playback is to synchronize the playout of a video frame (theoretical time unit) to a vertical refresh (physical time unit). If at any point those become desynchronized, you will have a discontinuity of at least one vertical retrace, or on average about one 75th of a second. Specifically, you'll have a video frame that is suddently displayed for between 50% and 100% longer than it's supposed to be, in the middle of a bunch of correct frames. This is *blatantly* noticable by anyone with a normal visual cortex.
Audio, and the human ear, is much more forgiving. If the program simply drops or duplicates a sample every once in a while to maintain minimal drift between the two (video and audio) clocks, it will be altering 1/44,100th of the samples in that second. If done wrong, it will cause a click. Doing it "less wrong" to avoid clicks is trivial.
So the decision is between locking to a highly variable audio clock (think 3.6 seconds per hour per 0.1% off) and having video that jerks and sputters whenever the theoretical and physical frame times disagree, or doing some resampling to the audio where necessary, with the possibility of some loss of quality that is undetectable by 99% of people watching videos on their computer with tinny speakers.
Me, I don't like video-induced headaches, I'll resample the audio.
Re:video focus (Score:1)
My experience with Video on Linux (Score:5, Informative)
The biggest advance in v4l was essentially the XFree86 4.x release since it encorporated an Xvideo extension allowing for really nice video play back in Linux.
There are a couple cards that are extremely well supported. I personally use an ATI AIW and the MPEG playback in incredible. In fact, I prefer MPEGs in Linux verses Windows simply because I think Linux does a better job at using the RGB conversion stuff at the hardware level than Windows does.
Of course, the biggest foe to video in Linux has been the fact that many of the best accelerations (iDCT) are simply not supported because card makers fear releases 'techinical secrets.'
Another problem is the split in video display APIs. Prior to the Xv extension being released, the Linux kernel had a video4linux API. The second version of that API is incredible as it has so many features that would allow for truely pluggable components.
Unfortunately, all X stuff is implemented in user space so cards that have integrated display and video stuff end up supporting everything in user space and then providing a loopback mechanism to work with the kernel API. It's a little messy but hopefully everything will get worked out as things progress.
Otherwise, hats off to all the hard work of the gatos project, the v4l2 project, and linuxvideo. If you haven't tried all the really cool stuff available for video on linux, you really should.
Video performance-Gfx performance issues (Score:2, Interesting)
Namely: graphics drivers should be moved into the kernel, which should provide a very low level graphics API
There are many people opposed to this as bloat in the kernel. But come on, there are so many things in the kernel that should be called bloat if gfx is bloat (like sound for instance).
And of course this is related to video. I think these low level drivers would include support for TV/out, processing signals from TV cards, standardizing APIs.. etc.
Re:Video performance-Gfx performance issues (Score:2)
First off, sound support in the kernel is extremely minimal. It just provides a method for userland programs to access the hardware, and other systems like ESD handle the higher-level stuff.
Second, I've rarely had a sound card crash, but my nVidia graphics card has been known to seize on occasion, often because of minor conflict with the X driver. However, when this happens, I can still SSH into the machine and shut it down cleanly. If your idea were used, those crashes would take down my whole box, and that would suck the big one.
Re:Video performance-Gfx performance issues (Score:2)
I think in the kernel would be great for a low level graphics access. really it just needs fb on steroids.
Re:Video performance-Gfx performance issues (Score:2)
Again, when my userspace graphics driver crashes, I can SSH in and take the system down cleanly. When a kernel driver crashes, you don't typically get that luxury. This is not a toy for me. I have to do real work on this machine, and the last thing I can afford is kernel panics while the drivers are perfected that make me to fsck my drives and cost me time.
Re:Video performance-Gfx performance issues (Score:2)
Of course the linux kernel is going to move to a more microkernel like hybrid than it is right now witch would put it into the possision to support the ability to run things like graphics drivers as kernel modules.
With linux we get the best of both worlds. the speed and simplicity of a monolithic kernel and the modularity of a micro kernel.
Re:Video performance-Gfx performance issues (Score:1)
It has drm included in the kernel.
Re:Video performance-Gfx performance issues (Score:1)
dScaler (Score:1, Insightful)
a refreshing perspective (Score:4, Insightful)
There are many core issues with video on any Unix that need to be hammered out now to ensure that things will go well both now and in the future.
As the author mentions several times, adapting refresh rates to video frame rates and working with the monitor's vertical sync as well as audio sync etc, are all very important things that need to be implimented before Video for (insert favorite unix here) will become anything more than a glorified hack.
The first logical step is to impliment what is needed to do things right, and to impliment them in the right(proper) way. the X-protocol should be fully implimented in Xfree, and the kernel should be extended to enable applications to be written which can make full use of the hardware, with minimal kludge-work.
Then the focus moves to making the "killer-app" type media production tools and players. The power of Open Source is the ability to build on the work of others. However, stealing someone's hack to adapt refresh rates, and jamming it into your own code is not an optimal solution. Focus on doing things right the first time, anything less (especially when dealing with core issues) is just asking for untold headaches and frustration in x years, when we are kicking ourselves for not doing the right thing the first time
Hardware abstraction. (Score:2)
OpenML (Score:1)
As Long As... (Score:2)
Multimedia codecs should remain where they should be, in libraries.
The Amiga did all this many years ago! (Score:1)
The problem is that the Linux kernel is currently missing a retrace interrupt counter...
The Amiga had a vertical refresh interrupt - actually you could even synchronize to an arbitrary (x,y) coordinate on the screen via the "copper" co-processor.
Some of the SGI graphics boards actually had an input jack called "genlock" into which you plugged a video signal
A "genlock" could be bought for the Amiga as an accessory for very little money (~100$ or so).
The Amiga was very well adapted to television display. So much that the CPU clock frequency was some multiple of the horizontal scan frequency of either PAL or NTSC! This made for incredibly smooth graphics on a standard television, and so with an Amiga you actually had a very cheap system for generating title screens etc. for your homevideo. And this was more than 10 years ago! Actually i believe that some of the cable companies here in Denmark are still using an Amiga for generating their "info channels".
Re:The Amiga did all this many years ago! (Score:2)
The college I work for has their own cable TV network set up for the dorm residents. One of the channels that they get is an endlessly looping "info" channel with campus events and the like on it.
We _just_ retired the Amiga 1200 that's been doing this for years. And it was only because the poor thing had started to overheat and crash - the job it did was still more than adequate.
--saint
What I'd liek to see (Score:2)
Make all the tools pipable (that's the *nix way) That way I can implement the parts based on my hardware, time and disk space constraints.
Don't tell me it can't be done - There are amny pieces already out there. They just need to be put together.
BTW, I have a system that can capture TV, DVD, and VCD, play most formats, and record to VCD now. It took multiple tools to do the job, and some are not even the most 'up-to-date' ones that _should_ work. I will soon try recording to digital tape (aka a DAT drive) and see how that works as well.
Video on Linux for professionals only (Score:2)
Re:My experiences with Linux (Score:3, Funny)