Closed romaincointepas closed 3 years ago
It's known issue of libvlc's vmem plugin. There are just no way to get pixel aspect ratio from libvlc. It could be solved by custom plugin - something like vmem2, but unfortunately I can't find time to finish it.
pixelFormat
is just enum which could be VlcPlayer.RV32
(= 0) or VlcPlayer.I420
(= 1)
@RSATom Got it, thanks! Do you know if libvlc 3.0 will make this possible without a custom plugin?
Don't think so. Only if somebody will finish vmem2
(or something similar) and will send patch to videolan team.
Closed as too old.
onFrameSetup
returns width and height that should not be used to calculate the dimensions/ratio of the canvas for anamorphic videos (aka non-square pixels).I thought the
pixelFormat
argument was here to help (by giving the pixel ratio, the equivalent ofsample_aspect_ratio
when using ffprobe), but it seems to always return 1 even for anamorphic videos.This can be easily reproduced with the following video: https://mega.nz/#!cwZUiCTA!oP0RUNe93M-qsUDGxhG-hjJV6WU20oo2a9y9zt2frUQ
ffprobe returns
onFrameSetup returns
VLC (the native app) will resize the app to the following dimensions
VLC itself being able to size anamorphic videos correctly, I assume that either there is a bug with
pixelFormat
that shouldn't be returning 1, or another argument may be added to handle correct sizing of anamorphic videos.My personal suggestion would be that because WebChimera.js is meant to be used in a HTML environment, width and height should directly be converted to "display" dimensions to be directly used to size the canvas and pixelFormat should be removed. (In the above example, width and height would then be 853x480).
Any thoughts?