Results 1 to 2 of 2

Thread: iOS device plays HLS stream encoded on DM365 only if it receives the first segment

  1. #1
    Join Date
    Nov 2011

    Default iOS device plays HLS stream encoded on DM365 only if it receives the first segment

    Hello, I was wondering if anyone could help with the issue we are having with
    live iOS streaming.

    We are using a hardware H264 encoder on Texas Instruments DM365 SoC. The H264
    stream it produces is muxed into a FLV container and then streamed to Wowza
    over RTMP.

    Streaming to Flash players works fine, but iOS devices such as iPod and iPad
    have trouble displaying video served through HLS.

    We have noticed that video on iOS plays if the H264 source connects to Wowza
    AFTER the iOS device. If the iOS device connects to Wowza after the video
    source connected, the iOS device would not display any video.

    It seems that there is some info in the start segment which is absent from the
    subsequent video segments, and which iOS needs to be able to decode video.

    We were able to successfuly stream to iOS devices by using a software h264
    encoder and a webcam with the following command:

    ffmpeg -r 25 -f vfwcap -i 0 -r 25 -an -f flv -s 320240 -vcodec
    libx264 -b 512k -flags +loop -cmp +chroma -partitions
    +parti4x4+partp8x8+partb8x8 -subq 5 -trellis 1 -refs 1 -coder 0
    -me_range 16 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -bt
    1024k -maxrate 512k -bufsize 512k -rc_eq 'blurCplx^(1-qComp)' -qcomp
    0.6 -qmin 10 -qmax 51 -qdiff 4 -level 30 -aspect 320:240 -g 30 -async
    2 "rtmp://"

    On the source, there are currently only a few parameters which we can tweak
    when using a gstreamer element which controls the encoder (bitrate, cbr/vbr,
    intraframe interval), and the encoder default is to encode high profile h264.

    In latest gstreamer plugin code, there are options to set the encoder to do
    base (or main profile), set the level to 3.1, and turn on AUD NAL and SPS/PPS
    headers insertion. Unfortunately, enabling these did not help. The stream on
    iOS would only play if the player got the first segment, as before.

    We were unable to run Apple's mediastreamvalidator on the m3u8 served by wowza
    - the validator would hang indefinitely with no output.

    There is no audio muxed into the FLV. The video pipeline on the source runs
    nominally on 30fps, but we are physically outputting about 15fps.

    We have tried manually streaming FLV generated on the source by splitting it
    into tags, removing script tag which contains metadata, and then publishing FLV
    tags in sequence to Wowza. After we reach the last tag, we start streaming
    again from the first tag, but we modify FLV container's timestamp so that it
    looks like a fresh chunk. We had the same issue with this set-up - iOS would
    start streaming only when it receives the start of h264 stream, that is, each
    time after the cycle restarts, but not mid-stream.

    The FLV obtained from the source is here:

    Is it possible that our stream does not contain some data which should be
    periodically inserted into the stream, such as IDR slices or SPS/PPS headers?

    Does Wowza change the H264 stream in any way when it transmuxes video? For
    example, does it insert AUD NALs if there aren't any in the input stream?


  2. #2
    Join Date
    Nov 2011



    We seem to have resolved this issue by adding a non-zero idrinterval parameter to dmaienc_h264 gstreamer plugin. Is it possible that the lack of IDR access units was the cause of this issue?

    Last edited by zzzZzzz; 11-08-2011 at 07:55 PM.

Similar Threads

  1. Transrate Segment Length for HLS and IOS Spec GOP Length
    By satappinc in forum Wowza Transcoder
    Replies: 3
    Last Post: 10-15-2014, 06:36 AM
  2. iOS Device Failing to Start Mid Stream
    By glennolsen in forum Live Streaming and Encoders
    Replies: 2
    Last Post: 05-25-2014, 01:23 PM
  3. Replies: 1
    Last Post: 02-21-2014, 07:43 AM
  4. Upload Stream from iOS Device
    By ankitthakur85 in forum Server-side Modules and Code Samples Discussion
    Replies: 5
    Last Post: 12-26-2011, 07:58 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts