lunes, 2 de agosto de 2010

dvgrab micro-howto

In this post, basic usage of dvgrab is explained. Dvgrab is a CLI tool that allows the user to capture Digital Video (DV) data from a FireWire port.


Capture and save to .dv files

A first try would look like this:

# dvgrab --format raw --autosplit --size 100 source_

This tells dvgrab to capture data and save it in files source_001.dv, source_002.dv, etc, limiting the size of each file to 100 MB.
[Reference: Become a digital editing guru using linux tools ]

Capture and encode

Digital Video is not compressed very much, so it takes a lot of disk space to store .dv files.
We may want to encode the video as we capture it, for example using ffmpeg2theora.

# dvgrab --format raw - | ffmpeg2theora -a 0 -v 5 -f dv -x 320 -y 240 -o video.ogg

Taking one step ahead, we may stream this encoded video to an Icecast2 server, using oggfwd.

# dvgrab --format raw - | \
ffmpeg2theora -a 0 -v 5 -f dv -x 320 -y 240 -o /dev/stdout - | \
oggfwd www.myicecastserver.net 8000 passwd /mountpoint.ogg

[Reference: ffmpeg2theora examples ]


FireWire permissions

In some Linux distributions, the FireWire device (/dev/raw1394) has file access permissions only for the superuser.

In a terminal windows do as follows:

$ sudo /etc/udev/rules.d/40-permissions.rules

Where you can replace with: emacs, vi, nano, gedit, ...

Find the line that says:

KERNEL=="raw1394", GROUP="disk"

and change it to:

KERNEL=="raw1394", GROUP="video"

This implies some security risks. Please read the reference for more information.

References:

Similar information can be found here:


sudo, ksudo and gksudo

Other possibility is to use sudo. Sudo allows you execute a command as other user, just writing 'sudo' before the command:

$ sudo dvgrab ...

Tipically, sudo will prompt you to type your password in the terminal.

ksudo and gksudo are similar to sudo, but they are designed to be used in KDE or GNOME (respectively), and they ask for your password in a window, rather than in the terminal.
See also:


No hay comentarios:

Publicar un comentario