Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8350281

Media: MediaException opening .mov

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P3 P3
    • jfx25
    • jfx23
    • javafx

      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
      ```

            almatvee Alexander Matveev
            angorya Andy Goryachev
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: