{
// make a new copy of mov
Movie movie = cloneMovie(mov);
int timescale = movie.getTimeScale();
TimeCodeDef tcDef = new TimeCodeDef();
tcDef.setTimeScale(movie.getTimeScale());
int fps = MovieUtils.countFrames(movie, 0, 1);
tcDef.setFrameDuration(movie.getTimeScale() / fps);
tcDef.setFramesPerSecond(fps);
tcDef.setFlags(StdQTConstants.tcDropFrame);
// first record at 0 hrs, 0 min, 0 sec, 0 frames
TimeCodeTime tcTime = new TimeCodeTime (0, 0, 0, 0);
// create time code track and media