-
Notifications
You must be signed in to change notification settings - Fork 63
Constant decklink Audio buffer overflow #410
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
Comments
I think drift_fix is old terminology, and it is now If the encoder or receiver CPU can't keep up, I believe the errors would be similar. |
So replace drift fix with synchronized ? |
But it says its using it by default: [DeckLink display] Using SoxR resampler by default when DecKlink audio drift fixer is enabled. |
I might be mistaken, but I don't think synchronized aka sync is a replacement for drift_fix as I don't think it does any resampling. I believe synchronized is a replacement for the deprecated low-latency mode. Also I believe soxr is already the default resampler now |
it was my understanding that or can they be combined for even more consistency? |
It seems that both options work. |
one at a time, or combined?
|
more context here: |
Yeah thanks I will look into this, I see that I in fact commented on that thread too complaining about how this would add 100ms of latency, which in the case I am using would be problematic for the setup I am using. Is this option to just keep things in time for audio and video for synchronous playback or can I ignore this option and just yse the audio delay option to be able to keep things sync'd up? What very very funny is now I don't see the problem anymore. It seems to be gone. The only thing that has changed is a different source was given to me for the encode. Could there be something in the SDI VANC or timecode that is a problem but not being logged as an error in the encoder side, but causes the decoder side to have this problem? Update: The source now connected a reference signal to their production (not to our encoders) and the issues seems to be gone. Do you think that I should be referencing the cards anyways? |
if you are still getting "buffer overflows" maybe try lowing your mtu. |
Well.... that does make sense if the audio and video were interleaved into one packet, but RTP/RTSP normally has audio on one packet and video on another. The audio packets are like 80 and video is 1430, so setting the MTU would only be setting the limit on video packets and not audio. That being said, I don't have the problem anymore after the client added a sync to their setup. So I am still trying to find out why the problem was happening. |
maybe @MartinPulec could give us some input on the differences between using |
And by the way when I try the synchronized mode, I loose audio on my decoding side. |
I didn't follow the whole discussion (yet?) so I'll just respond specifically to the question:
Those 2 options are totally incompatible, I believe - the audio resampler in first case drops timestamps - even if it wasn't, the number of samples won't fit the audio time frame*. I don't believe that it can be currently made work together. To use both features, it must have been perhaps done in one component. * it's hard to explain in few lines - I'd need to go more into details if wanted |
Thanks for the info @MartinPulec . I've been using |
When I try to use :synchronized I get muted/no audio on the RX side. I am still using drift fix. 1.9.6 |
@MartinPulec when using the two sync params, like say sync:10,20. Does that mean that the latency could variably change from 10-20, going up and down in that range throughout the decoding session? |
Bringing this back up to the top to get some help: Using the following two commands successfully: /usr/bin/uv --control-port=2209 --audio-filter controlport_stats --capture-filter preview:path=/tmp/encode_thumbnail_209.socket:target_size=854x480 -t decklink:connection=sdi:device=5:codec=UYVY -c libavcodec:codec=H.264:encoder=libx264:bitrate=30000000:preset=superfast:subsampling=420 -s embedded --audio-codec=OPUS:sample_rate=48000:bitrate=128k --audio-capture-format channels=16 -f V:rs:: -f A:mult:3 -P 23374 172.18.20.4 and /usr/bin/uv --control-port=2209 --audio-filter controlport_stats -d multiplier:decklink:device=7:drift_fix#preview:path=/tmp/decode_thumbnail_209.socket:hq:rate_limit=2:target_size=854x480 -r embedded -P 23374 172.18.20.4 These commands work for me, but what I am seeing that "sometimes" I begin to get random audio buffer overflows on the decoder. This comes and goes over time running the application but I can not seem to find a way why it comes and goes. For the most part this works, but its not flawless. It's all local network testing so highly doubtful its network issues. I've be trying to test the synchronized option, and it seems that this gets rid of my problem, but when I try to put it into my command it doesn't want to work with thumbnails: /usr/bin/uv --control-port=2209 --audio-filter controlport_stats -d multiplier:decklink:device=7:synchronized#preview:path=/tmp/decode_thumbnail_209.socket:hq:rate_limit=2:target_size=854x480 -r embedded -P 23374 172.18.20.4 and /usr/bin/uv --control-port=2209 --audio-filter controlport_stats -d multiplier:decklink:device=7:synchronized=4,6#preview:path=/tmp/decode_thumbnail_209.socket:hq:rate_limit=2:target_size=854x480 -r embedded -P 23374 172.18.20.4 Both of these last two command don't output any audio and are throwing tons of overflow errors: If I drop the multiplier it's able to work with these commands: /usr/bin/uv --param window-title=qframe2_ultragird_decode_process_209 --control-port=2209 --audio-filter controlport_stats -d decklink:device=7:synchronized -r embedded -P 23374 172.18.20.4 and /usr/bin/uv --control-port=2209 --audio-filter controlport_stats -d decklink:device=7:synchronized=4,6 -r embedded -P 23374 172.18.20.4 Is it a multiplier issue or I am missing something to separate the thumbnail generator in the miltiplier? I tried to move the sync command elsewhere into the output device argument but it's same result. If I use drift_fix the command works just fine but has the audio over/under flows on the decoder. Using 1.9.6 release. |
Just trying to bring this to the top. @MartinPulec any thoughts? |
Closing this and opening a new one for different issue.. |
Uh oh!
There was an error while loading. Please reload this page.
I am using these settings for my encoding and decoding, and I am constantly getting decklink audio buffer overflow, I've tried OPUS and and MP3 the result is the same. Any suggestions?
/usr/bin/uv --audio-filter controlport_stats --capture-filter preview:path=/tmp/encode_thumbnail_65.socket:target_size=854x480 -t decklink:connection=sdi:device=0:codec=UYVY -c libavcodec:codec=H.264:encoder=libx264:bitrate=20000000:preset=veryfast:subsampling=420 -s embedded --audio-codec=MP3:sample_rate=48000:bitrate=128k --audio-capture-format channels=16 -f V:rs:: -f A:mult:3 -P 20492 172.18.20.5
/usr/bin/uv --audio-filter controlport_stats -d multiplier decklink:device=0:drift_fix#preview:path=/tmp/decode_thumbnail_65.socket:hq:rate_limit=2:target_size=854x480 -r embedded -P 20492 172.18.20.5
Using latest stable build.
Any suggestions?
The text was updated successfully, but these errors were encountered: