I want to transcode MJPEG stream that comes from IP camera (http://xx.yy.zz.tt:8080/video.cgi) to FLV or MP4 stream under Linux OS so that users can play the file using a web based Flash player such as Flowplayer.

I discovered VLC for that purpose but I cannot figure out the exact command line string. I also need HTTP authentication feature since IP camera access is password protected.

I also interested in any non-VLC solution if any (ffmpeg?).

migrated from serverfault.com Apr 28 '11 at 14:07

This question came from our site for system and network administrators.


I suggest using Handbrake. It makes a nice front end to VLC transcoding.


Try this: (On Linux) ffmpeg -f mjpeg -r 8 -i *ttp://your_IP_address:port/video.jpg -f flv -vcodec flv -r 25 -b 26000 -s 320x240 /opt/lampp/htdocs/output.flv


Use cURL to handle the HTTP request with authentication, and pipe CURL's output to the stdin of ffmpeg to handle transcoding. You can break it into segments or something as needed. If you need a live stream, things get more complicated, and a commercial solution is probably going to be a lot easier to deal with than any of the open source stuff out there.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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