Parsing NAL units using FFMPEG

10,991

For question 1: The following article has links that will help you understand what NALs are.

In h264 NAL units means frame.?

NALs are divided into several types, and depending on the type can contain decoding parameters (SPS, PPS), enhancement information (SEI) and video samples (slice header and data). A common sequence from a broadcast transport stream would be SPS, PPS, SEI, slice_header(), slice_data(), SEI, slice_header(), slice_data() *

You probably don't need to understand ISO 14496-10 section 7.3 "Syntax in tabular form" for your application.

Share:
10,991
2ndlife
Author by

2ndlife

I am a developer working on UPnP , H264 and a newbie in Android projects

Updated on June 12, 2022

Comments

  • 2ndlife
    2ndlife almost 2 years

    I am new to MPEG-4 and taking baby steps to learn it. I am using FFMPEG as reference.

    1. I understand that all mpeg-4 are encoded into NAL units and wrt to FFMPEG av_read_frame() function returns one NAL unit, Am I right? Is frame a NAL unit? (though it can be a combination of multiple NALs)

    2. I also saw that h264_parser.c implements a function called h264_parse which is calling parse_nal_units() inside, If i need to get NAL units how can I use this parse_nal_units from my main function?

    3. What is av_parse_Parse2() function do? does it return decoded NAL units?

    4. OR FFMPEG has -vbsf h264_mp4toannexb switch to dump raw NAL units, Can somebody help me understand how I can use the same from my main function?

    Please help me out here... -ash5

  • 2ndlife
    2ndlife over 12 years
    thanks Bob, I had seen that SO link, Have you used FFMPEG or any other library to decode individual NAL units and merge them to get one frame of picture??
  • Mutant Bob
    Mutant Bob over 12 years
    I have not. Most of my video manipulation has been at the container level.