jueves, 5 de mayo de 2011

solving MKVToolnix compile crash


When trying to compile mkvtoolnix 4.6 on Ubuntu 10.10, the compiler crashed with the following error message:



(in /home/agonzalez/src/mkvtoolnix-4.6.0)
CXX src/input/flac_common.cpp
cc1plus: internal compiler error: Segmentation fault
Please submit a full bug report, with preprocessed source if appropriate.


The solution is discussed at Gentoo's BugZilla in bug 311595.



In a few words, the problem is solved by compiling the source files that give problems with a special command line. This line was, in my case:



g++ -O3 -march=barcelona -O2 -ftracer -ftree-vectorize -g -ggdb -fvisibility-inlines-hidden -DPACKAGE=\"mkvtoolnix\" -DVERSION=\"4.7.0\" -DMTX_LOCALE_DIR=\"/usr/share/locale\" -DMTX_PKG_DATA_DIR=\"/usr/share/mkvtoolnix\" -I. -Ilib -Ilib/avilib-0.6.10 -Ilib/utf8-cpp/source -Isrc -Ilib/libebml -MMD -c -o src/input/flac_common.o src/input/flac_common.cpp

This compiles src/input/flac_common.cpp into object file src/input/flac_common.o. I had to repeat this for src/common/curl.cpp, changing the corresponding filenames in the command line.

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:


Reviewing GNU Autotools...

Here is an interesting article that analyzes the problems associated with the use of GNU Autotools.

Did you call them autocrap tools?

viernes, 16 de julio de 2010

GStreamer Tutorials

In this post, I group some interesting tutorials and documentation related to GStreamer.

- Here is the official docummentation.

http://gstreamer.freedesktop.org/documentation/

- Here is also a good tutorial.

http://www.cin.ufpe.br/~cinlug/wiki/index.php/Introducing_GStreamer


GStreamer is a C library. But there are also binding for Python (PyGST). When I was trying to learn GStreamer, glib and GObject concepts became a stone in the way, since I hadn't much experience with these libraries. So I think, if someone has some basic understanding of Python, maybe PyGST is a easier way to begin learning GStreamer concepts.

So, here are some Python GStreamer tutorials:

http://pygstdocs.berlios.de/

http://pygstdocs.berlios.de/pygst-tutorial/introduction.html

http://www.jonobacon.org/2006/08/28/getting-started-with-gstreamer-with-python/

http://pitivi.org/wiki/Introduction


Enlace