src/main/java/org/jcodec/containers/mp4/QTTimeUtil.java
public static String formatTimecode(TrakBox timecodeTrack, int counter) {
        TimecodeSampleEntry tmcd = NodeBox.findFirstPath(timecodeTrack, TimecodeSampleEntry.class, Box.path("mdia.minf.stbl.stsd.tmcd"));
        byte nf = tmcd.getNumFrames();

        String tc = String.format("%02d", counter % nf);
        counter /= nf;
        tc = String.format("%02d", counter % 60) + ":" + tc;
        counter /= 60;
        tc = String.format("%02d", counter % 60) + ":" + tc;
        counter /= 60;
        tc = String.format("%02d", counter) + ":" + tc;

        return tc;
    }
public static String formatTimecode(TrakBox timecodeTrack, int counter) {
        TimecodeSampleEntry tmcd = NodeBox.findFirstPath(timecodeTrack, TimecodeSampleEntry.class, Box.path("mdia.minf.stbl.stsd.tmcd"));
        byte nf = tmcd.getNumFrames();

        String tc = String.format("%02d", counter % nf);
        counter /= nf;
        tc = String.format("%02d", counter % 60) + ":" + tc;
        counter /= 60;
        tc = String.format("%02d", counter % 60) + ":" + tc;
        counter /= 60;
        tc = String.format("%02d", counter) + ":" + tc;

        return tc;
    }
public static String formatTimecode ( TrakBox timecodeTrack , int counter ) { TimecodeSampleEntry tmcd = NodeBox . findFirstPath ( timecodeTrack , TimecodeSampleEntry . class , Box . path ( "mdia.minf.stbl.stsd.tmcd" ) ) ; byte nf = tmcd . getNumFrames ( ) ; String tc = String . format ( "%02d" , counter % nf ) ; counter /= nf ; tc = String . format ( "%02d" , counter % 60 ) + ":" + tc ; counter /= 60 ; tc = String . format ( "%02d" , counter % 60 ) + ":" + tc ; counter /= 60 ; tc = String . format ( "%02d" , counter ) + ":" + tc ; return tc ; }
Formats tape timecode based on frame counter

@param timecodeTrack
@param counter
@return
Formats tape timecode based on frame counter