Video audio sync / frame rate problems - advice plez :D

edited August 2016 in Pro Support

Hi - So it's become apparent that when I use footage from my webcam, the video and the audio play at different speeds. I've played around with Handbrake, but as I am not that clued up on codecs and such, I'm not entirely sure what the problem is - and thus not sure what to do to fix it. But you'll see the video plays (or should play) fine on your computer (It plays fine in the Films and TV player on my Win10 computer), but when I import it into Hitfilm, no matter what settings I seem to set the project file up, when I put it into the timeline, there's a crossed out area on the audio track at the end and they play at different speeds - further more playing it in the trimmer, you'll see that the last few frames of the video refuse to play.

 I don't use webcams often to film, but occasionally for quick channel updates it's convenient - or at least it would be if I knew what was the problem with the file formats. 

If anyone has anymore experience than I do with the complexities of video formats/codecs/framerates, I would welcome advise.

Video below:

https://www.dropbox.com/s/mwx7kn1yis1cz5q/Win 20160811 22 29 03 Pro-1.mp4?dl=0

Comments

  • The issue is that the footage uses variable frame rate, which works ok for playback, but not for editing. Editing software is going to expect the same number of frames in every second of your video. So, all you need to do is convert the footage to a constant frame rate, which is easily done with Handbrake.

    A good place to start is to select MP4 as your Container, then use the following settings in the Video tab:

    QUALITY
    Constant Quality: 17 RF

    FRAMERATE (FPS): Set this to a fixed number. You footage is averaging around 15.93 FPS, but you will want to set a whole number, like 16. Better yet, use a standard frame rate, like 24 or 30.
    Constant Framerate: Enabled

    OPTIMISE VIDEO
    Fast Decode: enabled
    H.264 Profile: High
    H.264 Level: Auto
    Extra Options: keyint=15:min-keyint=1:bframes=0

    This process is also shown in the following video, if you prefer to have some visual guidance: https://youtu.be/4wWI_9Sscjc?t=8m4s

  • Hey Axel - So this is one of the things I tried, but when I do this and import it into Hitfilm, the audio does a weird popping thing if I switch the project sample rate to match at 44100 (the audio is silent at any other rate, it would seem)? 

  • I'm glad there is at least A solution out there. However, as a daily vlogger... Handbaking every clip I capture is insane. It adds another 4 hours onto each day of video production. Hmmm, may have to rethink this whole "the best camera is the one you have with you" thing & buy an AX100...

  • @ucello

    That is an awful lot of video! I can't imagine Handbrake taking that long. When I run a 10 minute screen capture video through Handbrake (1920x1080), it takes less than 60 seconds to do the job. I am curious: What are you doing that takes so long?

  • I note that the best time to batch convert is just before bed. Let the computer work while you sleep. 

  • edited September 2016

    Thank you for the replies!!!

    @senseihaynes    Perhaps it varies by the type of content, and what you're converting it to? On average I have about an hour of 1080 smartphone footage (VBS so around 20 to 30 fps, approx 15mbps h264 mp4 wrapper, 192 audio). I convert it to a constant bitrate 30FPS, using settings found in a thread here in the forums. Handbrake seems to process this type of file at a 1-to-4 ratio (one hour = 4 hours of processing time)... and this is on an i7 with an SSD and 16GB mem!

    @Triem23    I agree... except that I need to publish the vlog THAT SAME DAY. Sometimes I can delay a release & pretend it was from that day, but juggling all this scripting, capturing, transcoding, editing... as a one-man-band it can trigger mental illness LOL.

    I think I'll get back to using a pro camcorder for talking head clips, and smarphone only for non-audio field clips.

  • @ucello "Handbrake seems to process this type of file at a 1-to-4 ratio (one hour = 4 hours of processing time)... and this is on an i7 with an SSD and 16GB mem!"

    What Handbrake settings exactly. Depending on settings used, x264 can be as fast as a hardware encoder or ultra slow. 

    Also, what i7?

  • @ucello this surprises me, since Handbrake usually transcodes footage for me at about 200fps (more than 6x real-time). However NormanPCN is one of the most knowledgeable techies here, so working with him I wouldn't be surprised if he figured out a setting to speed up throughput. 

  • edited September 2016

    I need more sleep. The settings were mentioned earlier in this very thread, by a staff member:

    "  QUALITY

    Constant Quality: 17 RF

    FRAMERATE (FPS): Set this to a fixed number. You footage is averaging around 15.93 FPS, but you will want to set a whole number, like 16. Better yet, use a standard frame rate, like 24 or 30.
    Constant Framerate: Enabled

    OPTIMISE VIDEO
    Fast Decode: enabled
    H.264 Profile: High
    H.264 Level: Auto
    Extra Options: keyint=15:min-keyint=1:bframes=0  "

     

  • edited September 2016

    According to my control panel, my  i7 is a 6500 @2.5GHZ... Windows 10 64 bit, x64 based processor.

    Handbrake doesn't require a fancy GPU accroding to the documentation. But I'm wondering if your speeds are aided by a nice GPU??? I only have the Intel Graphics 520 (for the lose).

  • @ucello yes, Handbrake is GPU accelerated. That said, try changing output codec from h.264 to h.264 (Quicksynch). This will use the hardware based encoding on your Intel-HD 520. This will speed up encoding by a lot, but at a slightly lower quality (so raise your output mbps a little to compensate.).

  • CNKCNK
    edited September 2016

    @ucello You have a dual core CPU, but I think that it makes use of HyperThreading, which is at least a good boost.

    For the record, my A8 5500 CPU doesn't get that slow, and my GPU is a R9 380. Is that the problem? I don't know, we would have to convert the same file. If you're going to do that, don't give me the 1h file please. :)

    You can upload a small sample to Góogle Drive or something.

  • edited September 2016

    @ucello You did not list all settings. Playing with the "encoder preset" setting. This option will have the largest effect on the encoding speed. Kinda obvious from the preset names.

    At the same CRF value the quality should be close from the slowest to faster settings. The faster encoding settings will generate larger files.

    Your i7 6500 is a little slow and only two cores so that impacts performance. 

  • I ran a quick test on this...

    - A sixty second 1920x1080 OBS video capture took 12 seconds to run through handbrake.

    - A sixty second 1280x720 video from my LG G3 took 15 seconds to run through Handbrake.

    - A sixty second 3840x2160 video from my LG G3 took 98 seconds to run through Handbrake.

    I am encoding to a CFR of 29.97, making it the same size as it was before.

Sign in to comment

Leave a Comment