Summary: | kdenlive-git HEAD shows black clip when using GPU/movit and GLES2 | ||
---|---|---|---|
Product: | [Applications] kdenlive | Reporter: | Anton Gubarkov <anton.gubarkov> |
Component: | Video Display & Export | Assignee: | Jean-Baptiste Mardelle <jb> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | fritzibaby, paul, snd.noise |
Priority: | NOR | Flags: | snd.noise:
MOVIT+
|
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Gentoo Packages | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: |
static.png
movit patch to fix crash on locale with comma as decimal separator |
Description
Anton Gubarkov
2016-01-18 13:17:39 UTC
Created attachment 96710 [details]
static.png
Additional note: my system has 2 GPUs: Intel HD 4600 and Nvidia GeForce 730M.
The segfault above is when X is configured to run on nvidia (and system-wide opengl is set to nvidia too).
When I switch X and opengl to xorg/mesa, there is no segfault anymore, but I see static instead of the clip (see attachment static.png) and the term is full of :
[filter avcolor_space] Invalid format glsl
nvidia-drivers is at 361.18
mesa is at 11.1.1
I finally managed to update my Gentoo system to latest git versions of kdenlive, mlt and movit. This update got me into the following position: movit demo program works as expected - allows me to tinker colors of the photo in opengl window I can play a clip in melt -consumer qglsl with good speed. (I couldn't before update, same invalid format glsl errors). kdenlive no longer crashes when using movit to play a clip, however there is no video in the clip monitor (there is an audio signal image there though). The starting terminal is full of [filter avcolor_space] Invalid format glsl_texture [filter avcolor_space] Invalid format glsl tested on mesa-11.1.1/Intel i965 driver Dear Jean-Batiste, could you kindly give your comment on this issue? Is it low prio at the moment? Is it feasible at all? Is this problem observed on my distro Gentoo only? I can see you fix other issues, but ignore this one. I would like to understand the reasons. Hi Anton, I have a limited time to work on Kdenlive, and which bug I work on is sometimes a bit random. However, Movit is currently not a top priority. One of the reason is that I am not very familiar with the code, and that it seems to be very dependant on which GPU/driver is used, which makes it really difficult to debug. Movit still has an experimental status, we are mostly concentrating our efforts on the UI workflow for the 16.04 release, and to add some missing features important for editing. Hope it clarifies a bit the situation. Hi! Don't know if you are still interested but I accidentally found a problem in MLT/Movit that might be responsible for your crash. There is a problem when using a locale with a comma as numeric separator. If you want to help, can you try the following: * Open a terminal * type: "LC_ALL=C kdenlive" This will start Kdenlive with a different locale using a dot as numerical separator. This might solve the movit crash Hi, Jean-Baptiste, I can no longer reproduce the crash with movit enabled. the clip and project monitors always display back. The behaviour doens't depend on LC_NUMERIC. I can't verify with LC_ALL=C since all my clip data are in directories with Russian names, I can't read the russian names in the file chooser and I can't descend into any of these directories. I can observe [filter avcolor_space] Invalid format glsl_texture [filter avcolor_space] Invalid format glsl in the staring terminal. Thanks for the update. The problem I found related to locales is that Movit does not correctly initialize, which is why it sends these errors:
[filter avcolor_space] Invalid format glsl
Can you check if you see a line like this:
Movit system requirements: Needs at least GLSL version 1.30 (has version
> 1,0)
in the terminal after starting Kdenlive ? It would mean that you are hit by the locale bug I described...
Also, what happens if you try to add a color clip, does it work ?
I used to have the line "Movit system requirements: Needs at least GLSL version 1.30 (has version
> 1,0)" before I switched to kdenlive-git. I don't have it anymore.
Adding a color clip does segfault kdenlive. Here is a compact backtrace:
#0 0x00007ffff108e5a6 in ?? () from /lib64/libc.so.6
#1 0x00007fffd21c7833 in ?? () from /usr/lib64/libswscale.so.3
#2 0x00007fffd21bc480 in sws_scale () from /usr/lib64/libswscale.so.3
#3 0x00007fffd3c53b91 in ?? () from /usr/lib64/mlt/libmltavformat.so
#4 0x00007fffd7524792 in ?? () from /usr/lib64/mlt/libmltopengl.so
#5 0x00007fffd75266dc in ?? () from /usr/lib64/mlt/libmltopengl.so
#6 0x00007ffff6bb42b8 in mlt_frame_get_image () from /usr/lib64/libmlt.so.6
#7 0x00007ffff6bc7c41 in ?? () from /usr/lib64/libmlt.so.6
#8 0x00000000006c17ed in ?? ()
#9 0x00007ffff1a1d292 in ?? () from /usr/lib64/libQt5Core.so.5
#10 0x00007fffef5db424 in start_thread () from /lib64/libpthread.so.0
#11 0x00007ffff10535fd in clone () from /lib64/libc.so.6
Please advise which packages/libraries I should rebuild with debug info to provide a meaningful backtrace to you.
I need more infos to understand the problem. I need you to check those things: 1 - Make sure Kdenlive works without movit: If you disable movit in Kdenlive settings, can you correcty open and play a video clip 2 - Make sure MLT works with Movit: in a terminal, type: melt myclip.mp4 .glsl=1 -attach movit.saturation saturation=0 -consumer xgl Replace myclip.mp4 with any clip you have. It should play your clip in black and white Please let me know the results of steps 1 and 2 1. kdenlive does work w/o movit. I can play my clips and work with timeline. Everything is fine (except no GPU based effects) 2. the melt command you've provided segfaults, with the following output: anton@r9-008cln ~/Видео/2016-01-24 Венчание/Материал $ melt gubarkov.MTS .glsl=1 -attach movit.saturation saturation=0 -consumer xgl Failed to open VDPAU backend libvdpau_i965.so: невозможно открыть разделяемый объектный файл: Нет такого файла или каталога [filter avcolor_space] Invalid format glsl +-----+ +-----+ +-----+ +-----+ +-----+ +-----+ +-----+ +-----+ +-----+ |1=-10| |2= -5| |3= -2| |4= -1| |5= 0| |6= 1| |7= 2| |8= 5| |9= 10| +-----+ +-----+ +-----+ +-----+ +-----+ +-----+ +-----+ +-----+ +-----+ +---------------------------------------------------------------------+ | H = back 1 minute, L = forward 1 minute | | h = previous frame, l = next frame | | g = start of clip, j = next clip, k = previous clip | | 0 = restart, q = quit, space = play | +---------------------------------------------------------------------+ Movit system requirements: Needs at least GLSL version 1.30 (has version 1,0) Failed to open VDPAU backend libvdpau_i965.so: невозможно открыть разделяемый объектный файл: Нет такого файла или каталога [filter avcolor_space] Invalid format glsl [filter avcolor_space] Invalid format glsl [filter avcolor_space] Invalid format glsl_texture [consumer xgl] OpenGL Shading Language is not supported on this machine. [filter avcolor_space] Invalid format glsl [filter avcolor_space] Invalid format glsl [filter avcolor_space] Invalid format glsl_texture Current Position: 0 [filter avcolor_space] Invalid format glsl [filter avcolor_space] Invalid format glsl [filter avcolor_space] Invalid format glsl_texture If I prepend the command with LC_ALL=C, it works fine, I can see the desaturated clip. Ok, then it really looks like you are hit by the locale bug I found, but I don't understand why changing locale does not fix the issue with Kdenlive... If you are comfortable with compiling, you could try my Movit patch to see if it helps... You need to edit the file init.cpp in Movit source directory with the following changes: Around line 382, you will find a line like this (in the function double get_glsl_version ): float glsl_version = atof(glsl_version_str); Replace this line with the following 4 lines: std::istringstream locale_convert(glsl_version_str); locale_convert.imbue(std::locale("C")); double glsl_version; locale_convert >> glsl_version; Then recompile and re-install movit. MLT's command line should work without the LC_ALL trick, and it might fix the Kdenlive issue... Created attachment 97208 [details]
movit patch to fix crash on locale with comma as decimal separator
I have integrarted the patch into my package manager and rebuilt movit. I can run melt w/o tweaking my LC_NUMERIC now and the clip runs fine desaturated.
However, kdenlive still crashes when I add a color clip and the movie clip is still black.
I made one more observation: if I add a movie clip first and color clip second, kdenlive doesn't crash. But both movie and color clips display as black. When I add the color clip as the first clip in the project, kdenlive crashes immediately. The terminal is full of [filter avcolor_space] Invalid format glsl [filter avcolor_space] Invalid format glsl [filter avcolor_space] Invalid format glsl_texture Anton, in Kdenlive's git I just added some code that displays a error message in the monitors if Movit initialization failed. Can you try to update to latest git and see if you get an error message ? Latest git does display a message for me: Cannot initialize Movit's GLSL manager. please disable Movit. Git commit 435a098676183d19092308c1a7637634792d85c4 by Jean-Baptiste Mardelle. Committed on 16/02/2016 at 21:53. Pushed by mardelle into branch 'master'. Try to fix Movit if GPU does not support GL_ARB_sync M +55 -13 src/monitor/glwidget.cpp M +3 -0 src/monitor/glwidget.h http://commits.kde.org/kdenlive/435a098676183d19092308c1a7637634792d85c4 Can you please test with the commit I just made ? It should fix Movit if your GPU does not support the GL_ARB_sync extension, and also should prints some useful debug info in terminal if this does not solve your problem.. Hi, Jean-Baptiste. I tested your latest commit. I still get a message to disable movit in the monitors. Here is what I see in the term (besides the usual output): OpenGL vendor: "Intel Open Source Technology Center" OpenGL renderer: "Mesa DRI Intel(R) Haswell Mobile " OpenGL ARG_SYNC: false OpenGL OpenGLES: true OpenGL vendor: "Intel Open Source Technology Center" OpenGL renderer: "Mesa DRI Intel(R) Haswell Mobile " OpenGL ARG_SYNC: false OpenGL OpenGLES: true I tested with my optimus Nvidia Geforce 730M (nvidia closed-source drivers). movit doesn't initialize either. OpenGL vendor: "NVIDIA Corporation" OpenGL renderer: "GeForce GT 730M/PCIe/SSE2" OpenGL ARG_SYNC: false OpenGL OpenGLES: true (In reply to Jean-Baptiste Mardelle from comment #17) > Can you please test with the commit I just made ? It should fix Movit if > your GPU does not support the GL_ARB_sync extension, and also should prints > some useful debug info in terminal if this does not solve your problem.. nvidia drivers do support GL_ARB_sync: anton@r9-008cln ~/Видео/2016-01-24 Венчание/Материал $ glxinfo|grep -i ARB_sync GL_ARB_stencil_texturing, GL_ARB_sync, GL_ARB_tessellation_shader, GL_ARB_stencil_texturing, GL_ARB_sync, GL_ARB_tessellation_shader, (In reply to Jean-Baptiste Mardelle from comment #17) > Can you please test with the commit I just made ? It should fix Movit if > your GPU does not support the GL_ARB_sync extension, and also should prints > some useful debug info in terminal if this does not solve your problem.. My MESA/Intel drivers also support ARB_sync: anton@r9-008cln ~ $ glxinfo|grep -i ARB_sync GL_ARB_shading_language_packing, GL_ARB_sync, GL_ARB_texture_barrier, GL_ARB_shading_language_packing, GL_ARB_shadow, GL_ARB_sync, I've recompiled kdenlive with no gles2 support (together with the following qt dependencies: qtwidgets qtdeclarative qtopengl qtprintsupport plasma qtgui). movit works now! OpenGL vendor: "Intel Open Source Technology Center" OpenGL renderer: "Mesa DRI Intel(R) Haswell Mobile " OpenGL ARG_SYNC: true OpenGL OpenGLES: false OpenGL vendor: "Intel Open Source Technology Center" OpenGL renderer: "Mesa DRI Intel(R) Haswell Mobile " OpenGL ARG_SYNC: true OpenGL OpenGLES: false I'm not sure if this is related but this sounds an awful lot like the glitches I encountered here: https://bugs.kde.org/show_bug.cgi?id=355398 Rendering of /home/paul/Unbenannt12.mp4 crashed medium: [ ref=1, _mlt_properties_load=medium, __mlt_properties_load=medium ] Movit system requirements: Needs at least GLSL version 1.30 (has version 1,0) [consumer qglsl] OpenGL Shading Language rendering is not supported on this machine. [filter avcolor_space] Invalid format glsl [filter avcolor_space] Invalid format glsl GL error 502 at /home/paul/rebuild/4/src/kdenlive/src/monitor/glwidget.cpp : 406 [filter avcolor_space] Invalid format glsl Unfortunately MOVIT (GPU effects) is not stable and not ready for production use. *** This bug has been marked as a duplicate of bug 380019 *** |