VideoJack



VideoJack é um conceito baseado no JACK (Jack Audio Connection Kit) para enviar streams de vídeo entre softwares.




Portugues

Visão Geral

Primeiramente o VideoJack adiciona um novo tipo de porta: video - assim como no audio, temos entradas no jack e saídas do jack.

Temos um novo tipo de porta: video.

Três novos integrantes foram adicionados à porta de vídeo:

int video_width, int video_height, e enum video_colorspace.
Estes recebem valores iniciais 0,0 e RGBA32

Quando um cliente acessa com um input de entrada, ele é assinalado para um buffer de memória compartilhada, com dimenção de largura*altura*4 bytes (logo, inicialmente 0)

Quando um cliente acessa um output de saída, ele é linkado a um buffer. Inicialmente a memoria do buffer está nulo (frame-buffer sem preenchimento), até que o output cosniga ler alguma fonte conectada na entrada input que ele está lendo obuffer.

O client ede entrada deve setar a largura e altura do quadro para seu buffer antes de ser ativado, usando o jack_video_set_width_and_height() .

Por padrão o campo de cores é RGBA32.

Notas


Diferente do áudio, não existe uma função de mixer para o video. Toda sobre-posição é feita no software que acende ao servidor, lendo e misturando dois ou mais frames de saída.

Isto significa que uma porta de entrada de vídeo pode ser conectada a apenas uma porta de saída. No entanto uma saída pode conectada a diversas entradas.

Existe tabém uma função para setar o espaço das cores. Isso somente deve ser feito em circunstâncias exepcionais, por exemplo quando todos cliente concordam em usar um tipo de espaço de cores especifico.

A Fazer


Haverá um contador de frames, que será escrito pelo cliente de entrada e lido pelo cliente(s) de saída para este determinado buffer.
O cliente do jack poder ser usado para sincronizar audio e vídeo.

Clientes (Produtores/Consumidores)


Clientes de escrita no JackVideo:
rtsp (source)
unicap (v4l2/etc) (source) http://bekstation.bek.no//piksel/pikseldev/unicap_rcv.tar.bz2
LiVES (source)
jack_video_test_generator (source)
camorama(source)
Ekiga (source)

Clientes de leitura do JackVideo:
LiVES (sink)
jack_video_output (sink)

Clientes planejados:

net_send (sink)
net_receive (source)

pd_vjack_in (sink)
pd_vjack_out (source)


Um guia Rápido


1) Façao download do código-fonte empacotado do jack aqui:
http://bekstation.bek.no/piksel/pikseldev/jack-vjack5.tar.bz2

Compile e instale.
./configure


make


make install


Certifique-se que você deletou todas as copias antigas do jack.


2) edite seu arquivo ~/.jackdrc, mudando para:

/usr/bin/jackd --port-max 10 -d dummy -r 25 -p 10

(assumindo que voce instalou o jackd empacotado em /usr/bin)

3)Teste com a webcam - faça o download do pacote do camorama aqui:
http://bekstation.bek.no/piksel/pikseldev/camorama-vjack.tar.bz2

Compile e instale.

./configure


make


make install



Instalação do VideoJack no LiVES


Baixe o código fonte da última versão em http://lives.sf.net/index.php?do=downloads

Instale o LiVES com os seguinte comandos:

./configure --enable-vjack


make


make install



Lista de discussão e arquivos

https://www.bek.no/mailman/listinfo/videojack

English


OVERVIEW


First of all, videojack adds a new port type: video - as with audio
there are inputs to jack and outputs from jack.

There is a new port type: video.

Three new members are added to the video port:

int video_width, int video_height, and enum video_colorspace. These take initial
values 0,0 and RGBA32.

When a client joins as an input, it is assigned a shared memory buffer,
with a size of width*height*4 bytes (so initially 0).

When a client joins as an output, it is linked to a buffer. Initially
the buffer is a zero filled (blank frame buffer), until the output
connects to a video input, when it is linked to the input port's buffer.

The input client must set the frame width and height for its buffer after being activated, using jack_video_set_width_and_height().

The colorspace is set to default RGBA32.



NOTES


Unlike with audio, there is no mixdown function for video. All
mixing is done in the host application by reading and mixing two or
more output buffers.

This means that an output video port can only connect to a single input
port. However 1 input port can be connected to multiple outputs.

There is also a function to set the colorspace. This should only be done
in exceptional circumstances, for example when all clients agree to use
a private colorspace.

TODO


There will be frame count which is writable by the input client and readable by the output client(s) for that buffer.

For synchronisation of video and audio, the jack synch client can be used.

CLIENTS (PRODUCERS/CONSUMERS)


Existing clients
There currently exist clients for:

rtsp (source) needs re-working
unicap (v4l2/etc) (source) untested as yet

LiVES (source)
jack_video_test_generator (source)
camorama(source)

LiVES (sink)
jack_video_output (sink)


Planned clients

net_send (sink)
net_receive (source)

pd_vjack_in (sink)
pd_vjack_out (source)


ogg theora stream client (sink)



A quick HOWTO:


1) download the patched jack from here:
http://bekstation.bek.no/piksel/pikseldev/jack-vjack5.tar.bz2

compile and install it. Make sure you delete all older copies of jack !


2) edit your ~/.jackdrc file (backing up the old version if necessary), and change it to:

/usr/bin/jackd --port-max 10 -d dummy -r 25 -p 10

(assuming you installed the patched jackd in /usr/bin)



Testing

The simplest test is to start up the jack_video_test_generator and connect it to the jack_video_output.

jack_video_test_generator &
jack_video_output &


jack_connect jack_video_test_generator:video_out jack_video_output:video_in


You should see test frames appearing.


If you compile qjackctrl against the patched libjack, you can simply connect the two clients in qjackctrl.


Another thing that can be done is to view the output of a webcam.

Download the patched version of camorama from here:
http://bekstation.bek.no/piksel/pikseldev/camorama-vjack.tar.bz2

compile and install it.


Plug in a USB webcam, and fire up the patched camorama. If you see output from the camera then all is well.

You can display frames from the camera by starting up jack_video_output, then:

jack_connect camorama:video_out jack_video_output:video_in


LiVES also has a videojack input and output.




Mailing list and archives

https://www.bek.no/mailman/listinfo/videojack

Links


- Página do VideoJack: http://www.piksel.no/pwiki/VideoJack (em inglês).

- Página apresentando o conceito de Video Piping: http://www.piksel.no/pwiki/VideoPiping (em inglês).

- Wiki de desenvolvimento: http://www.piksel.no/pwiki/VjackDev (em inglês).

- E-mail que deu incício ao desenvolvimento do VideoJack (em inglês).

- Página do LiVES no Estudio Livre: http://estudiolivre.org/LiVES

- Site do LiVES: hhtp://lives.sf.net (em inglês).

Last modification: 17/04/2008 at 17:41, by: pixel