There is an error in JavaFX MediaPlayer. When trying to play videos with a resolution greater than 1920x1080px the screen became black and nothing more happend.
Adding the following error-handling-code:
mediaPlayer.setOnError(new Runnable) {
@Override
public void run() {
System.out.println(mediaPlayer.getError.getMessage());
System.out.println(mediaPlayer.getError.getType());
}
});
results in this error:
[com.sun.media.jfxmediaimpl.platform.gstreamer.GSTMediaPlayer@5482fb8f] ERROR_MEDIA_INVALID: ERROR_MEDIA_INVALID
UNKNOWN
The video is encoded with h264 and aac (for audio) and is having a resolution of 1920x1168px. The error occurs with each video with a resolution greater than 1920x1080px. Videos with a resolution of 1920x1080px or smaller are working fine. The playback of all videos is working with VLC-Player.