[MPlayer-users] MPlayer, RTSP, live555 and audio
Michael Kohne
mhkohne at moberg.com
Fri Dec 14 15:23:41 EET 2018
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://192.168.0.113/media/video1
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://192.168.0.113/media/video1.
Connecting to server 192.168.0.113[192.168.0.113]: 554...
A single media stream only is supported atm.
rtsp_session: unsupported RTSP server. Server type is 'unknown'.
STREAM_LIVE555, URL: rtsp://192.168.0.113/media/video1
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://
192.168.0.113/media/video1
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://184.72.239.149/vod/mp4:BigBuckBunny_175k.mov
This locks up, same as the camera
ffmpeg://rtsp://184.72.239.149/vod/mp4:BigBuckBunny_175k.mov
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
Moberg
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