[Gstreamer-bugs] [Bug 141686] New: - Proposal for printf-style tag formatting element

bugzilla-daemon at widget.gnome.org bugzilla-daemon at widget.gnome.org
Sun May 2 15:59:00 PDT 2004


http://bugzilla.gnome.org/show_bug.cgi?id=141686
GStreamer | gstreamer (core) | Ver: HEAD CVS

           Summary: Proposal for printf-style tag formatting element
           Product: GStreamer
           Version: HEAD CVS
          Platform: Other
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: Normal
         Component: gstreamer (core)
        AssignedTo: gstreamer-maint at bugzilla.gnome.org
        ReportedBy: jyasskin at mail.utexas.edu
         QAContact: gstreamer-maint at bugzilla.gnome.org


Right now, the only way I know of to get the tags out of a file from the command
line is to actually decode the file with `gst-launch --tags`. I suggest that a
printf-style tag formatting element be written that could be used in a command
line like: `gst-launch filesrc="file" ! spider ! formattags
format="%{album}:%{title}" ! filesink=/dev/stdout`. This could then be easily
wrapped up in a shell script.

The element should have a sink of type application/x-gst-tags and a source of
type text/plain.

I think format specifiers like %{tagname} work well for inserting tag values
because the names are variable length and more will be added. For other
metadata, the more traditional %c style could be used, or other delimiters, ex.
%(non-tag_data)

At the very least, all tags gstreamer knows about should be supported by %{}, %%
should insert a '%', and all C '\' escapes should work. If possible, there
should be format specifiers that insert the filename and mime type (%f and %m?).
It might be nice to also support format-specific tag names, like id3's TPE4, etc.

I have a simple program that does this formatting for mp3 and vorbis files in
arch. Archive at http://bluejay.dyndns.org/archives/2003/ version
jyasskin at mail.utexas.edu--2003/mprintf--main--0.1 (sorry, it's in haskell)

We need to decide what to do when a tag doesn't exist. So far, I've just been
inserting the empty string, but it might be better to let the user decide. Also,
tags with a list of values need to have those values separated with something.
I've been using ',', but again the user should have a choice. Finally, if we
support format-specific tags, a way to disambiguate their names from gstreamer
offical tag names is needed. Perhaps "artist" would select the gst tag, while
"id3v1:artist" would take the id3v1 tag specifically. (This solution would
constrain gst tag names to never contain ':')

I hope to be able to start writing this element after the 15th, but I figure a
bug is appropriate in case I don't get around to it or someone has a better idea.

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
You are the QA contact for the bug, or are watching the QA contact.




More information about the Gstreamer-bugs mailing list