Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: Parsing PES data #21

Open
lars18th opened this issue Jun 8, 2021 · 9 comments
Open

Suggestion: Parsing PES data #21

lars18th opened this issue Jun 8, 2021 · 9 comments
Labels
enhancement New feature or request

Comments

@lars18th
Copy link

lars18th commented Jun 8, 2021

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:

  • In the "Parse data" function add one Status Window (or a Status Bar) to print the percentage of the completed process. As you know the total number of packets then you can calculate how many reamins until complete the process. Futhermore, you can also implement a "Stop" button to exit for the process and print only de partial data parsed. This will helps when the number of packets is very large and you only want to check some part.

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

@EricBerendsen EricBerendsen added the enhancement New feature or request label Jun 9, 2021
@EricBerendsen
Copy link
Owner

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
Copy link
Author

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
Copy link
Owner

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
Copy link
Author

Wooh! Yes, just that. 👍
I never see this in the menu. Great! 😄

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
Copy link
Author

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
Copy link
Owner

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
Copy link
Author

lars18th commented Dec 9, 2021

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:

  • Example for MPEG-2 (already implemented):
Video PES Packet (Picture B) [pts=1:33:27.0200] [0]
Video PES Packet (Picture P) [pts=1:33:27.0450] [1]
Video PES Packet (Picture I) [pts=1:33:27.0700] [2]
...
  • Example for H.264:
Video H.264 PES Packet (Slice-Type P) [pts=1:33:27.0200] [0]
Video H.264 PES Packet (Slice-Type B) [pts=1:33:27.0450] [1]
Video H.264 PES Packet (Slice-Type I) [pts=1:33:27.0700] [2]

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
Copy link
Author

lars18th commented Apr 4, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants
@lars18th @EricBerendsen and others