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 577099 - [discoverer] use gst.pbutils to also give codec/container human-friendly names
[discoverer] use gst.pbutils to also give codec/container human-friendly names
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-python
git master
Other Linux
: Normal enhancement
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-03-28 17:37 UTC by Christian Fredrik Kalager Schaller
Modified: 2011-01-28 13:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch adding codec information gathering (4.71 KB, patch)
2009-07-06 17:40 UTC, Christian Fredrik Kalager Schaller
none Details | Review

Description Christian Fredrik Kalager Schaller 2009-03-28 17:37:39 UTC
It would be nice if the discoverer library in pygst could also provide the codec
names for the audio and video. Often when you want size/lenght and similar information you at the same time want to know which codecs are used.
Comment 1 Edward Hervey 2009-03-30 08:19:15 UTC
A trick we use in pitivi is to use the "gst.pbutils" module (plugins base utils), which is normally used for the missing plugins system, but you can also use parts of it to convert caps to 'human' description.

In [1]: import gst

In [2]: import gst.pbutils

In [3]: gst.pbutils.get_codec_description(gst.Caps("video/mpeg, systemstream=True"))
Out[3]: 'MPEG Video'


The above example also shows that you can do that for container formats also ! :)

discoverer should use this.
Comment 2 Tim-Philipp Müller 2009-03-30 09:14:17 UTC
This info should also be in the *CODEC* tags.
Comment 3 Christian Fredrik Kalager Schaller 2009-03-30 13:38:16 UTC
But the caps displayed by discoverer do not seem to include any reference to the codecs used? 

The output of gst-discover is for instance:
video caps: video/x-raw-yuv, format=(fourcc)I420, width=(int)352, height=(int)240, pixel-aspect-ratio=(fraction)10/11, framerate=(fraction)30000/1001

So getting the format name to something human readable I guess is a step 2 from actually getting the codec information at all?
Comment 4 Stefan Sauer (gstreamer, gtkdoc dev) 2009-03-31 08:36:31 UTC
Christian, imho gst-discover does not handle tags, gstfile.py imho does. While your at it, having a gtk-based discovery browser would be nice :)
Comment 5 Christian Fredrik Kalager Schaller 2009-05-05 09:25:22 UTC
Not sure if any of the proposed solutions actually work in the sense that it seems none of them returns enough information to actually be useful. On this wiki
page I have listed the caps information needed to actually identify codecs and container formats:
http://gstreamer.freedesktop.org/wiki/GstreamerCaps

So to actually identify mp3 I need to get back 'audio/mpeg,mpegversion=1,layer=3'
and not 'audio/mpeg'

So what I would like is for discoverer to give me the full 'unique' caps string back for the codecs in the file discovered, so that I can use that information to decide if remuxing is possible for instance.
Comment 6 Christian Fredrik Kalager Schaller 2009-07-06 17:40:58 UTC
Created attachment 137930 [details] [review]
Patch adding codec information gathering

This patch implements the suggested added functionality
Comment 7 Stefan Sauer (gstreamer, gtkdoc dev) 2011-01-28 08:49:10 UTC
I am using pbutils manualy in gst-media info to get the human readable codec/container names and its fairly straight forward. I also use the internal media-type as a hashtable key to lookup other details, so that needs to be kept. I feel its easy enough to lookup the names if needed from the application using the discoverer api.
Comment 8 Christian Fredrik Kalager Schaller 2011-01-28 13:12:41 UTC
Actually this bug is redundant as the new C based discoverer does this. Closing.