No video display when watching HLS streams in browsers

Chien-Ming Cheng cmcheng at gmail.com
Fri Feb 10 05:31:01 UTC 2017


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).


On Wed, Feb 8, 2017 at 4:12 AM, Rand Graham <rand.graham at lge.com> wrote:
> Hello,
>
> Can you clarify what platform you are using?
>
> I have observed a case where the videos play in Chrome on Android but not in Safari on iOS. On iOS I get audio playback only and no video.
>
> My pipe line is as follows
>
> gst-launch-1.0 -v -e mpegtsmux name=m ! hlssink max-files=0 playlist-length=0 filesrc location=bees_hevc.ts ! tsdemux name=dem dem. ! queue ! h265parse ! omxh265dec ! nvvidconv ! 'video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, format=(string)I420' ! omxh264enc profile=8 ! m. dem. ! queue ! avdec_aac ! audioconvert ! voaacenc ! m.
>
> Regarding your pipeline, I could not get it to run because I get a no more pads error when trying it on my machine.
>
> Regards,
> Rand
> ________________________________________
> From: gstreamer-devel [gstreamer-devel-bounces at lists.freedesktop.org] On Behalf Of Chien-Ming Cheng [cmcheng at gmail.com]
> Sent: Monday, February 06, 2017 3:56 AM
> To: gstreamer-devel at lists.freedesktop.org
> Subject: No video display when watching HLS streams in browsers
>
> Hello
>
> I simply converted a media file (container: Quicktime, audio: MPEG-4
> AAC, video: H.264) to HLS stream as follows.
>
> gst-launch-1.0 filesrc location=media.mp4 ! qtdemux name=demux !
> queue2 ! h264parse disable-passthrough=true ! mpegtsmux name=mux !
> hlssink max-files=0 playlist-length=0 demux. ! queue2 ! aacparse !
> mux.
>
> I can watch the HLS stream via the playlist.m3u8 by using media
> players such as ffplay and vlc.
>
> Then I created a web page which includes videojs-contrib-hls to play
> the playlist.m3u8. However, only audio can be played (no video
> display) when watching the HLS stream via http://address/index.html in
> browsers such as Chrome and Safari. On the other hand, both audio and
> video are fine via the same web page when replacing the HLS playlist
> and segment files with that generated by ffplay program.
>
> I have tested GStreamer 1.6.x, 1.9.x, and the latest 1.10.3. All have
> the same result.
>
> Does anyone know how to watch HLS streams generated by GStreamer in
> browsers? Did I make any mistakes (for example, the wrong GStreamer
> pipeline)?
>
> Thanks
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


More information about the gstreamer-devel mailing list