DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD General

FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 17th July 2008
Fritz_Katz's Avatar
Fritz_Katz Fritz_Katz is offline
Video-4-BSD
 
Join Date: Jul 2008
Location: Los Angeles, CA
Posts: 9
Default Video For BSD

Video For BSD (( new project at SourceForge ))

Because of the success of the Video4Linux project, there are large numbers of device drivers available for multimedia cards, digital cameras, and USB devices currently on the market. Since V4L is an active, dynamic project with numerous contributing developers, new hardware drivers are created and bugs are addressed

On the other hand, BSD supports older Brooktree 'bktr' tuner chips that are no longer in production. If you want to watch TV on your FreeBSD system you might be able to find an old analog 'bktr' card on eBay. But why bother? In a few months (February 2009) there won't be any NTSC broadcasts in the USA, only ATSC will be available. In many other places, broadcasts are switching from PAL/SECAM to DVB-T.

Why BSD?
  • BSD systems are secure and stable. "Uptimes are measured in years". The occasional blue-screen, hang, hex-dump, hardware & software incompatibility, and virus infection is accepted as typical by a Windows-Vista user. Many companies don't want to base their consumer products on Microsoft because support for buggy systems and license fees eat into profits. Consumers have a choice and they won't buy a TV with a reputation that it periodically hangs and reboots.
  • BSD systems are developer friendly. Tools available on Linux are also available on BSD.
  • Many corporations find BSD a more 'business friendly' platform to take their product to market.

Philosophical Differences

There are fundamental philosophical differences in support for multimedia on Linux and BSD.

Linux has moved V4L support into the kernel. This certainly makes the kernel more complex, bloated, and prone to potential problems. Hundreds of devices, most of which are not currently in your system, are supported. When a hardware is no longer used, dead code will remain in the Linux kernel for years to come. New hardware will require newer kernels.

The BSD philosophy is that putting non-time critical code in the kernel only bloats the kernel. BSD seeks to protect the hardware by providing a level of abstraction between user programs and critical hardware. This is probably the main reason for BSD's vaunted stability.

Of course, if BSD doesn't support V4L, much work will have to be repeated in re-writing new hardware drivers. Most hardware which just 'plugs-n-plays' on Linux will never work on BSD. Bugs fixed in V4L will not be propagated to BSD.

There's similar project at: http://wiki.freebsd.org/HDTV Support for HDTV on FreeBSD is just starting out. John-Mark Gurney has added support an ATSC based card with work underway for a second. There is no known support for the DVB family. John-Mark Gurney has also written the beginning of a design document on how to provide generic multimedia support under FreeBSD.

Project Goal

This project will implement a V4L compatible API and device drivers for the BSD systems, enabling you to run Linux video applications on BSD. Our goal is to provide an emulation layer that would let us recompile the linux source code on BSD, and provide a sufficiently complete emulation of the Linux kernel APIs so that device drivers can be used without significant modifications to their source code.

Source for working device drivers, ports of Linux multimedia applications, along with notes on how to install various multimedia devices on BSD will be made available in this SourceForge repository. Project releases will have the FreeBSD copyright a simple, permissive, non-copyleft free software license, compatible with the GNU GPL.

Can it be done? Here's an example by Luigi Rizzo on Building Linux Device Drivers on FreeBSD for several webcams. Here's another example on porting a DVB-T television USB-Stick driver. (NOTE: the HW manufacturer has released a new revision of their DVB-T USB stick that is not supported by this driver. --- this is the reason this project is needed. If BSD had a central location providing HW drivers; updates, fixes, and new HW could be supported ).

The port available in: /usr/ports/devel/linux-kmod-compat claims that the "porting of a linux driver should be as simple as downloading the linux driver sources, writing a simple Makefile.kmod, and running "make -f Makefile.kld" to produce the driver.ko". Of course, current reality is not that simple --- not yet. In the words of Admiral Horatio Hornblower and Captain Jean-Luc Picard the goal of this project is to "Make it so".

Support this Project

