Viewing an mjpeg stream with mplayer

Introduction

Firefox and Co uses much CPU Power on my X-Windows.

I search for an other client and found a solution with mplayer 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.

-- PeterHolik - 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.

-- KennethLavrsen - 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 stream.mjpg 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 "

-- BradMrumlinski - 24 May 2011
Topic revision: r5 - 24 May 2011 - 03:41:59 - BradMrumlinski
 
Motion - Mplayer Mjpeg Stream Viewing
Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Please do not email Kenneth for support questions (read why). Use the Support Requests page or join the Mailing List.