JDK-8135303 : Audio and video synchronization issue with MP4 and HTTP Live Streaming
  • Type: Bug
  • Component: javafx
  • Sub-Component: media
  • Affected Version: 8u60,9
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2015-09-10
  • Updated: 2018-09-05
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdUnresolved
Related Reports
Relates :  
Description
I notice that audio and video is not synchronized properly on Windows for MP4 and HTTP Live Streaming. So far I found 3 repro cases for this issue.
1) Load MP4 or HLS file several times without disposing previous MediaPlayer. After 3-5 loads file will be played with audio and video not synchronized. If MediaPlayer is disposed, then issue does not reproduces.
2) Create several (5-10) MediaPlayers in same application with MP4 or HLS. Start playing one of the players and it will play with audio and video not synchronized.
3) Create two MediaPlayers in same application with MP4 or HLS. Start playing both of them and it will play with audio and video not synchronized.
Comments
I was able to reproduce this issue with 8u20 as well, so it does not seems to be regression.
25-02-2016

MS DirectShow Video decoder for some reason does not output video frames fast enough. Delay is about 5 seconds withing first 30 seconds of playback. GStreamer synchronized stream based on audio and since audio is going forward it will render video frames as soon as it receives them. Not sure how to fix this issue. We do run DirectShow decoding without any clock, so it will decode as fast as possible. One possible solution is to run DirectShow audio and video decoding in same Graph and use synchronization provided by DirectShow. Not sure if it will work or not, but it will take some effort to implement this. Alternative, we can switch to MediaFoundation and see how it works.
25-02-2016