4/01/2008

Herramientas para manipular Vídeo II - Software captura

Continuamos con el tema de la captura de vídeo, para esta ocasión veremos un par de aplicaciones, que a mi parecer cumplen con un trabajo aceptable en el tema de adquisición, una tiene entorno gráfico, y la otra sí bien tiene algunos front-ends, es mucho mejor ejecutarla desde la línea de comando, la primera es conocida como xawdecode (lease Xdtv), y la segunda es el popular mencoder.

Xdtv http://xawdecode.sourceforge.net/

Desafortunadamente es un proyecto que en este momento se encuentra abandonado (sep-2007), pero que sin embargo, tiene cierto grado de madurez que nos permite utilizarlo sin ningún incoveniente. Xdtv no se encuentra en ninguno de los repositorios oficiales, pero se puede hallar en un repo frances donde está compilado para utilizar los recursos que nos ofrece el repo livna, por lo tanto debemos tener este último configurado y funcionando:

sudo rpm -hiv http://rpm.livna.org/livna-release-8.rpm
sudo rpm --import http://rpm.livna.org/RPM-LIVNA-GPG-KEY


Luego añadimos el repositorio frances kwizart:

sudo rpm --import http://kwizart.free.fr/fedora/RPM-GPG-KEY-kwizart
sudo rpm -ivh http://kwizart.free.fr/fedora/kwizart-release-8.noarch.rpm


e instalamos el xdtv:

yum --enablerepo=kwizart install xdtv xdtv-OSD-font

La aplicación debe aparecer en el menú Sonido y Vídeo

Un par de observaciones, es mejor modificar la configuración directamente en el archivo de texto que por medio de la interfaz gráfica, por lo menos a mi no me guardan los cambios cuando la reinicio, dicho archivo se encuentra en ~/.xdtv/xdtvrc, y se debe verificar que la entrada de línea esté activada, esta vez para captura.

Mencoder:

Es un programa que acompaña a mplayer, pero cumple funciones de codificación y captura entre otras, se halla en el repo livna (sudo yum install mencoder) en esta oportunidad les dejo un comando para utilizarlo como capturador:

mencoder tv:// -tv driver=v4l:input=2:norm=ntsc:width=640:height=480: \
device=/dev/video0:forceaudio:audiorate=32000 buffersize=64 -ovc lavc \
-lavcopts vcodec=mpeg4:vbitrate=800:keyint=30 -oac mp3lame \
-lameopts br=128:cbr:mode=3 -ffourcc divx -endpos 10 -o `date +%y%m%d_%H%M`-m.avi


En general este comando nos indica que se debe utilizar el soporte de driver v4l (puede ser v4l2, por ejemplo en el caso de usarse saa74xx), la entrada de supervideo (input=2), las otras entradas podrían ser tv input=0, o composite input=1, la normativa es ntsc, podría ser pal o secam, luego la resolución en que queremos guardar nuestro vídeo final(640x480), el dispositivo de hardware a utilizar (/dev/video0), luego la parte relacionada con el formato de vídeo y de audio, esto es todo un maremagnum de posibilidades y tendríamos que escribir un libro para comprenderlo, pero a simple vista se entiende que usamos mpeg4 para el video y mp3 para el audio, un item importante es el vbitrate, a mayor número, mayor tamaño del archivo, y menor posibilidad de perder frames en el proceso de captura, todo esto lo almacenamos en un contenedor avi, cuyo nombre es la fecha de captura.

En este procedimiento con mencoder, no podemos visualizar la imagen que está siendo capturada, por lo tanto, si se necesita saber en que momento detener la captura (Ctrl+c) es necesario tener un dispositivo adicional para ver lo que está ocurriendo, como un televisor, de lo contrario solo se puede saber por el audio que se escucha.

Resumiendo:

mencoder tv:// -tv opciones_acá -ovc lavc -oac mp3lame -lavcopts opciones_acá -lameopts opciones_acá -o archivo_final.avi

Sería bastante recomendable leer el manual de mencoder-mplayer:

man mencoder

7 comentarios:

RainMan dijo...

sangrenegrv,

en http://vidalinux.blogspot.com/2008/01/instalacin-y-compilacin-de-mythtv-paso.html
he puesto lo prometido sobre MythTV, todo lo que puedas complementar desde tu blog o lo que sugieras será bienvenido.

Espero que sea de tu agrado y del de tus lectores. Se que es un artículo un poco largo, pero para el que quiera un multimedia center "10" es muy interesante.

Saludos y agradecerte la dedicación que tienes en tu blog para explicar tus conocimientos.

sangrenegrv dijo...

Claro ya lo leí, estoy a la espera del tercer artículo para implementarlo en un pc medianito que tengo arrumado, como te dije, lo dejaré como un tivo, simplemente que le voy a añadir la parte de juegos arcade emulados en xmame...Y el manejador de ventanas sería fluxbox o algo liviano.

Lo mismo agradeciendote por tu trabajo....

Anónimo dijo...

Hola:

Necesito de tu ayuda...acabo de instalar Fedora 9 en una maquina con dos placas de red.Lo que deseo es poder rutear con ella y aplcar un squid y demas. El problema es que si bien ya tengo internet en la red que esta detras de la interfaz privada no logro que funcione YUM... puesto que ontengo el siguiente error:

Fallo temporal en la resoluci/xc3/xb3n del nombre)
Trying other mirror."


ese fallo temporal me da con todos los mirrors...

Ojala puedas ayudarme pues me urge arreglar esta cuestion para seguir instalando.

muchas gracias...

Anónimo dijo...

perdon por contaminar tu blog...ya solucione el inconveniente de yum...

Agregue los DNS correspondientes en /etc/resolv.conf

Gracias igual

Anónimo dijo...

