Seamless mp4 Looping Audio

Get Microsoft Silverlight

One of the problems with Silverlight 3 is that there isn't a built in way to have seamless, looping audio.  However, one of the great things about Silverlight 3 is the MediaStreamSource, which you can so that you can create your own audio and visual solutions.  With that in mind, The DDtMM.ISO.Media library allows you to create a MediaStreamSource that allows for the specification of loop points in MP4 audio files.

Unfortunately applications that encode mp4 audio such as Nero's encoder add gaps or cut audio off, which makes it difficult to have a seamless loop (though by specifying loops points you can get very close).  This discovery caused me to abandon this project for sometime.  However, Expression Encoder 3 (and possibly earlier versions) do encode mp4 audio in such a way that there is absolutely no gap.  Very nice and makes this project very easy to use.  If I could go back in time however, I'd do a solution for lossless WMAs (specifications are easier to find too).

This is in no way a complete solution.  The video portion is only partially implemented and I've only been able to get it to work for maybe one source.  I think looping and directly controlling the sample index on video would be cool (I was thinking of a Lethal Enforcers type game).  Even if you get video to work, I didn't really work on keeping multiple tracks in sync.  Also, it doesn't support streaming, which would be very easy given the way Expression Encoder 3 encodes the relevant boxes at the start at the file.

In addition to the DDtMM.ISO.Media library, the DDtMM.ISO.Parser library should also be interesting to folks for their own ISO/IEC-14496 projects and you can also use the sample silverlight project as a guide for implementing your own solutions.

Copyright © 2010 DDtMM

Powered by BlogEngine.NET 1.5.0.7