Reputation: 73
Basically, I connected a USB camera with Video4Linux 2 installed in ubuntu box. The camera is working with VLC:
vlc v4l2:///dev/video0
also I can save the camera stream with ffmpeg by:
ffmpeg -f v4l2 -i /dev/video0 -c:v libx264 -an -f flv MY_FLV.flv
I added following lines in rtmp section of nginx.conf file:
application webcam {
live on;
record off;
exec_static ffmpeg -f v4l2 -i /dev/video0 -c:v libx264 -an -f flv rtmp://localhost/webcam/live;
}
when I run nginx with rtmp, there is no stream out, could you please give me some ideas on this issue? Thank you in advance.
Upvotes: 1
Views: 2989
Reputation: 73
My bad, just need to put absolute path for ffmpeg
exec_static /usr/local/bin/ffmpeg -f v4l2 -i ...
it works like charm...
Upvotes: 1