V4L capturing: Difference between revisions

From LinuxTVWiki
Jump to navigation Jump to search
(encoding application comparison)
Line 46: Line 46:
:*[http://developers.videolan.org/x264.html H264] -- a highly compressed codec optimized for streaming
:*[http://developers.videolan.org/x264.html H264] -- a highly compressed codec optimized for streaming
:*[http://www.xvid.org xvid] -- free mpeg4 codec
:*[http://www.xvid.org xvid] -- free mpeg4 codec

==Live x264 capture comparison==

The x264 encoder is now of such a high quality that it is possible to compress live tv on the fly with good results. So far I've been unable to find a solution that delivers on all counts: good audio/video synchronization, small file size, efficient encoding (full size and high quality without dropped frames), and a resulting file that streams with VLC. These results, however, may vary locally; the following is a status report from late March 2006 on a Debian amd64 sid with Marillat's multimedia packages.

<br>

<table border="10" cellpadding="5" width="70%" cellspacing="3" frame="hsides" rules="all">

<tr>
<th>application</th>
<th>a/v sync</th>
<th>file size</th>
<th>efficiency</th>
<th>streaming</th>
</tr>


<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>

<tr>
<td>ffmpeg</td>
<td>?</td>
<td>small</td>
<td>good</td>
<td>yes</td>
</tr>

<tr>
<td>mencoder</td>
<td>great</td>
<td>small</td>
<td>poor</td>
<td>no</td>
</tr>

<tr>
<td>transcode</td>
<td>poor</td>
<td>large</td>
<td>great</td>
<td>yes</td>
</tr>

<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>

</table>

<br>

Revision as of 20:13, 27 March 2006

TV Recording applications

Other frame grabbers

Common configuration and control commands

1. v4l2ucp -- universal control panel for v4l2 (available for Debian from Marillat)

2. Command-line control the TV card (v4lctl is a part of the xawtv package)

  • v4lctl -c /dev/video0 list
  • v4lctl -c /dev/video0 bright "60%"
  • v4lctl -c /dev/video0 contrast "55%"

3. Capture the stream

  • streamer (part of the xawtv package):
Usage:
streamer -i 1 -c /dev/video0 -s 320x240 -q -j 80 -f jpeg -n ntsc -b 24 -o /var/www/webcam.jpeg
streamer -i 1 -c /dev/video0 -s 320x240 -q -j 80 -f jpeg -n ntsc -b 24 -o /dev/stdout |uuencode thief.jpeg|sendmail alarm@foo.com
  • videodog:
Usage:
videodog -x 640 -y 480 -w 3 -b 1 -c 65535 -m PAL -q -d /dev/video0 -j -f /var/www/webcam.jpg
This useful tool supports continuously moving (ftp or scp - ssh copy) of jpeg output to remote server. Also allows put in additional text (date time, location), rotating of image.
Usage:
webcam /etc/webcamrc
See webcams for model and driver details

Compression formats

Live x264 capture comparison

The x264 encoder is now of such a high quality that it is possible to compress live tv on the fly with good results. So far I've been unable to find a solution that delivers on all counts: good audio/video synchronization, small file size, efficient encoding (full size and high quality without dropped frames), and a resulting file that streams with VLC. These results, however, may vary locally; the following is a status report from late March 2006 on a Debian amd64 sid with Marillat's multimedia packages.


application a/v sync file size efficiency streaming
ffmpeg ? small good yes
mencoder great small poor no
transcode poor large great yes