[MPlayer-users] MPlayer, RTSP, live555 and audio

Michael Kohne mhkohne at moberg.com
Sat Dec 15 06:38:06 EET 2018

OK, a big piece of this is that I'm a little stupid. Both RTP streams were
trying to come in on the same port (62000), and therefore got in each
other's way.
When I stop using -rtsp-port, and open up my firewall, it works (still
can't hear the audio, but that's likely to be an unrelated issue).

I've not got time till Monday to dig into the source, but I couldn't see
anything in the man page - is there a way to specify a range for
-rtsp-port? I need be able to predict the ports that will be used, so that
I can open up only the firewall ports I need.

Michael Kohne

Senior Software Engineer
Office: 215.283.0860 x208
mhkohne at moberg.com

On Fri, Dec 14, 2018 at 8:23 AM Michael Kohne <mhkohne at moberg.com> wrote:

> I'm trying to use mplayer to play video from a Sony IP camera (the EP-580).
> I've built the latest mplayer (from yesterday, SVN 38117), and had it grab
> ffmpeg itself.
> I'm building with the Live555 libraries in place (I'm on CentOS 6, and the
> Live555 version I have is 2012.01.25 - that was the one I could easily find
> packaged already in the nux repo).
> If I disable audio on the camera, I can run mplayer thusly:
> ./mplayer -prefer-ipv4 -rtsp-port 62000 rtsp://
> And it works great (Camera is doing 1920x1080 @ 30 fps, 4096kbps). Video
> looks good.
> If I enable audio on the camera (even if I end up leaving the microphone
> unplugged), then I never see an image, and mplayer exits after a second or
> so:
> MPlayer SVN-r38117-4.9.1 (C) 2000-2018 MPlayer Team
> Playing rtsp://
> Connecting to server[]: 554...
> A single media stream only is supported atm.
> rtsp_session: unsupported RTSP server. Server type is 'unknown'.
> STREAM_LIVE555, URL: rtsp://
>  file format detected.
> Initiated "video/H264" RTP subsession on port 62000
> Initiated "audio/PCMU" RTP subsession on port 62000
> VIDEO:  [H264]  0x0  0bpp  30.000 fps    0.0 kbps ( 0.0 kbyte/s)
> [gl] using extended formats. Use -vo gl:nomanyfmts if playback fails.
> ==========================================================================
> Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
> libavcodec version 58.42.101 (internal)
> Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
> ==========================================================================
> ==========================================================================
> Opening audio decoder: [alaw] aLaw/uLaw audio decoder
> AUDIO: 8000 Hz, 1 ch, s16le, 64.0 kbit/50.00% (ratio: 8000->16000)
> Selected audio codec: [ulaw] afm: alaw (uLaw)
> ==========================================================================
> [AO OSS] audio_setup: Can't open audio device /dev/dsp: No such file or
> directory
> AO: [alsa] 8000Hz 1ch s16le (2 bytes per sample)
> Starting playback...
> A:   0.0 V:   0.0 A-V:  0.000 ct:  0.200   0/  0 ??% ??% ??,?% 0 0
> Exiting... (End of file)
> I've poked around the lists a bit, and found references to using ffmpeg to
> do rtsp:
> ./mplayer -prefer-ipv4 -rtsp-port 62000 ffmpeg://rtsp://
> I tried that with audio both enabled and disabled on the camera and got
> the same results: The video is jerky and useless because it's missing RTP
> packets (I get a steady stream of messages indicating losses of up to 300
> packets at a go). Note that I also didn't hear any audio, but that could
> just be because it couldn't get enough data in a row to play it.
> Other things I've tried:
> rtsp://
> This locks up, same as the camera
> ffmpeg://rtsp://
> This plays video, but no audio. There's no messages about dropped RTP
> packets, and no indications of bad video, just...no audio comes out.
> Latest Live555 libraries: No good. They changed their API in April 2013,
> and MPlayer has never been updated to the new API. There's a patch floating
> around that builds, but it produced no difference in operation. (
> http://lists.mplayerhq.hu/pipermail/mplayer-users/2013-July/086408.html
> https://git.trafficking.agency/teddydestodes/arietta_buildroot/raw/3789597275f7557110b572f492ece3c084932bc8/package/mplayer/0003-mpdemux-live555-async-interface.patch?inline=false
> )
> Conclusions:
> mplayer's use of ffmpeg as an rtsp client can't keep up with my camera,
> and may have audio problems.
> mplayer's use of the Live555 libraries is somehow broken when multiple
> streams are in play.
> Is there anything else I should be trying to get this going before I start
> trying to learn how the demuxers work? I'm starting to dig through the
> DOCS/tech directory now, but if there's a way to fix this without having to
> dive into the RTP demuxer code, I'd be most grateful.
> Thank you.
> Michael Kohne
> Senior Software Engineer
> Office: 215.283.0860 x208
> mhkohne at moberg.com


Celebrating 20 Years

Transforming Neurocritical Care

Research, Inc.

224 S Maple Street, Ambler, PA 19002

24/7 Customer 
Support: 888.662.7246

www.moberg.com <https://www.moberg.com/>

More information about the MPlayer-users mailing list