<div dir="ltr">Hi,<div><br></div><div>At this moment, there is no built-in support for H.265 in the JavaFX media API&#39;s. It sounds doable though, if there is time and interest.</div><div>In that case, we can start a discussion about it at <a href="mailto:openjfx-dev@openjdk.java.net">openjfx-dev@openjdk.java.net</a> ?</div><div><br></div><div>- Johan</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Nov 26, 2019 at 7:12 AM Samuel Audet &lt;<a href="mailto:samuel.audet@gmail.com">samuel.audet@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">+Johan Vos<br>
<br>
JavaCV doesn&#39;t have a video player per se. It&#39;s meant more for image <br>
analysis and such than anything else. JavaFX is the one with a proper <br>
video player: <a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__openjfx.io_&d=DwMFaQ&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=CUkXBxBNT_D5N6HMJ5T9Z6rmvNKYsqupcbk72K0lcoQ&m=PQkEL5H7d_3R8XKmyLxgs0mWipp75yAshPm3CwtzR3I&s=iKkRWM5v4HmHz7Guz3RkyKZQj_Nl1K8h3czTZj54kxo&e=" rel="noreferrer" target="_blank">https://openjfx.io/</a><br>
<br>
Johan, does it support playback of HEVC media?<br>
<br>
Samuel<br>
<br>
On 11/26/19 2:43 PM, Ramsey Gurley wrote:<br>
&gt; I think you may have saved me a lot of work :) I&#39;ll also check out <br>
&gt; javacv-platform, since I see you have a swing component to play video in <br>
&gt; that as well.<br>
&gt; <br>
&gt; Thank you!<br>
&gt; <br>
&gt; Ramsey<br>
&gt; <br>
&gt; On 11/26/19 1:25 PM, Samuel Audet wrote:<br>
&gt;&gt; Hi,<br>
&gt;&gt;<br>
&gt;&gt; In theory, Sulong can compile x265 to fully portable bytecode, and <br>
&gt;&gt; these files can be packaged into Maven artifacts like any other Java <br>
&gt;&gt; classes, but the performance that we would get from that may not be <br>
&gt;&gt; satisfactory. It would probably be around 10x slower than native <br>
&gt;&gt; binaries since Java bytecode isn&#39;t able to accommodate for native <br>
&gt;&gt; assembly instructions that are used heavily in encoders such as x265. <br>
&gt;&gt; Also, we may need dependencies on GraalVM, Truffle, and Sulong, so we <br>
&gt;&gt; wouldn&#39;t get a small independent package that could run on the JDK, <br>
&gt;&gt; but I&#39;m not entirely sure about that. Those projects are still pretty <br>
&gt;&gt; experimental, so that&#39;s probably why I&#39;m not finding a friendly way to <br>
&gt;&gt; try it out. :)<br>
&gt;&gt;<br>
&gt;&gt; Because of these kinds of limitations, what everyone does, including <br>
&gt;&gt; very official projects from OpenJDK like JavaFX, is simply to package <br>
&gt;&gt; native libraries in JAR files and access them with JNI. It works fine <br>
&gt;&gt; for multiple platforms as well. For example, I&#39;m making packages for <br>
&gt;&gt; FFmpeg (which include x265) available here:<br>
&gt;&gt; <a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_bytedeco_javacpp-2Dpresets_tree_master_ffmpeg&d=DwMFaQ&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=CUkXBxBNT_D5N6HMJ5T9Z6rmvNKYsqupcbk72K0lcoQ&m=PQkEL5H7d_3R8XKmyLxgs0mWipp75yAshPm3CwtzR3I&s=UINC3Ai8f3nUmMC0bMTwzAdk-mxSZAkccWhMyqFHieY&e=" rel="noreferrer" target="_blank">https://github.com/bytedeco/javacpp-presets/tree/master/ffmpeg</a><br>
&gt;&gt;<br>
&gt;&gt; There are binaries for Android (ARM, ARM64, x86, x86_64), Linux (ARM, <br>
&gt;&gt; ARM64, POWER, x86, x86_64), Mac (x86_64), and Windows (x86 and <br>
&gt;&gt; x86_64), all accessible from a single Maven artifact named <br>
&gt;&gt; &quot;ffmpeg-platform&quot;, but we can create builds easily for more platforms. <br>
&gt;&gt; To get smaller JAR files, we can also limit the scope of the builds to <br>
&gt;&gt; small libraries such as only x265 itself.<br>
&gt;&gt;<br>
&gt;&gt; Samuel<br>
&gt;&gt;<br>
&gt;&gt; On 11/25/19 4:47 PM, Ramsey Gurley wrote:<br>
&gt;&gt;&gt; Hi all,<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I&#39;d like to compile a native lib with graal to be distributed as a maven<br>
&gt;&gt;&gt; artifact. I have a few questions.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Are native libraries platform specific if compiled with graalvm&#39;s llvm<br>
&gt;&gt;&gt; tools? Let&#39;s say I want to compile x265. Do I need one artifact per<br>
&gt;&gt;&gt; arch? Per os?<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Once created, can the graal compiler used by OpenJDK make use of them?<br>
&gt;&gt;&gt; Or is a graalvm with llvm tools installed a requirement?<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Basically, I want to fill a gap in Java, which is video codecs and a<br>
&gt;&gt;&gt; swing component to use them. I&#39;m hoping graalvm is a good way to do <br>
&gt;&gt;&gt; this.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Thank you,<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Ramsey<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
<br>
</blockquote></div>