JDK-8350281 : Media: MediaException opening .mov
  • Type: Bug
  • Component: javafx
  • Sub-Component: media
  • Affected Version: jfx23
  • Priority: P3
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2025-02-18
  • Updated: 2025-10-30
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
jfx26Unresolved
Related Reports
Relates :  
Description
Using the attached test code, try playing the attached video clip (with the .mov extension).  The playback does not start due to

MediaException: MEDIA_UNSUPPORTED : media type not supported (file:///Users/angorya/Downloads/test.mov)
	at javafx.media/javafx.scene.media.Media.<init>(Media.java:410)
	at andy_test/goryachev.bugs.MediaPlayer_MP4.start(MediaPlayer_MP4.java:49)
	at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$7(LauncherImpl.java:840)
	at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$5(PlatformImpl.java:444)
	at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$4(PlatformImpl.java:419)
	at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)

However, when the .mov file is renamed to .mp4, the video plays bac rotated 180 degrees.

Two issues:
1. javafx should look into the header (?) to determine whether the format is supported instead of relying on file extension.
2. why does the video is rotated?

NOTES:

`ffmpeg -i test.mov` shows the following video stream information:
```
  Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 1920x1080, 17468 kb/s, 30 fps, 30 tbr, 600 tbn (default)
      Metadata:
        creation_time   : 2025-02-18T20:36:16.000000Z
        handler_name    : Core Media Video
        vendor_id       : [0][0][0][0]
        encoder         : H.264
      Side data:
        displaymatrix: rotation of -180.00 degrees
```

Comments
The extension should be a *hint*, rather than the sole decision point, in my opinion. Just like fmpeg tool can decode the file information even if the clip is renamed "test.xxx".
19-02-2025

1. javafx should look into the header (?) to determine whether the format is supported instead of relying on file extension. > I think this will need more discussion. We to look into header if extension is not recognizable. .mov files are not exactly same thing as .mp4, even if they have same header, so maybe valid extensions should be priority to determine if file type is supported. 2. why does the video is rotated? > Looks like a bug to me. We never tested files with displaymatrix. I will call it enhancement for now to add support for media files with displaymatrix. 3. Maybe we need to consider adding .mov file extension as well.
19-02-2025