[vlc-devel] live555: default video frame size

Gilles Chanteperdrix gilles.chanteperdrix at xenomai.org
Sat Dec 28 15:27:08 CET 2013


On 12/28/2013 03:20 PM, Rémi Denis-Courmont wrote:
> Le mardi 17 décembre 2013, 02:09:46 Gilles Chanteperdrix a écrit :
>> the default video frame size, when receiving a video through RTSP using
>> the live555 module, is a fixed constant set to 100KB, which can be set
>> to another constant value, using vlc menus. But we can do better than
>> that: select a size which is proportional to the image size, this avoids
>> displaying corrupted HD videos before the buffer size is automatically
>> doubled a few times.
> 
> TBH, I don't really see why you need to know that. The only data size you 
> should ever need to guess when receiving RT(S)P is that of the largest 
> possible RTP packet.
> 
> Video frames should be fragmented. In my understanding, the packetizer or the 
> decoder is responsible for reassembling full frames if the codec requires it.
> 

A "wild guess" on the reassembled full frames size is to use the decoded
frame size, on the basis that an encoded frame is usually smaller than
its decoded counter part, and if it is not (which really, should not
happen often), vlc can resort to doubling the size as it currently doe.
The current approach of vlc: using a fixed size, results in corrupted
video when vlc has to double the buffer. A large enough size to cope
with all possible video sizes, will result in a frame too large for
small resolutions, whereas using a frame size proportional to the image
size will scale nicely and be future proof (since 4K for instance).

-- 
                                                                Gilles.



More information about the vlc-devel mailing list