Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
×
Linux Software

Linux Real Time MPEG Compression? 29

aszoth asks: "I working on a project that is going to require approximately 4 hours of video recording per day for about two months. We are currently using DVM tapes, however the extraction and compression time has left us with a large library of tapes un-converted. We are considering other methods, in particular real time MPEG 2 or MPEG 4 Compression. We also would like to be able to slow down our frame rate from the 29.7 fps to something along the lines of 5-15 fps. I am wondering if any one has any suggestions on possible ways to do such compression (or get similar results) with a Linux box. Thank you for any help you can give."
This discussion has been archived. No new comments can be posted.

Linux Real Time MPEG Compression?

Comments Filter:
  • Ask Google. (Score:2, Insightful)

    by Guspaz ( 556486 )
    Seriously. Do some searching for video capture applications for Linux, and then look at Linux MPEG-4 encoders like Xvid. Then Google can probably also point you towards several how-to guides. Why are you asking Slashdot? Ask Google.
    • Re:Ask Google. (Score:4, Insightful)

      by tsphere ( 93898 ) on Thursday January 16, 2003 @07:29PM (#5098502) Homepage Journal

      Why is this person asking slashdot? For an answer. Google may be great but there's a lot of garbage out there. I'm sure the poster was hoping someone could help him out by sharing some personal experience.

      It's a great compliment to the community that people can ask a question assuming there will be an informed, helpful response. The knee-jerk "google it" reaction that is so common these days is tearing apart this vital facet of the community.

      this whole /. thing is about community, people. let's be helpful if we can. and remember, there's no such thing as a stupid question, just unhelpful answers.

      • Re:Ask Google. (Score:4, Informative)

        by Bud ( 1705 ) on Saturday January 18, 2003 @02:25PM (#5108391)
        It's a great compliment to the community that people can ask a question assuming there will be an informed, helpful response. The knee-jerk "google it" reaction that is so common these days is tearing apart this vital facet of the community.

        Still, it is prudent to do your Google homework before posting to any online forum. This keeps the signal-to-noise ratio up and makes people feel it's worth to come back to the site later.

        Actually, the knee-jerk RTFM/RTFGoogle answers you're witnessing are all about community! More specifically, about teaching people how to behave here at Ask Slashdot. Saying "search Google before posting to Ask Slashdot" is very much like saying "don't shout in the library".

        --Bud
  • What purpose is this for? is the real time video recording for security? performances? transfer? if it were for security I would say that you could go with just a digital camera taking pictures, rather than a full-on video setup. However, if you really do need video, you should probably go with a capture card like stated above.
    • The real time recording is being used in connection with flight data that is being recorded. We need to be able to at least look at the ground clear enough that we can get some basic topographical details. This video is being used to cross check anomolyies in the data collected by our sensor. The reason for the data files is we have to time stamp everything and our flights are 3+ hours so standered DVM tapes are too short. At this point it accually looks like we will be going with hardware solution to the problem and For both the ease on our processors, they have other stuff to be doing. Thanks to those of you kind enough to give ideas.
  • But VirtualDub on a winders box could easily do this, you would simply have to script some stuff, and BAM...done. ..hmm.. while you're at it, you could TRY to port virtualdub to Linux ;)
    • VirtualDub isn't a realtime encoder. Your machine just happens to be fast enough to run the encoder in real time. A real time encoder will do whatever it takes to maintain sync with the input stream, including making it look unintelligable and/or dropping frames.

      I believe mencoder has an option for this, or try possibly a webcam application of some kind (might end up with MJPEG, but that's more compressed than raw video).

      Also, there is a port of VirtualDub to linux under way, though it wasn't usable last time I checked.
  • Mpeg4IP? (Score:5, Informative)

    by Pathwalker ( 103 ) <hotgrits@yourpants.net> on Thursday January 16, 2003 @06:26PM (#5098080) Homepage Journal
    mpeg4ip [sourceforge.net] should do what you want, if you are willing to ignore the issues with licensing of the MPEG-4 patent portfolio.

    If you are not stuck with Linux, I would suggest using a mac - Quick Time Broadcaster does real time mpeg4 encoding at good quality even on old iBooks, and the mpeg-4 royalties are taken of as part of the cost of QuickTime Pro.
  • by LinuxGeek8 ( 184023 ) on Thursday January 16, 2003 @06:29PM (#5098103) Homepage
    You're not very clear on what hardware you have. If you have fast enough hardware you can do software compression in realtime. Use something like transcode or mjpegtools. I used transcode with ffmpeg plugins a few times.
    These software packages can do mpeg2, maybe also mpeg4, though I'm not sure of that. They can do xvid and divx, if you're satisfied with that as mpeg4 alternative.
    But if it's a lot of data, you need a lot of cpu power. It depends on the resolution and so...
    A hardware encoder might suit you better then. Afaik there are only mpeg1 and mpeg2 encoders, even secondhand and cheap. I wonder if there are mpeg4 hardware encoders on the market.
  • MPEG (Score:4, Insightful)

    by isorox ( 205688 ) on Thursday January 16, 2003 @06:31PM (#5098129) Homepage Journal
    MPEG is fine for archiving, but its not that good if you want to edit later. MPEG encodes the difference between key frames. This makes it hard and expensive to edit frame-by-frame.

    What I'd like to know is if there are any standard formats that are good for cuts. DV is great, but takes up a lot of space (3 minutes on a CD). It'd be nice to archive easilly editable source, just at a lower-than-dv quality.
    • Re:MPEG (Score:2, Informative)

      by AndersM ( 32304 )
      MJPEG [sourceforge.net] (Motion JPEG)?
    • It is Motion JPEG, essentially the same as MPEG inside the frame, but without motion estimation (and resulting frame-to-frame dependance). I've heard that this is what professional video editors use (for the reasons you stated above).

      Also, as a shameless plug, a friend of mine builds hardware MJPEG encoder/decoder boards for Linux. Check out http://www.linuxmedialabs.com/

      Maybe this is what the original poster needed?

      Paul B.
    • Final Cut Pro [apple.com] can do something called OfflineRT [apple.com]. It lets you store and edit in smaller-than-DV. The page says you can put 24 hours in 48GB, which is WAY less than DV.

      Hope that helps,

      Ster
    • As you mentioned, one problem with MPEG is that it's hard to edit frame-by-frame, since one of the primary ways it achieves compression is to compress the difference between each frame, not each individual frame.

      Another problem resulting from the interframe dependencies is that if there is too much time between frames (5-15 fps as opposed to the 25+ normally used with MPEG), then the algorithm won't be NEARLY as efficient, since it's tuned around a smaller time interval between frames. (Some other algorithms are tuned around 15ish, like many videoconferencing algorithms. OTOH, a videoconferencing algorithm designed to perform well at 30 FPS will often perform horribly at 15 FPS. This is the case with a codec I worked on at college - It had stunning quality at 30 FPS, but drop it to 15 and it started having serious issues.)
  • by HotNeedleOfInquiry ( 598897 ) on Thursday January 16, 2003 @07:46PM (#5098624)
    Buy a Tivo. It is a linux box after all.
  • if you have a dedicated powerhouse (~1.5 GHz+) then you might be able to do Realtime encoding under linux. But many ppl (including myself) have experienced A/V sync problems with FFMPEG...

    If you have anything less than a dedicated 2GHz machine, you should seriously look into a hardware encoder.

    Canopus makes some cheap mpeg encoder cards, but it looks like the Linux support is sparse...the WinTV PVR-250 [bit-tech.net] is fairly cheap ($150) and supports both MPEG1 & MPEG2 encoding.

    So...why bother with something that *MIGHT* work and go with something that is certain to work...

    In all fairness, some of the AV sync problems with ffmpeg are most likely due to a difference between the buffer sizes of the video and audio...
  • ffmpeg. go grab the current cvs sources from sourceforge, if they're back up yet. also if you don't like that interface, you can use the ffmpeg core within mencoder, from the mplayer suite. look it up on freshmeat.
  • Find an old Iomega Buz on ebay.

    They will do realtime MJPEG encoding even on a relatively old machine. And because it is a hardware solution it should be less likely to jitter & choke every now and then.

    AND because it is MJPEG and not MPEG like a previous post said it is good for re-editing later.
  • i work on a similar project and we use mpeg4ip (mpeg4ip.sourceforge.net) to capture input from a tv tuner and compress it in realtime to mpeg4 video and aac audio. there also is a program called 'streamer' that comes with xawtv.

Work without a vision is slavery, Vision without work is a pipe dream, But vision with work is the hope of the world.

Working...