I have only raw H264 video data (video frames) and its PPS and SPS information. How can I calculate the real duration of this video? (I have no moov atom, no audio data)
Asked
Active
Viewed 373 times
1 Answers
1
The SPS has an optional struct calld VUI. If the VUI is present AND the timing_info_present_flag is set AND the fixed_frame_rate_flag is set, you can read the num_units_in_tick and time_scale to determine frame time. If any one of those flags is false, timing is unavailable in the bitstream and must be derived from the container.

szatmary
- 29,969
- 8
- 44
- 57
-
I see that even when timing_info_present_flag is false, the duration of video still can be calculated. I sent you an email with the full description what I see. Please check your inbox. – TOP Jan 21 '16 at 03:33
-
@TOP I'm having same thing..I have mdat atom , SPS and PPS but not the moov atom. I'm trying to find the NALU inside the mdat atom and decode, but it is getting some invalid NALU also..Can you please explain me how can I do that if you know. – Mohammad Azam Mar 16 '21 at 04:48