No video display when watching HLS streams in browsers
Rand Graham
rand.graham at lge.com
Fri Feb 10 15:40:07 UTC 2017
Hello,
It sounds like you have a working pipeline now?
RE: VideoJS
I have used VideoJS successfully in the past to play back HLS streams. One way to gather more information about your failure case is to open the JavaScript console in Chrome and reload the page that is trying to playback the video. If you receive any error messages from VideoJS, you may get more information about the problem.
RE: your previous pipeline
Like I said, it did not work for me because I got a "no more pads" error. I am not sure the exact cause of "no more pads" errors. I was using gstreamer 1.8.2.
RE: re encoding
One major difference that I can think of is the encoder that is being used. You are using some input file but you have not mentioned how the input file was created. Specifically what encoder was used?
Your updated pipeline is using the x264enc software encoder that comes with gstreamer.
Through google searching I have seen that some h.264 encoders have shown problems creating video that plays well in HLS,
Here is an example of a problem that someone ran into previously (and there doesn't seem to be a solution)
https://www.raspberrypi.org/forums/viewtopic.php?t=116690&p=1049440
Regards,
Rand
________________________________________
From: gstreamer-devel [gstreamer-devel-bounces at lists.freedesktop.org] On Behalf Of Chien-Ming Cheng [cmcheng at gmail.com]
Sent: Thursday, February 09, 2017 11:31 PM
To: Discussion of the development of and with GStreamer
Subject: Re: No video display when watching HLS streams in browsers
Hi Rand,
Thanks for your reply. Let me describe my steps and further
experimental results.
I run GStreamer on a desktop server with Ubuntu 14. My objective is to
play HLS stream via a webpage (for example, http://address/index.html)
with various browsers. I refer to VideoJS HLS at
http://videojs.github.io/videojs-contrib-hls for creating the webpage
to play HLS stream in browsers without native HLS support (e.g.
Chrome).
The pipeline described in my previous email should be OK (kindly let
me know if it is not). As mentioned, however, I get only audio
playback but NO video display in browsers.
I further changed the pipeline from "demux and mux" to "decode first,
encode, and then mux" as follows (it does not matter although I
changed AAC encoder to faac).
gst-launch-1.0 filesrc location=media.mp4 ! decodebin name=decode !
queue2 ! videoconvert ! x264enc ! h264parse disable-passthrough=true !
mpegtsmux name=mux ! hlssink max-files=0 playlist-length=0 decode. !
queue2 ! audioconvert ! faac ! mux.
The HLS stream can be played well (both audio & video) in browsers (in
Chrome on Linux and Safari on iOS).
What is the difference between the first pipeline (only transmuxing)
and the second one (transmuxing plus re-encoding)? Does the
re-encoding process fix some errors in video stream and/or add some
missing information to video stream so that the video can be
displayed?
Thanks for any help or comments.
ps. I've tested version 1.10.3 and the one built from master branch (1.11.1.1).
More information about the gstreamer-devel
mailing list