Windows: Support cygwin 64bits, native Windows and IDE
winlinvip opened this issue · 10 comments
SRS for Windows
SRS 5.0.89+ supports Windows(Cygwin64).
Build from code
Please install Cygwin64.
Install packages gcc-g++
make
automake
patch
pkg-config
tcl
cmake
, please see packages.
Build SRS with cygwin terminal:
git checkout develop
./configure
make
If success, there should be a ./objs/srs.exe
Install from binary
For each release of SRS, from SRS 5.0.89, there is always a binary installer of SRS Windows, normally as the artifact of release, which allows you to install and run SRS very easy.
Bellow is some examples, note that you should always use the latest release, not the fixed one:
Note: SRS 5.0.89+ supports cygwin pipeline, to build and packge automatically by GitHub Actions.
Run SRS as administrator:
Publish to SRS Windows by FFmpeg:
ffmpeg -re -i ~/srs/doc/source.flv -c copy -f flv rtmp://win11/live/livestream
Play by VLC or srs-player
Most of SRS features are available in Windows, for example, RTMP, HTTP-FLV, HLS, WebRTC, HTTP-API, Prometheus Exporter, etc.
Package by NSIS
If want to package by NSIS, please run in cygwin terminal:
"/cygdrive/c/Program Files (x86)/NSIS/makensis.exe" \
/DSRS_VERSION=$(./objs/srs -v 2>&1) \
/DCYGWIN_DIR="C:\cygwin64" \
packaging/nsis/srs.nsi
Known Issues
Links
ST supports windows: ossrs/state-threads#20
Commits about SRS Windows: ossrs/srs-windows#2
Windows docker also works for SRS, however, srs.exe
is more popular for windows developers.
During the SRS installation process, SRS will be added to the Windows environment variables. Users can open the cmd console and directly launch SRS.
How to solve the issue of not adding system environment variables? What variables should be manually added?
TRANS_BY_GPT3
During the SRS installation process, SRS will be added to the Windows environment variables. Users can directly launch SRS by opening the cmd console.
How to solve the issue of not adding system environment variables? What variables should be manually added?
Mine also didn't add environment variables? Does everyone use Windows?
TRANS_BY_GPT3
During the SRS installation process, SRS will be added to the Windows environment variables, allowing users to directly launch SRS by opening the cmd console.
What if the system environment variables are not added? How can it be resolved? Manually add which variables?Mine also does not have the environment variables added? Does everyone use Windows?
I have already given up and am waiting for future updates. Currently, I find CentOS more stable to use.
TRANS_BY_GPT3
Have you ever compiled a Windows version? When I compile it, it stops executing with an error at 'Building ffmpeg-4-fit'...
TRANS_BY_GPT3
During the SRS installation process, SRS will be added to the Windows environment variables. Users can directly launch SRS by opening the cmd console.
What should I do if I haven't added the system environment variables? How can I manually add the variables?I also haven't added the environment variables. Does everyone use Windows?
I have already given up and am waiting for future updates. Currently, I find CentOS more stable to use.
Have you ever compiled a Windows version? When I was compiling, I encountered two issues that prevented me from proceeding...
First issue: ./config
Building libsrtp-2-fit.
patching file crypto/math/datatypes.c
Reversed (or previously applied) patch detected! Assume -R? [n]
This place, I don't know how to handle it?
Secondly, during the process of making.
In file included from src/app/srs_app_threads.cpp:21:
src/app/srs_app_rtc_dtls.hpp:16:10: fatal error: srtp2/srtp.h: No such file or directory
16 | #include <srtp2/srtp.h>
| ^~~~~~~~~~~~~~
compilation terminated.
That's the end here.
TRANS_BY_GPT3
I have never compiled the Windows version before. The actual released version can run normally, but there are some differences in the command syntax between Linux and Windows. My problem at that time was that the conf file configured in Linux could not run properly in the Windows version. So I set up a local Linux server on an old computer with the help of Baota, which is very convenient. Why do you have to use Windows? I don't know what your application environment is, but I use the Linux version and it is very stable. I haven't made any changes since I set it up, and the speed is also good. Public network services can be directly deployed on the cloud, and lightweight servers are not expensive now. L.HF @.*** Rongcheng Yijie Network Technology Co., Ltd.
I just want to learn because I rarely use Linux, so I want to use it on Windows.
TRANS_BY_GPT3
During the SRS installation process, SRS will be added to the Windows environment variables, allowing users to directly launch SRS from the cmd console.
What if the system environment variables are not added? How to manually add the variables?Mine also doesn't have the environment variables added? Does everyone use Windows?
I have already given up and will wait for future updates. Currently, using CentOS is more stable.Have you ever compiled a Windows version? When I was compiling, I encountered two issues that prevented me from proceeding...
First issue: ./config Building libsrtp-2-fit. patching file crypto/math/datatypes.c Reversed (or previously applied) patch detected! Assume -R? [n]
At this location, I don't know how to handle it.
Second: When making, in file included from src/app/srs_app_threads.cpp:21: src/app/srs_app_rtc_dtls.hpp:16:10: fatal error: srtp2/srtp.h: No such file or directory 16 | #include <srtp2/srtp.h> | ^~~~~~~~~~~~~~ compilation terminated.
This is the end.
Manually compile 3rdparty\libsrtp-2-fit. Move the files under the include directory to objs\srtp2\include\srtp2. Move the compiled .a file to objs\srtp2\lib. Then run make again, it should work.
TRANS_BY_GPT3
Already merged commit:
commit e9503a9
Author: wenjie.zhao 740936897@qq.com
Date: Fri Nov 18 23:02:35 2022 +0800
For #2532: Windows: Replace ln by cp for windows. v5.0.87 (#3246)
1. Replase ln by cp for windows.
2. Refine OS and CPU arch detecting.
3. Support configure from any directory by `SRS_WORKDIR`.
4. Support output to any directory by `SRS_OUTPUT`.
5. Disable sanitizer for gperf.
6. Use parallels build for make.
7. Refine bash variable check.