[vlc-devel] Smooth Streaming, resolution switches (follow-up)

Frederic YHUEL fyhuel at viotech.net
Fri Mar 2 15:38:22 CET 2012


Hello,

For those who are interested, I'm happy to announce that I found a
solution to the resolution switches problem, for Smooth Streaming, and
potentially for DASH.

It's conceptually simple: whenever the MP4 demux reads a new chunk
whose "quality" is different from the previous one, it calls
es_out_Del() / es_out_Add() to init a new decoder, like this:

  es_out_Del( p_demux->out, p_track->p_es );
  stream_Control( p_demux->s, STREAM_GET_FMT, tid, qid, &p_track->fmt );
  p_track->p_es = es_out_Add( p_demux->out, &p_track->fmt );

where "tid" is the track ID and "qid" is the QualityLevel ID. Both are
(arbitrarily) set by the SS stream_filter module, and then wrote down
in each chunk, so that MP4 demux can identify properly each chunk and
(if needed) request a new es_format_t structure to the SS
stream_filter module.

I don't know if this is a smart solution, it works but I would
appreciate any comments you can provide about this.

Of course, I had to add support of fragmented MP4 to the MP4 demux,
before doing that. I hope I will be able to send a clean patch soon.

Besides, I think I could provide a similar solution to DASH, but it
needs some work.

Best Regards,

-- 
Frédéric



More information about the vlc-devel mailing list