-
Notifications
You must be signed in to change notification settings - Fork 854
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
High packet loss with SRT streams on MacBooks #2691
Comments
Can be something to do with the network driver. |
Thank you. Unfortunately I run into some problems while compiling art-xtransmit:
CMake Error at /usr/local/Cellar/cmake/3.26.0/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the
system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY
OPENSSL_INCLUDE_DIR)
Call Stack (most recent call first):
/usr/local/Cellar/cmake/3.26.0/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
/usr/local/Cellar/cmake/3.26.0/share/cmake/Modules/FindOpenSSL.cmake:670 (find_package_handle_standard_args)
submodule/srt/CMakeLists.txt:368 (find_package)
I tried to export all PATH according your instructions and the Homebrew instructions but still it is not working. How can I fix it?
Thank you.
… On 16 Mar 2023, at 11:31, Maxim Sharabayko ***@***.***> wrote:
Can be something to do with the network driver.
Could you test UDP sending performance using srt-xtransmit? Just replace SRT with UDP, options like latency can be omitted.
https://github.com/maxsharabayko/srt-xtransmit/blob/master/docs/metrics.md
—
Reply to this email directly, view it on GitHub <#2691 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABYZNMAVYBOGTZGPLVESQNTW4LMY7ANCNFSM6AAAAAAV4IP3RU>.
You are receiving this because you authored the thread.
|
SRT is a derived project there so if you specify explicitly any options for SRT, the same you should specify here. If you didn't compile SRT from source, follow specific instruction in the documentation - SSL is a special kind of dependency for Mac platform and it needs to be treated with care. |
Sorry I am not experienced with compiling. So I installed srt now with brew and now I have to make specific compile instructions for srt-xtransmit…?
… On 16 Mar 2023, at 15:04, Sektor van Skijlen ***@***.***> wrote:
SRT is a derived project there so if you specify explicitly any options for SRT, the same you should specify here. If you didn't compile SRT from source, follow specific instruction in the documentation <https://github.com/Haivision/srt/blob/master/docs/build/build-macOS.md> - SSL is a special kind of dependency for Mac platform and it needs to be treated with care.
—
Reply to this email directly, view it on GitHub <#2691 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABYZNMASENYSFM37Q4BRTELW4MFWFANCNFSM6AAAAAAV4IP3RU>.
You are receiving this because you authored the thread.
|
That one of the testing applications you can use to check if that's the problem. You can also try the same with the |
Thank you. "srt-live-transmit" also needs to be compiled.
… On 16 Mar 2023, at 15:37, Sektor van Skijlen ***@***.***> wrote:
That one of the testing applications you can use to check if that's the problem. You can also try the same with the srt-live-transmit app that is among the demonstration applications. I don't know if it is available in the brew packages.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
brew install cmake
brew install openssl
export OPENSSL_ROOT_DIR=$(brew --prefix openssl)
export OPENSSL_LIB_DIR=$(brew --prefix openssl)"/lib"
export OPENSSL_INCLUDE_DIR=$(brew --prefix openssl)"/include" |
@ethouris, Please don't confuse @saltarob . |
Sorry, of course. I thought he is testing on some live stream. |
Yes. I copied and pasted the commands from the GitHub page.
… On 16 Mar 2023, at 16:01, Maxim Sharabayko ***@***.***> wrote:
@saltarob <https://github.com/saltarob>
Thank you. Unfortunately I run into some problems while compiling art-xtransmit: CMake Error at /usr/local/Cellar/cmake/3.26.0/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY OPENSSL_INCLUDE_DIR) Call Stack (most recent call first): /usr/local/Cellar/cmake/3.26.0/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE) /usr/local/Cellar/cmake/3.26.0/share/cmake/Modules/FindOpenSSL.cmake:670 (find_package_handle_standard_args) submodule/srt/CMakeLists.txt:368 (find_package) I tried to export all PATH according your instructions and the Homebrew instructions but still it is not working. How can I fix it? Thank you.
Did you do <https://github.com/maxsharabayko/srt-xtransmit#macos>:
brew install cmake
brew install openssl
export OPENSSL_ROOT_DIR=$(brew --prefix openssl)
export OPENSSL_LIB_DIR=$(brew --prefix openssl)"/lib"
export OPENSSL_INCLUDE_DIR=$(brew --prefix openssl)"/include"
—
Reply to this email directly, view it on GitHub <#2691 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABYZNMEP6TOATMZXE6MFJSDW4MMNBANCNFSM6AAAAAAV4IP3RU>.
You are receiving this because you were mentioned.
|
Well, CMake can't locate the OpenSSL library. So there is something to be done with the system paths. In fact, encryption is not needed for these tests. It might be easier to just disable it using |
[100%] Built target srt-xtransmit
Great thank you. Will start with the test now.
… On 16 Mar 2023, at 16:09, Maxim Sharabayko ***@***.***> wrote:
Yes. I copied and pasted the commands from the GitHub page.
Well, CMake can't locate the OpenSSL library. So there is something to be done with the system paths.
In fact, encryption is not needed for these tests. It might be easier to just disable it using -DENABLE_ENCRYPTION=OFF CMake option.
See here.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
--metricsfreq: Value %metricsfreq% could not be converted to INT
How do I solve this?
… On 16 Mar 2023, at 16:16, Abdul Hadi Parsdorfer ***@***.***> wrote:
[100%] Built target srt-xtransmit
Great thank you. Will start with the test now.
> On 16 Mar 2023, at 16:09, Maxim Sharabayko ***@***.***> wrote:
>
>
> Yes. I copied and pasted the commands from the GitHub page.
> Well, CMake can't locate the OpenSSL library. So there is something to be done with the system paths.
> In fact, encryption is not needed for these tests. It might be easier to just disable it using -DENABLE_ENCRYPTION=OFF CMake option.
> See here.
> —
> Reply to this email directly, view it on GitHub, or unsubscribe.
> You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Replace |
Thank you. On the sender side I get now this error:
16:32:51.742970 [I] PACER sendrate 5000000 bps (inter send interval 2105 us)
16:32:51.747317 [I] udp::write::sendto: error 49.
16:32:51.747376 [W] GENERATE udp::write::sendto error
… On 16 Mar 2023, at 16:30, Maxim Sharabayko ***@***.***> wrote:
Replace %metricsfreq% with your value, e.g. 1s.
—
Reply to this email directly, view it on GitHub <#2691 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABYZNMFQSNQDAMHAVBS6KUTW4MP2HANCNFSM6AAAAAAV4IP3RU>.
You are receiving this because you were mentioned.
|
Could you share the command line you use to run |
$ set ip=127.0.0.1
$ set port=4200
$ srt-xtransmit generate "udp://%ip%:%port%" --enable-metrics --sendrate 5Mbps --duration 120s -v
16:36:52.662138 [I] PACER sendrate 5000000 bps (inter send interval 2105 us)
16:36:52.666799 [I] udp::write::sendto: error 49.
16:36:52.666869 [W] GENERATE udp::write::sendto error
… On 16 Mar 2023, at 16:36, Maxim Sharabayko ***@***.***> wrote:
Could you share the command line you use to run srt-xtransmit? Maybe add -v to enable verbose output.
—
Reply to this email directly, view it on GitHub <#2691 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABYZNMB6TVWVIVB57L3HEN3W4MQNBANCNFSM6AAAAAAV4IP3RU>.
You are receiving this because you were mentioned.
|
Try srt-xtransmit generate "udp://127.0.0.1:4200" --enable-metrics --sendrate 5Mbps --duration 120s -v |
I had the same idea, yes it’s working.
… On 16 Mar 2023, at 16:40, Maxim Sharabayko ***@***.***> wrote:
Try
srt-xtransmit generate "udp://127.0.0.1:4200" --enable-metrics --sendrate 5Mbps --duration 120s -v
—
Reply to this email directly, view it on GitHub <#2691 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABYZNMFH22JWL3X4PH4UEXDW4MQ5NANCNFSM6AAAAAAV4IP3RU>.
You are receiving this because you were mentioned.
|
I have more less the same description for this error 49: "Can't assign requested address". |

