RE: [PATCH] media: coda: avoid starvation on well-compressed data

From: Benjamin Bara - SKIDATA
Date: Tue Oct 06 2020 - 10:56:50 EST


> -----Original Message-----
> From: Ezequiel Garcia <ezequiel@xxxxxxxxxxxxxxxxxxxx>
> Sent: Montag, 28. September 2020 22:06

> If you have some (public) bitstream that are known to timeout, and that you could
> share with me, that would be nice, so I could have a more complete set of samples.

Thanks for the response! We only have MPEG4 and H.264 encoded videos in use
and the described problem occurs only with MPEG4.
I analyzed the video streams with ffprobe [1] and found out that the problem occurs
when the video contains a couple of small P frames between key frames.

For my test bitstreams, I basically did the same as your colleague Nicolas,
but additionally I did some variations with ffmpeg [1].
To get really small P frames, only little changes between frames are allowed.
Therefore, a "single color video" seems to be the best choice.
Since the problem seemed to be related to the size of a frame, I varied:
width, height, bitrate and GoP (amount of P frames between key frames).
This should also be possible with your gstreamer pipeline [2, 3].

These things also lead to my "simplistic approach" to solve the issue.
I saw your patch series and will try it as soon as possible.

Regards
Benjamin

[1] https://ffmpeg.org/
[2] https://gstreamer.freedesktop.org/documentation/libav/avenc_mpeg2video.html?gi-language=c#avenc_mpeg2video:gop-size
[3] https://gstreamer.freedesktop.org/documentation/libav/avenc_mpeg2video.html?gi-language=c#avenc_mpeg2video:maxrate

*Get "packet sizes" of video stream:*
ffprobe -hide_banner -select_streams v -show_entries packet=flags,size -of compact video.avi