Motion - Video Palette Config Option Patch

VideoPaletteConfigOptionPatch

Introduction

I receieved this patch via email from a Russian user.

Description of Patch

From original email.

I have ivc-200 capture card.
This card incorrect working with VIDEO_PALETTE_YUV420P,
but working fine with VIDEO_PALETTE_YUV422.
Should you add new option into config file for manual setup of video
palette for each cam.

Thanks you.

My answer was

I would rather try and find the problem and perhaps find a way to autodetect the best palette.

Kenneth

The patch was then received with this note

autodetect work, but my ivc card glitch.
pleaze use patch into attach.

I then created this patch topic and sent this comment back to the author. (Modified for TWiki display)


I really prefer getting patches through the official TWiki way.

Especially when it is more than just a few code line bug fix. (MotionPatches)

I have created the patch topic for you on the Motion TWiki so also other developers can see it and comment or improve the patch. (This topic).

I would not accept the feature as you have implemented it.

A new config option which so far you are the first person in 4 years that ever needed.

And the option definition - if really needed - I still doubt it - is not user friendly. An option with a numeric value from 1-16. Only one value has any meaning. I am the maintainer and I have no clue what the other values would mean.

I would give it a score of 6 on my NerdoMeter worried, confused worried, confused . And the score for such a simple thing should not be more than 2 or 3.

I would really like to avoid such a config option by implementing a better detection method. And if this turns out to be impossible then any option should be defined in a much more user friendly way and much better documented leaving no doubt what it does, what the values means (preferred names and not numbers).

I will ask the development community for help and ideas to make Motion compatible with the ivc-200.

Is there a latin letters spelling of your name? I only see greek letters in my email client.

Kenneth

Installation of Patch

Change History of Patch

Version 1.0

Discussion and Comments


I think patching the driver for ivc-200 capture card is a better solution.

-- PeterHolik - 04 Aug 2005

I think, that problem into bt878 chipset. This card have 4 chipset bt878. 4 channel - 25 fps (PAL) for each channel. One channel - work fine with YUV420P pallete, but 2 or more channel result noise (random horizontal line) and freeze, reboot or kernel panic.

-- OstrouhovZamir - 04 Aug 2005

I resolve this problem. It problem compatibility ivc-200 and my motherboard (via kt600)

-- OstrouhovZamir - 10 Aug 2005

Thank for this patch! It made the Cisco VT Advantage camera work - and not just with Motion!

My company use Cisco IP Phone 7940 with Cisco Call Manager. Cisco VT Advantage is a USB camera branded as Cisco Systems with Windows only software. The software connects incoming video calls from the 7940 to the PC and the USB camera.

Some of us techies are using GNU/Linux on our laptops, and the Cisco VT Advantage software and camera drivers don't work on our OS. I've tried using Wine 0.9.6, but no luck.

I initially gave up having video conferencing from my laptop, but wanted to see if I could use the camera with Motion. A great little tool for GNU/Linux called lsusb with the verbose option -v set made all the difference. Here is the interesting bit of output:

idVendor 0x046d Logitech, Inc. idProduct 0x08b6

A Logitech camera, not Cisco - the camera has been rebranded! Searching for "linux driver 0x08b6" on Google.com gave this link http://www.ee.oulu.fi/~tuukkat/quickcam/quickcam.html, and searching this page for 0x08b6 revealed that it is supported by the latest version of the famous Philips web cam driver at http://www.saillard.org/linux/pwc/, which compiles nicely for SuSE Linux 10 with the instructions at http://www.novell.com/coolsolutions/feature/16340.html.

With the driver in place, I tried the camera with Motion, but http://localhost:8081 showed a grey image. I then tried GnomeMeeting/Ekiga to see if I got a different result. Nope, grey image.

Then I remembered something - this had happened to me before! I actually had one of those Philips web cams, and used the original driver from http://www.smcc.demon.nl/webcam/, but at one point something happened to the palette and it stopped working. So I searched these pages for "palette", and found this patch describing similar behaviour.

I downloaded motion-3.2.4.tar.gz, did tar xfvz motion-3.2.4.tar.gz to create the directory motion-3.2.4, then made a copy using cp motion-3.2.4 motion-3.2.4-patched. I downloaded the patch from this page, unzipped the contents and copied the *.diff files to motion-3.2.4-patched. I then applied the three patches, like this:

patch conf.c conf.c.diff patch conf.h conf.h.diff patch video.c video.c.diff

and compiled the patched motion-3.2.4-patched, using the regular

./configure ./make ./make install

Starting the patched motion, and visiting http://localhost:8081/ now showed that the web cam was working!

I started looking around for a version of GnomeMeeting/Ekiga which supported the palette, and my search led me to believe that the palette was supported, but perhaps it wasn't autodetected correctly. I opened GnomeMeeting/Ekiga to look for palette settings and to my surprise found that the web cam magically working! Apperently, the patched motion had initialized the right palette in the camera. I can disconnect and reconnect the camera without problems!

By registering GnomeMeeting with GNU Gatekeeper using an ID, and forwarding all calls to my phone from Cisco Call Manager to my gatekeeper ID in our Tandberg MCU / ISDN Gateway, I now have incoming and outgoing phone and video conferencing from my laptop!

Thank you!

Haakon

Topic revision: r7 - 03 Feb 2006, TWikiGuest
Copyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Please do not email Kenneth for support questions (read why). Use the Support Requests page or join the Mailing List.
This website only use harmless session cookies. See Cookie Policy for details. By using this website you accept the use of these cookies.