Skip to content

Instantly share code, notes, and snippets.

@nico-lab
Created January 10, 2020 11:02
Show Gist options
  • Save nico-lab/9c7130cccd28a8368631ae32408f2d59 to your computer and use it in GitHub Desktop.
Save nico-lab/9c7130cccd28a8368631ae32408f2d59 to your computer and use it in GitHub Desktop.
######################################################################
# Usage
######################################################################
# options は url の前に指定する
hlsdl [options] url
-b ... Automaticly choose the best quality.
-v ... Verbose more information.
-o ... Choose name of output file.
-u ... Set custom HTTP User-Agent header.
-h ... Set custom HTTP header.
-p ... Set proxy uri.
-k ... Allow to replace part of AES key uri - old.
-n ... Allow to replace part of AES key uri - new.
-f ... Force overwriting the output file.
-q ... Print less to the console.
-d ... Print the openssl decryption command.
-t ... Print the links to the .ts files.
-s ... Set live start offset in seconds.
-e ... Set refresh delay in seconds.
-r ... Set max retries at open.
-w ... Set max download segment retries.
-a ... Set additional url to the audio media playlist.
-c ... Treat HTTP code 206 as 200 even if request was made without range header.
-C ... the file name of file holding cookie data in the old Netscape / Mozilla cookie data format.
######################################################################
# Install utilities
######################################################################
git:
https://git-scm.com/download/win
Visual Studio 2017
https://visualstudio.microsoft.com/pl/downloads/
https://www.visualstudio.com/ja/thank-you-downloading-visual-studio/?sku=Community&rel=15
community
C++
# エラー MSB8036 Windows SDK バージョン 10.0.17134.0 が見つかりませんでした。必要なバージョンの Windows SDK をインストールするか、プロジェクト プロパティ ページで SDK バージョンを変更するか、ソリューションを右クリックして [ソリューションの再ターゲット] を選択してください。
http://tooljp.com/qa/MSB8036-build-compile-error-88E1.html
Windows 10 に読み替えてインストールする
cmake:
https://cmake.org/download/
cmake-3.13.0-rc2-win64-x64.msi
#cmake version 3.15.4 で確認済み
######################################################################
# Download & Build
######################################################################
# clonse hlsdl
git clone https://github.com/samsamsam-iptvplayer/hlsdl.git
# Download OpenSSL MSCVC
https://www.npcglib.org/~stathis/blog/precompiled-openssl/
https://www.npcglib.org/~stathis/downloads/openssl-1.1.0f-vs2017.7z
# Download pthreads
https://sourceware.org/pthreads-win32/
ftp://sourceware.org/pub/pthreads-win32/pthreads-w32-2-9-1-release.zip
同じフォルダ内に以下のフォルダを作成した状態で展開する
# 7zip ならここに展開
openssl-1.1.0f-vs2017
# 7zip なら pthreads-w32-2-9-1-release で展開
pthreads-w32-2-9-1-release
hlsdl
# Build pthreads
cd pthreads-w32-2-9-1-release\pthreads.2
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x64
set cl=/D_TIMESPEC_DEFINED
nmake clean VC-static
copy pthreadVC2.lib ..\Pre-built.2\lib\x64\pthreadVC2MT.lib
nmake clean VC-static-debug
copy pthreadVC2.lib ..\Pre-built.2\lib\x64\pthreadVC2MTd.lib
cd ../..
# clone curl
git clone https://github.com/curl/curl.git
cd curl
git checkout tags/curl-7_62_0
# build curl
buildconf.bat
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x64
copy ..\hlsdl\msvc\curl\MakefileBuild.vc winbuild\MakefileBuild.vc
# 上書きコピー
cd winbuild
nmake /f Makefile.vc mode=dll WITH_SSL=dll SSL_PATH=../../openssl-1.1.0f-vs2017 DEBUG=yes MACHINE=x64
nmake /f Makefile.vc mode=dll WITH_SSL=dll SSL_PATH=../../openssl-1.1.0f-vs2017 DEBUG=no MACHINE=x64
nmake /f Makefile.vc mode=static WITH_SSL=static SSL_PATH=../../openssl-1.1.0f-vs2017 DEBUG=no MACHINE=x64
..\builds\libcurl-vc-x64-release-static-ssl-static-ipv6-sspi\bin\curl.exe --version
# Open project solution hlsdl.sln
Release_MT x64 に変更して、ビルドタブから hlsdl のビルド
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment