Frame By Frame Tags

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Frame By Frame Tags

Brian Panneton
Hello,

I currently am stepping frame by frame in PAUSED mode with the following python code and pulling out each frame:
        self.elements['innersink'].send_event(Gst.Event.new_step(Gst.Format.BUFFERS, 1, 1, True, False))
        self.inner_sample = self.elements['innersink'].emit('pull-preroll')
        self.inner_buffer = self.inner_sample.get_buffer()

I am struggling to get tags out without being in PLAYING mode. Is there any way to get the Tags out while in PAUSED mode? From what I can tell, the only way to get the streaming tags is to listen for them on the bus similar to how one would listen for the EOS. I attempted this as I stepped through, but I couldn't seem to get anything.

While in paused mode I do something like this to get some tags off the beginning:

        while(True):
            msg = self.pipeline_front.get_bus().pop_filtered(Gst.MessageType.TAG | Gst.MessageType.ERROR | Gst.MessageType.ASYNC_DONE)
            print "TAG TYPE", msg, type(msg), msg.type
            if msg.type != Gst.MessageType.TAG:
                print 'Done:', msg.type
                break
            tags = msg.parse_tag()
            print tags.to_string()
            for tag in range(tags.n_tags()):
                name = tags.nth_tag_name(tag)
                print tag, name, tags.get_string(name)


It seems to work, but I only get a few tags like the following. I assume these are metadata tags.

taglist, video-codec=(string)H264; 
taglist, container-format=(string)Matroska;
taglist, video-codec=(string)H.264;

When I run 'strings <file>' command on the file I find these, so I know there are more tags.
matroska
GStreamer plugin version 1.2.4
GStreamer Matroska muxer
Video
V_MPEG4/ISO/AVC

The one I'm trying to pull out is the encoder tag (encoder=GStreamer plugin version 1.2.4) but I can't for the life of me find it. Any help would be appreciated!

Thanks,
Brian Panneton

           



_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Frame By Frame Tags

Brian Panneton
Actually I can't seem to find that data anywhere even while in PLAYING mode. Is there somewhere else metadata is hidden aside from the TAGs? I didn't see them in the CAPS either.

Thanks,
Brian

On Tue, Jun 14, 2016 at 3:44 PM, Brian Panneton <[hidden email]> wrote:
Hello,

I currently am stepping frame by frame in PAUSED mode with the following python code and pulling out each frame:
        self.elements['innersink'].send_event(Gst.Event.new_step(Gst.Format.BUFFERS, 1, 1, True, False))
        self.inner_sample = self.elements['innersink'].emit('pull-preroll')
        self.inner_buffer = self.inner_sample.get_buffer()

I am struggling to get tags out without being in PLAYING mode. Is there any way to get the Tags out while in PAUSED mode? From what I can tell, the only way to get the streaming tags is to listen for them on the bus similar to how one would listen for the EOS. I attempted this as I stepped through, but I couldn't seem to get anything.

While in paused mode I do something like this to get some tags off the beginning:

        while(True):
            msg = self.pipeline_front.get_bus().pop_filtered(Gst.MessageType.TAG | Gst.MessageType.ERROR | Gst.MessageType.ASYNC_DONE)
            print "TAG TYPE", msg, type(msg), msg.type
            if msg.type != Gst.MessageType.TAG:
                print 'Done:', msg.type
                break
            tags = msg.parse_tag()
            print tags.to_string()
            for tag in range(tags.n_tags()):
                name = tags.nth_tag_name(tag)
                print tag, name, tags.get_string(name)


It seems to work, but I only get a few tags like the following. I assume these are metadata tags.

taglist, video-codec=(string)H264; 
taglist, container-format=(string)Matroska;
taglist, video-codec=(string)H.264;

When I run 'strings <file>' command on the file I find these, so I know there are more tags.
matroska
GStreamer plugin version 1.2.4
GStreamer Matroska muxer
Video
V_MPEG4/ISO/AVC

The one I'm trying to pull out is the encoder tag (encoder=GStreamer plugin version 1.2.4) but I can't for the life of me find it. Any help would be appreciated!

Thanks,
Brian Panneton

           




_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Frame By Frame Tags

Tim Müller
On Thu, 2016-06-16 at 13:11 -0400, Brian Panneton wrote:

Hi,

As far as I can tell we don't put the muxing application info ("GStreamer plugin version 1.2.4") anywhere into tags currently.

Cheers
 -Tim
-- 
Tim Müller, Centricular Ltd - http://www.centricular.com

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Frame By Frame Tags

Brian Panneton
So when I run mkvinfo I get a bunch of output and see the following:

+ EBML head
|+ Doc type: matroska
|+ Doc type version: 2
|+ Doc type read version: 2
+ Segment, size unknown
|+ Seek head (subentries will be skipped)
|+ Segment information
| + Segment UID: 0x13 0x4b 0xac 0x31 0x0b 0x80 0x43 0x60 0x5c 0xf8 0xd5 0x95 0x64 0x37 0xcd 0x10
| + Timecode scale: 1000000
| + Duration: 0.000s (00:00:00.000)
| + Muxing application: GStreamer plugin version 1.2.4
| + Writing application: GStreamer Matroska muxer
| + Date: Mon May 01 11:41:31 2015 UTC
|+ Segment tracks
| + A track
|  + Track number: 1 (track ID for mkvmerge & mkvextract: 0)
|  + Track type: video
|  + Track UID: 5610257614117874817
|  + Name: Video
|  + Video track
|   + Pixel width: 1280
|   + Pixel height: 960
|  + Codec ID: V_MPEG4/ISO/AVC
|  + CodecPrivate, length 33 (h.264 profile: Main @L4.1)
|+ Cluster

You are right that that is not stored in the TAGs. It seems to show up under Segment Information. Is there some way to pull this information out with gstreamer? I'm not sure where to look. I pulled out the segments but nothing jumps out as to where it is stored.

Thanks,
Brian

On Thu, Jun 16, 2016 at 3:55 PM, Tim Müller <[hidden email]> wrote:
On Thu, 2016-06-16 at 13:11 -0400, Brian Panneton wrote:

Hi,

As far as I can tell we don't put the muxing application info ("GStreamer plugin version 1.2.4") anywhere into tags currently.

Cheers
 -Tim
-- 
Tim Müller, Centricular Ltd - http://www.centricular.com

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Frame By Frame Tags

Tim Müller
On Mon, 2016-06-27 at 14:02 -0400, Brian Panneton wrote:

Hi Brian,

> You are right that that is not stored in the TAGs. It seems to show
> up under Segment Information. Is there some way to pull this
> information out with gstreamer? I'm not sure where to look. I pulled
> out the segments but nothing jumps out as to where it is stored.

The only sensible [*] way to do this is by modifying the matroska-demux
source code to extract that information and put it into the tags :)

Cheers
 -Tim

[*] ignoring things like writing an element that just extracts the
metadata in question and otherwise passes through the buffers

--

Tim Müller, Centricular Ltd - http://www.centricular.com
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel