Viewing an mjpeg stream with mplayer
and Co uses much CPU
Power on my X-Windows.
I search for an other client and found a solution
to view an MJPEG
Stream in real-time.
mkfifo a.mjpeg wget -O a.mjpeg http://localhost:8081 2>/dev/null & mplayer -cache 32 -demuxer 35 a.mjpeg
Because mplayer doesn't know anything from handling http streaming wget is used.
A fifo is filled only with mjpeg by wget.
Mplayer reads from this fifo and uses the mjpeg demuxer (35) to view the stream.
- 18 Jul 2005
That is a wonderful idea. I will think about where in the official Motion Guide I should put this little gold piece of information.
- 18 Jul 2005
The above suggestion did not work for me. What works however is
mplayer -demuxer lavf http://localhost:8081/stream.mjpg
Note that the
part is important, without it you will get
LAVF_check: no clue about this gibberish!
nonsense from libavformat.
Adding MPEG or AVI streaming would still be a good idea though, as I believe it will help save bandwidth.
If your camera does not have a sream location that ends with .mjpg then you can still fool mplayer into thinking is does by attaching a fake get variable at the end of the URL like this :
" mplayer -demuxer lavf http://localhost:8081/?video_name=stream.mjpg
- 24 May 2011
FFplay from FFmpeg works as well and has many options, *mjpeg format needs to be forced. :
ffplay -f mjpeg -probesize 32 -i http://localhost:8081
The full manual is over at http://www.ffmpeg.org/ffplay.html
--Kelsie.Flynn - 2 Dec 2013