Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
seo young Joung
opencv
Commits
390f0a5d
Commit
390f0a5d
authored
7 years ago
by
Alexander Alekhin
Browse files
Options
Download
Email Patches
Plain Diff
cmake: generate and install ffmpeg-download.ps1
64-bit only
parent
0614ee3f
4.x
3.4
5.x
master
next
4.5.5
4.5.4
4.5.3
4.5.3-openvino
4.5.3-openvino-2021.4.2
4.5.3-openvino-2021.4.1
4.5.2
4.5.2-openvino
4.5.1
4.5.1-openvino
4.5.0
4.5.0-openvino
4.4.0
4.4.0-openvino
4.3.0
4.3.0-openvino
4.3.0-openvino-2020.3.0
4.2.0
4.2.0-openvino
4.1.2
4.1.2-openvino
4.1.1
4.1.1-openvino
4.1.0
4.1.0-openvino
4.0.1
4.0.1-openvino
4.0.0
4.0.0-rc
4.0.0-openvino
4.0.0-beta
4.0.0-alpha
3.4.17
3.4.16
3.4.15
3.4.14
3.4.13
3.4.12
3.4.11
3.4.10
3.4.9
3.4.8
3.4.7
3.4.6
3.4.5
3.4.4
3.4.3
3.4.3-openvino
3.4.2
3.4.2-openvino
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitattributes
+2
-0
.gitattributes
3rdparty/ffmpeg/ffmpeg-download.ps1.in
+63
-0
3rdparty/ffmpeg/ffmpeg-download.ps1.in
3rdparty/ffmpeg/ffmpeg.cmake
+5
-0
3rdparty/ffmpeg/ffmpeg.cmake
with
70 additions
and
0 deletions
+70
-0
.gitattributes
View file @
390f0a5d
...
...
@@ -81,6 +81,8 @@ org.eclipse.jdt.core.prefs -text whitespace=cr-at-eol merge=union
*.cmd text eol=crlf
*.cmd.tmpl text eol=crlf
*.dsp text eol=crlf -whitespace
*.ps1 text eol=crlf
*.ps1.in text eol=crlf
*.sln text eol=crlf -whitespace
*.vcproj text eol=crlf -whitespace merge=union
*.vcxproj text eol=crlf -whitespace merge=union
...
...
This diff is collapsed.
Click to expand it.
3rdparty/ffmpeg/ffmpeg-download.ps1.in
0 → 100644
View file @
390f0a5d
$url = "https://raw.githubusercontent.com/opencv/opencv_3rdparty/@FFMPEG_BINARIES_COMMIT@/ffmpeg/opencv_ffmpeg_64.dll"
$expected_md5 = "@FFMPEG_FILE_HASH_BIN64@"
$output = "$PSScriptRoot\@OPENCV_BIN_INSTALL_PATH@\opencv_ffmpeg@OPENCV_DLLVERSION@_64.dll"
Write-Output ("=" * 120)
try {
Get-content -Path "$PSScriptRoot\etc\licenses\ffmpeg-readme.txt" -ErrorAction 'Stop'
} catch {
Write-Output "Refer to OpenCV FFmpeg wrapper readme notes about library usage / licensing details."
}
Write-Output ("=" * 120)
Write-Output ""
if(![System.IO.File]::Exists($output)) {
try {
Write-Output ("Downloading: " + $output)
Import-Module BitsTransfer
$start_time = Get-Date
Start-BitsTransfer -Source $url -Destination $output -ErrorAction 'Stop'
Write-Output "Downloaded in $((Get-Date).Subtract($start_time).Seconds) seconds"
} catch {
$_ # Dump error
try {
Write-Output ("Downloading (second attempt): " + $output)
$start_time = Get-Date
Invoke-WebRequest -Uri $url -OutFile $output
Write-Output "Downloaded in $((Get-Date).Subtract($start_time).Seconds) seconds"
} catch {
Write-Output ("Can't download file: " + $output)
Write-Output ("URL: " + $url)
Write-Output "You need to download this file manually. Stop"
Pause
Exit
}
}
} else {
Write-Output ("File exists: " + $output)
Write-Output ("Downloading is skipped. Remove this file and re-run this script to force downloading.")
}
if(![System.IO.File]::Exists($output)) {
Write-Output ("Destination file not found: " + $output)
Write-Output "Stop"
Pause
Exit
}
try {
$hash = Get-FileHash $output -Algorithm MD5 -ErrorAction 'Stop'
if($hash.Hash -eq $expected_md5) {
Write-Output "MD5 check passed"
} else {
Write-Output ("MD5 : " + $hash.Hash.toLower())
Write-Output ("Expected: " + $expected_md5)
Write-Output "MD5 hash mismatch"
}
} catch {
$_ # Dump error
Write-Output "Can't check MD5 hash (requires PowerShell 4+)"
}
Pause
Write-Output "Exit"
This diff is collapsed.
Click to expand it.
3rdparty/ffmpeg/ffmpeg.cmake
View file @
390f0a5d
...
...
@@ -35,3 +35,8 @@ function(download_win_ffmpeg script_var)
set
(
${
script_var
}
"
${
FFMPEG_DOWNLOAD_DIR
}
/ffmpeg_version.cmake"
PARENT_SCOPE
)
endif
()
endfunction
()
if
(
OPENCV_INSTALL_FFMPEG_DOWNLOAD_SCRIPT
)
configure_file
(
"
${
CMAKE_CURRENT_LIST_DIR
}
/ffmpeg-download.ps1.in"
"
${
CMAKE_BINARY_DIR
}
/win-install/ffmpeg-download.ps1"
@ONLY
)
install
(
FILES
"
${
CMAKE_BINARY_DIR
}
/win-install/ffmpeg-download.ps1"
DESTINATION
"."
COMPONENT libs
)
endif
()
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help