Hardware manufacturers wanting to expand their customer base world-wide should consider donating hardware, specifications, and expertise to the Video-4-BSD project. Video-4-Linux has often been forced to valiantly create drivers via reverse engineering with USB and PCI bus sniffers. Some corporate legal departments are frightened by the GNU-GPL but have no problem with the FreeBSD license. By making hardware and software specifications available under the FreeBSD license, this project hopes to return/provide assistance to the Video-4-Linux project and a 'Thank You' for making it all possible.

Join and Contribute to this Project

To join this effort, first join SourceForge and then send an email to the members discussion list containing your SourceForge username.
__________________
- Fritz Katz
Reply With Quote
  #2   (View Single Post)  
Old 17th July 2008
TerryP's Avatar
TerryP TerryP is offline
Arp Constable
 
Join Date: May 2008
Location: USofA
Posts: 1,547
Default

Now this is good news :-)
__________________
My Journal

Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''.
Reply With Quote
  #3   (View Single Post)  
Old 17th July 2008
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Banned
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Default

OpenBSD -CURRENT has a video(4), a V4L compatibility layer... and uvideo(4) for newer UVC cameras.

If the layer you propose is incompatible, a lot of user land applications already written for Linux will go to waste.

I haven't read about your project in detail, but NTSC isn't entirely dead, it'll still be useful in rural areas.. and in Canada, it'll be around until at least 2011.

bktr(4) still had it's uses, your point about BSD not having things in kernel isn't entirely accurate either, OpenBSD for instance does not believe in kernel modules, while the functionality remains, it's not used by any kernel drivers. (I'm only aware of kqemu in ports that uses it..).

I'll read more about your project goals, but writing drivers for every tuner chipset sounds like a very daunting task...

Will the driver support *all* of the BSD derivatives? Without FreeBSD favouritism?
Reply With Quote
  #4   (View Single Post)  
Old 17th July 2008
Fritz_Katz's Avatar
Fritz_Katz Fritz_Katz is offline
Video-4-BSD
 
Join Date: Jul 2008
Location: Los Angeles, CA
Posts: 9
Default

Quote:
OpenBSD -CURRENT has a video(4), a V4L compatibility layer... and uvideo(4) for newer UVC cameras.

If the layer you propose is incompatible, a lot of user land applications already written for Linux will go to waste.
Interesting. I'm basically familiar with FreeBSD port: /usr/ports/devel/linux-kmod-compat -- currently it supports only a few V4L webcams but it's a proof-of-concept that the idea will work.

Does the OpenBSD V4L compatibility layer allow V4L device drivers for cameras, DVB/ATSC TV-Tuners, USB sticks, ...etc. to run on OpenBSD?

Quote:
I haven't read about your project in detail, but NTSC isn't entirely dead, it'll still be useful in rural areas.. and in Canada, it'll be around until at least 2011.
NTSC will still be used for cable (at least until 2012), closed circuit TV, and internal hotel networks for years to come.

