lu-zero / bmdtools

Basic capture and play programs for Blackmagic Design Decklink
Boost Software License 1.0
198 stars 74 forks source link

AV sync after SDI input switching #75

Open yverbin opened 8 years ago

yverbin commented 8 years ago

Audio and video out of sync after SDI input switching. I try to use DeckLink Mini Recorder, DeckLink SDI - every SDI input switching increases delay between audio and video streams.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/34736323-av-sync-after-sdi-input-switching?utm_campaign=plugin&utm_content=tracker%2F256764&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F256764&utm_medium=issues&utm_source=github).
stevenviola commented 8 years ago

I've seen the same behavior on the Decklink SDI (pre 4k) and Mini Recorder. This seems to be an issue with the firmware on the cards and wasn't something wrong with bmdtools. I created posts on the blackmagic forums regarding this for the Decklink SDI and the Decklink Mini Recorder with more details

Basically, the pts values of the audio and video differ a lot after an input switch which causes A/V sync issue. These pts values come from the card and a lot of issues were resolved for me with the Decklink SDI card by updating the firmware and drivers to 10.4.2. I've not tested the 10.6.X releases yet, but those might fix other issues with the Mini Recorder as well

yverbin commented 8 years ago

@stevenviola In some cases, I use open broadcaster for capture & encode, and all looks ok.

yverbin commented 8 years ago

I successfully modified decklink_input_callback::VideoInputFrameArrived method of ffmpeg decklink decoding module for ts synchronization a/v streams after SDI input switching, and at first glance, all looks ok. Now i'm testing it

lu-zero commented 8 years ago

@yverbin glad you have something working, but this does not belong here.

ggnull35 commented 8 years ago

@yverbin can you share your update so we can review it as well ? Thank you.