[FFmpeg-user] ffmepg not syncing while using pipe

frank ernest doark at mail.com
Sun May 4 23:40:34 CEST 2014

Please forgive this post if it is kinda rant like, it's been a windowz style
nightmare of queer brokenness.
I am having the most misrible time trying to get ffmpeg to transmit
and recieve via a pipe. I decided I was going to crate a more secure skype.
I decided to use ffmpeg, netcat, aespipe, and gnupg. In all my localhost
tests my idea worked, I just had to set the sync to video. I then tried
it between my desktop and laptop computers on my own personal network.
ffmpeg will not sync to save it's life. About one in every 100
connections syncs correctly.

ffmpeg -nostdin -loglevel fatal -f video4linux2 -framerate 20 \ 
-s:v 640x480 -i /dev/video0 -ac 2 -f alsa -i hw:0 -ac 2 -c:a libvorbis \
-s:v 640x480 -b:v 100KiB -c:v libvpx -f nut -b:a 9000B \
-filter_complex volume=15 - | aespipe -e AES256 -H SHA512 -w 2  \ 
-P ~/in | nc -w 60 -n 2048

nc -l -p 2048 | aespipe -e AES256 -H SHA512 -w 2 -d -P ~/in | ffplay \
-loglevel fatal -acodec libvorbis -x 640 -y 480 -vcodec libvpx \
-b:a 9000B -ac2 -b:v 50KiB -f nut -sync audio -

"in" is a fifo to the output of gpg2.
I tried using speex, theora, avi etc. Nothing can cause it to sync.
Theora outputs black and white. I tried -sync video and ext, no good.
I love pipes and I've never in my life had any trouble with them.
But for some reason ffmpeg can't work from them.
Why? How hard is it to render one video and one audio frame at a time from
a pipe in a first-in-first-out method?

More information about the ffmpeg-user mailing list