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 361047 - Add new Totem-based video indexer
Add new Totem-based video indexer
Status: RESOLVED FIXED
Product: beagle
Classification: Other
Component: General
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Beagle Bugs
Beagle Bugs
Depends on:
Blocks:
 
 
Reported: 2006-10-10 02:22 UTC by Bastien Nocera
Modified: 2006-10-18 16:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
beagle-totem-indexer.patch (6.06 KB, patch)
2006-10-10 02:31 UTC, Bastien Nocera
none Details | Review

Description Bastien Nocera 2006-10-10 02:22:02 UTC
This new indexer uses the totem-video-indexer (now in Totem CVS HEAD) to parse the metadata from videos and music files. It supports all the metadata and files that Totem does (no, it doesn't include subtitle data interleaved in video files, sorry).
Comment 1 Bastien Nocera 2006-10-10 02:23:34 UTC
Example run against a video:

Filename: file:///home/hadess/Movies/Unleashed.avi
Debug: Loaded 46 filters from /home/hadess/Projects/Cvs/beagle/Filters/Filters.dll
Filter: Beagle.Filters.FilterTotem
MimeType: video/x-msvideo

Properties:
  dc:extent = 6149
  fixme:audio:bitrate = 128
  fixme:audio:codec = MPEG layer 2/3
  fixme:audio:samplerate = 44100
  fixme:video:codec = ISO MPEG-4 (XviD, ffmpeg)
  fixme:video:fps = 23
  fixme:video:height = 240
  fixme:video:width = 576

(no content)
(no hot content)

Example run against an audio file:

Filename: file:///home/hadess/Music/Albums/Chris Isaak - Wicked Game/01. Chris Isaak - Wicked Game.m4a
Debug: Loaded 46 filters from /home/hadess/Projects/Cvs/beagle/Filters/Filters.dll
Filter: Beagle.Filters.FilterTotem
MimeType: audio/mp4

Properties:
  dc:extent = 289
  dc:title = Wicked Game
  fixme:album = Wicked Game
  fixme:artist = Chris Isaak
  fixme:audio:codec = AAC 2.0 (libfaad)
  fixme:audio:samplerate = 44100
  fixme:year = 1991

(no content)
(no hot content)
Comment 2 Bastien Nocera 2006-10-10 02:31:34 UTC
Created attachment 74381 [details] [review]
beagle-totem-indexer.patch

The Filter parses the output of the "totem-video-indexer <URI>" command, for all the mime-types reported by "totem-video-indexer --mimetypes".

It should probably have a higher priority than the MPlayer indexer. If useful properties are missing, please file a bug directly against Totem.

The totem-video-indexer binary just outputs key/value pairs on the stdout:
TOTEM_INFO_TITLE=Wicked Game
TOTEM_INFO_ARTIST=Chris Isaak
TOTEM_INFO_YEAR=1991
TOTEM_INFO_ALBUM=Wicked Game
TOTEM_INFO_DURATION=289
TOTEM_INFO_HAS_VIDEO=False
TOTEM_INFO_HAS_AUDIO=True
TOTEM_INFO_AUDIO_CODEC=AAC 2.0 (libfaad)
TOTEM_INFO_AUDIO_SAMPLE_RATE=44100

And the mime-type listing is simply one mime-type per line of stdout output.

Please check the few FIXMEs in the code and let me know.
Comment 3 Kevin Kubasik 2006-10-11 02:27:26 UTC
(In reply to comment #0)
> This new indexer uses the totem-video-indexer (now in Totem CVS HEAD) to parse
> the metadata from videos and music files. It supports all the metadata and
> files that Totem does (no, it doesn't include subtitle data interleaved in
> video files, sorry).
> 

Awesome to hear, this looks really cool, any rough approximations on a release? I'm more inclined to go with totem over mplayer since its far more likely to be shipped with the system.  (oh, and about those video subtitles, they are a major bug right now due to memory use, so I can't say it sounds like all that bad of an idea ;) )
Comment 4 Debajyoti Bera 2006-10-11 02:50:50 UTC
Why depend on a frontend to xine or gstreamer ? If you want libxine/gstreamer based filters, go for one that directly uses the libraries and not on an UI using them.
(And IMHO, I dont see the _advantage_ of moving to xine/gstreamer from mplayer - they seem to be equally smart in handling movie formats. And no, not every system ships xine by default, let alone totem.)
Comment 5 Bastien Nocera 2006-10-11 03:57:14 UTC
(In reply to comment #4)
> Why depend on a frontend to xine or gstreamer ? If you want libxine/gstreamer
> based filters, go for one that directly uses the libraries and not on an UI
> using them.

It doesn't depend on Totem, but on a binary that happens to be shipped with Totem. Same thing for the totem-video-thumbnailer. And because upstream (ie. me) cares about the integration with Beagle, I know things are in a better shape than parsing the output of an application that we have no control over (I used to work on nautilus-cd-burner, and parsing cdrecord's output was certainly fun).

> (And IMHO, I dont see the _advantage_ of moving to xine/gstreamer from mplayer
> - they seem to be equally smart in handling movie formats. And no, not every
> system ships xine by default, let alone totem.)

Right. *No* distribution ships MPlayer, at least non-with the interesting bits turned on. And Totem is the default GNOME video player, and is the default for OpenSUSE's GNOME, Fedora Core, Ubuntu, and Mandriva's GNOME. At least.

And I don't even know why I care to reply about that, if the video indexer isn't installed, it will fallback to MPlayer.
Comment 6 Joe Shaw 2006-10-11 20:15:06 UTC
Direct library filters would be ideal, but this is essentially the same as our mplayer, pdf, rpm, etc. filters and still useful.
Comment 7 Bastien Nocera 2006-10-11 20:43:23 UTC
(In reply to comment #6)
> Direct library filters would be ideal, but this is essentially the same as our
> mplayer, pdf, rpm, etc. filters and still useful.

I could ship the indexer as part of Totem, if it was possible to have the filters as plugins (or even better, as C plugins).
Comment 8 Joe Shaw 2006-10-11 20:47:34 UTC
The filter could be shipped as part of totem, but it doesn't seem worth it to add support for mono and crap to your build system to build one file.  It's not a big deal for us to ship it with Beagle, and that's what we do for the other filters anyway.
Comment 9 Debajyoti Bera 2006-10-11 21:44:23 UTC
Its my fault. I didnt check the code of the filter and assumed the totem filter will _completely_ replace the mplayer filter. I was scared because Totem is the " official movie player of the GNOME desktop environment " and thought it might pull in tons of GNOME desktop libraries as dependency. I didnt try to install it - I should have tried first. Sorry :P.
Comment 10 Kevin Kubasik 2006-10-13 07:49:39 UTC
Well, if your too lazy Joe, just say the word, and it shall be committed. (the filter, not your words, we don't care about those ;) )
Comment 11 Joe Shaw 2006-10-17 18:58:52 UTC
Checked this in, with a couple minor changes.

Bastien: the year being a string is fine; they all get stored as strings in the index in the end anyway.
Comment 12 Bastien Nocera 2006-10-18 16:12:18 UTC
Thanks! And you beat me to the release as well :)