EricBerendsen / dvbinspector

DVB Inspector is an open-source DVB analyzer, written in java
http://www.digitalekabeltelevisie.nl/dvb_inspector/
GNU General Public License v3.0
169 stars 29 forks source link

Suggestion: Parsing PES data #21

Open lars18th opened 3 years ago

lars18th commented 3 years ago

Hi @EricBerendsen ,

When parsing some "large" (between 5~10 min.) files, if I select "Parse data" for a pid I'll get in troubles. The problem is the memory management. In some cases the process will never finish (I need to close the program), or I'll need to wait a lot of time. So, here one suggestion if you want to implement it:

I hope you agree with this enhancement. Thank you for this useful tool. Regards.

EricBerendsen commented 3 years ago

Hi,

Sounds like a reasonable request, and think it should not be too difficult to implement. Only thing I need is time... Putting it on my TODO list.

lars18th commented 3 years ago

Hi @EricBerendsen ,

Another "simple" enhacement could be to add to the list of the PES Packets the order number. Example: Video H.264 PES Packet [pts=1:33:27.0200] (0001)

Then when we see the graf of the frame sizes (the panel selected when "H.264 PES Data"), then it will be more easy to search for the concrete packet.

You agree with that too?

EricBerendsen commented 3 years ago

Like this? image

Which can be toggled by this menu: image

(You found the PTS option, the number list items is right above it)

Or do you mean something else?

lars18th commented 3 years ago

Wooh! Yes, just that. :+1: I never see this in the menu. Great! :smile:

So, another suggestion: Please can you add the "Picture Type" in the PES packet? Something like this: Video H.264 PES Packet [pts=1:33:27.0200] [I] [0]

As you now can parse PES data of MPEG-2, H.264 and HEVC codecs (I can see this info in the NALUnits), then it will be very useful if you add this info in the packet list. Perhaps with a new menu entry like "Show Picture Type on PES Packets".

You agree? Regards.

lars18th commented 2 years ago

Hi @EricBerendsen ,

So, another suggestion: Please can you add the "Picture Type" in the PES packet? Something like this: Video H.264 PES Packet [pts=1:33:27.0200] [I] [0]

You agree with that last suggestion too?

EricBerendsen commented 2 years ago

So, another suggestion: Please can you add the "Picture Type" in the PES packet? Something like this: Video H.264 PES Packet [pts=1:33:27.0200] [I] [0]

For MPEG2 video this has already been done:

image

I am not a compression expert, but AFAIK for h264 and h265 things are more complicated. In h264 a frame can consist of multiple slices, and each can have its own slice-type (=Picture type). Also there are types SP and SI, All of these can be present in a single frame (never seen it, but think theoretical it could). So it is not always possible to say what type of frame it is. However the graph when you select the PES data node show all the slice-type in each PES packet.

image

From that you can find the type of each frame.

For h265 the slice types are even more complex, I would not know what to consider I, P or B. I think the graph has more value then just a simple letter on each PES packet

image

lars18th commented 2 years ago

Hi @EricBerendsen ,

Thank you for the info. However, perhaps I've presented the request in wrong terms. What I request is if you can write for H.264 & H.265 the type of slice in the list of frames, like this:

The idea is this: You have the data, as the diagram with bars has the information. But the line with the description of the PES packet in the Tree doesn't have it. Then it's very difficult to search for a specific frame this without checking the diagram. So the idea is quite simple: write the info that you have for the diagrams like you do with the MPEG-2 streams in the Tree.

I hope I've described it well this time. Regards.

lars18th commented 2 years ago

Hi @ValZapod ,

  • Example for H.264:

There are no I, P, B frames really, because there are IRAP, all kinds of recovery frames, etc. In HEVC there is also BLA and CRA.

Yes, in recent codecs the type of frames has increased. However, the idea is to print the codec-type of each frame.... independently of the codec used.