[vlc-devel] Smooth Streaming, MP4 and H.264

Frederic YHUEL fyhuel at viotech.net
Mon Oct 10 14:19:21 CEST 2011


Hello all,

As discussed in a previous thread [1], I try to do a VLC module that
would add support for a subset of MS Smooth Streaming protocol.
Contrary to DASH, a initialization segment (i.e. ftyp + moov boxes for
MP4) isn't provided, thus MP4 demuxer and H.264 decoder must be
initialized with data provided in the manifest (a SS manifest is like
a DASH MPD or a HLS playlist, exemple in [2]).

I thought the most straightforward way to work around that was to
build a moov box from the manifest, so I wrote a python script [3] to
see if such a solution could work.

The script can produce a valid moov box for one of the video quality
levels available, but I didn't succeed to produce a moov box such that
switching among the different quality levels would be possible.

Actually I don't know if this is my avcC box which is not correctly
generated, or something else, like a limitation of libavformat...

FYI, here is the definition of the AVCDecoderConfigurationRecord,
which is the "payload" of the avcC box:

aligned(8) class AVCDecoderConfigurationRecord {

  unsigned int(8) configurationVersion = 1;
  unsigned int(8) AVCProfileIndication;
  unsigned int(8) profile_compatibility;
  unsigned int(8) AVCLevelIndication;
  bit(6) reserved = ‘111111’b;
  unsigned int(2) lengthSizeMinusOne;
  bit(3) reserved = ‘111’b;

  unsigned int(5) numOfSequenceParameterSets;
  for (i=0; i< numOfSequenceParameterSets; i++) {
    unsigned int(16) sequenceParameterSetLength ;
    bit(8*sequenceParameterSetLength) sequenceParameterSetNALUnit;
  }

  unsigned int(8) numOfPictureParameterSets;
  for (i=0; i< numOfPictureParameterSets; i++) {
    unsigned int(16) pictureParameterSetLength;
    bit(8*pictureParameterSetLength) pictureParameterSetNALUnit;
  }
}

>From the manifest provided in [2], the script build an
AVCDecoderConfigurationRecord which contains 8 SequenceParameterSets,
each of which having a
sequenceParameterSetNALUnit taken from the CodecPrivateData attribute
of the manifest file. Unfortunately it is not sufficient to properly
initialize the H.264 decoder :-(

Any help or suggestion would be much appreciated :-)

Best Regards,

-- 
Frédéric

[1] http://mailman.videolan.org/pipermail/vlc-devel/2011-August/081568.html
[2] http://pastebin.com/JP4xQe1H
[3] https://bitbucket.org/yhuelf/python-scripts/src/033a2845a6b7/build_moov_box.py



More information about the vlc-devel mailing list