I am at a college, and we use Wirecast to broadcast events - sometimes lengthy ones like Commencement. There seems to be a slight lag of video to audio, which I think is to be expected because of the processing happening on the video side (correct?). However, we have observed the sync gap to increase over time, and when our techs test a stream by stopping and starting the stream in the QuickTime Player, the sync can worsen when the stream starts again.
I think I'm looking for rules of thumb here. Is there a compression (e.g. H.264 vs. MPEG-4) that maintains sync better than others? What factors/settings should I be adjusting to get the a/v sync under control?
I'm assuming that the slight lag that is present at the best of times would be handled by an audio delay device. If so, are there any recommendations of economical units?
Lag is less likely when signal path goes through a common "clock." Audio sent through the video camera is less likely to lag than camera video with USB Mic. Some signal paths have offsets. Then there may be a need for an offset.
Codec itself is not a key factor. Keyframes can be. Decreasing the key frame distance can sometimes help because it's possible the stream can resync. Keyframes can use more bandwidth though.
Thank you Craig. I changed the insertion point of the audio (into the Canopus box the camera was plugged into, rather than the Mac Pro's line in) and the audio and video are now spot on.
However, I set up a test to stream a source over several hours, and the sync separated by a second or more.
So I set up another test with two Mac Pros in parallel - same source, same encoding. The original Mac is a dual-core 2.66GHz Xeon with 2GB RAM and an NVIDIA GeForce 7300GT video card. The new competitor is a quad-core 2.8GHz Xeon with 4GB RAM and an NVIDIA GeForce 8800 GT card. Lo and behold the newer Mac could maintain sync over hours easily, breathing lightly at under 10% CPU usage. The older Mac lost sync, working at over 40% CPU. Since it has CPU to spare, would the sync culprit be the RAM, the graphics card, or both?
Thanks again. - Paul
Edit: I went exploring and discovered the new, syncing Mac had a Wirecast setting of Capture Device Size: Native, whereas the problematic Mac had a setting of Capture Device Size: Reduced.