Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Native library (win32-x86-64/libvlc.dll) not found in resource path #1164

Closed
CMingTseng opened this issue Sep 15, 2021 · 4 comments
Closed
Assignees
Labels
desktop examples Example applications question Not a bug, but question or comment

Comments

@CMingTseng
Copy link

Dear Sir

i try to build

https://github.com/JetBrains/compose-jb/tree/master/components/VideoPlayer

maybe the demo run at macOS/OSX ?

i use windows 10

so i get "Native library (win32-x86-64/libvlc.dll) not found in resource path"

Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: Could not initialize class uk.co.caprica.vlcj.binding.LibVlc

Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: Could not initialize class uk.co.caprica.vlcj.binding.LibVlc
at uk.co.caprica.vlcj.factory.discovery.NativeDiscovery.tryLoadingLibrary(NativeDiscovery.java:187)
at uk.co.caprica.vlcj.factory.discovery.NativeDiscovery.discover(NativeDiscovery.java:118)
at uk.co.caprica.vlcj.factory.MediaPlayerFactory.discoverNativeLibrary(MediaPlayerFactory.java:176)
at uk.co.caprica.vlcj.factory.MediaPlayerFactory.(MediaPlayerFactory.java:108)
at uk.co.caprica.vlcj.factory.MediaPlayerFactory.(MediaPlayerFactory.java:132)
at uk.co.caprica.vlcj.player.component.EmbeddedMediaPlayerComponent.initMediaPlayerFactory(EmbeddedMediaPlayerComponent.java:116)
at uk.co.caprica.vlcj.player.component.EmbeddedMediaPlayerComponent.(EmbeddedMediaPlayerComponent.java:77)
at uk.co.caprica.vlcj.player.component.EmbeddedMediaPlayerComponent.(EmbeddedMediaPlayerComponent.java:111)
at org.jetbrains.compose.videoplayer.DesktopVideoPlayerKt.VideoPlayerImpl(DesktopVideoPlayer.kt:26)
at org.jetbrains.compose.videoplayer.VideoPlayerKt.VideoPlayer(VideoPlayer.kt:7)
at org.jetbrains.compose.videoplayer.demo.ComposableSingletons$MainKt$lambda-1$1.invoke(Main.kt:16)
at org.jetbrains.compose.videoplayer.demo.ComposableSingletons$MainKt$lambda-1$1.invoke(Main.kt:15)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:215)
at androidx.compose.desktop.DesktopTheme_jvmKt.DesktopTheme(DesktopTheme.jvm.kt:59)
at org.jetbrains.compose.videoplayer.demo.ComposableSingletons$MainKt$lambda-2$1.invoke(Main.kt:15)
at org.jetbrains.compose.videoplayer.demo.ComposableSingletons$MainKt$lambda-2$1.invoke(Main.kt:14)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:215)
at androidx.compose.material.TextKt.ProvideTextStyle(Text.kt:252)
at androidx.compose.material.MaterialThemeKt$MaterialTheme$1.invoke(MaterialTheme.kt:81)
at androidx.compose.material.MaterialThemeKt$MaterialTheme$1.invoke(MaterialTheme.kt:80)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:215)
at androidx.compose.material.MaterialThemeKt.MaterialTheme(MaterialTheme.kt:72)
at org.jetbrains.compose.videoplayer.demo.ComposableSingletons$MainKt$lambda-3$1.invoke(Main.kt:14)
at org.jetbrains.compose.videoplayer.demo.ComposableSingletons$MainKt$lambda-3$1.invoke(Main.kt:13)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
at androidx.compose.desktop.AppWindow_desktopKt$Window$1$1.invoke(AppWindow.desktop.kt:107)
at androidx.compose.desktop.AppWindow_desktopKt$Window$1$1.invoke(AppWindow.desktop.kt:106)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
at androidx.compose.desktop.AppWindow$show$1.invoke(AppWindow.desktop.kt:460)
at androidx.compose.desktop.AppWindow$show$1.invoke(AppWindow.desktop.kt:459)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:215)
at androidx.compose.desktop.AppWindow$onCreate$1.invoke(AppWindow.desktop.kt:435)
at androidx.compose.desktop.AppWindow$onCreate$1.invoke(AppWindow.desktop.kt:434)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:116)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
at androidx.compose.ui.awt.ComposeWindow$setContent$3.invoke(ComposeWindow.desktop.kt:81)
at androidx.compose.ui.awt.ComposeWindow$setContent$3.invoke(ComposeWindow.desktop.kt:80)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
at androidx.compose.ui.awt.ComposeWindowDelegate$setContent$3$1.invoke(ComposeWindowDelegate.desktop.kt:95)
at androidx.compose.ui.awt.ComposeWindowDelegate$setContent$3$1.invoke(ComposeWindowDelegate.desktop.kt:94)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:215)
at androidx.compose.ui.awt.ComposeWindowDelegate$setContent$3.invoke(ComposeWindowDelegate.desktop.kt:91)
at androidx.compose.ui.awt.ComposeWindowDelegate$setContent$3.invoke(ComposeWindowDelegate.desktop.kt:90)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:215)
at androidx.compose.ui.platform.CompositionLocalsKt.ProvideCommonCompositionLocals(CompositionLocals.kt:148)
at androidx.compose.ui.platform.Wrapper_desktopKt$ProvideDesktopCompositionsLocals$1.invoke(Wrapper.desktop.kt:59)
at androidx.compose.ui.platform.Wrapper_desktopKt$ProvideDesktopCompositionsLocals$1.invoke(Wrapper.desktop.kt:58)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:215)
at androidx.compose.ui.platform.Wrapper_desktopKt.ProvideDesktopCompositionsLocals(Wrapper.desktop.kt:55)
at androidx.compose.ui.platform.Wrapper_desktopKt.access$ProvideDesktopCompositionsLocals(Wrapper.desktop.kt:1)
at androidx.compose.ui.platform.Wrapper_desktopKt$setContent$1.invoke(Wrapper.desktop.kt:42)
at androidx.compose.ui.platform.Wrapper_desktopKt$setContent$1.invoke(Wrapper.desktop.kt:41)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
at androidx.compose.runtime.ComposerKt.invokeComposable(Composer.kt:3336)
at androidx.compose.runtime.ComposerImpl$doCompose$2$5.invoke(Composer.kt:2583)
at androidx.compose.runtime.ComposerImpl$doCompose$2$5.invoke(Composer.kt:2579)
at androidx.compose.runtime.SnapshotStateKt.observeDerivedStateRecalculations(SnapshotState.kt:540)
at androidx.compose.runtime.ComposerImpl.doCompose(Composer.kt:2572)
at androidx.compose.runtime.ComposerImpl.composeContent$runtime(Composer.kt:2523)
at androidx.compose.runtime.CompositionImpl.composeContent(Composition.kt:476)
at androidx.compose.runtime.Recomposer.composeInitial$runtime(Recomposer.kt:727)
at androidx.compose.runtime.CompositionImpl.setContent(Composition.kt:432)
at androidx.compose.ui.platform.Wrapper_desktopKt.setContent(Wrapper.desktop.kt:41)
at androidx.compose.ui.awt.ComposeLayer$setContent$4.invoke(ComposeLayer.desktop.kt:292)
at androidx.compose.ui.awt.ComposeLayer$setContent$4.invoke(ComposeLayer.desktop.kt:283)
at androidx.compose.ui.awt.ComposeLayer$Wrapped.init(ComposeLayer.desktop.kt:91)
at org.jetbrains.skiko.SkiaLayer.checkInit(SkiaLayer.kt:72)
at org.jetbrains.skiko.SkiaLayer.init$lambda-0(SkiaLayer.kt:60)
at java.desktop/java.awt.Component.processHierarchyEvent(Component.java:6819)
at java.desktop/java.awt.Component.processEvent(Component.java:6438)
at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5027)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4859)
at java.desktop/java.awt.Component.addNotify(Component.java:7123)
at java.desktop/java.awt.Canvas.addNotify(Canvas.java:104)
at java.desktop/java.awt.Container.addNotify(Container.java:2800)
at java.desktop/javax.swing.JComponent.addNotify(JComponent.java:4791)
at java.desktop/java.awt.Container.addNotify(Container.java:2800)
at java.desktop/javax.swing.JComponent.addNotify(JComponent.java:4791)
at androidx.compose.ui.awt.ComposeWindowDelegate$pane$1.addNotify(ComposeWindowDelegate.desktop.kt:58)
at java.desktop/java.awt.Container.addNotify(Container.java:2800)
at java.desktop/javax.swing.JComponent.addNotify(JComponent.java:4791)
at java.desktop/java.awt.Container.addNotify(Container.java:2800)
at java.desktop/javax.swing.JComponent.addNotify(JComponent.java:4791)
at java.desktop/java.awt.Container.addNotify(Container.java:2800)
at java.desktop/javax.swing.JComponent.addNotify(JComponent.java:4791)
at java.desktop/javax.swing.JRootPane.addNotify(JRootPane.java:733)
at java.desktop/java.awt.Container.addNotify(Container.java:2800)
at java.desktop/java.awt.Window.addNotify(Window.java:787)
at java.desktop/java.awt.Frame.addNotify(Frame.java:490)
at java.desktop/java.awt.Window.show(Window.java:1049)
at java.desktop/java.awt.Component.show(Component.java:1732)
at java.desktop/java.awt.Component.setVisible(Component.java:1679)
at java.desktop/java.awt.Window.setVisible(Window.java:1032)
at androidx.compose.desktop.AppWindow.show(AppWindow.desktop.kt:463)
at androidx.compose.desktop.AppWindow.show$default(AppWindow.desktop.kt:450)
at androidx.compose.desktop.AppWindow_desktopKt$Window$1.run(AppWindow.desktop.kt:106)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:746)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Graphics card: Microsoft Basic Render Driver is blacklisted.

THX

@theapache64

@theapache64
Copy link
Contributor

theapache64 commented Sep 15, 2021

@CMingTseng

As of now, you need VLC installed on your computer to work with VideoPlayer.

There was a thought on shipping the VLC with VideoPlayer here (#1088 (comment)) though. But, I think @igordmn can comment more on this.

@CMingTseng
Copy link
Author

Dear Sir

can ref csharp ?

use ffmpeg ?

google chrome/chroiume also use FFMPEG (when building by ninja build)

https://blogs.windows.com/windowsdeveloper/2015/06/05/using-ffmpeg-in-windows-applications/

https://github.com/SuRGeoNix/Flyleaf

THX

@akurasov akurasov added examples Example applications question Not a bug, but question or comment desktop labels Sep 27, 2021
@akurasov akurasov self-assigned this Sep 27, 2021
@akurasov akurasov added the Saved label Nov 1, 2021
@igordmn igordmn removed the Saved label Nov 11, 2022
@okushnikov
Copy link
Collaborator

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.

@JetBrains JetBrains locked and limited conversation to collaborators Dec 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
desktop examples Example applications question Not a bug, but question or comment
Projects
None yet
Development

No branches or pull requests

5 participants