Adding NAL headers to raw H264 stream
Asked Answered
C

1

1

In order to add NAL headers to a raw H264 stream, what do I need to do? Ultimately, I want to take the video file and mux it with an audio file.

2 related questions:

1.) I've looked at this post: H.264 conversion with FFmpeg (from a RTP stream)

However, when I look at the first two bytes of each frame, I'm seeing 0 and 0 for any frame I record, which doesn't say anything about the NAL contents.

Am I looking at the right place? Is there another way I can create and write in NAL headers to a H264 stream?

2.) Also, does the NAl header contain any timing information? How could I sync it with the audio?

Thanks!

Craigie answered 26/6, 2013 at 15:18 Comment(0)
E
0

I have no idea what you mean when you say NAL headers. However, your stream is most likely in annexb format. In annexB format each NALU is preceded with a start code. Usually it is a 3 (0x000001) or 4 (0x00000001) byte startcode. Simply skip past these bytes.

Eighteenmo answered 12/7, 2013 at 23:42 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.