UPDATE
This seemed to work – then videos were out of sync, again, today!
It’s the middle of the night, I woke up and messed around – will explain further later, but: I noticed that as videos streamed from my own, local server after about 12 or 15 minutes the audio and video would be out of sync. Interestinlgy this happened in Chrome and did happen in Firefox. I found a video that was remaining synced and comparted some codecs. The only difference I found was the video frame rate. In the video that played properly the frame rate was 25. I re-encoded a video that was not remaining synced and it solved the problem.
One issue, however, was that the video that streamed properly had a video frame rate of 25 – versus 32 for the one not streaming. When I re-encoded with Handbrake and chose a framed rate of 25 it actually produced a video with a frame rate of 23.9 or something. That was weird since I absolutely chose 25 – but it did fix the sync problem as I had tested that particluar video before and know that it had the sync problem.
No sync problem
Sync Problem
From the web regarding frate rate discrepancy with Handbrake
When setting the frame rate in HandBrake, a common issue is that a setting of 25 FPS might result in a slightly lower output like 23.976 FPS, especially when using Constant Frame Rate or specific standards like NTSC or PAL. This is often due to the way frame rates are represented and the potential for subtle variations in timebases.
Here’s why this might happen and what to do:
-
NTSC and PAL standards:
NTSC and PAL video standards have frame rates that are not perfectly even (e.g., 29.97 or 25 FPS). HandBrake might use a slightly different representation of these rates, leading to the discrepancy.
-
Constant Frame Rate and “Jitter”:
When using Constant Frame Rate, HandBrake tries to maintain a consistent frame rate, but it can introduce small timing variations, sometimes referred to as “jitter,” especially when working with non-integer frame rates like 23.976.
-
Source Frame Rate:
If the source video has a frame rate slightly different from what you’ve set in HandBrake, the output might also be slightly different.
-
Encoding Algorithm:
The specific encoding algorithm and parameters used by HandBrake can also influence the final frame rate.
-
1. Check the source:
Make sure the source video’s frame rate is what you expect.
-
2. Use “Same as Source“:
If you’re concerned about losing information or don’t need a specific frame rate, you can use the “Same as Source” option in HandBrake. This will preserve the original frame rate of the source video.
-
3. Consider “Peak Frame Rate (PFR):
PFR is a good balance between compatibility and frame rate preservation. It lets you set a maximum frame rate, so HandBrake will limit higher frame rate portions of your video to that rate while leaving lower frame rate parts unchanged.
-
4. Adjust “Constant Frame Rate”:
If you need a specific frame rate, try adjusting the “Constant Frame Rate” option, but be aware that it can sometimes lead to “jitter”.
-
5. Check HandBrake documentation:
Refer to the HandBrake documentation for more detailed information on frame rate handling.