Not able to write the tags in matroskamux

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

Not able to write the tags in matroskamux

brateesh
Hi all,
trying to write tags in the mkv video stream
pipeline is appsrc|videoconvert|openh264enc|matoskamux|filesink

code:
...
mux = gst_element_factory_make("matroskamux", NULL);
...
GstTagSetter *tagsetter = GST_TAG_SETTER(mux);
        gst_tag_register("test", GST_TAG_FLAG_META,G_TYPE_INT, "-test", "tag to test its function", NULL);
        gst_tag_setter_add_tags(tagsetter, GST_TAG_MERGE_REPLACE,"video-codec","checking-codec",NULL);
        gst_tag_setter_add_tags(tagsetter, GST_TAG_MERGE_APPEND,"test",100,NULL);
...

while reading the tags on bus i can only read default tags
container-format : Matroska
video-codec:h264

even video-codec tag value not changed
Reply | Threaded
Open this post in threaded view
|

Re: Not able to write the tags in matroskamux

Sebastian Dröge-3
On Fr, 2016-06-10 at 03:26 -0700, brateesh wrote:

> Hi all,
> trying to write tags in the mkv video stream
> pipeline is appsrc|videoconvert|openh264enc|matoskamux|filesink
>
> code:
> ...
> mux = gst_element_factory_make("matroskamux", NULL);
> ...
> GstTagSetter *tagsetter = GST_TAG_SETTER(mux);
> gst_tag_register("test", GST_TAG_FLAG_META,G_TYPE_INT, "-test",
> "tag to
> test its function", NULL);
> gst_tag_setter_add_tags(tagsetter,
> GST_TAG_MERGE_REPLACE,"video-codec","checking-codec",NULL);
>         gst_tag_setter_add_tags(tagsetter,
> GST_TAG_MERGE_APPEND,"test",100,NULL);
> ...
>
> while reading the tags on bus i can only read default tags
> container-format : Matroska
> video-codec:h264
>
> even video-codec tag value not changed
matroskamux does not support writing of arbitrary tags currently,
there's only a limited set of tags that are supported.

And the video-codec is not stored as a tag in the Matroska container
but in the codec metadata about the streams (and it is based on the
caps, not the tag event). In the demuxer the tag is then created again
from that.


What are you trying to do?

--
Sebastian Dröge, Centricular Ltd · http://www.centricular.com
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (968 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Not able to write the tags in matroskamux

brateesh
I wanted to store more information of the frames in the video
so i thought of storing it in the arbitrary tags by frame number as tag name
so experimenting how to write and read the arbitrary tags
suggest any other api suitable for storing information in video
or container and codec which are good for arbitrary tags
Reply | Threaded
Open this post in threaded view
|

Re: Not able to write the tags in matroskamux

Sebastian Dröge-3
On Mi, 2016-06-15 at 21:23 -0700, brateesh wrote:
> I wanted to store more information of the frames in the video 
> so i thought of storing it in the arbitrary tags by frame number as
> tag name so experimenting how to write and read the arbitrary tags
> suggest any other api suitable for storing information in video
> or container and codec which are good for arbitrary tags

Should it interoperate with other applications?

You could extend matroskamux/demux for your use case to handle other
tags. In theory everything can be stored in Matroska, or also a few
other container formats. You will just need to implement something then
that allows you to store your custom tags in there in an appropriate
format.


Alternatively, what exactly do you want to store and how/where do you
want to use it? There might be other ways depending on what you want to
do.

--

Sebastian Dröge, Centricular Ltd · http://www.centricular.com
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (968 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Not able to write the tags in matroskamux

brateesh

No need to interoperate with other application

Initially you said matroskamux does not support the arbitrary tags now you are saying by implementing something we can store the arbitrary tags,what is that something

I want to store the key-value pair,It will be written during the encoding and read it during decoding


i have attached my code of implementing tag (line:224) you may get the idea what i m trying to do
matroskamux_tag.cpp 
Reply | Threaded
Open this post in threaded view
|

Re: Not able to write the tags in matroskamux

Sebastian Dröge-3
On So, 2016-06-19 at 21:39 -0700, brateesh wrote:
> No need to interoperate with other application
>
> Initially you said matroskamux does not support the arbitrary tags now you
> are saying by implementing something we can store the arbitrary tags,what is
> that something

Well, obviously you can change the code to write whatever information
you want into the files if you don't need interoperability with other
software. The tag system of Matroska is extensible by new tags, you
could just add support for yours to matroskamux and matroskademux.

Take a look at the code of both and how the current tag handling is
done, that will show you how new ones can be added there.

--

Sebastian Dröge, Centricular Ltd · http://www.centricular.com
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (968 bytes) Download Attachment