Replies: 2 comments 2 replies
-
Are you asking about making presets for libvlc? |
Beta Was this translation helpful? Give feedback.
0 replies
-
I'm trying to create a very simple video player with FFmpeg (org.bytedeco:ffmpeg) for Compose Multiplatform. I guess you didn't have time to read the whole text above. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi.
First of all, this library is a gem. Thanks for your effort.
Project Panama
Is this library going to be migrated to Project Panama? (Related YouTube video).
The JavaCPP project is even mentioned in the Java JEP.
Some famous libraries like Apache Lucene seem to be starting to migrate to and use Project Panama.
A video player for Compose on desktop
I'm trying to create a simple video player component for Desktop applications developed with Compose Multiplatform (don't know why its repository is called compose-jb). Compose Multiplatform is a port of Google Jetpack Compose Android framework for Desktop/Web/IOS (sorry for this description if you are already familiar with Compose).
Currently, there is no video player component for this framework on desktop. The authors/maintainers recommend using the vlcj library which, as far as I know, requires VLC to have been installed on the system.
I have created this very basic and rudimentary video player. It does not have any buffering, cannot pause/resume etc. I'm surprised that it works at all:
https://github.com/mahozad/compose-video-player
I've tried to sync the video to the audio but for some videos (especially .ts files, including the one that the app plays by default) it does not work well enough and video/audio are out of sync.
Also, this is not very performant. If I make the width and height a little larger, then the player cannot be fast enough and keep up with the video frame rate. On that matter, could you please provide a converter to directly convert a
Frame
to ComposeImageBitmap
?For the sample.ts file (which is played when running the application), I had to multiply the audio sample rate by
2
so the audio plays at normal speed:https://github.com/mahozad/compose-video-player/blob/4c90111b2eb8e09aee2fe9e663c4b955be11651d/src/main/kotlin/VideoPlayer.kt#L102
Why should I do that? It is because the video is interlaced?
Beta Was this translation helpful? Give feedback.
All reactions