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 111511 - audio preview should use gstreamer
audio preview should use gstreamer
Status: RESOLVED DUPLICATE of bug 486827
Product: nautilus
Classification: Core
Component: [obsolete] Audio Preview
2.13.x
Other All
: Normal enhancement
: 2.16.x
Assigned To: Christian Neumair
Nautilus Maintainers
: 47373 308592 336931 (view as bug list)
Depends on: 315383 333112
Blocks: 167946
 
 
Reported: 2003-04-24 15:19 UTC by Marinus Schraal
Modified: 2008-03-17 23:42 UTC
See Also:
GNOME target: ---
GNOME version: 2.15/2.16


Attachments
nautilus icon view preview soundfile using gstreamer (9.86 KB, patch)
2003-04-24 15:20 UTC, Marinus Schraal
none Details | Review
updated patch vs CVS HEAD (8.11 KB, patch)
2003-10-12 13:52 UTC, Marinus Schraal
none Details | Review
audi-preview-gst-launch.patch (4.11 KB, patch)
2005-08-20 02:37 UTC, Ed Catmur
none Details | Review
nautilus-2.12.0-gstlaunch.patch (4.31 KB, patch)
2005-09-06 00:38 UTC, Ed Catmur
none Details | Review
nautilus-2.12.0-gstlaunch.patch (5.70 KB, patch)
2005-09-06 11:09 UTC, Ed Catmur
none Details | Review
Proposed patch (21.86 KB, patch)
2006-02-24 22:08 UTC, Christian Neumair
none Details | Review

Description Marinus Schraal 2003-04-24 15:19:15 UTC
Attached a proof of concept hack to use gstreamer as audio player with the
on mouse over music preview in Nautilus. Patched vs. nautilus 2.2.3, it now
replaces the default implementation . If there's interest in doing it this
way, i could do a cleaned up version with some input on what is important
to change.
Comment 1 Marinus Schraal 2003-04-24 15:20:26 UTC
Created attachment 15981 [details] [review]
nautilus icon view preview soundfile using gstreamer
Comment 2 Elijah Newren 2003-04-27 01:16:52 UTC
Adding PATCH keyword, setting priority->high because of the patch, and
also addding GNOMEVER2.2 and bugsquad keywords.
Comment 3 Alexander Larsson 2003-04-28 14:44:09 UTC
It looks interesting to me. Although we should probably make the
gstreamer dependency compile-time optional.

campd, what's your opinion?

Also, we should probably reap the thread if its been idle for a while.
Comment 4 Marinus Schraal 2003-04-28 16:54:41 UTC
we should yes, right now that makes nautilus crash in some cases if
you keep it on preview for a long time it seems (after song end). 
Comment 5 Marinus Schraal 2003-10-12 13:52:30 UTC
Created attachment 20656 [details] [review]
updated patch vs CVS HEAD
Comment 6 Marinus Schraal 2003-10-12 13:54:17 UTC
updated patch, now with configure switch ripped from totem mostly.
confirmed to work with gst-0.6.3

Also supports flac if gstreamer supports it.

Don't know how i should handle the reaping cleanly, so left that out.
Comment 7 Luis Villa 2004-02-14 05:17:02 UTC
Cc'ing thomasvs, who might want to look over the media bits. Anyway, I
think this looks mad cool- hope it gets in (in 2.7 :)
Comment 8 Alex Converse 2004-02-20 22:12:40 UTC
*** Bug 47373 has been marked as a duplicate of this bug. ***
Comment 9 Dave Camp 2004-05-05 22:38:56 UTC
we're still thinking about the hover preview stuff - let's wait on this until we
have that figured out.
Comment 10 Jaap A. Haitsma 2004-08-07 11:32:48 UTC
Isn't bug #127872 a duplicate of this bug?
Comment 11 Sebastien Bacher 2005-05-15 12:59:18 UTC
#127872 is about video playing, this bug is about audio playing.

