Discussion:
[MPlayer-users] use mplayer with slow rtmp stream
john smith
2016-03-06 18:44:46 UTC
Permalink
I use rtmpdump to get a livestream I want to put as a screensaver
inside mplayer inside xscreensaver. The command I use is:

rtmpdump -live -r 'rtmp://cdn-03.whatsupcams.com/live/es_laspalmas3' \
-W http://www.whatsupcams.com/static/flowplayer/flowplayer.swf \
-quiet | mplayer -cache 8192 -

The problem is that playback does not start at all but only in a
couple of minutes, instead I get a lot of this:

Cache empty, consider increasing -cache and/or -cache-min. [performance issue]

I read some people suggesting using -o with rtmpdump and just pass an
output filename as a parameter to mplayer in a separate command. I can
do that and playback works but mplayer exits after a couple of seconds
probably because playback is finished. I suppose that root cause is
that download speed that rtmpdump achieves is very poor, slower than
playback speed. Stream in question works very nice in web browser:
http://www.whatsupcams.com/en/webcams/spain/canary-islands/las-palmas-gran-canaria/webcam-live-las-canteras-beach.
I
tried -nocache but got:

Cannot seek backward in linear streams!
Seek failed

What can be done about this? Ideally I would like mplayer to start
playback as soon as it gets data from rtmpdump, without any pause. Is
this possible?

mplayer version:
MPlayer 1.2.1-4.8.2 (C) 2000-2016 MPlayer Team

rtmpdump version:
RTMPDump v2.4
--
<***@gmail.com>
Reimar Döffinger
2016-03-06 19:43:14 UTC
Permalink
Post by john smith
I use rtmpdump to get a livestream I want to put as a screensaver
rtmpdump -live -r 'rtmp://cdn-03.whatsupcams.com/live/es_laspalmas3' \
-W http://www.whatsupcams.com/static/flowplayer/flowplayer.swf \
-quiet | mplayer -cache 8192 -
The problem is that playback does not start at all but only in a
Cache empty, consider increasing -cache and/or -cache-min. [performance issue]
There are a few things that go wrong.
On in particular is that FFmpeg has issues with the audio stream,
it thinks there is one but it can't figure out the format.
All issues can be worked around with:
-lavfdopts probesize=32 -demuxer lavf
john smith
2016-03-06 20:04:18 UTC
Permalink
Post by Reimar Döffinger
Post by john smith
I use rtmpdump to get a livestream I want to put as a screensaver
rtmpdump -live -r 'rtmp://cdn-03.whatsupcams.com/live/es_laspalmas3' \
-W http://www.whatsupcams.com/static/flowplayer/flowplayer.swf \
-quiet | mplayer -cache 8192 -
The problem is that playback does not start at all but only in a
Cache empty, consider increasing -cache and/or -cache-min. [performance issue]
There are a few things that go wrong.
On in particular is that FFmpeg has issues with the audio stream,
it thinks there is one but it can't figure out the format.
-lavfdopts probesize=32 -demuxer lavf
I tried this:

rtmpdump -v -r 'rtmp://cdn-03.whatsupcams.com/live/es_laspalmas3' \
-W http://www.whatsupcams.com/static/flowplayer/flowplayer.swf | \
mplayer -lavfdopts probesize=64 -demuxer lavf -

but somewhere in the middle of output mplayer says:

34.155 kB / 10200.47 sec[live_flv @ 0x7f73ba6c2220]Stream #0: not
enough frames to estimate rate; consider increasing probesize
[live_flv @ 0x7f73ba6c2220]decoding for stream 0 failed
[live_flv @ 0x7f73ba6c2220]Could not find codec parameters for stream
1 (Audio: none, 0 channels): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options

I tried increasing probesize to 128 but to no avail. Playback is still
not started but on the bottom I can see this:

Load subtitles in ./
1248.490 kB / 10417.33 sec

Both numbers are growing - no cache errors this time.
--
<***@gmail.com>
Reimar Döffinger
2016-03-06 20:30:24 UTC
Permalink
Post by john smith
Post by Reimar Döffinger
Post by john smith
I use rtmpdump to get a livestream I want to put as a screensaver
rtmpdump -live -r 'rtmp://cdn-03.whatsupcams.com/live/es_laspalmas3' \
-W http://www.whatsupcams.com/static/flowplayer/flowplayer.swf \
-quiet | mplayer -cache 8192 -
The problem is that playback does not start at all but only in a
Cache empty, consider increasing -cache and/or -cache-min. [performance issue]
There are a few things that go wrong.
On in particular is that FFmpeg has issues with the audio stream,
it thinks there is one but it can't figure out the format.
-lavfdopts probesize=32 -demuxer lavf
rtmpdump -v -r 'rtmp://cdn-03.whatsupcams.com/live/es_laspalmas3' \
-W http://www.whatsupcams.com/static/flowplayer/flowplayer.swf | \
mplayer -lavfdopts probesize=64 -demuxer lavf -
enough frames to estimate rate; consider increasing probesize
1 (Audio: none, 0 channels): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
I tried increasing probesize to 128 but to no avail. Playback is still
You can increase probesize to infinity and it won't change anything.
The audio cannot be played (is there audio? I actually assumed
there is none).
The point of setting the low probesize is exactly to make
it not even try and instead start playing.
john smith
2016-03-06 20:47:01 UTC
Permalink
Post by Reimar Döffinger
You can increase probesize to infinity and it won't change anything.
The audio cannot be played (is there audio? I actually assumed
there is none).
The point of setting the low probesize is exactly to make
it not even try and instead start playing.
No, there is no sound. The problem is that mplayer window is not shown
although it seems that playback is started. Using another stream such
as this one makes mplayer window show up:

rtmpdump -v -r rtmp://aljazeeraflashlivefs.fplive.net/aljazeeraflashlive-live/aljazeera_eng_med
| mplayer -
--
<***@gmail.com>
john smith
2016-03-06 21:02:10 UTC
Permalink
Post by john smith
Post by Reimar Döffinger
You can increase probesize to infinity and it won't change anything.
The audio cannot be played (is there audio? I actually assumed
there is none).
The point of setting the low probesize is exactly to make
it not even try and instead start playing.
No, there is no sound. The problem is that mplayer window is not shown
although it seems that playback is started. Using another stream such
rtmpdump -v -r
rtmp://aljazeeraflashlivefs.fplive.net/aljazeeraflashlive-live/aljazeera_eng_med
| mplayer -
ok, it works with `-nosound'.
--
<***@gmail.com>
Loading...