Jump to content

Recommended Posts

Has anybody tried capturing video on Linux PC?

I am curious about lag times under Linux and if it is possible to fly FPV using Linux laptop as a display option.

Share this post


Link to post
Share on other sites

I have a friend who has started looking about designing a box with multiple capture cards, being able to record several streams simultaneously etc, which would run under linux. According to him it would be no problem... but with the condition of finding cards that have a good Linux driver (already hard, but the most important regarding these details) and writing the actual capture software yourself ;)

Share this post


Link to post
Share on other sites

Hi cyber-flyer,

I was using my linux (ubuntu 7.04) a while ago - since it had a TV card with S-Video in.

#> lspci

05:02.0 Multimedia video controller: Conexant CX23880/1/2/3 PCI Video and Audio Decoder (rev 05)

05:02.1 Multimedia controller: Conexant CX23880/1/2/3 PCI Video and Audio Decoder [Audio Port] (rev 05)

05:02.2 Multimedia controller: Conexant CX23880/1/2/3 PCI Video and Audio Decoder [MPEG Port] (rev 05)

05:02.4 Multimedia controller: Conexant CX23880/1/2/3 PCI Video and Audio Decoder [IR Port] (rev 05)

05:03.0 FireWire (IEEE 1394): Texas Instruments TSB43AB22/A IEEE-1394a-2000 Controller (PHY/Link)
and was using TVTime to view the video signal for capturing I was using mencoder:
mencoder tv:// -tv driver=v4l2:input=1:norm=pal-bg:width=768:height=576:contrast=-15:saturation=25:brightness=-0:fps=25:buffersize=128 -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=1200:vhq:keyint=300 -oac mp3lame -lameopts cbr:br=32 -vf crop=720:544:24:16,pp=lb -endpos 00:30:00 -o output_Long5.avi

I'm certain, you will be able to find an USB capture device where a similar setup works.

Cheers,

relee

Share this post


Link to post
Share on other sites

Kilrah, I agree video capture under Linux will work, there are bunch of video capture cards supported under Linux. I am mostly concerned with the lag times that can create problem for FPV flight, so I am looking for the right hardware. If I remember correctly you've used laptop to capture and display downlink video and observed no (serious) lag. Do you know of any video capture system that is lag free and has open source code?

and was using TVTime to view the video signal

Hi Relee, have you tried capturing from video camera? If yes, were there a visible latency in displayed signal? Some TV capture card will lag the real signal by as long as half a second which makes it unusable for FPV.