Here is the result.
… On 16 Mar 2023, at 16:41, Abdul Hadi Parsdorfer ***@***.***> wrote:
I had the same idea, yes it’s working.
> On 16 Mar 2023, at 16:40, Maxim Sharabayko ***@***.***> wrote:
>
>
> Try
>
> srt-xtransmit generate "udp://127.0.0.1:4200" --enable-metrics --sendrate 5Mbps --duration 120s -v
> —
> Reply to this email directly, view it on GitHub <#2691 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABYZNMFH22JWL3X4PH4UEXDW4MQ5NANCNFSM6AAAAAAV4IP3RU>.
> You are receiving this because you were mentioned.
>
|
|
Oh sorry the attachment didn't make it. Here the metricsfile again. |
Not a single packet is received according to the file you provide. |
Oh, okay I will try it again.
… On 16 Mar 2023, at 17:16, Maxim Sharabayko ***@***.***> wrote:
Not a single packet is received according to the file you provide.
—
Reply to this email directly, view it on GitHub <#2691 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABYZNMDN5WYBQGMXFZHOGPTW4MVFZANCNFSM6AAAAAAV4IP3RU>.
You are receiving this because you were mentioned.
|
Second test same result…? Here again my command line:
Sender:
$ srt-xtransmit generate "udp://localhost:4200" --enable-metrics --sendrate 5Mbps --duration 120s -v
16:40:16.982926 [I] PACER sendrate 5000000 bps (inter send interval 2105 us)
16:40:17.983568 [I] GENERATE Sending at 4990 kbps
16:40:18.983691 [I] GENERATE Sending at 5000 kbps
16:40:19.983826 [I] GENERATE Sending at 5000 kbps
…
Receiver:
$ srt-xtransmit receive "udp://localhost:4200" --enable-metrics --metricsfile metricsfile_02.csv --metricsfreq 1s
What could be the reason?
… On 16 Mar 2023, at 17:16, Maxim Sharabayko ***@***.***> wrote:
Not a single packet is received according to the file you provide.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Hm, try $ srt-xtransmit receive "udp://:4200" --enable-metrics You should see the output in the terminal. Important is the number of packets detected as lost if any. |
You can also try |
All zero...
… On 16 Mar 2023, at 17:30, Maxim Sharabayko ***@***.***> wrote:
Hm, try
$ srt-xtransmit receive "udp://:4200" --enable-metrics
You should see the output in the terminal. Important is the number of packets detected as lost if any.
—
Reply to this email directly, view it on GitHub <#2691 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABYZNMELZ5OCZNYU6LH46NLW4MWYPANCNFSM6AAAAAAV4IP3RU>.
You are receiving this because you were mentioned.
|
Okay thank you. |
To clarify, do that 30% come from Wireshark capture taken on the sender side (MacBook) or the receiver side (AWS)? |
Ok, I prepared a branch that is visible also through the #2694 draft PR. Please get this version of SRT for this. Note that if you compiled srt-xtransmit from sources, you should simply checkout this version in the SRT submodule of srt-xtransmit. You need to add a new remote (mine - github.com/ethouris/srt) and select this branch - dev-try-sendmsg-check. |
I am so sorry. I never made such things before. I followed the instructions from here. How do I add the new submodule? |
No no, you don't add the submodule. It is there already, just when you are in the root directory of the If you do now Now do first |
Thank you. I don't the address with the
|
Again: I said: use the address that you can see after displaying it by
|
Okay I built it again now. Show I do now the exact same test?
|
Try this time with SRT, and on the sender side add |
Thank you. Here is the log file. I hope it is okay. |
No errors? Strange. Do you still experience such a high packet loss in this transmission? |
Now one interesting aspect is if I do a test with Wirecast with the older libsrt 1.4.1 version from the same MacBook Pro 2019 I get a perfect transmission. I tried to reproduce these results with FFmpeg libsrt 1.4.1. But with this test I got the same bad results. So I don't know what is different in Wirecast. |
Wouldn't it be better to make the srt-xtransmit test between the MacBook and the AWS server? |
Yes, please. |
Okay, I tested MacBook Pro to AWS server with following commands:
Here the log file: |
I made another test with OBS sending to srt-xtransmit on AWS. Don't know if it is useful for something. I changed the command a bit because there were to many failed checksum reports.
|
Any updates? Seems like srt-xtransmit is not helping to analyse the problem? |
No responses anymore? |
No issues, no dropped packets here. The other one (OBS sending to srt-xtransmit on AWS) there are packet drops on the receiver and packet reordering on the network. If those are from the same machine, then does not look like SRT problem. Consider increasing the latency to reduce drops. |
Thank you. Yes same machine, same network, same bitrate. Of course I can increase the latency but 30 % of the bandwidth is gone for resending the lost packets because of the problem. What kind of problem can it be then? I am wondering why the SRT version in Wirecast can do it with under 1% lost packages and all other SRT versions have a packet loss of 10-30%. On the same machine, same bitrate, same network. |
Well, it depends. I would suggest you first find what is different and try to minimize the difference to find the reason. |
Thank you so much. Your feedback helps a lot. Since Wirecast is using the old SRT version and OBS the newest one I knew that should not be the issue. Encoding: I tried all encoders. And on other machines the same encoder is working fine. Then I thought maybe something in the network is causing the SRT packet mess with MacBooks. So I made a test with the MacBook Pro 2019 in a different house with an independent, different network. And it worked. Packet loss under 1 %. Now can I ask you what could cause that SRT packet mess just for certain machines (MacBooks) and certain SRT versions? Is there a way to find the cause? Are there certain known network settings which affect SRT streams negatively? Unfortunately the problematic network is the production environment for the live streams. Thank you. |
Hard to say. The only way to know anything more from this is to record a pcap on both sides for some time during this transmission and then analyze it. Dropped packets will be clearly visible in the pcap from non-monotonic sequences (those can be detected by some script) and the time comparison could be made. This can detect local drops or allow to determine an unusual delay if it happened on the originating machine. |
Closing due to inactivity. Please reopen if anything new appears. |
Hi, after switching from my old Mac Pro 5,1 to a newer MacBook Pro 2019 I realised that my SRT stream suffered under high packet loss even if the SRT settings and the network conditions didn't change.
After testing and analysing with "lib-tcpdump-processing" I found out that on the Mac Pro only 1-3 % of the packets where retransmitted whereas on the MacBooks (I made tests with 3 MacBooks) 30 % where lost in the first transmission and had to be retransmitted. The 30 % retransmission needs of course a much bigger overhead and a big latency to be recovered.
All computers are connected with ethernet cables to the same router and the tests were made with the same video, same encoding settings, same SRT settings. But the results were consistent over many tests. Mac Pro 5,1 with 1-3 % packet loss and the MacBook Pros with up to 30% packet loss.
I made the test with different versions of OBS and FFmpeg (libsrt 1.5.1 and libsrt 1.4.1) on the sender side and with Wowza and Nimble Server on the Receiver side. I tested it with macOS 12 and macOS 13 and with Windows 10 in Bootcamp partitions.
Is there any explanation for that strange behaviour?
The text was updated successfully, but these errors were encountered: