Comments (9)
That is great. I will move the step to the README file in next update.
from transform360.
Sure. Will also add the following steps to the README file once you successfully build it.
- To build Transform360:
You can use, say, cmake (https://cmake.org/). Followed is an example of the CMakeLists.txt with different components:
(1) Write first part of CMakeLists.txt:
cmake_minimum_required(VERSION 2.8)
project (libtransform360)
set(CMAKE_BUILD_TYPE Release)
set (SOURCE_DIR "${PROJECT_SOURCE_DIR}/")
SET(SOURCES
${SOURCE_DIR}/VideoFrameTransform.cpp
${SOURCE_DIR}/VideoFrameTransformHandler.cpp)
SET(HEADERS
${SOURCE_DIR}VideoFrameTransform.h
${SOURCE_DIR}VideoFrameTransformHandler.h
${SOURCE_DIR}VideoFrameTransformHelper.h)
add_library(Transform360 STATIC ${SOURCES} ${HEADERS})
target_link_libraries(Transform360 ${PROJECT_LINK_LIBS} )
install(TARGETS Transform360
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
COMPONENT library
)
install(DIRECTORY . DESTINATION include/Transform360 FILES_MATCHING PATTERN "*.h")
(2) Add OpenCV:
We used a Facebook compiling tool to add OpenCV (>2.4.8) as a dependency of Transform360. You can try to add the following lines to the above file.
find_package(OpenCV REQUIRED)
include_directories(${OpenCV_INCLUDE_DIRS})
target_link_libraries(MY_TARGET_NAME ${OpenCV_LIBS})
(3) Specify CXXFLAGS:
Please follow http://stackoverflow.com/questions/10851247/how-to-activate-c-11-in-cmake to add "CXXFLAGS" and "-std=c++11" to the above CMakeLists.txt file based on the versions you are using.
-
Build Transform360 library with FFmpeg:
The successful building of Transform360 (with OpenCV as dependency) will generate the library file. We need to add it to FFmpeg as an extra library, which can be done by adding the following information to your FFmpeg configure line
'--extra-libs= -ltransform360_pic -lstdc++' -
Add other stuff related to Transform360 to FFmpeg:
You can follow the "To Build And Use Transform360" section in the README file to add vf_transform360.c to FFmpeg
Please let us know if it works for you.
from transform360.
Thanks so much Renbin for your detailed reply. Yes, it works for me.
I just made very minor changes. Here is the final CMakeLists.txt I used to build libTransform360.a:
cmake_minimum_required(VERSION 2.8)
project (libtransform360)
set(CMAKE_BUILD_TYPE Release)
set (SOURCE_DIR "${PROJECT_SOURCE_DIR}/")
SET(SOURCES
${SOURCE_DIR}/VideoFrameTransform.cpp
${SOURCE_DIR}/VideoFrameTransformHandler.cpp)
SET(HEADERS
${SOURCE_DIR}VideoFrameTransform.h
${SOURCE_DIR}VideoFrameTransformHandler.h
${SOURCE_DIR}VideoFrameTransformHelper.h)
list(APPEND CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")
add_library(Transform360 STATIC ${SOURCES} ${HEADERS})
target_link_libraries(Transform360 ${PROJECT_LINK_LIBS} )
find_package(OpenCV REQUIRED)
include_directories(${OpenCV_INCLUDE_DIRS})
target_link_libraries(Transform360 ${OpenCV_LIBS})
install(TARGETS Transform360
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
COMPONENT library
)
install(DIRECTORY . DESTINATION include/Transform360 FILES_MATCHING PATTERN "*.h")
Also, here is the configuration line that I used for ffmpeg:
./configure --prefix=/usr/local --enable-gpl --enable-nonfree --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-libopencv --extra-libs='-lTransform360 -lstdc++'
Thanks again.
from transform360.
For any OSX + Homebrew guys:
./configure --prefix=/usr/local --enable-gpl --enable-nonfree --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-libopencv --extra-libs='-lTransform360 -lstdc++ ' --extra-cflags='-I/usr/local/include/ -I/usr/local/Cellar/lame/3.99.5/include/ -I/usr/local/Cellar/theora/1.1.1/include/' --host-ldflags=-L/usr/local/lib
Maybe you need to adjust your 'lame' and 'theora' versions at a later time.
from transform360.
hi there,
when doing cmake is finished and we run 'make', what is the result we are getting? what should we do with it, that is, how will ffmpeg know 'lTransform360' to use from configure?
thanks.
from transform360.
It will generate a transform360 lib which can be recognized by ffmpeg based on the setting of ffmpeg mentioned above.
from transform360.
thanks you,
I am working on OSX, what i got was a file with a ".a" extension, is that the lib? and do i need to copy it to the ffmpeg dir?
thanks.
from transform360.
You can put it in a place where FFmpeg can pick it up
from transform360.
ok i think i did it, just added in the configure command:
--extra-ldflags="-L/Transform360-lib-file-dir" --extra-cflags="-I/Transform360-include-dir"
now i get strange errors for AudioHardware.h on mac OSX, i guess something with transform360 and mac.
thanks
from transform360.
Related Issues (20)
- How can I build the support to generate cube faces with different resolution ? HOT 2
- FFmpeg crashes with transform360 filter on Nvidia GPU HOT 1
- Speed optimisation for transform360 filter. HOT 4
- "Cross" shaped cubemap layout. Is it possible? HOT 5
- need solution for "libopencv not found" HOT 8
- FYI: branch with Transform360 patch pre-applied. HOT 2
- Unknown filter 'transform360'. HOT 4
- Minor change in ffmpeg - need to modify step 6 for building transform360
- performance problem HOT 10
- About Input to Output Projection Format
- Can't convert from EAC_32 to EQUIRECT HOT 2
- how to compile this in macbookpro
- how to play cubmap vr video in HMD
- Error on compile ffmpeg
- Segment fault (core dumped) HOT 1
- Windows build HOT 13
- License conflict
- Updating README.md
- gcc question HOT 2
- No such filter: 'transform_v1' Error reinitializing filters!
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from transform360.