Page 1 of 1

VLC with custom metadata

Posted: 24 Aug 2009 05:40
by FoxholeNorman
I have some mpeg 2 transport stream with metadata that I encoded in a particular format, and I was wondering if there was a way to setup VLC to display this data. I have some C# knowledge and have been looking at the wrappers people have made for VLC, but haven't found a very clear way to just get started with that kind of stuff. I'm open to any platform, but the captured transport stream has been having issues with windows media (I'm assuming directshow in general) and that's why i want to use some basis in VLC because it plays perfectly there. Any pointers or help would be greatly appreciated. So far it seems like I'll have to modify the VLC code in C or C# but, like I said before, I'm having a hard time getting started in that direction.

Fox

Re: VLC with custom metadata

Posted: 24 Aug 2009 10:04
by Jean-Baptiste Kempf
modules/demux/ts.c is probably the place you want to look at. :D

Re: VLC with custom metadata

Posted: 24 Aug 2009 19:09
by FoxholeNorman
Thanks for the reply, I've been looking through ts.c, but i was curious about something else as well. My files that I have captured have a ton of discontinuities; however, this doesn't seem to effect playback at all in vlc. Could this be the cause of the poor playback in other player though? As well, I wanted to try and give a better picture of how I capture to see if there were any obvious flaws. I am using a simple C program that reads udp data from an encoder into a gumstix computer. All I do is use recvfrom() and then fwrite() to store it on a microsd on the gumstix. I am only able to see the custom metadata in a hex editor so far, but that is how I have been verifying it is there. I guess I would need to add some functionality to ts.c to look for a certain PID, because the format is non-standard? Is this right?

Fox

Re: VLC with custom metadata

Posted: 15 Sep 2009 06:08
by chidug
A such I don't think VLC decoder supports metadata. Since the metadata is private, you will have to extract it from the stream based on the PID & dump it. What you want to do with it after wards,,,is upto you.
Try using some TS analyzers to check if there are any discontinuities per PID. If VLC player can play is properly, then the chances are that the incoming stream is good. The one problem that I can think of is that, the other player is trying to decode your metadata. Try using some defined/reserved stream type for your metadata & that may stop your other decoders to look/decode packets pertaining to metadata PID.