The articleice Machines introduces:This article about How To Buy Commercial Ice Machines For Restaurant,With the introduction of cutting edge and innovative technologies, a commercial ice machine is no longer a bulky device producing insanitation, consuming a lot ...

If you need more ice Machines infomation about How To Buy Commercial Ice Machines For Restaurant, Click here to find.

With the introduction of cutting ice Machines edge and innovative technologies, a commercial ice machine is no longer a bulky device producing insanitation, consuming a lot of energy, making noise, and taking a lot of time to make the needed supply of ice. As a result of high end technologies, commercial ice machines are able to achieve “being green” the highest levels of energy and water conservation. Now a commercial ice machine can easily produce from 65 pounds to 2,000 pounds of ice cubes in a day. You can find varied shapes of ice cubes such as dice, half dice, octagon, crushed, nugget, and flake.

Commercial ice machines are the standalone units,ice Machines designed to produce large quantities of ice for various commercial purposes. Once installed, these commercial ice makers are pretty automatic and do not need much attention from you or your staff. These factory-made machines consist of a condensing unit and ice-making section that operates as an integrated unit to make ice, an ice bin or a storage unit to store the created ice and a dispensing unit to dispense the ice out of the machine. Many automatic ice machines use moving water to create an improved quality of ice cubes. They work on the principle of “faster the water moves the better the ice quality becomes”. In this process, the air and un-dissolved solids get washed away. This results in pure and clear ice production.

Large amounts of ice are demanded for various purposes in many ice Machines commercial entities such as Restaurants, Bars, Ice Cream Parlors, Bakeries, Country Clubs and Golf Courses. A commercial ice machine is the perfect choice for such places as the large quantity of ice also needs to be a certain quality as well. Automatic commercial ice machines will make plenty of ice of equal size in a short span of time. All you need to do is just start the machine and set the required functions, and leave the rest up to the machine. You will get good quantity of quality ice in a short amount of time. In addition, many commercial ice machines come with a self cleaning function. This will help maintain the quality and quantity if the produced ice while decreasing the time that you and or your staff must spend with the machine.

Keep in mind that there are two varieties of ice machines: air cooled and waterice Machines cooled. Air cooled ice machines use air to disperse the heat, whereas water cooled ice machine uses water to do the same function. Air cooled ice machines use more energy and also are much noisier than water cooled ice machines. However, they are more affordable than water cooled ice machines.

An assorted collection of wonderful, fast and energy efficient commercial ice makers are readilyice Machines available in the market. Various renowned and reliable manufacturers have come up with their unique range of these amazing machines. Numerous models that create different types and sizes of ice are available in the local and online market. A competitive urge of creating more efficient and cost effective ice machines, has left the customers and consumers with a distinctive variety of these units in which to choose.

Anónimo dijo...

The articleice Machines introduces:This article about How To Buy Commercial Ice Machines For Restaurant,With the introduction of cutting edge and innovative technologies, a commercial ice machine is no longer a bulky device producing insanitation, consuming a lot ...

If you need more ice Machines infomation about How To Buy Commercial Ice Machines For Restaurant, Click here to find.

With the introduction of cutting ice Machines edge and innovative technologies, a commercial ice machine is no longer a bulky device producing insanitation, consuming a lot of energy, making noise, and taking a lot of time to make the needed supply of ice. As a result of high end technologies, commercial ice machines are able to achieve “being green” the highest levels of energy and water conservation. Now a commercial ice machine can easily produce from 65 pounds to 2,000 pounds of ice cubes in a day. You can find varied shapes of ice cubes such as dice, half dice, octagon, crushed, nugget, and flake.

Commercial ice machines are the standalone units,ice Machines designed to produce large quantities of ice for various commercial purposes. Once installed, these commercial ice makers are pretty automatic and do not need much attention from you or your staff. These factory-made machines consist of a condensing unit and ice-making section that operates as an integrated unit to make ice, an ice bin or a storage unit to store the created ice and a dispensing unit to dispense the ice out of the machine. Many automatic ice machines use moving water to create an improved quality of ice cubes. They work on the principle of “faster the water moves the better the ice quality becomes”. In this process, the air and un-dissolved solids get washed away. This results in pure and clear ice production.

Large amounts of ice are demanded for various purposes in many ice Machines commercial entities such as Restaurants, Bars, Ice Cream Parlors, Bakeries, Country Clubs and Golf Courses. A commercial ice machine is the perfect choice for such places as the large quantity of ice also needs to be a certain quality as well. Automatic commercial ice machines will make plenty of ice of equal size in a short span of time. All you need to do is just start the machine and set the required functions, and leave the rest up to the machine. You will get good quantity of quality ice in a short amount of time. In addition, many commercial ice machines come with a self cleaning function. This will help maintain the quality and quantity if the produced ice while decreasing the time that you and or your staff must spend with the machine.

Keep in mind that there are two varieties of ice machines: air cooled and waterice Machines cooled. Air cooled ice machines use air to disperse the heat, whereas water cooled ice machine uses water to do the same function. Air cooled ice machines use more energy and also are much noisier than water cooled ice machines. However, they are more affordable than water cooled ice machines.

An assorted collection of wonderful, fast and energy efficient commercial ice makers are readilyice Machines available in the market. Various renowned and reliable manufacturers have come up with their unique range of these amazing machines. Numerous models that create different types and sizes of ice are available in the local and online market. A competitive urge of creating more efficient and cost effective ice machines, has left the customers and consumers with a distinctive variety of these units in which to choose.

David dijo...

Como me gusta mucho el tema tecnológico soy de buscar novedades y también los distintos artículos para ampliar mis objetos. Hace poco pude obtener en oferta camaras de foto y ahora espero poder aprender a utilizarlas