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

Roger Heflin rogerheflin at gmail.com
Tue May 14 23:23:24 EEST 2019


Direct reply to you, since this is not directly mplayer related.

Depending on what you are doing with the data from the camera, motion
may work better.  It can drop all frames to jpg files using a defined
name.  I know it is available on various fedora versions and is
probably available on a number of other linux distributions.  It does
cleanly deal with mjpeg since a lot of the cameras use it, newer
versions also handle x266.

On Tue, May 14, 2019 at 1:55 PM Kevan Hashemi
<hashemi at opensourceinstruments.com> wrote:
>
> Dear Reimar,
>
> Thank you for your help.
>
> > But the "-f mpeg" to FFmpeg and MJPEG codec... Are you putting MJPEG
> > into a MPEG container?
>
> It's the Raspberry Pi that's producing the stream, and calls is MJPEG. When I receive with ffmpeg and copy the stream codec into a file, ffmpeg says the file is "Video: mjpeg (mp4v / 0x7634706D), yuvj420p(pc, bt470bg/unknown/unknown)" Is there a container involved in the stream? I don't know.
>
> > Either is quite a horrible format.
>
> When your choice is H264 or MJPEG, these being the camera options, MJPEG does have certain advantages: every frame is a key frame, and arrives within one frame period of being captured by the image sensor. We synchronize video recordings with wireless EEG recordings to within fifty milliseconds.
>
> > I would most strongly recommend to pick some other format (e.g. mkv,
> > nut or such)
>
> I'm not using a container, so far as I know. I'm directing an incoming stream to MPlayer. If that incoming stream has a container, I have no control over it.
>
> > specifying -demuxer lavf and maybe even -lavdopts format=mpeg
>
> The first one works on MacOS MPlayer. The stream starts right away. The second one I believe is an mencoder option.
>
> > As far as I know, basically all MPlayer versions will fail to
> > properly auto-detect that and hang randomly, and what you are seeing
> > is probably some versions handling it better than others.
>
> I think you're right. The MPlayer versions that could figure it out took about ten seconds to do so. With "-demuxer" lavf they hook up and start streaming right away. I'm still getting this report from Linux MPlayer when I try to play the same stream:
>
> 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:  4.00% (40960 bytes)
> Exiting... (End of file)
>
>
> Best, Kevan
>
> --
> Kevan Hashemi, President
> Open Source Instruments Inc.
> www.opensourceinstruments.com
> _______________________________________________
> MPlayer-users mailing list
> MPlayer-users at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/mplayer-users


More information about the MPlayer-users mailing list