Create HLS Stream from external HW H264 Encoder

Franz Löseke franz at inparty-fm.de
Sun Oct 21 12:53:10 UTC 2018


Hello. I have tried many things but now i have no idea what happen.
I  want to stream a HLS from an external H264 Encoder. This encoder  
creates a HTTP TS  and a rtsp stream. As i know for HLS a TS is  
needed. If i use the videotestsrc everything works fine but if i take  
the source from the http stream then gstreamer creates one single  
hlsfile and no playlist.
This is my line for the videotest:

gst-launch-1.0 videotestsrc is-live=true ! x264enc ! mpegtsmux !  
hlssink max-files=3  playlist-root=http://192.168.178.60  
location=/var/www/html/hlsstream%01d.ts target-duration=5  
playlist-location=/var/www/html/playlist.m3u8


This for the external encoder:

gst-launch-1.0 souphttpsrc location=http://192.168.178.100:8000/ext  
is-live=true ! h264parse ! mpegtsmux ! hlssink max-files=5   
target-duration=8 playlist-root=http://192.168.178.60  
location=/var/www/html/hlsstream%01d.ts  
playlist-location=/var/www/html/playlist.m3u8

I tried also without mpegtsmux (because i think it is TS as the  
description of the encoder says). Here just one .ts file will be  
created and not splitted as the first test command.


In verbose mode i get these messages:



Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps =  
video/x-h264, width=(int)1280, height=(int)720,  
framerate=(fraction)0/1, parsed=(boolean)true,  
stream-format=(string)byte-stream, alignment=(string)au, profi          
      le=(string)main, level=(string)3.1
/GstPipeline:pipeline0/MpegTsMux:mpegtsmux0.GstPad:sink_65: caps =  
video/x-h264, width=(int)1280, height=(int)720,  
framerate=(fraction)0/1, parsed=(boolean)true,  
stream-format=(string)byte-stream, alignment=(string)au, prof           
     ile=(string)main, level=(string)3.1
/GstPipeline:pipeline0/MpegTsMux:mpegtsmux0.GstPad:src: caps =  
video/mpegts, systemstream=(boolean)true, packetsize=(int)188
/GstPipeline:pipeline0/GstHlsSink:hlssink0.GstGhostPad:sink.GstProxyPad:proxypad0: caps = video/mpegts, systemstream=(boolean)true,  
packetsize=(int)188
/GstPipeline:pipeline0/GstHlsSink:hlssink0/GstMultiFileSink:multifilesink0.GstPad:sink: caps = video/mpegts, systemstream=(boolean)true,  
packetsize=(int)188
/GstPipeline:pipeline0/GstHlsSink:hlssink0.GstGhostPad:sink: caps =  
video/mpegts, systemstream=(boolean)true, packetsize=(int)188
/GstPipeline:pipeline0/MpegTsMux:mpegtsmux0.GstPad:src: caps =  
video/mpegts, systemstream=(boolean)true, packetsize=(int)188,  
streamheader=(buffer)<  
47400030a600ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff      
           
fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff              fffffffffffffffffffffffffffffffffffffffffffff0000b00d0001c100000001e020a2c32941, 474020308b00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff              ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0002b0280001c10000e041f00c050448444d5688040ffffcfc1be041f00a050848444d56ff1b4              43f5a3175c0  
 >
/GstPipeline:pipeline0/GstHlsSink:hlssink0.GstGhostPad:sink.GstProxyPad:proxypad0: caps = video/mpegts, systemstream=(boolean)true, packetsize=(int)188, streamheader=(buffer)< 47400030a600fffffffffffffffffffffffffffffffffff              fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff              ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000b00d0001c100000001e020a2c32941, 474020308b00fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff              fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0002b0280001c10000e041f00c050448444d5688040ffffcfc              1be041f00a050848444d56ff1b443f5a3175c0  
 >
/GstPipeline:pipeline0/GstHlsSink:hlssink0/GstMultiFileSink:multifilesink0.GstPad:sink: caps = video/mpegts, systemstream=(boolean)true, packetsize=(int)188, streamheader=(buffer)< 47400030a600ffffffffffffffffffffffffffffff              fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff              fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000b00d0001c100000001e020a2c32941, 474020308b00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff              ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0002b0280001c10000e041f00c050448444d5688040ff              ffcfc1be041f00a050848444d56ff1b443f5a3175c0  
 >
/GstPipeline:pipeline0/GstHlsSink:hlssink0.GstGhostPad:sink: caps =  
video/mpegts, systemstream=(boolean)true, packetsize=(int)188,  
streamheader=(buffer)<  
47400030a600fffffffffffffffffffffffffffffffffffffffffffffffffffffffff   
              
fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff              ffffffffffffffffffffffffffffffffffffffffffffffffff0000b00d0001c100000001e020a2c32941, 474020308b00fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff              fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0002b0280001c10000e041f00c050448444d5688040ffffcfc1be041f00a050848444d56              ff1b443f5a3175c0  
 >




Is there anybody who have a sollution for that? Other question. What  
happen if the encoder is temporaly not available?

Regards

Franz









More information about the gstreamer-devel mailing list