I'm trying to stream the video and audio a USB webcam using avconv (or ffmpeg) using just port 8080 over a network.
I can successfully stream audio using the following command:
Code:
avconv -f oss -ar 8000 -ac 1 -i /dev/dsp1 -acodec mp2 -f rtp rtp://172.17.2.2:9090
and VLC will read it just fine, with maybe a 1 second delay.
I can successfully stream video using:
Code:
avconv -f video4linux2 -i /dev/video0 -vcodec mpeg2video -r 25 -pix_fmt yuv420p -me_method epzs -b 2600k -bt 256k -f rtp rtp://172.17.2.2:8080
which will also work just fine in VLC, but with a slightly greater delay.
However, I can't combine them both with rtp. So far the best I can do is:
Code:
avconv -f video4linux2 -i /dev/video0 -f oss -i /dev/dsp2 -vcodec mpeg2video -pix_fmt yuv420p -me_method epzs -r 25 -b 2600K -bt 256k -acodec mp2 -ar 8000 -ac 1 -ab 128k -async 1 udp://172.17.2.2:8080/stream.mpg
which does NOT work in VLC, but will work using:
Code:
ffplay -i udp://172.17.2.2:8080/stream.mpg
However, this turns out to have a 6-second delay.
So, does anyone know how I can get rtp to work, or at least an alternative that would get VLC to work with it?
EDIT:
I would like to point out that this is running on an ARM platform and I'm trying to stick with the "main" repository only.
Bookmarks