Hello! Description of the process and problems: Using the ffmpeg library from the network, I get a media stream with data (video, audio, and so on). All necessary contexts and so on are copied from the stream, and then the packages are written to the file using the av_interleaved_write_frame method. Everything works as it should, that is, the file is created, the data is written, then everything is correctly and correctly displayed in any player, that is, the remuxing works.

Now the question. If there is no data from the network (for example, video), it is necessary to add frames to the file (regular video frames with some text, at least one). I have already done something, but for now it is not working.

Maybe someone will throw the idea how it is done "in the right way"? thank

  • You should start taking a video stream by dividing it into groups of images (GOP), when a hole is found in the resulting group, discard it replacing it with a group with frames - stubs. - VTT

0