WWW search tells me that some video gamers will redirect X-Box or other gaming console output on PC screen and the latency there is critical. They found that some video card work well under windows (as we also know from Kilrah's results).

But I am yet to find one that works well under Linux.

Edited by cyber-flyer

Share this post


Link to post
Share on other sites
Do you know of any video capture system that is lag free and has open source code?

Nope. Mine I have now is a Pinnacle one, the software suite is crud, you have to install it to install the driver, but at least you can access it with other software later. From what I've heard it's mainly luck, as some other Pinnacle won't let you. I don't think they'd support linux with their ridiculous attitude of making you pay extra for every single feature you'd want.

Regarding the lag time, it's indeed pretty complicated as it can come from the hardware, the software ot both... In the case of mine there was a ~1sec delay, but thankfully it was only pinnacle software.

I've never really tried other USB models, I was using PCMCIA before until my new PC didn't have that anymore.

Share this post


Link to post
Share on other sites

Would you get similar results if you were to use a Mac? I mean we know that Mac and Linux are very close to the mother software (UNIX) and usually Mac handles media much better that PC. I know the down fall is... you have to buy a Mac, when if you have a PC base laptop, then converting to Linux is easier. Just a thought <_<

Share this post


Link to post
Share on other sites
Would you get similar results if you were to use a Mac?

JMS, I am looking for one with an open source code driver. I am not a Mac user - not sure what the situation with free software for Macs is.

There are some nifty Linux boxes that I came across:

http://www.cappuccinopc.com/star-466.asp

Dirt cheap and at 6W power consumption they can be easily a part of portable ground station.

Share this post


Link to post
Share on other sites

OMG Cyber-Flyer! Now that is tiny! Now I see the light... oh that's my daughter playing with the LED flash light again! Ok now I see what you are after! Great find and it would be nice to pack light to the field like that. Too bad it's powered by AMD, I'm an Intel guy normally. Still this is worth looking into by all of us!!!!!

Oh another thing, I noticed it has only 128megs of RAM integrated onto the board, is that enough to handle video on this Linux box? I know nothing about Linux except it's closer to Unix, which means fairly stable compared to Windows... then again anything is more stable than Windows... even a Yugo or Lada! :lol:

Share this post


Link to post
Share on other sites

cyber-flyer, I'm not capturing the stuff to fly by the display afterwards.

So far I'm just recording it to find a suitable Tx/Rx + Cam; later I'll add a head mounted display to fly by this. But still want to record my flights.

Cheers,

relee

Share this post


Link to post
Share on other sites

Hi all,

While I am a HUGE fan of linux, just beware that doing anything even remotely complicated with it is likely to require a huge investment of time and pulled out hair.

If your prepared to work at it then go for it! It's a really fatastic operating system!

JMS, I am looking for one with an open source code driver. I am not a Mac user - not sure what the situation with free software for Macs is.

There are some nifty Linux boxes that I came across:

http://www.cappuccinopc.com/star-466.asp

Dirt cheap and at 6W power consumption they can be easily a part of portable ground station.

Cyber-flyer, that looks like a pretty cool PC to play with, but unless your looking at brewing your own linux distro and getting drivers for as much hardware acceleration as you can lay your hands on, I think you'll run into performance issues. Especially as the CPU is 333MHz.

If your just looking to install Ubuntu or similar with a windows type GUI then it will run very slowly, if at all. I think anything like realtime video would be out of the question.

As JMS pointed out, 128Mb of RAM is really not a lot these days, even the higher 256Mb option is small. Whats more worrying is that the size of the flash-IDE-storage does not appear to be listed. I can't see this being greater than 4Gb at most which is tight if your looking at an OS and recorded video, but not the biggest problem!

If you really want to you can get PC boards based around the same CPU with ports to connect things like harddrives and PCI cards to get around those limitations.

I use a fanless mini-itx 800MHz VIA Eden based PC as a small allways-on server at home running linux. I usually just use SSH and the command line to access it, but installed Ubuntu a few months ago to see what the hype was about.

The GUI was incredably unresponsive on such a slow machine and I soon scrapped the lot and went back to the command line! I may be talking nonsense, but the XWindows system is rather slow and inefficient due to the number of layers involved. It is worth noting that I didn't try to locate or install any drivers for the graphical acceleration that is available on the board (it would have taken longer than I was willing to spend trying to install them).

I did breiefly install windows 2000 as a comparison and found that to be more responsive and just about capable of playing DivX and XVid files when all of the correct drivers were in. It did struggle with DVDs oddly enough.

A couple of mini-itx sites if anyones intersted;

http://www.mini-itx.com/

http://linitx.com/

Quite a few people install them in cars as media centers, so there are power supplies available designed from running off a 12v car battery. The power requirements are quite a bit larger then 6W though!

Share this post


Link to post
Share on other sites

Thanks Zeldorf and greatly appreciated for the input. So I checked out your link and now that's a Linux box!!! But like you said a bit more power hungry compared to 6 volts but still doable. If I had a little bit more time on my hands I would dive into Linux 100% because of all the good things I have heard about it. So in the mean time I will study this before I make this transition. Is this learning curve very deep since my mind is so used to Windows?

Share this post


Link to post
Share on other sites

Hi JMS, it all depends on what you want to do with Linux. If your looking for a desktop system with the equivalent Office programs then using something like Ubuntu and Open Office should be pretty straight forward. Ubuntu is great for beginners as it introduces you to the programs using point and click interfaces, rather than the command line. Of course there are disadvantages this too, but it's a good place to start.

Sooner or later you're going to have to get involved with the command line, and the learning curve starts to looks like a cliff!

Don't let that put you off though, once you grasp the basics and start to understand what the system is capable of it is amazing, and great fun! Some of those mini-itx boards also have built in I2C ports on them, which makes it easy to hook up DIY circuits etc.

Share this post


Link to post
Share on other sites

Zeldorf, thanks for the link to the Pico-ITX, it looks pretty good.

If your just looking to install Ubuntu or similar with a windows type GUI then it will run very slowly, if at all. I think anything like realtime video would be out of the question.

Some 10 years ago I was all over Linux - writing my own video dirvers and X-windows apps. At that time I was able to capture video and display it in X-window at descent rate of 10 fps. The rate was limited by video capture hardware not the video display card and the Linux box was 100 Mhz Pentium. I haven't touched Linux for the last 6 years as my job occupation has changed. But I am suprised about slowness of the OS that you've mentioned. It's possible that all the add-ons had slowed it down, like you've said - one may need to go deeper below point-and-click layer to get the performance back.

I thought it will be easier to find open source video driver for Linux.

Share this post


Link to post
Share on other sites

Wow cyber-flyer, thats some pretty hardcore stuff! :blink:

My personal opinion is that the larger distros have become far too bloated and slow, which is part of the reason I dislike Windows! They seem to try to focus on whiz-bang animated graphics which sure make it look nice, but don't add anything to the usability and kill the performance. Almost all of my time with Linux is spend on servers in one form or another, so I usually don't even bother to install X. From the little that I have seen I feel that there is such a lack of standards in the way of GUI design that the usability is really suffering, as well as other things... but thats going a bit off topic for here :)

It certainly sounds like you could just install everything from scratch with not too much trouble at all!

There is a large group of people using mini-itx boards to build PVRs using MythTV, so if your interested in video drivers, codecs and the like, that is probably a good place to start!

http://www.mythtv.org/

There also Video for Linux (V4L)

I'd like to muck around with this kind of stuff more, but like anything it's having the time! :(

Share this post


Link to post
Share on other sites
There also Video for Linux (V4L)

Thanks Zeldorf - that's a lot of info to go through. I am still in the dark if there is a lag-free hardware solution for Linux video capture. After reading couple of "Hardware Requirements" docs it seems that a lot of CPU power is used for MPEG encoding. I can drop PVR function and only use video capture and display if I can find one. Doing some FPV specific functionality under Linux could be great: one can put some real fancy video overlay with artifical horizon, switch between map view or video view, have Picture-in-Picture, redirect it all to hi-res Z800 goggles...

Edited by cyber-flyer

Share this post


Link to post
Share on other sites

I've long been a fan of the Viewcast Osprey 100 PCI capture card. I've only ever used it under Windows, however they claim it can be used under Linux, more than one can be used in a system and they supply an sdk. Osprey 100 link. It may be what you are after.

Good luck!

B.

Share this post


Link to post
Share on other sites

Just went through Linux MCE pages and it's a life on its own. It's very cool but requires top of the line hardware.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×