Git Product home page Git Product logo

ffmpeg-hololens2's Introduction

FFmpeg Libs for Hololens2

Basics

  • Hololens2 runs on UWP(Universal Windows Platform, or Windows Store standard) ARM64
  • ffmpeg libs can be compiled against UWP ARM64 for Hololens2, and x64 for Hololens2 Emulator
  • This repo used Msys2 and VS2019 to compile
  • ffmpeg is free to use(LGPL license) but x264 is not

Prebuilt

Compile

1. Install vs2019

  • Enable C++
  • Enable Universal Windows Platform

2. Setup Msys2

  • Download and install Msys2. Download exe
  • [Important] Edit msys2_shell.cmd to remove rem before set MSYS2_PATH_TYPE=inherit. So that msys cmd will inherit path when called.
  • In cmd.exe, open x64 version of Msys2, and install tools
     // In cmd.exe
     "C:\msys64\msys2_shell.cmd" -mingw64
     
     // In shell
     pacman -S mingw-w64-x86_64-toolchain nasm
     // Press return to select ALL
    

3. Confirm Compile Tools

  • In cmd.exe, call vs2019's compile prompt tool vcvarsall.bat. For example:
     // In cmd.exe
     "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" x86_amd64 uwp
     // vs environment will be setup
    
     // call shell
     "C:\msys64\msys2_shell.cmd" -mingw64 --login
    
     // In shell
     which cl link nasm cpp
     // all should be found
     // cl and link should come from vs2019
     
    

4. Compile

  • Edit MSYS2_SHELL in BuildFFmpegUniversal.bat, for example:

     set MSYS2_SHELL=C:\msys64\msys2_shell.cmd
    
  • Open cmd.exe, goto this repo, run BuildFFmpegUniversal.bat

  • FYI:

    • BuildFFmpegUniversal.bat calls FFmpegUniversal\BuildFFmpegUniversalInternal.bat, which setup vs2019, call shell and runs BuildFFmpeg.sh.
    • If something fails in the middle, you can setup vs2019 and run BuildFFmpeg.sh in you own cmd.exe and shell (Section 5).
    • The old versions setup folder in FFmpeg (for example Output/Windows10/x64) and run ../../../../FFmpeg/configure. It somehow generate 'src/libavdevice/alldevices.cnot found error. So I run./configure` directly from FFmpeg's root folder.

5. Compile step by step (if Section 4 failed)

  • In cmd.exe, enable vs2019
     "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" x86_amd64 uwp
    
  • call shell
     "C:\msys64\msys2_shell.cmd" -mingw64 --login
    
  • run build.sh
     // static ARM64
     ./FFmpegUniversal/BuildFFmpeg.sh Static ARM64
     // or shared x64
     ./FFmpegUniversal/BuildFFmpeg.sh Shared x64
    

Reference

ffmpeg-hololens2's People

Contributors

initialneil avatar mourinaruto avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.