This is pretty much the premise of a little tool I wrote to generate QuickTime reference movies. It is written in Python, because it is to be used in a Django app that handles video uploads and encodes. Well, that and because I love Python! There isn't much else to say, so here is the code if you are interested:
hg clone http://bitbucket.org/dmurmann/root pyqtref
This is very much alpha software, it may fail horribly for you!
The simplest possible example, generating a reference movie to 'content.mov' looks like this:
from pyqtref import *
ref_mov = Movie(ReferenceMovie(Descriptor(
DataReference('content.mov')))).to_bytes()
The boilerplate is necessary, because the API is pretty close to the Quicktime File Format Specification.