OpenShot / libopenshot

OpenShot Video Library (libopenshot) is a free, open-source project dedicated to delivering high quality video editing, animation, and playback solutions to the world. API currently supports C++, Python, and Ruby.
http://www.openshot.org
GNU Lesser General Public License v3.0
1.28k stars 276 forks source link

rx460 hw detection failure #324

Closed ghost closed 5 years ago

ghost commented 5 years ago

I will update mesa...

salva@salva-lubuntu:~$ glxinfo -B
name of display: :0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: X.Org (0x1002)
    Device: AMD Radeon (TM) RX 460 Graphics (POLARIS11, DRM 3.23.0, 4.15.0-52-generic, LLVM 7.0.0) (0x67ef)
    Version: 18.2.8
    Accelerated: yes
    Video memory: 4096MB
    Unified memory: no
    Preferred profile: core (0x1)
    Max core profile version: 4.5
    Max compat profile version: 4.4
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.2
Memory info (GL_ATI_meminfo):
    VBO free memory - total: 4037 MB, largest block: 4037 MB
    VBO free aux. memory - total: 4091 MB, largest block: 4091 MB
    Texture free memory - total: 4037 MB, largest block: 4037 MB
    Texture free aux. memory - total: 4091 MB, largest block: 4091 MB
    Renderbuffer free memory - total: 4037 MB, largest block: 4037 MB
    Renderbuffer free aux. memory - total: 4091 MB, largest block: 4091 MB
Memory info (GL_NVX_gpu_memory_info):
    Dedicated video memory: 4096 MB
    Total available memory: 8192 MB
    Currently available dedicated video memory: 4037 MB
OpenGL vendor string: X.Org
OpenGL renderer string: AMD Radeon (TM) RX 460 Graphics (POLARIS11, DRM 3.23.0, 4.15.0-52-generic, LLVM 7.0.0)
OpenGL core profile version string: 4.5 (Core Profile) Mesa 18.2.8
OpenGL core profile shading language version string: 4.50
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 4.4 (Compatibility Profile) Mesa 18.2.8
OpenGL shading language version string: 4.40
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile

OpenGL ES profile version string: OpenGL ES 3.2 Mesa 18.2.8
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

what happened here? ...interesting

[[Asalva@salva-lubuntu:~$ vainfo 
libva info: VA-API version 1.1.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so
libva info: va_openDriver() returns -1
vaInitialize failed with error code -1 (unknown libva error),exit
salva@salva-lubuntu:~$ lspci
00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 30h-3fh) Processor Root Complex
00:02.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 30h-3fh) Processor Root Port
00:02.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 1425
00:03.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 30h-3fh) Processor Root Port
00:03.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 30h-3fh) Processor Root Port
00:04.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 30h-3fh) Processor Root Port
00:10.0 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB XHCI Controller (rev 09)
00:10.1 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB XHCI Controller (rev 09)
00:11.0 SATA controller: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [AHCI mode] (rev 40)
00:12.0 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB OHCI Controller (rev 11)
00:12.2 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB EHCI Controller (rev 11)
00:13.0 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB OHCI Controller (rev 11)
00:13.2 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB EHCI Controller (rev 11)
00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller (rev 16)
00:14.2 Audio device: Advanced Micro Devices, Inc. [AMD] FCH Azalia Controller (rev 01)
00:14.3 ISA bridge: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge (rev 11)
00:14.4 PCI bridge: Advanced Micro Devices, Inc. [AMD] FCH PCI Bridge (rev 40)
00:14.5 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB OHCI Controller (rev 11)
00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 30h-3fh) Processor Function 0
00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 30h-3fh) Processor Function 1
00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 30h-3fh) Processor Function 2
00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 30h-3fh) Processor Function 3
00:18.4 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 30h-3fh) Processor Function 4
00:18.5 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 30h-3fh) Processor Function 5
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Baffin [Radeon RX 460/560D / Pro 450/455/460/555/560] (rev cf)
01:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Device aae0
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 0c)
ferdnyc commented 5 years ago

@Askmewho

The vainfo issue is interesting, and may explain our detection failure. ...Perhaps a permissions problem? What happens if you run sudo vainfo instead?

ghost commented 5 years ago

No change at all... maybe a mesa bug? Should ive compile it? Ive done before for arm sbcs. I will search the flags for radeon if youdont know them.

ghost commented 5 years ago

First i will try downloading new mesa prebuilt packages

ghost commented 5 years ago

Well, it didnt boot on the first try, but yes on the second one going back to my old mesa. Thanks lubuntu! Now...compiling mesa. I will continue tomorrow, thanks dana!

ferdnyc commented 5 years ago

@Askmewho Good luck, keep us posted.

I'm way out of my depth here since I've personally never run Linux on AMD graphics hardware (only ever Nvidia or Intel), but if it were my Nvidia GPU doing something like that, one of the things I'd suspect is a version mismatch between the installed drivers and the loaded kernel module. Whenever I upgrade to a new xorg-x11-drv-nvidia release, all of the hardware-accelerated video interfaces on my system always start failing until I get around to restarting the system so that an updated kernel module can be loaded.

Other that that, I got nothin'. ¯\_(ツ)_/¯

ghost commented 5 years ago

So, ive switched to manjaro (which I am in love...extremely deep) and here openshot...shows the same on performance label... latest version, obviusly.

[salva@salva-pc ~]$ vainfo 
vainfo: VA-API version: 1.5 (libva 2.5.0)
vainfo: Driver version: Mesa Gallium driver 19.1.5 for AMD Radeon (TM) RX 460 Graphics (POLARIS11, DRM 3.32.0, 5.2.11-1-MANJARO, LLVM 8.0.1)
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointEncSlice
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointEncSlice
      VAProfileHEVCMain               : VAEntrypointVLD
      VAProfileHEVCMain               : VAEntrypointEncSlice
      VAProfileHEVCMain10             : VAEntrypointVLD
      VAProfileJPEGBaseline           : VAEntrypointVLD
      VAProfileNone                   : VAEntrypointVideoProc
ghost commented 5 years ago

So, you are telling me than I have to switch to the propietary drive to allow hw accel? Maybe i misunderstood you a bit haha

ferdnyc commented 5 years ago

@Askmewho *nod* Our detection is probably still failing, but with vainfo working we can at least say for sure that it should be able to detect your card.

