bytedeco / javacv

Java interface to OpenCV, FFmpeg, and more
Other
7.53k stars 1.58k forks source link

JavaFxPlayVideoAndAudio example plays audio out of sync with video #2167

Open mrlimbic opened 9 months ago

mrlimbic commented 9 months ago

I tried running the video player example below but the audio is very out of sync with the video. I tried 2 videos of different formats and both are not in sync.

https://github.com/bytedeco/javacv/blob/master/samples/JavaFxPlayVideoAndAudio.java

Any ideas why this would happen?

I'm on Mac OS 13.6.3.

saudet commented 9 months ago

Please try again with the snapshots: http://bytedeco.org/builds/

jpsacha commented 9 months ago

@mrlimbic Which version of JavaFX are you using?

mrlimbic commented 9 months ago

I copy/pasted just the demo class into my own projecy which is using JavaFX 18.0.2

I also just updated javacv-platform to 1.5.10-SNAPSHOT.

Still plays out of sync.

jpsacha commented 9 months ago

I am using 1.5.9 and cannot reproduce the issue on macOS 14. Is it your Mac an Intel or an Mx? Can you share a sample video with the issues?

mrlimbic commented 9 months ago

Intel Mac Mini 2018 / Mac OS 13.6.3 (22G436). I have other Macs including apple silicon but haven't tried it on those as don't really use them for development.

I'll upload some videos somehwere.

mrlimbic commented 9 months ago

Another weird thing. I tried using 1.5.9 instead and it won't start up due to below error. What does that mean?

Error occurred during initialization of boot layer java.lang.module.FindException: Module org.bytedeco.flandmark not found, required by org.bytedeco.javacv

Changing to 1.5.10-SNAPSHOT works again (but with original sync problem).

One of my test videos that I was going to upload has stopped wotking completely. Demo just exits now.