JDK-8115891 : JavaFx MediaView hangs when I used large video files
  • Type: Bug
  • Component: javafx
  • Sub-Component: media
  • Affected Version: 7u10
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2013-01-15
  • Updated: 2015-07-20
  • Resolved: 2013-04-26
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.
JDK 7 JDK 8
7u40Fixed 8Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
Hi,

I am developing a software for play/Edit of video files using JavaFx.
If I used comparatively very large file my MediaView and all the controlles of MediaPlayer (play,pause,slider,forward) hangs and and unable to play the file.
The file size is 9 hr or bigger that 40GB file I am using. 
Reflected for 
Windows-XP, Windows-7 and MacOSX.
Comments
Ok. Thanks for the info.
16-07-2014

Please, provide a link to the webrev. Please, complete Risk Analysis Steps to reproduce are not clear. How SQE can verify the fix? Or would be a customer verification enough for this fix?
14-07-2014

This bug is resolved/fixed with a changeset pushed for both FX 2 and FX 8, so I am removing the critical watch label. If additional work needs to be done, please file a new JIRA rather than reuse this one. You can link the new JIRA as "related to" RT-27715.
16-04-2014

IMHO the only correct way to improve that drawback is to reimplement qtdemuxer table parsing algorithm so it could request moov table source by smaller blocks.
08-04-2014

There is another smaller problem with such long files found: when the moov table is parsed the qtdemuxer asks to read that table in a single block. For 12hr mp4 that requires about 50Mb. The stream java source allocates direct ByteBuffer when asked for readBlock(). For reading the moov table the direct ByteBuffer of 50Mb is allocated. The problem is that this native memory could be released only when the instance of this ByteBuffer is garbage collected and thus native memory may leak even if the MediaPlayer.dispose() is called when closing media. Since there is no API for controlling media source stream operations the only workaround is to call System.gc() after MediaPlayer.dispose(), though no guarantees here of course.
08-04-2014

Found the following check in the gstreamer (qtdemux.c:5382): if (stream->n_samples >= QTDEMUX_MAX_SAMPLE_INDEX_SIZE / sizeof (QtDemuxSample)) { GST_WARNING_OBJECT (qtdemux, "not allocating index of %d samples, would " "be larger than %uMB (broken file?)", stream->n_samples, QTDEMUX_MAX_SAMPLE_INDEX_SIZE >> 20); That means the gstreamer rejects streams which have more than QTDEMUX_MAX_SAMPLE_INDEX_SIZE / sizeof (QtDemuxSample) = 50 * 1024 * 1024 / 32 = 1638400 samples. The file supplied 1861369 samples, that's why it couldn't be loaded.
24-03-2014

Customer reports this is still a problem with 7u40, FX 2.2.40. I am working to get the details.
19-09-2013

Re-resolve as fixed.
26-04-2013

I has checked this fix with JDK 1.7.0_21 and JavaFx 2.2.21-b11 and find that the performance of the application is slightly better. but the problem is still persists. I find the problem still persists. I loaded Some of the large files, some times the application crashes on frequent load of different media file from source or Edit list, And some time it goes in unresponsive state and file not being loaded in media. I replicate this scenario with 3 GB files. I find nun of any error message from Media components I have the screen-shots if you need I will send that to your official/personal Email-ID as I am unable to attached any file in my JIRA account. Thanks,
25-04-2013

http://jfxsrc.us.oracle.com/javafx/8.0/scrum/media/media/source/hg/javafx/8.0/scrum/media/media/rev/1195854fd53f
08-03-2013

Will any work around you find guys. If I had done something wrong please tell.I also checked this with JavaFx 2.2.6(Build 4 and 8) beta version the problem still persists. Please help.
23-01-2013