Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?).

share|improve this question

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.

share|improve this answer

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

share|improve this answer

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.

share|improve this answer

Your Answer


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.