Manually generate "empty" h264 p-frame
Asked Answered
S

1

7

Let's call a p-frame frame empty if it doesn't change any pixels in the currently decoded video (i.e. no motion vectors, nothing).

What I need is to be able to manually insert empty p-frame into the video stream on request (need to send frames to the streaming client with a constant framerate, however the frame source on the streaming server can supply frames with a different/lower one).

So I need to be able to correctly form the byte sequence which represents the empty p-frame for the current resolution (I wonder which other parameters could be needed?)

Ideally, I prefer to have an encoder-independent solution, since I use two different ones: nvenc via Nvidia Video SDK and x264 via FFmpeg.

Where should I look to?

Saintpierre answered 14/4, 2017 at 14:10 Comment(5)
This question is WAY to broad for stackoverflow. To point you in the correct direction, look into h264 bitstream parsing, VCL and CABAC coding and SKIP macroblocks.Transfusion
@Transfusion okay, will look into FFmpeg's one! Should work identically for both encoders more or less, shouldn't it?Saintpierre
also, just found this: h264bitstreamSaintpierre
Did you find a solution?Microphysics
@DavidQHogan Sorry for late answer. I don't remember exactly, but probably just give an h264 encoder two (or more) indentical frames in a sequence and see its bytestream outputSaintpierre
W
0

I think there is a h264 nal unit dedicated to data padding (nal_unit_type: 12 : filler_data_rbsp( )). It might be useful for you.

Wintertide answered 26/4, 2017 at 10:56 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.