After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 575022 - problems with audio-only files
problems with audio-only files
Status: RESOLVED FIXED
Product: pitivi
Classification: Other
Component: General
Git
Other Linux
: Normal major
: 0.13.1
Assigned To: Alessandro Decina
Pitivi maintainers
Depends on:
Blocks:
 
 
Reported: 2009-03-12 02:32 UTC by Brandon Lewis
Modified: 2009-03-13 10:29 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gst debug output (130.20 KB, text/plain)
2009-03-12 20:21 UTC, Brandon Lewis
Details

Description Brandon Lewis 2009-03-12 02:32:28 UTC
When I try to import audio only files, they do not work well or at all. Exactly what goes wrong seems to depend on the encoding, but none of the formats I have tried works properly, including wav, mp3, flac, and ogg. The following is a summary of what happens when you I to import each type of file

My Setup

The following is based on the current git master branch, using the most recent gstreamer libraries supplied by the PPA as of Mar 11, 2009. I am running ubuntu 8.10 with the universe, multiverse, etc enabled, as well as medibuntu non-free. 

Errors for .wav:

Traceback on the console:
Traceback (most recent call last):
  • File "pitivi/discoverer.py", line 424 in _capsNotifyCb
    stream = self._addStreamFromPad(ghost)
  • File "pitivi/discoverer.py", line 459 in _addStreamFromPad
    stream  = get_stream_for_pad(pad)
  • File "pitivi/stream.py", line 337 in get_stream_for_pad
    stream = get_stream_for_caps(caps, pad)
  • File "pitivi/stream.py", line 318 in get_stream_for_caps
    stream_type = get_pad_type(pad)
  • File "pitivi/stream.py", line 286 in get_pad_type
    decoder = find_decoder(pad)
  • File "pitivi/stream.py", line 227 in find_decoder
    factory = element.get_factory()
AttributeError: 'gst.GhostPad' object has no attribute 'get_factory'

Closer inspection of the code reveals that there is probably a bug in the find_decoder function. On line 223, element is assigned the value of pad.get_parent(). I would think pad.get_parent_element() is more appropriate, since sometimes the parent of a pad is a ghost pad. After changing the call from get_parent() to get_parent_element(), the traceback dissapears, but I still get a general import error in the gui. The text of the error is as follows:

URI:/home/brandon/media/turn_the_beat_around.wav
Problem:An internal error occured while analyzing this file: Internal data flow error.
Extra information:gstwavparse.c(1888): gst_wavparse_loop (): /GstPipeline:Discoverer-file:///home/brandon/media/turn_the_beat_around.wav/GstDecodeBin2:dbin/GstWavParse:wavparse0:
streaming task paused, reason not-linked (-1)

.mp3

I get an import error in the gui. The text of the error is as follows:

URI:/home/brandon/media/turn_the_beat_around.mp3
Problem:Could not establish the duration of the file.
Extra information:This clip seems to be in a format which cannot be accessed in a random fashion.

.flac

URI:/home/brandon/media/turn_the_beat_around.flac
Problem:Pipeline didn't want to go to PAUSED.

.ogg

Import succeeds, but after adding files to the timeline, my console fills with 

(pitivi:20645): GStreamer-CRITICAL **: gst_mini_object_unref: assertion `mini_object->refcount > 0' failed

while thumbnails are being generated.
Comment 1 Brandon Lewis 2009-03-12 02:59:46 UTC
After rebooting, the situation has changed slightly:

.wav with find_decoder() modified as above:

import succeeds, and I can add the file to the timeline, but I get the same assertion errors as I do with .ogg.

.mp3 

Different errors appear in the GUI. I now see:

URI:/home/brandon/media/turn_the_beat_around.mp3
Problem:An internal error occured while analyzing this file: Internal data flow error.
Extra information:gstbasesrc.c(2330): gst_base_src_loop (): /GstPipeline:Discoverer-file:///home/brandon/media/turn_the_beat_around.mp3/GstFileSrc:src-file:///home/brandon/media/turn_the_beat_around.mp3:
streaming task paused, reason not-linked (-1)

Other Strange Behavior:

With an audio-only clip in the timeline, the previewer can't be completely paused. Playback seems to stop, but the seek position is constantly being updated (i.e. if I try to scroll, the scrollbar snaps back), and the "play" icon remains visible on the "play/pause" button.
Comment 2 Brandon Lewis 2009-03-12 03:12:25 UTC
Further updates:

Some of the behavior described above is not limited to audio-only files. They also seem to be happening with AV files as well.

* this assertion fills my console while audio waveforms are generated
(pitivi:20645): GStreamer-CRITICAL **: gst_mini_object_unref: assertion
`mini_object->refcount > 0' failed

* the timeline playhead position is updated during playback, but not when scrubbing the ruler. It's not yet clear to me whether this is because the the timeline ruler isn't getting the appropriate signal, or whether the signal is being emitted but with the wrong timestamp.

* seeking seems to be faulty: scrubbing the ruler causes the appropriate frames to appear in the viewer, but the timeline ruler position isn't updated until you press play. After pressing play, the ruler position stops being updated.

* the timeline must still be getting playback-position-changed events from the timeline pipeline, because you can't scroll the past the timeline cursor. as soon as it moves out of view, the scroll position centers back around the ruler.
Comment 3 Alessandro Decina 2009-03-12 16:50:29 UTC
The problems with mp3 flac and wav should be fixed in master.

* this assertion fills my console while audio waveforms are generated
(pitivi:20645): GStreamer-CRITICAL **: gst_mini_object_unref: assertion
`mini_object->refcount > 0' failed

this is fixed in gst-python git, i'll package it and put in PPA soon.

As for the seeking, we should open separate bugs i think.
Comment 4 Brandon Lewis 2009-03-12 18:47:02 UTC
Installed latest updates as of 11:35AM Mar. 12, 2009.

Confirmed that:

* .wav now import successfully
* no assertions appear in console while audio waveforms are generated.
* flac seems to work as sell, in master
* no problems with ogg either.

Still getting this error with with mp3:
URI:/home/brandon/media/turn_the_beat_around.mp3
Problem:Could not establish the duration of the file.
Extra information:This clip seems to be in a format which cannot be accessed in
a random fashion.
Comment 5 Brandon Lewis 2009-03-12 20:21:41 UTC
Created attachment 130551 [details]
gst debug output
Comment 6 Brandon Lewis 2009-03-12 20:23:11 UTC
added attachment with debug level 3 output
Comment 7 Brandon Lewis 2009-03-12 21:01:47 UTC
On Alessandro's suggestion, I have removed the gstreamer01.0-fluendo-mp3, which fixes the problem for mp3. 
Comment 8 Alessandro Decina 2009-03-13 10:29:59 UTC
commit 5229af6baa164fa0818a9cb2603c5c4e34c14742
Author: Alessandro Decina <alessandro.decina@collabora.co.uk>
Date:   Thu Mar 12 17:43:21 2009 +0100

    stream: add a fix for wav files.

commit d5cbac4c3434e3eef0dd183cc57347c7863b4a1f
Author: Alessandro Decina <alessandro.decina@collabora.co.uk>
Date:   Thu Mar 12 17:14:02 2009 +0100

    discoverer: link the pads even before we get a notify::caps signal.

commit 4cb4e62ba2c429bb103d7f5b96ec28bed4dc380a
Author: Alessandro Decina <alessandro.decina@collabora.co.uk>
Date:   Thu Mar 12 16:40:29 2009 +0100

    discoverer: link pads on the first notify::caps even if caps are still not fixed