Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JavaFX MediaPlayer dual AAC audio sampling rate Linux issue

474dfd45-12c6-4163-848d-ebcbcc72e70dJul 23 2015 — edited Jul 23 2015

In the current Java 8 JDK (update 51) and in previous versions I noticed strange behaviour regarding the audio output of the JavaFX MediaPlayer under Linux (Ubuntu 14.04 LTS). If you try to play an MPEG4 video with AAC audio with dual audio sampling rates Java seems to mess up something because the **playback sound gets pitched low** (voices are deep) but the speed stays constant. If you set MediaPlayers playback rate to 2x speed the pitch is normal, but of course speed is doubled up.

I don't know if this is a Java bug or a Linux codec problem. I also tried to install several video and audio codecs for Ubuntu (i.e. ubuntu-restricted-extras). I also could not find anything on the internet refering to this problem. I am wondering if there is a workaround for this? Maybe by setting the sampling rate manually for the media (but how?)?

I would like to provide an example MP4 file but I could not find any free on the net with dual sampling rates. All I can provide is the output of `mediainfo` (by Tektronix) for the media the problem occurs on, which says:

    First audio stream:

    64.0 Kbps, 48.0 KHz / 24.0 KHz, 2 channels, AAC (HE-AAC / LC)

Note the given dual audio sampling rates: 48.0 KHz / 24.0 KHz

This problem does not occur on Windows platforms!

The problem also occurs if you try to play the media by using the Java Webkits HTML5 video player (<video></video>).

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 20 2015
Added on Jul 23 2015
0 comments
891 views