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

Alexander Strasser eclipse7 at gmx.net
Fri Oct 24 13:25:42 CEST 2014


Hi!

On 2014-10-23 23:22 +0200, Reimar Döffinger wrote:
> On Thu, Oct 23, 2014 at 10:57:21PM +0200, Reimar Döffinger wrote:
> > On Thu, Oct 23, 2014 at 01:52:21PM +0100, Andy Furniss wrote:
> > > Erik Auerswald wrote:
> > > >Hi,
> > > >
> > > >On Thu, Oct 23, 2014 at 12:48:15PM +0100, Jim Cross wrote:
> > > >>I have quite a few example audio streams that I can not get to play using
> > > >>MPlayer, although the streams work in chrome's browser.
> > > >>
> > > >>As one example, I have tried the below 'playlist' file (or it's contents)
> > > >>but get the further below (typical) output.
> > > >>I have tried many options with and without -cache sizes together
> > > >>with/without many -cache-min values.
> > > >>
> > > >>Could this be a bug (in the current version I'm using?) or is there another
> > > >>option that can be applied to get the stream to start playing?:
> > > >>
> > > >>http://dir.xiph.org/listen/1467960/listen.m3u
> > > >>http://ai-radio.org:8000/radio.opus
> > > >
> > > >I get the error message:
> > > >
> > > >   Ogg stream 0 is of an unknown type
> > > 
> > > Me too, but if I save the stream with wget, mplayer will play the file OK
> > > (and display a logo).
> > 
> > That seems suspicious. I think this might be due to us using different
> > default demuxers for Ogg, since the FFmpeg one (used to/does?) work
> > rather badly for streaming.
> > An explicit -demuxer lavf works.
> > Assuming your FFmpeg version that MPlayer uses is new enough.
> 
> Starting with r37304 it should work (mostly?) without -demuxer lavf.

  Damn it! I should have read my emails before working hours to come
up with this hack:

--- a/libmpdemux/demux_ogg.c
+++ b/libmpdemux/demux_ogg.c
@@ -38,6 +38,7 @@
 #include "demux_ogg.h"
 
 #define FOURCC_VORBIS mmioFOURCC('v', 'r', 'b', 's')
+#define FOURCC_OPUS   mmioFOURCC('o', 'p', 'u', 's')
 #define FOURCC_SPEEX  mmioFOURCC('s', 'p', 'x', ' ')
 #define FOURCC_THEORA mmioFOURCC('t', 'h', 'e', 'o')
 
@@ -865,6 +866,18 @@ int demux_ogg_open(demuxer_t *demuxer)
             mp_msg(MSGT_DEMUX, MSGL_INFO,
                    "[Ogg] stream %d: audio (Vorbis), -aid %d\n",
                    ogg_d->num_sub, n_audio - 1);
+        } else if (pack.bytes >= 19 && !strncmp(pack.packet, "OpusHead", 8)) {
+            sh_a = new_sh_audio_aid(demuxer, ogg_d->num_sub, n_audio, NULL);
+            sh_a->format     = FOURCC_OPUS;
+
+            ogg_d->subs[ogg_d->num_sub].speex      = 1;
+            ogg_d->subs[ogg_d->num_sub].id         = n_audio;
+            n_audio++;
+            mp_msg(MSGT_DEMUX, MSGL_INFO,
+                   "[Ogg] stream %d: audio (Opus), -aid %d\n",
+                   ogg_d->num_sub, n_audio - 1);
+
+            // check for Theora
         } else if (pack.bytes >= 80 && !strncmp(pack.packet, "Speex", 5)) {
             sh_a = new_sh_audio_aid(demuxer, ogg_d->num_sub, n_audio, NULL);
             sh_a->wf         = calloc(1, sizeof(*sh_a->wf) + pack.bytes);
 


Hopefully I learned one thing or another ;)
  Alexander
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <https://lists.mplayerhq.hu/pipermail/mplayer-users/attachments/20141024/2b180e1a/attachment.asc>


More information about the MPlayer-users mailing list