RSATom / QmlVlc

[ABANDONED] libvlc wrapper for Qt Quick 2/Qml
Other
140 stars 56 forks source link

aspect ratio problem (when using QmlVlc to read a Dvd) #52

Open xGuildart opened 8 years ago

xGuildart commented 8 years ago

Hi, first the aspect ratio function that return aspect ratio in QmlVlcVideo doesn't work properly, it return an empty string.

stretched fillmode is good but the other doesn't take effect properly in case if the first title 0 has an aspect ratio or(width,height) different to first track(chapter) in the first title for example.i notice that aspect ratio displayed is the aspect ratio calculated by the the height_width extracted by libvlc api , or there is no guarantie to be the right height_width. so the aspect ratio used is wrong and the video will display in a aspect ratio calculated by his original resolution (and there is no relation between resolution and aspect ratio) . otherwise a dvd that contains more than one aspect ratio will not play properly. same as (the width and height).

please if anyone find out the trick to get width or height or change aspect ratio or let the predefined aspect ratio take effect properly, it will be a great hint.

i will be grateful for any suggestion or advice , solution that can be useful. thank you all.

xGuildart commented 8 years ago

I found the solution: (by the way , my solution work for reading DVD) by using libdvdnav and get aspect ratio with it, so i altered the QmlVlcVideoSurface (Rsatom) to take the original aspect. to anderstand what i'm talking about (read ifo specification/Video attributes): http://stnsoft.com/DVD/ifo.html and for the library used: https://github.com/microe/libdvdnav thank you for help anyway.

RSATom commented 8 years ago

It's possible I could solve pixel aspect issues only when switch to use my vmem2 libvlc plugin. But it not ready yet.

xGuildart commented 8 years ago

my solution is not the most suitable because doesn't depends on libVlc plugin only, but it works fine , i solved it by:

i added a module for navigation menu and there i used a stack for extract button and aspect ratio with libdvdnav: dvdnav_get_video_aspect(dvdnav_t*)

so i modified the virtual function used in QmlVlcVideoSurface (QSGNode* updatePaintNode( QSGNode, UpdatePaintNodeData );) to take the right aspect frame.

then PreservedAspectFit work properly.

thank you.