hlssink directly split mpeg2TS files to support HLS not work

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

hlssink directly split mpeg2TS files to support HLS not work

rland
Hi,I'm working  with 1.82, use UDP to accept the mpegts stream,and I
tried to use the following way to produce hls's TS segment, but it doesn't seem to work properly.
There is only one 00000.ts, and did not generate m3u8 file.
note:input  mpeg2ts(h264+aac)
---------------
gst-launch-1.0 udpsrc uri=udp://10.9.44.208:1234 !  hlssink  max-files=6  target-duration=6
---------------

When I use the following pipeline,It's  OK.
--------------
gst-launch-1.0 uridecodebin uri=udp://10.9.44.208:1234 name=decbin !
queue ! videoconvert ! x264enc ! mpegtsmux name=muxer ! hlssink   max-files=6  target-duration=6
--------------
I know second  pipeline did a lot of redundant work and  reduced performance,
decoding aac/h264, re encoding, remux to mpegts, and then segment ....

I know the input is mpeg2ts (h264+aac), there is a way to directly use  hlssink
segment to HLS and without re encoding it?

Could please help me.
Thanks :)





Reply | Threaded
Open this post in threaded view
|

Re: hlssink directly split mpeg2TS files to support HLS not work

Baby Octopus
Administrator
I think hlssink looks for key frame event to fragment. You can try something like this

udpsrc ! tsdemux name=demux \
demux.! queue ! h264parse ! mpegtsmux  name=mux ! hlssink \
demux.! queue ! aacparse !  mpegtsmux mux.
Reply | Threaded
Open this post in threaded view
|

Re: hlssink directly split mpeg2TS files to support HLS not work

rland
This post was updated on .
Thx for your quickly comment.
I tried the following pipeline, still not work.
I think your suggestion may be right, but I'm wrong somewhere?
-----------------------
gst-launch-1.0 filesrc location=/home/shakin/Desktop/4m.ts  ! tsdemux name=demux demux.! queue ! h264parse ! mpegtsmux  name=mux ! hlssink max-files=3 target-duration=6 demux. ! queue ! aacparse ! mux.

./grammar.y(506): gst_parse_no_more_pads (): /GstPipeline:pipeline0/GstTSDemux:demux:
failed delayed linking some pad of GstTSDemux named demux to some pad of GstQueue named queue1
-----------------------
Reply | Threaded
Open this post in threaded view
|

Re: hlssink directly split mpeg2TS files to support HLS not work

Arjen Veenhuizen
You should also add config-interval=1 (or -1 if you're on a recent 1.9+ GStreamer) to the h264parse element in order to be sure that SPS/PPS NAL units are inserted at regular intervals. Not sure why your last pipeline is not working though...
Reply | Threaded
Open this post in threaded view
|

Re: hlssink directly split mpeg2TS files to support HLS not work

rland
This post was updated on .
Arjen Veenhuizen wrote
You should also add config-interval=1 (or -1 if you're on a recent 1.9+ GStreamer) to the h264parse element in order to be sure that SPS/PPS NAL units are inserted at regular intervals. Not sure why your last pipeline is not working though...
Hi Arjen, I tried a lot of different TS input files, but still not work.
The pipeline is stuck after generate one TS frgment and m3u8.
May be waste your precious time, Could you help me to find out a work well command ?

Thanks a lot. :)
 
Reply | Threaded
Open this post in threaded view
|

Re: hlssink directly split mpeg2TS files to support HLS not work

Topilski
Hi guys, i have the same issue,i think this bug (https://bugzilla.gnome.org/show_bug.cgi?id=727417) will be fix our problem .