Transcoding MJPEG to FLV or MP4

Emre Yazici picture Emre Yazici · Jul 19, 2010 · Viewed 14k times · Source

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

Answer

rogerdpack picture rogerdpack · Aug 1, 2010

appears VLC can do HTTP authentication. http://www.videolan.org/doc/play-howto/en/ch04.html and I believe it can output to flv. Typically I start things going by using the GUI to see what it is using as parameters, then go from there. There's no magic formula there, mate.

Appears you can output to flv by something similar to:

:sout=#transcode{vcodec=h264,vb=0,scale=0,acodec=mp3,ab=128,channels=2,samplerate=44100}:http{mux=ffmpeg{mux=flv},dst=:8080/}

http://forum.videolan.org/viewtopic.php?f=14&t=80722

Also might work FFmpeg with url like http://user:password@host:port/address

ref: https://ffmpeg.zeranoe.com/forum/viewtopic.php?t=1139