mjpeg-howto: Unsorted list of useful Hints
2 Unsorted list of useful Hints
*******************************
You have to compile and install the mjpeg_play package, for this read
the README & REQUIRED_SOFTWARE & INSTALL. If you do not want to
compile it, you can download the mjpeg .RPM or .DEB package at
Sourceforge.
There is a script in the scripts/ directory. This script is
something that show's you a way how it can be done. It also creates
(under certain circumstances) videos that look quite good. Better
videos you only get by tuning the parameters yourself.
If you use a Linux kernel from the 2.4 series, you will usually have
to load the drivers for the Buz or DC10 or LML33 cards.So you have to
run the update script providing as option the name of your card you
have. The script is usually in /usr/src/driver-zoran/. The zoran
kernel driver below the kernel 2.4.4 do not work. You have to use the
driver available from: http://mjpeg.sourceforge.net/driver-zoran
In the 2.6. Linux kernel is the driver for the zoran cards included,
you just need to make soure that it is loaded correct.
The driver for the Matrox Marvel card also works, more information
about it: http://marvel.sourceforge.net
If you compile the tools on a P6 based computer (PPro, P-II, P-III,
P-4, Athlon,Duron) then never try to let them run on a P5 based computer
(Pentium, Pentium-MMX, K6, K6-x, Cyrix, Via, Winchip). You'll get a
"illegal instruction" and the program won't work.
If lav2yuv dumps core then one possible cause is no dv support was
included. To enable it make sure that libdv is installed on the system.
This will be necessary if you are using a digital camera (or analog to
DV converter such as the Canopus ADVC100) and converting the dv avi
format into the MPEG format.
Start xawtv to see if you get an picture. If you want to use
HW-playback of the recorded streams you have to start xawtv (any TV
application works) once to get the streams played back. You should also
check the settings of your mixer in the sound card.
If you compile the tools on a platform other than Linux not all tools
will work. Mjpegtools on a OS/X system for example will not have V4L
(video4linux) capability.
Never try to stop or start the TV application when lavrec runs. If
you start or stop the TV application lavrec will stop recording, or
your computer could get "frozen". This is a problem of v4l
(video4linux).
This problem is solved with v4l2. If you use v4l2 you can record the
video and stop and start the tv application whenever you want. But
v4l2 is currently (7. Jan. 2003) only supported for the zoran based
cards (BUZ, DC10, DC10+, LML33) if you use the CVS driver from
mjpeg.sf.net tagged with ZORAN_VIDEODEV_2. And this driver only works
with the 2.4.20 kernel and the 2.5.* development kernel.
One last thing about the data you get before we start:
Audio: ( Samplerate * Channels * Bitsize ) / (8 * 1024) CD
Quality:(44100 Samples/sec * 2 Chanels * 16 Bit) / (8 * 1024)=172,2
kB/sec
The 8 * 1024 convert the value from bit/sec to kByte/sec
Video: (width * height * framerate * quality ) / (200 * 1024) PAL
HALF Size : (352 * 288 * 25 * 80) / (200 * 1024) = 990 kB/sec PAL FULL
size : (720 * 576 * 25 * 80) / (200 * 1024) = 4050 kB/sec NTSC HALF
size: (352 * 240 * 30 * 80) / (200 * 1024) = 990 kB/sec NTSC FULL size:
(720 * 480 * 30 * 80) / (200 * 1024) = 4050 kB/sec
The 1024 converts the Bytes to kBytes. Not every card can record the
size mentioned. The Buz and Marvel G400 for example can only record a
size of 720x576 when using -d 1, the DC10 records a size of 384x288
when using -d 2.
When you add audio and video datarate this is what your hard disk
has to be able to write constantly streaming, else you will have lost
frames.
If you want to play with the `-mjpeg-buffer-size'. Remember the value
should be at least big enough that one frame fits in it. The size of
one frame is: (width * height * quality ) / (200 * 1024) = kB If the
buffer is too small the rate calculation doesn't match any more and
buffer overflows can happen. The maximum value is 512kB.
How video works and the difference between the video types is
explained here: http://www.mir.com/DMG/
There you also find how to create MPEG Still Images for VCD/SVCD.
A good description of DV (Digital Video) can be found here:
http://www.uwasa.fi/~f76998/video/conversion/
Menu