Skip to content

videoSize doesn't always report the actual video size

Generally, what I'm trying to do is removing the black letterboxing from video views. As it is not possible to change the background color of the VLCOpenGLES2VideoView to transparent, i'm forced to crop the view manually.

Therefore, i currently fetch the videoSize property and then change the frame of the UIView drawable accordingly. This works for many video streams, but on some streams, videoSize reports CGSize(0,0), despite the VLCOpenGLES2VideoView knowing the video dimensions exactly (_voutDisplay->source->i_width, _voutDisplay->source->i_height). I can see this in the debugger, but of course cannot access this from the code.

Example public RTSP stream : rtsp://stream-5gw.1000eyes.de/rtplive/cgnC8409D.stream

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information