WebChimera.js icon indicating copy to clipboard operation
WebChimera.js copied to clipboard

Is it possible to get Video File's aspect ratio?

Open Chayemor opened this issue 8 years ago • 7 comments

I understand that libvlc has the function libvlc_video_get_aspect_ratio, which I assume is the one I need. I can't find this function available in the API documents. Is it available? Thanks.

Chayemor avatar May 10 '16 09:05 Chayemor

Yes, it's missing in current API. But I can add it.

RSATom avatar May 10 '16 09:05 RSATom

That would be tremendously helpful.

Chayemor avatar May 10 '16 09:05 Chayemor

As you're using using wcjs-player, it might be possible to do that already. I haven't tested it but you should be able to get width and height with:

player.vlc.events.on("FrameSetup", function(width, height) {
});

Then you can calculate the ratio from width and height.

jaruba avatar May 10 '16 09:05 jaruba

I thought so as well, but if there's a function that does it for me, I thought "why implement it again" ?

Chayemor avatar May 10 '16 10:05 Chayemor

Sometimes aspect is different from width to height relation.

RSATom avatar May 10 '16 10:05 RSATom

Closed as too old.

RSATom avatar Dec 01 '20 08:12 RSATom

Is this something you can revisit? It would be very helpful to me.

mattzucker avatar May 06 '21 18:05 mattzucker