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.

share|improve this question
    
Is nginx compiled with nginx-rtmp-module? What's in nginx logs? – Dmitry Verhoturov Mar 5 '15 at 18:14
    
Yes, it's compiled with rtmp – PGKLIC Mar 5 '15 at 18:25

My bad, just need to put absolute path for ffmpeg

exec_static /usr/local/bin/ffmpeg -f v4l2 -i ...

it works like charm...

share|improve this answer

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.