how do i add H.264 stream to Muxer using SSFMuxAddStreamRSS

2 replies

Last post Jul 24, 2014 06:30 AM by chandar175

  • how do i add H.264 stream to Muxer using SSFMuxAddStream

    Jul 23, 2014 09:11 AM|chandar175|LINK

    Hi,

    I am trying to add H.264 stream to IIS Streaming muxer using SSFMuxAddStream but it fails. Also, I am confused it require H.264 without start code and my H.264 encoder output is with start how do i add it?. please help.

  • Re: how do i add H.264 stream to Muxer using SSFMuxAddStream

    Jul 23, 2014 12:24 PM|thalesc|LINK

    Hi,

    The start code delimiter is used for transporting H.264 in a byte-stream. However, for transporting in a MP4 container (like a Smooth Streaming fragment) you need to use the length delimited format. Basically start codes need to be replaced with a 4 bytes (default) specifying the length in big-endian format of the delimited H.264 NAL unit. Perhaps this can give you a bit of additional information: http://stackoverflow.com/questions/5544696/parsing-h264-in-mdat-mp4

    - Thales

  • Re: how do i add H.264 stream to Muxer using SSFMuxAddStream

    Jul 24, 2014 06:30 AM|chandar175|LINK

    Hi,

    the sequence header with start code is this: 00 00 00 01 67 42 c0 1f 96 54 02 80 2d 98 08 04 00 00 00 01 68 ce 3c 80 and from this i am creating length delimited sequence header  i am using two bytes as length of the NAL units.

    BYTE SeqHdr[] = {0x00,0x0C,
    0x67,0x42,
    0xc0 ,0x1f ,0x96 ,0x54,
    0x02 ,0x80 ,0x2d ,0x98 ,
    0x08 ,0x04 ,
    0x00, 0x04 ,
    0x68, 0xce ,0x3c ,0x80
    };

    and it successfully add stream to muxer and i pass sample from H.264 encoder output to SSFMuxProcessInput   but SSFMuxProcessOutput failed with catastrophic error after feeding 2 sec of vedio samples. what am i doing wrong?