0

I need to play a video in my JFrame (specifically as a splash screen right when the program launches), however, all the research I have done have lead me to the Java media framework which is outdated.

I also found this question that seems to have some solutions, but I didn't find a guide on how to do it. I am very bad at reading documentation, is there a step-by-step guide on how I could implement this in a good way?

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
Soni
  • 77
  • 1
  • 10
  • Does your intro animation have sound? If not, you probably want to convert it to an animated GIF that can be used for an actual [SplashScreen](https://docs.oracle.com/en/java/javase/15/docs/api/java.desktop/java/awt/SplashScreen.html). – VGR Oct 26 '20 at 03:01
  • @VGR that could be an option, although you lose a lot of quality when converting to a GIF. Is this easy to do with little knowledge? – Soni Oct 26 '20 at 15:14
  • It’s true you lose quality when converting to GIF, but how many colors does your animation have? If it’s a splash screen animation, I doubt it has a complex background. As for how to convert, I would [download ffmpeg](https://ffmpeg.org/download.html) and use a command like `ffmpeg -i animation.mp4 animation.gif`. I’m sure there are other tools that can do it as well. – VGR Oct 26 '20 at 15:32
  • i’ll try. as for the implementation in Java, is that easy? – Soni Oct 26 '20 at 15:33
  • 1
    Yes, read the SplashScreen documentation to which I linked. – VGR Oct 26 '20 at 15:36

0 Answers0