0

I'm creating a player in Python-GStreamer, on a pretty dated GStreamer 0.10.32, like this:

import pygst
pygst.require("0.10")
import gst
import gobject

self.__player = gst.parse_launch(
    'filesrc name="source" location="/file/here.mp3" '
    '! audio/mpeg, mpegversion=1, layer=3 '
    '! ffdec_mp3 '
    '! audioconvert ! audioresample ! volume name="vol" '
    '! alsasink name="sink" sync=false')

It works fine, but I never get a tags message from the player's bus. I do need id3 tags. So I'm replacing caps filter (audio/mpeg, mpegversion=1, layer=3) with id3demux, and an error appears on certain MP3s: "streaming task paused, reason not-linked (-1)".

Putting identity or queue in front and linking to them doesn't help with id3demux.

For some reason, mad element is not available on my platform.

Why won't my second replacement work, or is there another way to get id3 tags from the stream?

EDIT: Apparently, this is caused by specific files. No idea yet what is so specific about those MP3s. This also happens when I simply test the pipeline with gst-launch.

With GST_DEBUG=2, I'm getting:

0:00:00.046048767 32720      0x22388a0 WARN                tagdemux gsttagdemux.c:680:gst_tag_demux_chain:<id3demux0> Downstream did not handle newsegment event as it should
0:00:00.046096615 32720      0x22388a0 WARN                 basesrc gstbasesrc.c:2625:gst_base_src_loop:<source> error: Internal data flow error.
0:00:00.046106087 32720      0x22388a0 WARN                 basesrc gstbasesrc.c:2625:gst_base_src_loop:<source> error: streaming task paused, reason not-linked (-1)

Replacing id3demux with a caps filter back helps, but I never get the tags then.

Victor Sergienko
  • 13,115
  • 3
  • 57
  • 91

1 Answers1

2

I ended up resorting to playbin2. It manages to build a working pipelines that do send tags message somehow.

Victor Sergienko
  • 13,115
  • 3
  • 57
  • 91