2

I'm trying to use gstreamer to record a video stream for a url, https://csm-e-nineau2-eb.bln1.yospace.com/csm/extlive/nnaprd01,prod-simulcast-mel-ch9-hls-r13.m3u8

I have managed to do this with a test stream, http://devimages.apple.com/iphone/samples/bipbop/gear4/prog_index.m3u8, that's on the gstreamer examples page using the following command (using fakesink here for testing)

 gst-launch-1.0 souphttpsrc location=http://devimages.apple.com/iphone/samples/bipbop/gear4/prog_index.m3u8 \
 ! hlsdemux \
 ! tsdemux \
 ! queue \
 ! video/x-h264 \
 ! h264parse \
 ! fakesink

When I try the exact same command with the stream I want, I receive the following error:

ERROR: from element /GstPipeline:pipeline0/GstHLSDemux:hlsdemux0: Internal data stream error.
Additional debug info:
../gst-libs/gst/adaptivedemux/gstadaptivedemux.c(3891): gst_adaptive_demux_stream_download_loop (): /GstPipeline:pipeline0/GstHLSDemux:hlsdemux0:
streaming stopped, reason not-linked (-1)
ERROR: from element /GstPipeline:pipeline0/GstHLSDemux:hlsdemux0: Internal data stream error.
Additional debug info:
../gst-libs/gst/adaptivedemux/gstadaptivedemux.c(3891): gst_adaptive_demux_stream_download_loop (): /GstPipeline:pipeline0/GstHLSDemux:hlsdemux0:
streaming stopped, reason not-linked (-1)

I'm struggling here to work out what my issue here is with the stream, and what I should be linking the hlsdemux to. Running a get-discover on the url gives me the following:

gst-discoverer-1.0 -v https://csm-e-nineau2-eb.bln1.yospace.com/csm/extlive/nnaprd01,prod-simulcast-mel-ch9-hls-r13.m3u8
Analyzing https://csm-e-nineau2-eb.bln1.yospace.com/csm/extlive/nnaprd01,prod-simulcast-mel-ch9-hls-r13.m3u8
Done discovering https://csm-e-nineau2-eb.bln1.yospace.com/csm/extlive/nnaprd01,prod-simulcast-mel-ch9-hls-r13.m3u8

Properties: Duration: 99:99:99.999999999 Seekable: yes Live: no Tags: private-data: buffer of 8 bytes nominal bitrate: 128025 audio codec: MPEG-4 AAC video codec: H.264 container #0: application/x-hls Tags: None

container #-1: video/mpegts, systemstream=(boolean)true, packetsize=(int)188
  Tags:
    None

  video #1: video/x-h264, stream-format=(string)avc, pixel-aspect-ratio=(fraction)1/1, width=(int)854, height=(int)480, framerate=(fraction)25/1, coded-picture-structure=(string)frame, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, colorimetry=(string)bt709, parsed=(boolean)true, alignment=(string)au, profile=(string)high, level=(string)3, codec_data=(buffer)0164001effe100272764001eac72100d83de6f016a020202800000030080000019747003a9801d4d7bdc07c201092001000428fb8f2c
    Tags:
      video codec: H.264

    Codec:
      video/x-h264, stream-format=(string)avc, pixel-aspect-ratio=(fraction)1/1, width=(int)854, height=(int)480, framerate=(fraction)25/1, coded-picture-structure=(string)frame, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, colorimetry=(string)bt709, parsed=(boolean)true, alignment=(string)au, profile=(string)high, level=(string)3, codec_data=(buffer)0164001effe100272764001eac72100d83de6f016a020202800000030080000019747003a9801d4d7bdc07c201092001000428fb8f2c
    Stream ID: a4b40f2cfad0e90e410cdb6ae232e3f77caacc14e61a67041b21641c1866aa91/src_0:1/000001e1
    Width: 854
    Height: 480
    Depth: 24
    Frame rate: 25/1
    Pixel aspect ratio: 1/1
    Interlaced: false
    Bitrate: 0
    Max bitrate: 0
container #-1: audio/mpeg, framed=(boolean)false, mpegversion=(int)4, stream-format=(string)adts, level=(string)2, base-profile=(string)lc, profile=(string)lc, channels=(int)2, rate=(int)48000
  Tags:
    None

  audio #2: audio/mpeg, framed=(boolean)true, mpegversion=(int)4, level=(string)2, base-profile=(string)lc, profile=(string)lc, rate=(int)48000, channels=(int)2, stream-format=(string)adts
    Tags:
      private-data: buffer of 8 bytes
      nominal bitrate: 128025
      audio codec: MPEG-4 AAC

    Codec:
      audio/mpeg, framed=(boolean)true, mpegversion=(int)4, level=(string)2, base-profile=(string)lc, profile=(string)lc, rate=(int)48000, channels=(int)2, stream-format=(string)adts
    Stream ID: a4b40f2cfad0e90e410cdb6ae232e3f77caacc14e61a67041b21641c1866aa91/src_1
    Language: <unknown>
    Channels: 2 (front-left, front-right)
    Sample rate: 48000
    Depth: 32
    Bitrate: 128025
    Max bitrate: 0

EDIT: It looked like the hlsdemux was failing due to there being multiple video streams. Setting the connection-speed option to the maximum (4294967) did the trick, I'm guessing as it didn't try switching video streams to a lower quality one

gst-launch-1.0 souphttpsrc location=https://csm-e-nineau2-eb.bln1.yospace.com/csm/extlive/nnaprd01,prod-simulcast-mel-ch9-hls-r13.m3u8 \
 ! hlsdemux connection-speed=4294967 \
 ! tsdemux \
 ! h264parse \
 ! video/x-h264 \
 ! fakesink

0 Answers0