Avidemux 2.7.6 fails scaling the preview video

Started by Peperoga, August 01, 2020, 04:54:13 PM

Previous topic - Next topic

Peperoga

Hi

I download the appimage for the latest 2.7.6 release which works fine except for the scaling of the video inside the main
window. I run it in OpenSUSE Leap 15.2 fresh using both proprietary NVIDIA and Nouveau video driver with the same
result. My laptop has a 4K display so the KDE was set with a global scaling of 200%. I compiled successfully avidemux
2.7.6 by my self against Qt5 with the same result. I attached a crop of the main window which help me to describe this
issue. The preview video set on 1/4th of the available space in the main window.  Indeed, some commercial programs
shows this issue as well but they use older versions of Qt5 libraries.

Regards.

eumagga0x2a

#1
Could you please redirect stdout and stderr of your own Avidemux build* from launching it and loading that video to a file (e.g. ~/admlog.txt), close Avidemux, then compress and attach admlog.txt to your reply?

The bad thing is that I don't have a Linux environment with a display HiDPI enough to test. Do other outputs (Xv, OpenGL, Qt) behave the same? Could you please verify if possible that the issue persists with GNOME?

*) Please use git master, there have been quite a lot of usable changes recently.

eumagga0x2a

#2
Okay, no further testing needed, just remove

defined(_WIN32) &&

from https://github.com/mean00/avidemux2/blob/a8308b7242d5414b09e723ff7f4f58d97dd17933/avidemux/qt4/ADM_userInterfaces/ADM_gui/Q_gui2.cpp#L1718 and recompile to enable HiDPI scaling on Linux too.


Scratch that, this allows just to reproduce the bug --> confirmed, thank you for your report.

Peperoga

I attached the log you asked me on this message. Hope it can help you.

I noted this issue only on avidemux and some commercial programs not official supported in my OpenSUSE Leap 15.2 release
compiled against custom build of Qt5 version 5.9

Almost any other program can scaling properly in each part, some better than others.

I run Avidemux in GNOME with the same result.

I will try a new build with the latest code in git master this evening. I will update you ASAP.

Regards.

eumagga0x2a

Thank you, you don't need to try git master for this particular issue (maybe for other things solved like slightly wrong color in filter preview, but not for this one), it won't be any better unless I manage to fix it at the spot.

We pass pixel size of the surface to paint to to the renderer based on device-independent size of video frame we get from Qt --> half width and half height at 200%.

eumagga0x2a

Should be fixed now for XVideo, VDPAU and libva renderers. Please try a build generated from the current git master.

The output of the unaccelerated "Qt" renderer looks really ugly at 200% as the displayed image seems to be upscaled simply by duplicating pixels.

Peperoga

#6
I had at work for the last few days away from my PC, so i cannot test the new version till now.

Unfortunately, a new build from git master was unsuccessful. The building script ends with this error:

CMake Error at CMakeLists.txt:216 (ADD_SUBDIRECTORY):
  The source directory

    /home/salvatore/t/avidemux2-master/avidemux/qt4/i18n

  does not contain a CMakeLists.txt file.



**************************
***  Optional Library  ***
***      Summary       ***
**************************
*** Video Encoder      ***
    NVENC          Yes
*** Miscellaneous      ***
    gettext        Yes
    SDL            No
    XVideo         Yes
    OpenGL         Yes
**************************
***   Release Build    ***
**************************


salvatore@Einstein:~/t/avidemux2-master> tail bootStrap.bash.log
-- UI:shell.ui -> /home/salvatore/t/avidemux2-master/buildQt5/ADM_userInterfacesQT5/ADM_shell/ui_shell.h
-- CPP:Q_shell.h -> ADM_shellQT5_source=
-- CPP:Q_shell.h -> ADM_shellQT5_source=/home/salvatore/t/avidemux2-master/buildQt5/ADM_userInterfacesQT5/ADM_shell/moc_Q_shell.cpp
-- UI:mainfilter.ui;seekablePreview.ui -> /home/salvatore/t/avidemux2-master/buildQt5/ADM_userInterfacesQT5/ADM_filters/ui_mainfilter.h;/home/salvatore/t/avidemux2-master/buildQt5/ADM_userInterfacesQT5/ADM_filters/ui_seekablePreview.h
-- CPP:Q_mainfilter.h;Q_seekablePreview.h -> ADM_filtersQT5_source=
-- CPP:Q_mainfilter.h;Q_seekablePreview.h -> ADM_filtersQT5_source=/home/salvatore/t/avidemux2-master/buildQt5/ADM_userInterfacesQT5/ADM_filters/moc_Q_mainfilter.cpp;/home/salvatore/t/avidemux2-master/buildQt5/ADM_userInterfacesQT5/ADM_filters/moc_Q_seekablePreview.cpp
-- Packager=rpm, valid choices= {deb,rpm,tgz,none}
-- Configuring incomplete, errors occurred!
See also "/home/salvatore/t/avidemux2-master/buildQt5/CMakeFiles/CMakeOutput.log".
** Failed at cmakeZ**[/size]

It seems some file is missing but i cannot figure out what is the actual problem.


Peperoga

Yes, I can confirm you the latest version now scales the video preview as expected.

The accelerated "Qt" renderering is very good, let me say perfect, even with low resolution videos. I cannot
test with unaccelerated "Qt" right now.

Regards.

eumagga0x2a

Thank you for verifying the fix.

I'd like to clarify that the "Qt" renderer is always unaccelerated (the CPU is doing all the scaling and color conversion work). The QtGL renderer is accelerated, but Qt is just a shell for OpenGL there. It was also unaffected by the issue and didn't require any modifications.