Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 16 Apr 2014, 12:56
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
ffmpeg and mplayer use with 2goPC web camera
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [2 Posts]  
Author Message
JustGreg

Joined: 24 May 2005
Posts: 653
Location: Connecticut USA

PostPosted: Thu 17 Jul 2008, 15:27    Post subject:  ffmpeg and mplayer use with 2goPC web camera
Subject description: Take 2!
 

This is an update of my previous post. This post adds the use of mplayer for web camera video. If I should not have re-posted, but edited the first post, then I am apologize for my mistake in advance.

The 2goPC comes with a web camera. The web camera is a USB Video Class (UVC) device. The web camera is a model Sirus USB 2.0 manufactured by Vimicro Inc. Being a UVC device the proper kernel model is the uvcvideo kernel module. The new products for web cameras should be UVC devices. This may help as a general guide for UVC web cameras.

It is fairly easy to get the web camera to work once you know how. First, you need to add uvcvideo kernel module to your system. For Puppy 4.0, it was provided by tempestuous in this post.

Just download and save the uvcvideo_20070706-k2.6.21.7.pet for the Puppy Linux forum and install it using the PetGet Package Manager (Install icon on Desktop). One can click on the saved file in the Rox file manager and the PetGet Package Manager will ask if you want to install it. The other two needed kernel modules (videodev and compat_ioctl32) are part of Puppy 4.0 already.

One has to have the needed kernel modules (videodev, compat_ioctl32 and uvcvideo) added. An easy way is to add them to the end of the file /etc/rc.d/rc.local. The three (3) lines that need to be added are:

Code:
modprobe videodev
modprobe compat_ioctl32
modprobe uvcvideo

An alternate way (and in the future, standard way) of loading the needed modules is to add them to the /etc/rd.d/MODULESCONFIG file. Open the file in a text editor and go to the end of the file. There is an explanation on the use of the addlist option. Add the names of the three (3) modules is the same order as above to the addlist option line.

One can use ffmpeg, part of Puppy 4.0 to test the web camera. However, the version ffmpeg that comes with Puppy 4.0 has a problem. It is easy to check if the ffmpeg has the problem. In a console terminal (RXVT), type:
Code:
ffmpeg -version

If you see the this (ffmpeg version SVN-rUNKNOWN) at the end of the output, then you need to replace ffmpeg. The solution is to replace the existing ffmpeg with the one from Puppy 3.01. One has to retrieve the package ffmpeg-20070214.pet from the Puppy 3.0 repository at ibibilio Linux archive.
After downloading, one can install ffmpeg-20070214.pet by clicking on the saved file in file Rox file manager.

You can also use the PetGet package manager (Install icon on desktop) to find and install the Puppy 3.01 version of ffmpeg.

A check using a console terminal (RXVT) and typing ffmpeg -version, one should see ffmpeg version SVN-r7972 in the terminal window.

To test the web camera, one can capture video using ffmpeg in a console terminal window by typing:
Code:
ffmpeg -vd /dev/video -f video4linux -s 320x240 -sameq -y test.mpeg


You should see many lines of output in the console window. After a 10 or 20 seconds, hit the "q" key to stop ffmpeg encoding and close the file. Do not encode for too long. The resulting file is uncompressed video. On my first try, I got about 16 megabyte file for about 14 seconds. There will be no audio recorded in the mpeg file. One can capture both the audio and video using ffmpeg. The console program ffmpeg is very powerful. The documentation page for ffmepg is here.
The documentation is good and you should read it. It has several good examples.

You can check on the web camera operation. Open the file manager (file icon on desktop) and click on test.mpeg located in root directory. Gxine should open and click on the play button will show the recorded video. Do not delete test.mpeg yet. It can be used to check mplayer

If you want to see real time video from the web camera, one can use the extra program, mplayer. For the real time video, one has to add some extra libraries for mplayer operation. The two needed are both standard Puppy 4.0 pet files. One can use the PetGet package manager (Install icon on desktop) to find and install the first one:
libgd-2.0.35 (for fast imaging creation)
The second one (xorg-xorg-full-dri-.7.3 (complete xorg, large over 20 Megabytes))is located here.
You will have to download it first then use PetGet package manager to install it.

Now that the extra capability is available, one has to make a minor change to the /etc/xll/xorg.conf file. This line (Option "omit xfree86-dga" # don't initialise the DGA extension) needs to be commented out so xfree86-dga is loaded.

There are several versions of mplayer for Puppy available. However, only one does video streams. Forum member, tempestuous once again has made it available. The post is here.
Please read the post. Tempestuous provides many pointers and points out a problem with mplayer graphical user interface (GUI) and the window manager, JVM. Also, the mplayer GUI only displays and does not record (best of my knowledge). Mplayer is a console terminal command program. This "how to" for mplayer will use the console terminal (rxvt). From the post, download the version of mplayer (meplayer-1.0rc2.pet) and mencoder (mencoder-1.0rc2.pet) for Puppy 4.0 and 2goPC. The mencoder is an encoding program like ffmpeg. I will not use it for this "how to". But, it is of use.

After downloading and saving, click mplayer in a file manager window to install it with PetGet package manager. Do the same for mencoder. At this time, because the new libraries and new programs have been added, one should reboot Puppy to ensure all changes are incorporated.

First, we need to test mplayer to check if it is complete and can display video. Use in a console terminal window:
Code:
mplayer test.mpeg

One should see the video previously recorded by ffmpeg. If you do, then on to the next step.

For recording video, I found examples of using mplayer here.

The author of the examples uses the original "Video For Linux" (v4l) driver. This has a problem with mplayer. One needs to use "Video For Linux 2" (v4l2). Just substitute v4l2 for v4l in the examples. Note: l is the small letter L and not 1. One should also use Google to find the mplayer documentation and manual page. They are helpful. The test script used below is based on the examples of the referenced web page. This is the only script that I have tested successfully from the examples.

Now to check if the web camera video can be display using this in a console terminal window:
Code:
mplayer -tv driver=v4l2:fps=15:height=288:width=352 tv://

You should see the real time video stream from the web camera. To stop the display, press the "Esc" key. I found the height (288) and width (352) values are optimal for the small screen of the 2goPC with its 800x640 resolution. Once, the video display is going then you can click on the maximize button for the window to get a bigger screen. If you try a height or width value that does not fit, mplayer will come back with error saying it could not parse option -tv.

There are other applications discussed in the original post,
such as Camstream and Xawtv. If you are interested in them, see the original post for the comments in the replies. I hope this helps.

_________________
Enjoy life, Just Greg
Live Well, Laugh Often, Love Much
Back to top
View user's profile Send private message 
sazeile

Joined: 05 Jan 2006
Posts: 43

PostPosted: Thu 03 Dec 2009, 05:34    Post subject: Could kernel module comp_ioctl32 be missing from 4.3.1?  

I am attempting to install a Logitech C250 UVC compliant webcam on a VIAO laptop that dual boots Win XP and Puppy 4.3.1.

I installed the uvcvideo pet and the videodev and uvcvideo modules are there and modprobe works.

However modprobe on compat_ioctl32 fails with module not found.

Dmesg shows "No Video Chain Found" on boot up.

The post says that videodev and compat_ioctl32 are both part of 4.0.

Could they be missing from 4.3.1?

Thanks,

Steve Z.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [2 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » HOWTO ( Solutions )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0690s ][ Queries: 11 (0.0180s) ][ GZIP on ]