JDK-8088435 : javafx supported HLS issue
  • Type: Bug
  • Component: javafx
  • Sub-Component: media
  • Affected Version: 7u15
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2013-06-06
  • 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
Duplicate :  
Description
When I used the javafx play a stream.   There are some issues.
1. I can not play HLS stream in jdk 1.7. When I upgrade jdk 7 to jdk 8. And I test a m3u8 stream. That is ok. 
    I refer the bug comments: https://javafx-jira.kenai.com/browse/RT-25841
2. I can not play the url in our sample. Such as: http://222.92.132.3/jame_test.m3u8?channel=2. The exception say the unsupported file extension. Is javafx is not supported ".m3u8?channel=2".
3. The javafx look like not support the following playinglist. Such as do a get request: http://222.92.132.4/stream.m3u8
    #EXTM3U
    #EXT-X-STREAM-INF:PROGRAM-ID=1;BANDWIDTH=1000000
    stream.m3u8?channel=1
    #EXT-X-STREAM-INF:PROGRAM-ID=1���BANDWIDTH=64000
    stream.m3u8?channel=2
4. And How to control the streaming latency. Because my server is ip camera server. This is my very care. 
5. Do we have a way to operate the low layer api About h264 stream and the h264 frame data?
Thanks for your help. The 5 issues are in my test. Plase give me a suggestion.
Comments
For 2 see RT-31032. I will lower priority for this issue. See RT-31032 comment for explanation.
13-06-2013

1. Great. I can view the video base on your support. For 2. Thanks very much. 2. For 1. I paste my code and you run the code for view the issue. ============================================================================ import java.beans.EventHandler; import javafx.scene.media.*; import javafx.application.Application; import javafx.scene.Group; import javafx.scene.Scene; import javafx.scene.layout.BorderPane; import javafx.scene.layout.Pane; import javafx.scene.media.MediaView; import javafx.scene.text.Font; import javafx.scene.text.Text; import javafx.stage.Stage; public class jaw extends Application { private static final MediaView NULL = null; @Override public void start(Stage primaryStage) { String source= "HTTP://222.92.132.3/jame_test.m3u8?channel=5"; Media media; MediaPlayer mediaPlayer = null; MediaView mediaView = NULL; try { media = new Media(source); if (media.getError() == null) { media.setOnError(new Runnable() { public void run() { // Handle asynchronous error in Media object. } }); try { mediaPlayer = new MediaPlayer(media); if (mediaPlayer.getError() == null) { mediaPlayer.setOnError(new Runnable() { public void run() { // Handle asynchronous error in MediaPlayer object. } }); mediaView = new MediaView(mediaPlayer); // mediaView.setOnError(new EventHandler(mediaView, source, source, source) { /* public void handle(MediaErrorEvent t) { // Handle asynchronous error in MediaView. }*/ //}); } else { // Handle synchronous error creating MediaPlayer. } } catch (Exception mediaPlayerException) { // Handle exception in MediaPlayer constructor. } } else { // Handle synchronous error creating Media. } } catch (Exception mediaException) { // Handle exception in Media constructor. } /* Pane p = new Pane(); Text t = new Text("Hello Fx"); t.setFont(Font.font("Arial", 60)); mediaView.setVisible(true); mediaPlayer.play(); p.getChildren().addAll(mediaView); primaryStage.setScene(new Scene(p)); primaryStage.show();*/ Group root = new Group(); Scene scene = new Scene(root, 800, 600); root.setCache(true); root.getChildren().add(mediaView); primaryStage.setScene(scene); mediaPlayer.bufferProgressTimeProperty(); mediaPlayer.setAutoPlay(true);//mediaPlayer.play(); primaryStage.show(); } public static void main(String[] args) { launch(args); } } ===================================================================================================================
12-06-2013

For 1: Based on log we do re-requesting playlist and downloading segments, then we stop. Do not see based on log what is wrong. Can you provide several hls/s1_clip*.ts files?
12-06-2013

For 2: Do not use spaces for #EXT-X-TARGETDURATION and #EXTINF. This is invalid according to spec. Also, I notice intermittent issue when input data is very small and you may get error that stream is invalid. Try to use more data like in example below. #EXTM3U #EXT-X-TARGETDURATION:10 #EXTINF:10 jame.ts #EXTINF:10 jame.ts #EXTINF:10 jame.ts #EXTINF:10 jame.ts #EXTINF:10 jame.ts #EXTINF:10 jame.ts #EXTINF:10 jame.ts #EXTINF:10 jame.ts #EXT-X-ENDLIST
12-06-2013

1. I do not see anything wrong with network captured information. You do not have anything like ?channel=1 in captured stream. >>Answer>>About #2. I am so sorory. I paste the issue session in the page. Issue description: There are nothing actions after the ts files list requested finished. ==issue session =============================================================== HEAD /img/stream.m3u8?channel=2 HTTP/1.1 User-Agent: Java/1.8.0-ea Host: 172.21.15.61 Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2 Connection: keep-alive HTTP/1.1 200 OK Content-Type: application/vnd.apple.mpegurl, audio/mpegurl Content-Length: 181 Date: Tue, 11 Jun 2013 00:36:55 GMT Server: ip-camera GET /img/stream.m3u8?channel=2 HTTP/1.1 User-Agent: Java/1.8.0-ea Host: 172.21.15.61 Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2 Connection: keep-alive HTTP/1.1 200 OK Content-Type: application/vnd.apple.mpegurl, audio/mpegurl Content-Length: 181 Date: Tue, 11 Jun 2013 00:36:55 GMT Server: ip-camera #EXTM3U #EXT-X-MEDIA-SEQUENCE:28940 #EXT-X-TARGETDURATION:3 #EXTINF:3 hls/s1_clip28937.ts #EXTINF:3 hls/s1_clip28938.ts #EXTINF:3 hls/s1_clip28939.ts #EXTINF:3 hls/s1_clip28940.ts ==issue session =============================================================== 2. Did you manually generate following http://222.92.132.3/jame_test.m3u8?channel=2 ? >>Answer>>Yes. It is by myself in a web server. This is server issue. I am only crate two file in a web server . One m3u8 file and One ts file. The example can play in my iphone sarfri. But javafx can not play. You can double check. ================================================================== I also do following sample to try. But it also can not play in javafx. #EXTM3U #EXT-X-TARGETDURATION: 10 #EXTINF: 10 http://222.92.132.3/jame.ts #EXT-X-ENDLIST ==================================================================
11-06-2013

The #2. I have capture network package. You get it from the url: http://222.92.132.3/javafx_hls.zip Please help check. Thanks. ==Java Environment============================================================ D:\Java_work\source\bin>java -version java version "1.8.0-ea" Java(TM) SE Runtime Environment (build 1.8.0-ea-b92) Java HotSpot(TM) Client VM (build 25.0-b34, mixed mode, sharing)
11-06-2013

Did you manually generate following http://222.92.132.3/jame_test.m3u8?channel=2 ? #EXTM3U #EXT-X-TARGETDURATION: 10 #EXTINF: 10 ./jame.ts #EXT-X-ENDLIST Only one segment and "./" is not common.
11-06-2013

I do not see anything wrong with network captured information. You do not have anything like ?channel=1 in captured stream.
11-06-2013

2-3) Can you zip playlists and 10 segment files and attach to bug, so I can investigate. We should able to play such playlists. 4) You cannot control it. Usually you will get around 10-30 seconds delay. HLS is not real time streaming protocol. 5) No. Can you explain in more details what you mean by operating on H.264 stream?
10-06-2013