Any news on the patch? gstreamer is used by the desktop now, that would be nice
to use it for the audio preview ... anybody who wants to update this patch?
Comment 12 Sebastien Bacher 2005-06-24 13:41:32 UTC
*** Bug 308592 has been marked as a duplicate of this bug. ***
Comment 13 Giacomo Perale 2005-07-19 13:09:30 UTC
Gentoo actually patches nautilus 2.10.x to use gstreamer, maybe foser doesn't
consider the patch good for inclusion yet.
Comment 14 Sebastien Bacher 2005-07-19 16:46:37 UTC
does the patch use gstreamer from nautilus? If that's the code alex said it
doesn't want such code because a gst bug would crash nautilus and not only the
audio preview
Comment 15 Christian Neumair 2005-07-27 16:27:53 UTC
Sebastien: Would be nice to get concrete information on that crasher. Using GST
is a *MUST*, why else do we have such great streaming technology? :)
Comment 16 Sebastien Bacher 2005-07-27 21:03:32 UTC
there is no known crasher, but running gst from the main thread would expose
nautilus to gst bugs (ie: instead of crashing the preview you would crash the
browser) that's probably why alex said he doesn't want to do that
Comment 17 Ed Catmur 2005-08-20 02:32:59 UTC
This may seem silly, but why not just spawn 

gst-launch gnomevfssrc location=%s ! spider ! gconfaudiosink

It might seem nasty to us an external binary, but this is effectively the same
as forking and setting up a mainloop to run the same pipeline, with the
advantage that gst-launch is known good code.

I've tried it myself and it works fine; the only issue is locating the
gst-launch binary (Gentoo calls it gst-launch-0.8, for example) but that can be
done with some autoconf-fu, no doubt.
Comment 18 Ed Catmur 2005-08-20 02:37:24 UTC
Created attachment 51016 [details] [review]
audi-preview-gst-launch.patch

Demonstration patch (against 2.11.91) to use gst-launch
Comment 19 Ed Catmur 2005-09-06 00:38:13 UTC
Created attachment 51845 [details] [review]
nautilus-2.12.0-gstlaunch.patch

For 2.12.0. Also improved the pipeline to:
gnomevfssrc location=%s ! spider ! audioconvert ! audioscale ! gconfaudiosink

to be able to play audio files with other bitrate, bit depth etc.
Comment 20 Ronald Bultje 2005-09-06 01:28:20 UTC
Ed:

1) please use location="%s", in case the filename/uri has spaces
2) please use decodebin instead of spider, since spider will not detect the
media type of some mp3 files (and is therefore deprecated)

Otherwise, thanks!
Comment 21 Ed Catmur 2005-09-06 11:09:28 UTC
Created attachment 51861 [details] [review]
nautilus-2.12.0-gstlaunch.patch

OK, switched to decodebin.
Re the location="%s": I construct the argv with a GPtrArray rather than by
parsing a command line; this means quotes, escaping, etc. aren't needed. The
above pipeline is just schematic.

Also added a patch to configure.in: AC_ARG_WITH([gst-launch],...)
Comment 22 Ronald Bultje 2005-09-06 14:09:20 UTC
You may want to add a fallback checking for gst-launch-0.8, since Debian
(amongst others) does not appear to install gst-launch by default.
Comment 23 Christian Neumair 2005-09-06 16:00:21 UTC
On a sidenote: gst-launch (at least for me) tries to run pipelines even if it
lacks an element. This can lead to heavily crippled output. Maybe there is a way
to prevent it from runing an incomplete pipeling, and returning an error instead?
Comment 24 Ronald Bultje 2005-09-06 17:09:35 UTC
Not that I know, you'll need to do some pre-checks on the relevant elements
(gnomevfssrc, audioconvert, audioscale, sink, decodebin) inside the nautilus
process to ensure it all works.
Comment 25 Christian Neumair 2005-09-06 17:17:38 UTC
Ronald: Maybe they could be added to make it simpler for client apps, and for
people who invoke it manually like me? I'd even find it more useful if we had a
--force-incomplete option which forces continuing if the pipeline lacks elements
and we defaulted to "do nothing but fail and complain".
Comment 26 Ronald Bultje 2005-09-06 18:03:22 UTC
Fine with me, but you'll need to open a new GStreamer bug (feature req.) for that.
Comment 27 Christian Neumair 2005-09-06 18:06:23 UTC
I've filed bug 315383 against gstreamer.
Comment 28 Ed Catmur 2005-09-06 19:10:42 UTC
Re comment 22: I'm using

	AC_PATH_PROGS(GST_LAUNCH_PATH, 
		      [gst-launch-0.9 gst-launch-0.8 gst-launch], no)

so gst-launch-0.8 will be used if available.
Comment 29 Christian Neumair 2005-10-05 21:09:34 UTC
*** Bug 127872 has been marked as a duplicate of this bug. ***
Comment 30 Christian Neumair 2005-10-05 21:10:11 UTC
Updating bug information, milestoning to Nautilus 2.14.
Comment 31 Tim-Philipp Müller 2005-10-05 21:32:14 UTC
I'm not sure whether gst-launch should be called directly. gst-launch is more
regarded as a developer tool as far as I know.

Of course calling gst-launch would appear to work independent of which GStreamer
major version is used/installed (0.8 vs. 0.9/0.10), but in the end you'd have to
decide for one or try both anyway, as the 'audioscale' element will be gone in
0.9/0.10 and be renamed to 'audioresample', for example.

If stability is the main concern for spawning an external helper program (and
rightly so probably), then why not just do a fork() + gst_parse_launch("my !
pipeline", &err) instead?

Or maybe write a little GUI tool that spawns an audio preview helper dialog with
a small seekbar or so? (That would also make it more apparent to the user that a
program is running which possibly blocks the audio device).

 Cheers
  -Tim
Comment 32 Christian Neumair 2005-10-12 22:00:51 UTC
Tim: Thanks for your comments. I agree that error handling could be made nicer
if we forked a previewer. We should probably depend on gstreamer 0.9.
Comment 33 Christian Neumair 2006-02-24 22:05:18 UTC
Missed feature freeze, milestoning to 2.16.
Comment 34 Christian Neumair 2006-02-24 22:08:08 UTC
Created attachment 60086 [details] [review]
Proposed patch

Proposed prelimitary proof-of-concept patch for GStreamer. It does not launch an app but directly use the API, since GStreamer got more and more stable.
Comment 35 Christian Neumair 2006-03-02 11:41:04 UTC
Making dependant on 333112. Testing revealed this GStreamer issue and as long as it isn't fixed we can't use it.

Note that the proposed patch from comment 34 does not use a timeout, i.e. the playback instantly starts when you hover over a file, thus stress-testing GStreamer when quickly hovering over many files.
Comment 36 Fabio Bonelli 2006-04-02 23:32:37 UTC
*** Bug 336931 has been marked as a duplicate of this bug. ***
Comment 37 Baybal Ni 2006-12-08 15:49:10 UTC
We need some quick workaround! Soon it will be 4 year old bug. Why just not to launch gst-launch-0.10 playbin ! gconfaudiosink?
Comment 38 Jason Brower 2007-03-07 06:02:12 UTC
lets get this thing crackin! But a proposed patch and nothing done for an entire year in gnome kind of out dates it.  Don't you think.
I am not expert program.  Pythons that best I got, but couldn't this progress just a little bit?  At least once this year?
Comment 39 Dylan McCall 2007-04-21 22:18:51 UTC
Sorry about the rather irrelevant comment, but I agree as far as new features / cleanups are concerned this should be a Priority (!) for the next release.
Nautilus' current behaviour for audio previews does not sit well with Gnome's "Just work" mentality where one must inexplicably install mpg123 and cannot get previews for files that only gStreamer can understand. It also does not sit well with the idea that each program does one thing well. If we have 2 programs doing the same thing (gStreamer for video / audio playback, but for no reason mpg123/mpg321 for audio playback within Nautilus), that idea is injured. It also makes no sense because gStreamer should be promoted as a centralized solution! When something as big as the file manager is not using it where it could and should, there is something wrong.

Sorry in advance about the following misuse of Bugzilla:
With gStreamer doing previews, would it be possible to do an audio preview with a video file? It could work well as an extra bonus that is visible to everyone. A lot of the time, all one really needs to recognize a video is a bit of sound from it. (And on the other hand, a full video preview could be rather painful).
Comment 40 Ed Catmur 2007-10-20 17:19:19 UTC
Looks like this has been picked up again by the Red Hat guys at bug 486827.  You may want to cc yourselves there.
Comment 41 Bastien Nocera 2007-10-30 23:56:21 UTC

*** This bug has been marked as a duplicate of 486827 ***