Quote:
your point about BSD not having things in kernel isn't entirely accurate either, OpenBSD for instance does not believe in kernel modules, while the functionality remains, it's not used by any kernel drivers. (I'm only aware of kqemu in ports that uses it..).
So porting V4L apps and drivers to OpenBSD is easy?

Quote:
I'll read more about your project goals, but writing drivers for every tuner chipset sounds like a very daunting task...
That's the whole point of the project -- the work has already been done for Video-4-Linux. We don't need to re-invent wheels.

Quote:
Will the driver support *all* of the BSD derivatives? Without FreeBSD favouritism?
Sounds like a good plan. I wonder about portability between the BSDs. So far we've just FreeBSD developers interested. Probably we'll need someone knowledgeable of OpenBSD device drivers with us on the team ( hint, hint,.. )
__________________
- Fritz Katz

Last edited by Fritz_Katz; 19th July 2008 at 10:46 PM. Reason: add 2012 date for analog cable NTSC support.
Reply With Quote
  #5   (View Single Post)  
Old 18th July 2008
TerryP's Avatar
TerryP TerryP is offline
Arp Constable
 
Join Date: May 2008
Location: USofA
Posts: 1,547
Default

I would really look into OpenBSDs efforts if I was you.


(note: my OpenBSD machine is headless and X'less)
__________________
My Journal

Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''.
Reply With Quote
  #6   (View Single Post)  
Old 18th July 2008
Fritz_Katz's Avatar
Fritz_Katz Fritz_Katz is offline
Video-4-BSD
 
Join Date: Jul 2008
Location: Los Angeles, CA
Posts: 9
Default

I see the uvideo driver:
http://www.openbsd.org/cgi-bin/man.c...86&format=html

Currently supports USB Video Class (UVC) webcams & cameras.

I see hooks for V-4-L here:
http://www.openbsd.org/cgi-bin/man.c...penBSD+Current

Can an off the shelf ATSC or DVB TV-Tuner that just 'plugs-n-plays' in recent Linux kernels be put in an OpenBSD system, be recognized, and run? I had no idea that uvideo driver was so far along.

I think yes, the uvideo driver is the way to go -- but in order to run on other *BSDs it would be necessary to have it be a loadable kernel module.
__________________
- Fritz Katz
Reply With Quote
  #7   (View Single Post)  
Old 18th July 2008
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Banned
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Default

Nobody said that ATSC/DVB Tuners were supported, uvideo(4) handles UVC devices only, video(4) is a device independent "V4L" compatibility layer.

No drivers have no written to support such devices, porting them from Linux is a bad idea, GPL is only compatible in one direction.. can't have GPL code in a BSD project. (Though honestly, GPL proponents fail to understand the BSD licence and violate it often.).

video(4) was only recently developed, only uvideo(4) uses it... but, with that in tree, a motivated developer might write a driver for a ATSC/DVB tuner they own, it probably won't be a LKM though.

It's still early, but I can tell you.. not many will be interested in the concept of recompiling a Linux driver for usage on *BSD.
Reply With Quote
  #8   (View Single Post)  
Old 18th July 2008
Fritz_Katz's Avatar
Fritz_Katz Fritz_Katz is offline
Video-4-BSD
 
Join Date: Jul 2008
Location: Los Angeles, CA
Posts: 9
Default

Quote:
Originally Posted by BSDfan666 View Post
Nobody said that ATSC/DVB Tuners were supported, uvideo(4) handles UVC devices only, video(4) is a device independent "V4L" compatibility layer.

No drivers have no written to support such devices, porting them from Linux is a bad idea, GPL is only compatible in one direction.. can't have GPL code in a BSD project. (Though honestly, GPL proponents fail to understand the BSD licence and violate it often.).
The FreeBSD license is compatible with the GNU GPL.

Yes you have GPL code in a BSD project. Code licensed under the GNU GPL can be used in other projects, so long as they also are released under the same or a compatible license. We will be 'linking' to the Linux source and providing full source of all our wrappers which we'll release.

There are over 1700 'ports' in FreeBSD /usr/ports -- many are GPL'd. They are pulled in as source and built on FreeBSD. I don't see GNU ever suing FreeBSD. Linus Torvalds himself removed the “you may not distribute it for money” restrictions in 1992.

Quote:
Originally Posted by BSDfan666 View Post
video(4) was only recently developed, only uvideo(4) uses it... but, with that in tree, a motivated developer might write a driver for a ATSC/DVB tuner they own, it probably won't be a LKM though.
What about a developer motivated by money (from a corporation) that wants to deploy a multimedia/TV-tuner product built on a FreeBSD platform -- as long as source and modifications to all drivers are available it's OK.

The driver needs to be a LKM if it's going to be widely accepted in *BSD.

Quote:
Originally Posted by BSDfan666 View Post
It's still early, but I can tell you.. not many will be interested in the concept of recompiling a Linux driver for usage on *BSD.
I suppose the only people who would be interested are those who want to use new hardware; TV-Tuners, hot-pluggable USB devices, cameras, ... etc. in a *BSD environment.

Otherwise why bother with *BSD at all? Why not wipe the drive and replace it with a Linux distro which will run many devices that you need. --- But why bother with the trouble of Linux when most devices just run out-of-the-box on Windoze or a Mac?
__________________
- Fritz Katz
Reply With Quote
  #9   (View Single Post)  
Old 18th July 2008
TerryP's Avatar
TerryP TerryP is offline
Arp Constable
 
Join Date: May 2008
Location: USofA
Posts: 1,547
Default

Ports are third party software not part of the base system.


For GPL software in the FreeBSD Project look at /usr/src/contrib/ for individual license files: most if not all GPL code should live there.
__________________
My Journal

Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''.
Reply With Quote
Old 18th July 2008
Fritz_Katz's Avatar
Fritz_Katz Fritz_Katz is offline
Video-4-BSD
 
Join Date: Jul 2008
Location: Los Angeles, CA
Posts: 9
Default

Quote:
Originally Posted by TerryP View Post
Ports are third party software not part of the base system.
There is much wisdom in that brief statement. The kernel must provide basic kernel services, nothing more.

Entire linux systems live in /usr/ports/emulators, including Gentoo and Fedora-core. I'm building V4L with 2.6.25 kernel source on Fedora-8 chroot'd in a shell on my BSD system.
__________________
- Fritz Katz
Reply With Quote
Old 1st October 2008
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Real Name: Martin
Tcpdump Spy
 
Join Date: Apr 2008
Location: Netherlands
Posts: 2,243
Default

This got added to the FreeBSD ports collection today:

http://www.freshports.org/multimedia/cx88/

Quote:
cx88 provides drivers for TV/radio capture cards based on
the Conexant CX23880/1/2/3 series of chips. This port
includes the cx88 kernel drivers as well as a simple app
for HDTV capture. It requires multimedia/libtuner for
channel selection and peripheral configuration.
Not related to the Video for BSD project btw ... (This guy seems to produce less noise and more code).

I'd be interested in knowing how well it works ... I have a few (old) TV tuner cards, maybe one of them uses this chip ...
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.
Reply With Quote
Old 2nd October 2008
Fritz_Katz's Avatar
Fritz_Katz Fritz_Katz is offline
Video-4-BSD
 
Join Date: Jul 2008
Location: Los Angeles, CA
Posts: 9
Default

Quote:
(This guy seems to produce less noise and more code).
Hmmm.

Actually, it's mainly for newer cards.
  • DViCO FusionHDTV 5 Gold (ATSC)
  • Hauppauge WinTV-HVR-1100 (DVB-T)
  • pcHDTV HD-3000 (ATSC)
  • pcHDTV HD-5500 (ATSC)
  • Hauppauge WinTV-HVR-1100 LP (DVB-T)
  • Leadtek WinFast DTV2000H (DVB-T)
  • Hauppauge WinTV-HVR-1300 (DVB-T)
  • Hauppauge WinTV-HVR-3000 (DVB-T)
  • Hauppauge WinTV-HVR-4000 (DVB-T)
  • Hauppauge WinTV Nova-T (DVB-T)
I know the pcHDTV HD-5500 also does analog NTSC/PAL. Hope to see support for older cards based on cx2388/xc2028 chipsets soon.
__________________
- Fritz Katz
Reply With Quote
Reply

Tags
bsd, multimedia, video

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Recording video stream jwhal Other BSD and UNIX/UNIX-like 7 14th February 2009 08:25 PM
Resample video graudeejs General software and network 1 3rd November 2008 10:40 PM
2 Video Cards, 2 Monitors Braveheart_BSD FreeBSD General 3 23rd July 2008 11:55 AM
video on FreeBSD? Damien787 FreeBSD General 11 22nd June 2008 01:06 PM
How to play an avi video? aleunix OpenBSD Packages and Ports 3 16th June 2008 06:25 AM


All times are GMT. The time now is 09:25 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick