Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I tried to pipe streaming video from video4linux2 webcam connected to a Raspberry Pi through /dev/ttyAMA0 to a computer using an Arduino as a intermediary. First of all, is it possible? Because I was thinking about with the max baud base from ttyAMA0 (115200bps)

I tried to make a fifo using mkfifo inside tty and does not works, I tried to use avconv documentation to learn how to make properly the pipe inside the encoding line like:

avconv -f video4linux2 -i /dev/video0 -somestuff -f mpeg2video pipe:1 | cat > serial:/dev/ttyAMA0:115200/webcam.mpg

Also doesn't works. *ttyAMA0 is made executable whith chmod and I have the permisions commenting the /etc/inittab corresponding line.

Another option was:

avconv -i in ${encoding options} -f mkv /dev/serial

And so on. In than case the output was "'mkv' is not a suitable output format". I had defined the serial before the command line.

It has to be with the UART pins because i can only use the USB to connect the Arduino to the computer and I cannot use an usbnet. Anyone could help me? It doesn't matter if the answer is extremely simple and it could offend me. I need some help.

share|improve this question
At last I've could transmitted with pipe1: | avplay /dev/ttyAMA0. The problem was that my encoding line is optimized to 200kbps and the max baud rate can I use in this serial transmission in 115200, so I only got 1fps... Anyway if someone could do something like that better than me, please, be free to answer the question. – refel Mar 27 '13 at 14:15
Why would you want to use an arduino as a intermediary? It is going to slow every thing down and is expensive. You can use a Serial TTL to USB converter to do it. They are available for around 3$. You can also use WIFI, bluetooth or Ethernet. – Ufoguy Dec 15 '13 at 18:12

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.