Here's how detection works:

  1. The acceleration backend OpenShot used is represented by an integer value. (In the range 0-7, with 0 being no hardware acceleration, the other integers representing different backends — the list is defined either by FFmpeg or libopenshot, not sure which but I suspect it's FFmpeg.)
  2. The hardware device used is also selected by an integer (0 again being no hardware / no acceleration), though here it gets more confusing since specifying 1 or 2 selects the same card; we're not sure why yet. Nor am I sure what happens when there are multiple GPUs present, since I only have a single card in my system.
  3. Regardless, OpenShot cycles through each of the possible modes, and if either card 0 or card 1 is able to decode a sample video using that mode, it leaves that mode on the list. (If "card 0" is really the CPU / software decoding, then I have no idea why it would be testing card 0; maybe just as a baseline.)

So if your card isn't being reconized, most likely the decode attempt failed.

openshot-hwdetect.zip

The zip file above contains two items: The hardware-example.mp4 file that OpenShot uses in the detection process; and openshot_hw_detect.py, a script I put together to run a modified version of the detection process in isolation, then display the results.

The script requires access to libopenshot and its Python bindings. If it's installed and accessible by default, then you don't need to do anything. You can test that from the command line like so:

$ python3 -c "import openshot; print(openshot.OPENSHOT_VERSION_FULL)"
0.2.3-dev1

If it displays a version string like that, you're all set. A traceback or other error means that libopenshot's bindings aren't in your PYTHONPATH. In that case, you may have to set PYTHONPATH=/path/to/libopenshot/build/src/bindings/python first.

With the Python bindings accessible, running python3 ./openshot_hw_test.py from the location where you extracted the zip will spew a bunch of console noise from both FFmpeg and libopenshot as it runs the decode attempts, and then display a summary of the detected hardware support.

One modification I made to the OpenShot detection process is, I set the script up to test devices 0–4, instead of just 0 and 1. So, on my system, running it produces (after all of the detection spew) this summary:

$ python3 ./openshot_hw_detect.py
….
Final state of detection matrix:
{0: [0], 1: [0, 6], 2: [0, 6], 3: [0], 4: [0]}

Since both card 0 and mode 0 represent no-acceleration, this shows that only mode 6 was detected on "card 1" and "card 2" (both of which are my single Nvidia GeForce GT 710). Mode 6 is VDPAU, so that makes some sense, but I expected at least NVDEC (Nvidia's cuvid decoder, AKA mode 2) and possibly VA-API (mode 1) to be detected as well. So, it looks like our hardware detection may still need some improvement. And given that your card doesn't support VDPAU (obviously), if that's the only mode that's being successfully detected, then that would explain why it's failing for you.

Regardless, if you could run the tests on your system, then provide the full output (including all of the messages from FFmpeg / libopenshot), that would help us determine the state of hardware detection for your device.

If you run it with all output redirected to STDOUT, and piped through tee:

$ python3 ./openshot_hw_detect.py 2>&1 | tee /tmp/hwdetect.txt

Then a copy of the output will be in hwdetect.txt, which can be attached directly to a GitHub comment.

ferdnyc commented 5 years ago

Hmmm.

(a) It seems I'm wrong about AMD GPUs not supporting VDPAU, which is... surprising.

(b) That's a good thing, because as it turns out VA-API is completely disabled in the libopenshot source code for FFmpegReader, as it doesn't work. (It's enabled for FFmpegWriter, which is why h264_vaapi is available as an Export option for the output codec.)

I can't even get VA-API decoding to work as a transcode input on the ffmpeg command line, using my Nvidia card. Here's the command I'm using:

ffmpeg -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format vaapi \
-i hardware-example.mp4 -vf "format=nv12|vaapi,hwupload" -c:v h264_vaapi \
hardware-example.mkv

That's supposed to (according to the docs) transcode the MP4 stream into a (nearly identical, as it happens) h.264 MKV file, using VA-API hardware decoding and encoding. But if I run it like that, it reports libva: va_getDriverName() failed with unknown libva error,driver_name=(null). If I set the driver name:

LIBVA_DRIVER_NAME=nvidia ffmpeg -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 \
-hwaccel_output_format vaapi -i hardware-example.mp4 -vf "format=nv12|vaapi,hwupload" \
-c:v h264_vaapi hardware-example.mkv

...Then it segfaults.

But given that VDPAU isn't as Nvidia-specific as I originally thought, what's the output of vdpauinfo on your system? (You may need to install the relevant pieces of libvdpau first. And in doing so, I guess you might find that OpenShot starts detecting your card via VDPAU!)

ghost commented 5 years ago

Thanks @ferdnyc ! I will try it today and paste the output! I am making a lot of content about rpi4... and hw accel may help me a lot!

ferdnyc commented 5 years ago

@Askmewho Great, curious to hear the results!

I got around to running the detection test on my laptop (Intel gfx), and the results only further the confusion TBH:

$ PYTHONPATH=../build/src/bindings/python python3 ./openshot_hw_detect.py
...
{0: [0, 1, 3, 4, 5], 1: [0], 2: [0], 3: [0], 4: [0]}

So, device 0 isn't the CPU (or, if it is, then an integrated GPU can show up as device 0). And I think I may understand better now why VDPAU is showing up as device 1 and/or 2.

The VDPAU device in command-line ffmpeg is accessed via the X server display address: If I want to use my logged-in display when I'm running in X.org under the nvidia driver, I'm on display :1, not :0. So, I think it may be numbering them to match the X display. (Best guess I have, anyway.) Now, whether that means display :0 would be card 0, or if it's card 1 and that's why mine is showing up as card 2... still no clue.

ferdnyc commented 5 years ago

Depending on the results of the OpenShot hardware test, I'd also be curious what you get on your AMD system from this command:

ffmpeg -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format vaapi \
-i hardware-example.mp4 -vf "format=nv12|vaapi,hwupload" -c:v h264_vaapi \
hardware-example.mkv

Since, like I said, it definitely doesn't play nice with my Nvidia card, but it's the documented way to supposedly use VA-API for transcoding.

ghost commented 5 years ago

sorry for the delay! I were working! I am sorry about the delay, just take some patience on me! ahahah

[salva@salva-pc openshot-hwdetect]$ vdpauinfo               
display: :0   screen: 0
API version: 1
Information string: G3DVL VDPAU Driver Shared Library version 1.0

Video surface:

name   width height types
-------------------------------------------
420    16384 16384  NV12 YV12 
422    16384 16384  UYVY YUYV 
444    16384 16384  Y8U8V8A8 V8U8Y8A8 

Decoder capabilities:

name                        level macbs width height
----------------------------------------------------
MPEG1                          --- not supported ---
MPEG2_SIMPLE                    3 65536  4096  4096
MPEG2_MAIN                      3 65536  4096  4096
H264_BASELINE                  52 65536  4096  4096
H264_MAIN                      52 65536  4096  4096
H264_HIGH                      52 65536  4096  4096
VC1_SIMPLE                      1 65536  4096  4096
VC1_MAIN                        2 65536  4096  4096
VC1_ADVANCED                    4 65536  4096  4096
MPEG4_PART2_SP                  3 65536  4096  4096
MPEG4_PART2_ASP                 5 65536  4096  4096
DIVX4_QMOBILE                  --- not supported ---
DIVX4_MOBILE                   --- not supported ---
DIVX4_HOME_THEATER             --- not supported ---
DIVX4_HD_1080P                 --- not supported ---
DIVX5_QMOBILE                  --- not supported ---
DIVX5_MOBILE                   --- not supported ---
DIVX5_HOME_THEATER             --- not supported ---
DIVX5_HD_1080P                 --- not supported ---
H264_CONSTRAINED_BASELINE       0 65536  4096  4096
H264_EXTENDED                  --- not supported ---
H264_PROGRESSIVE_HIGH          --- not supported ---
H264_CONSTRAINED_HIGH          --- not supported ---
H264_HIGH_444_PREDICTIVE       --- not supported ---
HEVC_MAIN                      186 65536  4096  4096
HEVC_MAIN_10                   186 65536  4096  4096
HEVC_MAIN_STILL                --- not supported ---
HEVC_MAIN_12                   --- not supported ---
HEVC_MAIN_444                  --- not supported ---

Output surface:

name              width height nat types
----------------------------------------------------
B8G8R8A8         16384 16384    y  NV12 YV12 UYVY YUYV Y8U8V8A8 V8U8Y8A8 A8I8 I8A8 
R8G8B8A8         16384 16384    y  NV12 YV12 UYVY YUYV Y8U8V8A8 V8U8Y8A8 A8I8 I8A8 
R10G10B10A2      16384 16384    y  NV12 YV12 UYVY YUYV Y8U8V8A8 V8U8Y8A8 A8I8 I8A8 
B10G10R10A2      16384 16384    y  NV12 YV12 UYVY YUYV Y8U8V8A8 V8U8Y8A8 A8I8 I8A8 

Bitmap surface:

name              width height
------------------------------
B8G8R8A8         16384 16384
R8G8B8A8         16384 16384
R10G10B10A2      16384 16384
B10G10R10A2      16384 16384
A8               16384 16384

Video mixer:

feature name                    sup
------------------------------------
DEINTERLACE_TEMPORAL             y
DEINTERLACE_TEMPORAL_SPATIAL     -
INVERSE_TELECINE                 -
NOISE_REDUCTION                  y
SHARPNESS                        y
LUMA_KEY                         y
HIGH QUALITY SCALING - L1        y
HIGH QUALITY SCALING - L2        -
HIGH QUALITY SCALING - L3        -
HIGH QUALITY SCALING - L4        -
HIGH QUALITY SCALING - L5        -
HIGH QUALITY SCALING - L6        -
HIGH QUALITY SCALING - L7        -
HIGH QUALITY SCALING - L8        -
HIGH QUALITY SCALING - L9        -

parameter name                  sup      min      max
-----------------------------------------------------
VIDEO_SURFACE_WIDTH              y        48     4096
VIDEO_SURFACE_HEIGHT             y        48     4096
CHROMA_TYPE                      y  
LAYERS                           y         0        4

attribute name                  sup      min      max
-----------------------------------------------------
BACKGROUND_COLOR                 y  
CSC_MATRIX                       y  
NOISE_REDUCTION_LEVEL            y      0.00     1.00
SHARPNESS_LEVEL                  y     -1.00     1.00
LUMA_KEY_MIN_LUMA                y  
LUMA_KEY_MAX_LUMA                y  

I am new on manjaro, so a all new world , and python related programs are a bit difficult to me (I am not a dev as you are)

as you said, maybe I need to set the path for libopenshot python.

[salva@salva-pc openshot-hwdetect]$  python3 -c "import openshot; print(openshot.OPENSHOT_VERSION_FULL)"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
AttributeError: module 'openshot' has no attribute 'OPENSHOT_VERSION_FULL'

but where to do "PYTHONPATH=/path/to/libopenshot/build/src/bindings/python"? ive could compile libopenshot if you need that.

[salva@salva-pc openshot-hwdetect]$ pacman -Ql libopenshot     
libopenshot /usr/
libopenshot /usr/include/
libopenshot /usr/include/libopenshot/
libopenshot /usr/include/libopenshot/AudioBufferSource.h
libopenshot /usr/include/libopenshot/AudioReaderSource.h
libopenshot /usr/include/libopenshot/AudioResampler.h
libopenshot /usr/include/libopenshot/CacheBase.h
libopenshot /usr/include/libopenshot/CacheDisk.h
libopenshot /usr/include/libopenshot/CacheMemory.h
libopenshot /usr/include/libopenshot/ChannelLayouts.h
libopenshot /usr/include/libopenshot/ChunkReader.h
libopenshot /usr/include/libopenshot/ChunkWriter.h
libopenshot /usr/include/libopenshot/Clip.h
libopenshot /usr/include/libopenshot/ClipBase.h
libopenshot /usr/include/libopenshot/Color.h
libopenshot /usr/include/libopenshot/Coordinate.h
libopenshot /usr/include/libopenshot/CrashHandler.h
libopenshot /usr/include/libopenshot/DecklinkInput.h
libopenshot /usr/include/libopenshot/DecklinkOutput.h
libopenshot /usr/include/libopenshot/DecklinkReader.h
libopenshot /usr/include/libopenshot/DecklinkWriter.h
libopenshot /usr/include/libopenshot/DummyReader.h
libopenshot /usr/include/libopenshot/EffectBase.h
libopenshot /usr/include/libopenshot/EffectInfo.h
libopenshot /usr/include/libopenshot/Effects.h
libopenshot /usr/include/libopenshot/Enums.h
libopenshot /usr/include/libopenshot/Exceptions.h
libopenshot /usr/include/libopenshot/FFmpegReader.h
libopenshot /usr/include/libopenshot/FFmpegUtilities.h
libopenshot /usr/include/libopenshot/FFmpegWriter.h
libopenshot /usr/include/libopenshot/Fraction.h
libopenshot /usr/include/libopenshot/Frame.h
libopenshot /usr/include/libopenshot/FrameMapper.h
libopenshot /usr/include/libopenshot/ImageReader.h
libopenshot /usr/include/libopenshot/ImageWriter.h
libopenshot /usr/include/libopenshot/Json.h
libopenshot /usr/include/libopenshot/KeyFrame.h
libopenshot /usr/include/libopenshot/OpenMPUtilities.h
libopenshot /usr/include/libopenshot/OpenShot.h
libopenshot /usr/include/libopenshot/PlayerBase.h
libopenshot /usr/include/libopenshot/Point.h
libopenshot /usr/include/libopenshot/Profiles.h
libopenshot /usr/include/libopenshot/Qt/
libopenshot /usr/include/libopenshot/Qt/AudioPlaybackThread.h
libopenshot /usr/include/libopenshot/Qt/PlayerDemo.h
libopenshot /usr/include/libopenshot/Qt/PlayerPrivate.h
libopenshot /usr/include/libopenshot/Qt/VideoCacheThread.h
libopenshot /usr/include/libopenshot/Qt/VideoPlaybackThread.h
libopenshot /usr/include/libopenshot/Qt/VideoRenderWidget.h
libopenshot /usr/include/libopenshot/Qt/VideoRenderer.h
libopenshot /usr/include/libopenshot/QtImageReader.h
libopenshot /usr/include/libopenshot/QtPlayer.h
libopenshot /usr/include/libopenshot/ReaderBase.h
libopenshot /usr/include/libopenshot/RendererBase.h
libopenshot /usr/include/libopenshot/Settings.h
libopenshot /usr/include/libopenshot/Tests.h
libopenshot /usr/include/libopenshot/TextReader.h
libopenshot /usr/include/libopenshot/Timeline.h
libopenshot /usr/include/libopenshot/Version.h
libopenshot /usr/include/libopenshot/WriterBase.h
libopenshot /usr/include/libopenshot/ZmqLogger.h
libopenshot /usr/include/libopenshot/effects/
libopenshot /usr/include/libopenshot/effects/Bars.h
libopenshot /usr/include/libopenshot/effects/Blur.h
libopenshot /usr/include/libopenshot/effects/Brightness.h
libopenshot /usr/include/libopenshot/effects/ChromaKey.h
libopenshot /usr/include/libopenshot/effects/ColorShift.h
libopenshot /usr/include/libopenshot/effects/Crop.h
libopenshot /usr/include/libopenshot/effects/Deinterlace.h
libopenshot /usr/include/libopenshot/effects/Hue.h
libopenshot /usr/include/libopenshot/effects/Mask.h
libopenshot /usr/include/libopenshot/effects/Negate.h
libopenshot /usr/include/libopenshot/effects/Pixelate.h
libopenshot /usr/include/libopenshot/effects/Saturation.h
libopenshot /usr/include/libopenshot/effects/Shift.h
libopenshot /usr/include/libopenshot/effects/Wave.h
libopenshot /usr/lib/
libopenshot /usr/lib/libopenshot.so
libopenshot /usr/lib/libopenshot.so.0.2.3
libopenshot /usr/lib/libopenshot.so.17
libopenshot /usr/lib/python3.7/
libopenshot /usr/lib/python3.7/site-packages/
libopenshot /usr/lib/python3.7/site-packages/_openshot.so
libopenshot /usr/lib/python3.7/site-packages/openshot.py
[salva@salva-pc openshot-hwdetect]$ openshot-qt
Loaded modules from installed directory: /usr/lib/python3.7/site-packages/openshot_qt
      launch:INFO ------------------------------------------------
      launch:INFO    OpenShot (version 2.4.4)
      launch:INFO ------------------------------------------------
         app:INFO openshot-qt version: 2.4.4
         app:INFO libopenshot version: 0.2.3
         app:INFO platform: Linux-5.2.11-1-MANJARO-x86_64-with-arch-Manjaro-Linux
         app:INFO processor: 
         app:INFO machine: x86_64
         app:INFO python version: 3.7.4
         app:INFO qt5 version: 5.13.0
         app:INFO pyqt5 version: 5.13.0
[salva@salva-pc openshot-hwdetect]$ ffmpeg -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format vaapi -i hardware-example.mp4 -vf "format=nv12|vaapi,hwupload" -c:v h264_vaapi hardware-example.mkv
ffmpeg version n4.2 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 9.1.0 (GCC)
  configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-nvdec --enable-nvenc --enable-omx --enable-shared --enable-version3
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'hardware-example.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf57.83.100
  Duration: 00:00:00.33, start: 0.033008, bitrate: 103 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720, 61 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 2 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (h264_vaapi))
  Stream #0:1 -> #0:1 (aac (native) -> vorbis (libvorbis))
Press [q] to stop, [?] for help
[hwupload @ 0x562abea1a640] A hardware device reference is required to upload frames to.
[Parsed_hwupload_1 @ 0x562abea1a500] Query format failed for 'Parsed_hwupload_1': Invalid argument
Error reinitializing filters!
Failed to inject frame into filter network: Invalid argument
Error while processing the decoded data for stream #0:0
[libvorbis @ 0x562abe403380] 39 frames left in the queue on closing
Conversion failed!
ghost commented 5 years ago

I will compile libopenshot to test your debug commands, but something its not right with ffmpeg encoding, does it?

it didnt detect my "hw accel" on rpi4 too, so I will try to compile it. note: it detected hw accel on rpi3 when ive compiled the source code.

ghost commented 5 years ago

ive tried to compile libopenshot and i get this error

/usr/bin/ld: libopenshot.so.0.2.3: referencia a `Magick::Image::columns() const' sin definir
/usr/bin/ld: libopenshot.so.0.2.3: referencia a `Magick::Image::draw(std::vector<Magick::Drawable, std::allocator<Magick::Drawable> > const&)' sin definir
/usr/bin/ld: libopenshot.so.0.2.3: referencia a `Magick::Geometry::Geometry(unsigned long, unsigned long, long, long)' sin definir
/usr/bin/ld: libopenshot.so.0.2.3: referencia a `Magick::Geometry::aspect(bool)' sin definir
/usr/bin/ld: libopenshot.so.0.2.3: referencia a `Magick::Image::alpha(bool)' sin definir
/usr/bin/ld: libopenshot.so.0.2.3: referencia a `Magick::Image::rows() const' sin definir
/usr/bin/ld: libopenshot.so.0.2.3: referencia a `Magick::DrawableBase::DrawableBase()' sin definir
/usr/bin/ld: libopenshot.so.0.2.3: referencia a `Magick::Geometry::height() const' sin definir
/usr/bin/ld: libopenshot.so.0.2.3: referencia a `Magick::Geometry::width() const' sin definir
collect2: error: ld devolvió el estado de salida 1
make[2]: *** [src/CMakeFiles/openshot-player.dir/build.make:102: src/openshot-player] Error 1
make[1]: *** [CMakeFiles/Makefile2:157: src/CMakeFiles/openshot-player.dir/all] Error 2
make[1]: *** Se espera a que terminen otras tareas....
/usr/bin/ld: libopenshot.so.0.2.3: referencia a `Magick::Image::columns() const' sin definir
/usr/bin/ld: libopenshot.so.0.2.3: referencia a `Magick::Image::draw(std::vector<Magick::Drawable, std::allocator<Magick::Drawable> > const&)' sin definir
/usr/bin/ld: libopenshot.so.0.2.3: referencia a `Magick::Geometry::Geometry(unsigned long, unsigned long, long, long)' sin definir
/usr/bin/ld: libopenshot.so.0.2.3: referencia a `Magick::Geometry::aspect(bool)' sin definir
/usr/bin/ld: libopenshot.so.0.2.3: referencia a `Magick::Image::alpha(bool)' sin definir
/usr/bin/ld: libopenshot.so.0.2.3: referencia a `Magick::Image::rows() const' sin definir
/usr/bin/ld: libopenshot.so.0.2.3: referencia a `Magick::DrawableBase::DrawableBase()' sin definir
/usr/bin/ld: libopenshot.so.0.2.3: referencia a `Magick::Geometry::height() const' sin definir
/usr/bin/ld: libopenshot.so.0.2.3: referencia a `Magick::Geometry::width() const' sin definir
collect2: error: ld devolvió el estado de salida 1
make[2]: *** [src/CMakeFiles/openshot-example.dir/build.make:102: src/openshot-example] Error 1
make[1]: *** [CMakeFiles/Makefile2:103: src/CMakeFiles/openshot-example.dir/all] Error 2
ghost commented 5 years ago

how to purge the installation because I break my openshot, and even reinstalling I cant run it..

Loaded modules from installed directory: /usr/lib/python3.7/site-packages/openshot_qt Violación de segmento (`core' generado)

I will continue using another video editor for now

appimages didnt work neither

[salva@salva-pc Descargas]$ ./OpenShot-v2.4.4-x86_64.AppImage
Loaded modules from current directory: /tmp/.mount_pmZYtn/usr/bin
Traceback (most recent call last):
  File "/home/gitlab-runner/builds/5cd61c66/0/OpenShot/openshot-qt/openshot.py", line 18, in swig_import_helper
  File "/usr/lib/python3.4/imp.py", line 297, in find_module
ImportError: No module named '_openshot'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/cx_Freeze-4.3.4-py3.4-linux-x86_64.egg/cx_Freeze/initscripts/Console.py", line 27, in <module>
  File "openshot_qt/launch.py", line 55, in <module>
    from classes.app import OpenShotApp
  File "/usr/lib/python3.4/importlib/_bootstrap.py", line 2237, in _find_and_load
  File "/usr/lib/python3.4/importlib/_bootstrap.py", line 2226, in _find_and_load_unlocked
  File "/usr/lib/python3.4/importlib/_bootstrap.py", line 1200, in _load_unlocked
  File "/usr/lib/python3.4/importlib/_bootstrap.py", line 1129, in _exec
  File "/usr/lib/python3.4/importlib/_bootstrap.py", line 1471, in exec_module
  File "/usr/lib/python3.4/importlib/_bootstrap.py", line 321, in _call_with_frames_removed
  File "/tmp/.mount_pmZYtn/usr/bin/classes/app.py", line 41, in <module>
    from classes import info, settings, project_data, updates, language, ui_util, logger_libopenshot
  File "/usr/lib/python3.4/importlib/_bootstrap.py", line 2284, in _handle_fromlist
  File "/usr/lib/python3.4/importlib/_bootstrap.py", line 321, in _call_with_frames_removed
  File "/usr/lib/python3.4/importlib/_bootstrap.py", line 2237, in _find_and_load
  File "/usr/lib/python3.4/importlib/_bootstrap.py", line 2226, in _find_and_load_unlocked
  File "/usr/lib/python3.4/importlib/_bootstrap.py", line 1200, in _load_unlocked
  File "/usr/lib/python3.4/importlib/_bootstrap.py", line 1129, in _exec
  File "/usr/lib/python3.4/importlib/_bootstrap.py", line 1471, in exec_module
  File "/usr/lib/python3.4/importlib/_bootstrap.py", line 321, in _call_with_frames_removed
  File "/tmp/.mount_pmZYtn/usr/bin/classes/logger_libopenshot.py", line 31, in <module>
    import openshot
  File "/usr/lib/python3.4/importlib/_bootstrap.py", line 2237, in _find_and_load
  File "/usr/lib/python3.4/importlib/_bootstrap.py", line 2226, in _find_and_load_unlocked
  File "/usr/lib/python3.4/importlib/_bootstrap.py", line 1191, in _load_unlocked
  File "/usr/lib/python3.4/importlib/_bootstrap.py", line 1161, in _load_backward_compatible
  File "/home/gitlab-runner/builds/5cd61c66/0/OpenShot/openshot-qt/openshot.py", line 28, in <module>
  File "/home/gitlab-runner/builds/5cd61c66/0/OpenShot/openshot-qt/openshot.py", line 20, in swig_import_helper
  File "/usr/lib/python3.4/importlib/_bootstrap.py", line 2237, in _find_and_load
  File "/usr/lib/python3.4/importlib/_bootstrap.py", line 2226, in _find_and_load_unlocked
  File "/usr/lib/python3.4/importlib/_bootstrap.py", line 1191, in _load_unlocked
  File "/usr/lib/python3.4/importlib/_bootstrap.py", line 1161, in _load_backward_compatible
  File "/usr/lib/python3.4/importlib/_bootstrap.py", line 539, in _check_name_wrapper
  File "/usr/lib/python3.4/importlib/_bootstrap.py", line 1715, in load_module
  File "/usr/lib/python3.4/importlib/_bootstrap.py", line 321, in _call_with_frames_removed
ImportError: libselinux.so.1: cannot open shared object file: No such file or directory