Realtime Software MPEG2 Encoding Under Unix?
drix asks: "As part of a pet project I'm working on I need to encode MPEG2 video in realtime on Linux. I realize that there are many dedicated hardware boards being built explicitly for this purpose, but they are too expensive and I can't justify spending thousands of dollars for a hobby project. Currently several companies such as CinemaCraft and Ligos are advertising the ability to do realtime, DVD-quality MPEG2 encoding with heavily optimized software on a modestly powerful, PIII-700ish system, however all their products or SDKs are Windows based. I'm curious if anyone knows of similiar products designed to work on Linux. As an alternative, how much CPU would be needed to just 'brute-force' realtime, DVD-quality encoding using the standard (albeit sloooo) mpeg2encode program distributed by MPEG? Intel claims that a P3 1GHz can encode at 30fps, but apparently they turned down the quality, as this does not seem to be the experience of people on various newsgroups when trying to get DVD-like video."
I realize that this is not what you asked for, but maybe check out vcr. It'll do real-time divx encoding, as well as mpeg-4..it works great for me...I record 320x240@30fps and it looks great (on a dual 400 celeron with 256MB RAM..it only uses one processor though) I then use aviplay to watch the movie, and it scales up very cleanly to 1280x1024, very clear picture, and only uses about 10% CPU during playback.
It doesn't do mpg2, but it may be close enough for you..
(file sizes aren't too bad...for 30 minutes of TV, the file is about 380MB)
The basic sleazeware produced in a drunken fury by a bunch of UCBerkeley grad students was still the core of BIND. --PV
The DC10+ does not do MPEG in any way, shape, or form. It does Motion JPEG, which is basically a stream of JPEG images for each picture field (there is no temporal compression, each field is independent of the others).
Chu vi parolas Vikipedion?
Mp1e is the only program that does high quality high resolution real time compression, but it does not produce MPEG2 right now, only MPEG1. That is not a problem for the quality, though: for this application there is not much difference between those two. There is currently no release version of mp1e, you have to get it from the CVS of Zapping and it works only with V4L2. There is also the old version 1.7.1 of mp1e, which has a much lower quality but may be easier to install.
Sampeg can do real time MPEG1 and MPEG2, takes advantage of multiprocessing and is optimized for both Intel and Sun SIMD operations. It is very well written in C++, but also rather slow and there has been no update in a long time. The author is now working on an MPEG-4 encoder that should be available in the near future.
ffmpeg is reasonably fast, is usable and under current development and supports most formats, most notably MPEG1, MPEG4 (OpenDivx compatible), DivX ;-), and Realvideo. Some more may be added soon.
VCR may also be an alternative, but I have not tried that yet.
-- /. login
Arnd Bergmann <arnd at itreff dot de>, no
Depends on what you're doing. If the original poster just needs high-quality recording and playback (possibly with editing), then it'll do fine. (I usually use mine at approx. 3.6MB/s data rate with pleasing results.) If they actually need MPEG-2 as requested, it won't help. However it's unclear from the post what the actual requirements are.
Also note that the DC10+ uses square pixels (640x480 for NTSC, 768x576 for PAL), which is a different resolution from DVD-style MPEG2 (720x480 NTSC, 720x576 PAL), so it's not an ideal card if you want to convert to DVD resolution MPEG2.
I think the DC30 does 720px though... as of course does DV capture over 1394. Of course, I shudder to think of the CPU requirements of decoding DV *and* recoding it as MPEG2, in software, in realtime. (shudder)
Chu vi parolas Vikipedion?