JuliaIO / VideoIO.jl

Reading and writing of video files in Julia via ffmpeg
https://juliaio.github.io/VideoIO.jl/stable
Other
128 stars 53 forks source link

Package build fails caused by 404 Error #100

Closed Tyde closed 5 years ago

Tyde commented 7 years ago

Hi I was installing PGFPlots which depends on VideoIO.jl. During the build, I got the following error:

INFO: Building VideoIO
WARNING: Base.WORD_SIZE is deprecated.
  likely near C:\Users\thiem\.julia\v0.5\VideoIO\deps\build.jl:30
WARNING: Base.WORD_SIZE is deprecated.
  likely near C:\Users\thiem\.julia\v0.5\VideoIO\deps\build.jl:30
WARNING: Base.WORD_SIZE is deprecated.
  likely near C:\Users\thiem\.julia\v0.5\VideoIO\deps\build.jl:30
INFO: Attempting to Create directory C:\Users\thiem\.julia\v0.5\VideoIO\deps\downloads
INFO: Directory C:\Users\thiem\.julia\v0.5\VideoIO\deps\downloads already created
INFO: Downloading file http://ffmpeg.zeranoe.com/builds/win64/shared/ffmpeg-2.2.3-win64-shared.7z
Ausnahme beim Aufrufen von "DownloadFile" mit 2 Argument(en):  "Der Remoteserver hat einen Fehler zurückgegeben: (404) Nicht gefunden."
In Zeile:1 Zeichen:1
+ (new-object net.webclient).DownloadFile("http://ffmpeg.zeranoe.com/bu ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : WebException

====================================================================================================================[ ERROR: VideoIO ]=====================================================================================================================

LoadError: failed process: Process(`'C:\Windows\System32\WindowsPowerShell\v1.0\powershell' -NoProfile -Command '(new-object net.webclient).DownloadFile("http://ffmpeg.zeranoe.com/builds/win64/shared/ffmpeg-2.2.3-win64-shared.7z", "C:\Users\thiem\.julia\v0.5\VideoIO\deps\downloads\ffmpeg-2.2.3-win64-shared.7z")'`, ProcessExited(1)) [1]
while loading C:\Users\thiem\.julia\v0.5\VideoIO\deps\build.jl, in expression starting on line 103

===========================================================================================================================================================================================================================================================

=====================================================================================================================[ BUILD ERRORS ]======================================================================================================================

WARNING: VideoIO had build errors.

 - packages with build errors remain installed in C:\Users\thiem\.julia\v0.5
 - build the package(s) and all dependencies with `Pkg.build("VideoIO")`
 - build a single package by running its `deps/build.jl` script

===========================================================================================================================================================================================================================================================

So it seems that the ffmpeg binary is not provided anymore on this server.

kmsquire commented 7 years ago

Thanks. It looks like they took down all old versions. I'm not sure when I'll get the time to update this package to use the latest version, but I'll try to get to it soon.

kmsquire commented 7 years ago

(If you find another source for older binaries on Windows, please let me know)

Tyde commented 7 years ago

I mirrored this single package on my server (http://www.daniel-thiem.de/ffmpeg/ffmpeg-2.2.3-win64-shared.7z). This could maybe work as a temporary solution (Just to make it buildable again and use the packages, that depend on it).

nilshg commented 7 years ago

Ran into the same issue - tried solving it by adapting the build script like so:

if is_windows()
    ws=string(Sys.WORD_SIZE)
    provides(Binaries, URI("http://ffmpeg.zeranoe.com/builds/win"*ws*"/shared/ffmpeg-latest-win"*ws*"-shared.7z"),
             libav_libs,
             os = :Windows,
             unpacked_dir="ffmpeg-latest-win"*ws*"-shared/bin")
end

to try and build with the latest version. Unfortunately, this led to the following error:

INFO: Downloading file http://ffmpeg.zeranoe.com/builds/win64/shared/ffmpeg-latest-win64-shared.7z
INFO: Done downloading file http://ffmpeg.zeranoe.com/builds/win64/shared/ffmpeg-latest-win64-shared.7z
INFO: Attempting to Create directory C:\Users\nils\.julia\v0.6\VideoIO
INFO: Directory C:\Users\nils\.julia\v0.6\VideoIO already created
===============================[ ERROR: VideoIO ]===============================

LoadError: Provider BinDeps.RemoteBinaries failed to satisfy dependency libavcodec
while loading C:\Users\nils\.julia\v0.6\VideoIO\deps\build.jl, in expression starting on line 104

I'm afraid I don't know enough about video codecs to understand whether this is a fundamental issue or one that could be solved relatively easily!?

Tyde commented 7 years ago

@nilshg I think you ran into a different issue. Your issue is, that $WORD_SIZE is now removed under v0.6.0

The problem of the original issue is, that the server does not serve the old version (2.2.3) of the ffmpeg package. You changed the ffmpeg version in your code to the latest version which is apparently not compatible with the VideoIO.jl package.

I got it to run with a little "hack": I used your code and changed the version back to 2.2.3

if is_windows()
    ws=string(Sys.WORD_SIZE)
    provides(Binaries, URI("http://ffmpeg.zeranoe.com/builds/win"*ws*"/shared/ffmpeg-2.2.3-win"*ws*"-shared.7z"),
             libav_libs,
             os = :Windows,
             unpacked_dir="ffmpeg-2.2.3-win"*ws*"-shared/bin")
end

What I also had to do is to put the binary file into the VideoIO/deps/downloads/ folder. Building then worked.

IanButterworth commented 5 years ago

Closing given that both ffmpeg version and WORD_SIZE issues are fixed now