Skip to content

[DeckLink] clicking in audio with 24 FPS in sync mode #345

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
MartinPulec opened this issue Oct 12, 2023 · 6 comments
Closed

[DeckLink] clicking in audio with 24 FPS in sync mode #345

MartinPulec opened this issue Oct 12, 2023 · 6 comments
Assignees

Comments

@MartinPulec
Copy link
Collaborator

Originally posted by @alatteri in #326 (comment)

Clicks in audio are present if using audio compression with 24 FPS. Steps to reproduce:

ffmpeg -f lavfi -i sine=r=48000:d=30 -f lavfi -i testsrc=duration=30:r=24:size=1920x1080 tst24.mp4
uv -d decklink:sync -r embedded -t file:tst24.mp4 -s embedded --param incompatible -A AAC

Occurs also with OPUS. Doesn't occur if anything of following holds:

  1. synchronized mode is not use
  2. PCM (uncompressed) audio is used
  3. 25 FPS is used (other frame rates not tested)
@MartinPulec
Copy link
Collaborator Author

reproducible also simply with -t testcard:mode=Hp24 -s embedded

@MartinPulec MartinPulec self-assigned this Oct 13, 2023
@alatteri
Copy link

Thanks for looking into this. Do you think it is fixable? Having to send un-compressed PCM with sync mode is not ideal, but it is better than un-syncronized V/A.

@MartinPulec
Copy link
Collaborator Author

Well, I've slightly ill-designed the new audio compression code while perhaps too much complicating it. I've just simplified it by properly time-stamping the compressed audio.

It is already pushed it but not much tested – just the simple use-cases, where it seem to work. Hopefully I'll get to some more testing in following days.

@MartinPulec
Copy link
Collaborator Author

Forgot to say – --param incompatible is no longer needed, neither recognized. I'll update wiki accordingly tomorrow.

MartinPulec added a commit to MartinPulec/UltraGrid that referenced this issue Oct 17, 2023
now icorrectly working:
```
uv -r embedded -t testcard:mode=Hp24 -s embedded  -A AAC -d decklink:sync
````
(clicking)

Refers to CESNETGH-345 - sample count was actually not the issue here,
streamTime is incorrect, but to ensure it is valid.
@MartinPulec
Copy link
Collaborator Author

MartinPulec commented Oct 17, 2023

I've just fixed a small bug (8e8c1f3) that sometimes triggered incorrect behavior (on incommensurable codec and input frame sizes and when audio BPS doesn't much compression, which 4 for AAC, so eg. testcard's 2).

@alatteri
Copy link

alatteri commented Oct 22, 2023

I believe this is now fixed in latest continuous. Tested with both AAC and OPUS.

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants