This is our old Q&A Site. Please post any new questions and answers at

Is there any method of knowing the length of mp4 video in a packet? I have captured packets for a 27 second youtube video. There are 142 PDUs in total. I want to read the TCP data segment in any one of the packets and guess or calculate its length. Any help?


asked 16 Sep '14, 05:12

Qazi's gravatar image

accept rate: 0%

I guess this question could have some answers:

Unless you really mean the TCP segment length per packet - it can be calculated by taking the IP total length and subtracting the IP and TCP header size from that.

permanent link

answered 16 Sep '14, 05:17

Jasper's gravatar image

Jasper ♦♦
accept rate: 18%

edited 16 Sep '14, 05:18

Thanks for the response Jasper. I think I was not very clear in the question. I am not talking about the length of TCP segment. I want to know the length of video that is being carried by that specific packet.

(16 Sep '14, 05:25) Qazi

I'd guess it's usually all of the segment, but maybe there is also some kind of management info included.

For knowing how to reassemble a video stream out of the segments you need detailed protocol information about how that kind of stream works (unless it announces it in some way in one of the segments, but again, you'd need protocol specs for interpreting that info)

(16 Sep '14, 05:29) Jasper ♦♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 16 Sep '14, 05:12

question was seen: 2,834 times

last updated: 16 Sep '14, 05:29

p​o​w​e​r​e​d by O​S​Q​A