Export - round to nearest second?


So, as I was working last night I noticed something.  I had a video that ended at 14:39:10, which ended on a particular musical note.  When I exported that video, that last note was cut off on the .mp4 file.  Pondering it later, I thought it might have something to do with the fact that the movie didn't end right on the "whole second" of the timeline, and that the export was shaving those last ten rogue frames off of the final cut to make it an even 14:39, which is why I'd lose the very end of the music.

As the film took over 25 minutes to render, I wasn't keen on repeatedly exporting it to troubleshoot the issue.  Am I on the right track, and for future movies should I make sure that they're all an exact number of seconds so that this sort of thing doesn't happen again?


  • Hi there, assuming you're using HitFilm Pro 2017, please make sure you're running the latest version (update 2). I fixed some issues with audio export.

    HitFilm does not 'cut off' exports or timelines to the nearest second; durations are measured strictly in whole frames and displayed as Hours:Minutes:Seconds:Frames with the number of frames per second dependant on your framerate.

    When you create a timeline or export it, it's the total number of frames that determines the length, not the hours, minutes or seconds.

    The exported video and audio should be indentical to the timeline you exported. If the audio isn't cut off when you play back that timeline normally but is in the export then you may have found an issue.

  • @Danny77uk

    I'm running Update 2 and the audio plays correctly within Hitfilm, so yes; it looks like I've found an issue.   Let me know if you need the project file or any of the related media for debugging.

  • @SteveKarstensen bring your output render back into Hitfilm and see if duration matches up. If not, you'll see how many frames the discrepancy is. 

    @Danny77uk if there is a bug, might it be chopping off at a keyframe? Lets say mp4 with a keyframe every 15 frames, but Steve's video ends on a "9" frame, and instead of an "early" keyframe to close the file, it just truncated at the prior key? Just an idea. 

  • @Triem23 good idea.  I'll try that tonight.  I doubt it's significant, but Windows reports the file as being 14:39.  Since the last few video frames are a still image, it's tough to tell if the entire video's being truncated since there's no movement to gauge.

  • Steve also remember media players like VLC ,Windows Media or YouTube round to the nearest second and don't show frames.

  • @Danny77uk @Triem23

    I imported the rendered .mp4 back into Hitfilm as suggested.

    Hitfilm reports the video length as 14:39:10, which is the same as the original project.  Putting it onto the editor timeline, I can see that both the audio and video extend the entire length of the project.  However, the last 9 frames of the audio track have black diagonal lines over them, and when I play the end of the video the sound cuts out at exactly 14:39:01, where they start.

    Just for sake of completeness, the original project also has an Audio Fade transition over the last two seconds of the audio, and that doesn't appear in the export either.  Don't know if it's relevant.

    Hope this was helpful...

  • Steve, that sounds like audio drift. Can you double check that your audio sample rate matches that of the project and your export settings? (i.e. 44.1/48Khz match?)

    Can you also triple check that project frame rate and media frame rates match? A 29.97/30 fps mismatch is one frame of audio drift every 10 seconds. For a 14 minute project this isn't the right amount of drift, but let's be thorough.

    It's possible you found a bug, I'm just trying tho think of anything that could classify as user error first.

  • @Triem23 you might be on to something.  The project framerate is set at 23.97fps, but the video clips I'm using are mostly 24, with some at 23.97 and at least one at 25(?).  The audio sampling rate for the project is 48000Khz, but most of the audio is 41000, including the offending music track.  At least one of my sound samples is 96000.

  • Ok, that gives you something to try and maybe confirmation from @Danny77uk ;

  • @SteveKarstensen Diagonal bars on layers and objects indicate 'dead zones'. It means that those layers/objects are longer than the underlying media or comp shots that they represent.

    This is usually caused by increasing the framerate the underlying comp shot/media.

  • edited February 2017

    @Danny77uk ;yes, I've seen that happen before with video layers, but I'm not sure how it would apply to audio.  The audio track in question was actually cropped in the original project; it's two minutes long but trimmed down to end after 30 seconds to match the length of the final two comps.  Unless that's where the sample rate @Triem23 mentioned comes in, causing audio drift in the original export which would mean that when it was imported back in, naturally, the audio data would be shorter than what it was supposed to be.  Am I on the right track?

    (oh, bad pun.)

    So, generally speaking, since I'm converting all of my video footage from its original format anyway, I can definitely make sure to match the conversion options to the project settings.  For audio, though?  I have hundreds of clips in my library.  Should I just set the project sample rate to the most common one (44100) and hope for the best?

    Given that I've already released this video (and given how large the project file is), I don't see a point in going back and trying to fix it, but I can definitely keep all of this in mind going forward in an effort to keep it from happening again.

Sign in to comment

Leave a Comment