I followed all the instruction mentioned in https://github.com/cisco/openh264 but I am unable to get through. The information is cited in link but its quite confusing.
Alternative Way:
You can build Openh264 using visual studio in windows. Here are the steps..
- i) Download OpenH264 source code provided by cisco (that already you mentioned https://github.com/cisco/openh264).
- ii) Now you will find two visual studio compatible projects in directory /OpenH264/codec/build/win32/dec and /OpenH264/codec/build/win32/enc.
- iii) You will need to download NASM software from http://www.nasm.us/pub/nasm/releasebuilds/2.12.02/
- iv) Install NASM software on the directory C:\NASM or wherever you like.
- v) Then Add NASM executable path to all these visual studio projects.
- vi) Then You can either select static or dynamic library in general options.
- vi) If you are able to perform all these operations successfully, you will have 5 different .lib or .dll files named welsdcore, welsdecplus, welsecore, welsencplus, welsvp and those are usable in any visual studio projects.
Now if you want to get openh264 features, just add all these libraries to your project and enjoy. Hope it will help you.. :)
I also had some difficulty building openh264 on Windows using the recommended mingw approach.
In my case make
crashed for all configurations I tried:
bash -c "make OS=msvc ARCH=x86_64 USE_ASM=No BUILDTYPE=Debug clean"
bash -c "make OS=msvc ARCH=x86_64 USE_ASM=No BUILDTYPE=Debug"
0 [main] make 3888 handle_exceptions: Exception: STATUS_ACCESS_VIOLATION
564 [main] make 3888 open_stackdumpfile: Dumping stack trace to make.exe.stackdump
0 [main] make 5448 handle_exceptions: Exception: STATUS_ACCESS_VIOLATION
561 [main] make 5448 open_stackdumpfile: Dumping stack trace to make.exe.stackdump
copying dll files to destination folder...
FullDestDir is E:\projects\openh264\bin\x64\Debug
current dir is:
E:\projects\openh264
DestDir is bin/x64/Debug
cp: cannot stat `openh264.dll': No such file or directory
cp: cannot stat `openh264.lib': No such file or directory
cp: cannot stat `openh264.pdb': No such file or directory
cp: cannot stat `codec_unittest.exe': No such file or directory
cp: cannot stat `h264enc.exe': No such file or directory
cp: cannot stat `h264dec.exe': No such file or directory
BuildDebugFlag =1
BuildReleaseFlag =0
BuildDebugInfo ="build debug--failed"
BuildReleaseInfo =NULL
aBuildFlagList is 1 0
ReturnCode is 1
I resorted to converting the existing solution/projects (VS2008) to VS2013 and linking/building with the created .lib files.
You can find the solutions in {openh264_dir}\codec\build\win32\enc
and {openh264_dir}\codec\build\win32\dec
.
Building the solution will create .libs and .dlls in {openh264_dir}\bin\Win32\Release
To link to the lib, you need to link to welsenc.lib
.
When running, you need to have both the welsenc.dll
and welsvp.dll
in your application directory. So far it seems to have worked fine for my usage.
I'm assuming that building the decoder will be similar.
As of now 2024, I would like to report, the given steps in Openh264
official github repo are working, and you can easily compile it for windows by following below:
- Get cygwin, and isntall it with latest version of
make
package - Get latest version of NASM
- Install NASM in some directory (
say C:/NASM
) - Add installation directory path in envrionment variables
- Run
nasm
command in cygwin to make sure path has been set correctly - Go to openh264 source code
/build
directory - Run installation script with these parameters based on system type:
`AutoBuildForWindows.bat Win32-Release-ASM` for x86 Release build
`AutoBuildForWindows.bat Win64-Release-ASM` for x86_64 Release build
`AutoBuildForWindows.bat ARM64-Release-ASM` for arm64 release build
- Wait for installation to finish.
Note: If you want Debug build, just replace Release with Debug in installation command
© 2022 - 2024 — McMap. All rights reserved.