[MPlayer-users] MJPEG Streams on MacOS, Linux, Windows

Kevan Hashemi hashemi at opensourceinstruments.com
Tue May 14 01:17:28 EEST 2019


Greetings,

Apologies for long-winded question. I am encountering a failure that I think may be a missing codec or library, which causes some of my MPlayer installations to fail in receiving a particular video stream, while others receive the same stream just fine.

When I stream a video locally like this:

ffmpeg -i Mouse.mp4 -f mpeg tcp://127.0.0.1:8888?listen

And play it like this:

mplayer -cache 1000 ffmpeg://tcp://127.0.0.1:8888

The stream reception works perfectly on MacOS, Windows, and Linux with all my various mplayer installations.

Now I start an MJPEG stream from a Raspberri Pi camera. On MacOS I have the mplayer I pulled out of the MacOS Extended MPlayer, 24-JAN-18, and it plays the stream just fine, here are first few lines of output.

kevan$ ./mplayer -cache 1000 ffmpeg://tcp://10.0.0.235:2222
MPlayer SVN-r38017-4.2.1 (C) 2000-2018 MPlayer Team
Playing ffmpeg://tcp://10.0.0.235:2222.
libavformat version 58.3.100 (internal)
Cache fill: 19.20% (196608 bytes)
Cannot seek backward in linear streams!
Cannot seek backward in linear streams!
libavformat file format detected.
Cannot seek backward in linear streams!
[mjpeg @ 0x1043d7630]Found EOI before any SOF, ignoring
[lavf] stream 0: video (mjpeg), -vid 0
VIDEO:  [MJPG]  820x616  0bpp  25.000 fps    0.0 kbps ( 0.0 kbyte/s)
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
libavcodec version 58.9.100 (internal)
Selected video codec: [ffmjpeg] vfm: ffmpeg (FFmpeg MJPEG)
==========================================================================

Now I try to do the same thing, but with the mplayer I obtained with Home Brew today, but it fails with:

$ mplayer -cache 1000 ffmpeg://tcp://10.0.0.235:2222
MPlayer 1.3.0-4.2.1 (C) 2000-2016 MPlayer Team
Can't init Apple Remote.
Playing ffmpeg://tcp://10.0.0.235:2222.
libavformat version 57.25.100 (internal)
Cache fill:  3.20% (32768 bytes)

It freezes, no video window. I press CTR^C, when I get:

MPlayer interrupted by signal 2 in module: demux_open
MPlayer interrupted by signal 2 in module: enable_cache
Exiting... (End of file)

On Windows, I my mplayer receives the stream just fine. But on Linux, I install mplayer with YUM and it fails like this:

$ mplayer -fps 200 -cache 1000 ffmpeg://tcp://10.0.0.235:2222
MPlayer SVN-r34652-4.4.6 (C) 2000-2012 MPlayer Team
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.
Playing ffmpeg://tcp://10.0.0.235:2222.
libavformat version 53.32.100 (external)
Using network protocols without global network initialization. Please use avformat_network_init(), this will become mandatory later.
Cache fill:  3.20% (32768 bytes)

I thought at first that my problems were arising from the MacOS "Can't init Apple Remote" or the Linux "Failed to open LIRC support. You will not be able to use your remote control." But I get these same errors when streaming locally with ffmpeg and mplayer works fine.

The Windows and MacOS Extended installations come with an accompanything library folder. But the Linux and Home Brew installations do not come with these same libraries. What is missing from the MPlayer installations that fail on this stream?

Best, Kevan

-- 
Kevan Hashemi, President
Open Source Instruments Inc.
www.opensourceinstruments.com


More information about the MPlayer-users mailing list