Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: FFMpeg and SFML  (Read 10039 times)

0 Members and 1 Guest are viewing this topic.

thunem

  • Newbie
  • *
  • Posts: 15
    • View Profile
FFMpeg and SFML
« on: May 25, 2020, 07:40:25 pm »
Hi, I have tried to integrate FFMpeg with SFML in the last two days, but I haven't got any results sadly, the examples on the net are all old versions or unclear.
There are some examples for ffmpeg 3.3.1 but I can't find that development version prebuilt, or I have ffmpeg 4 + but examples are not working for me anymore, I don't know why.

I have tried to convert one by one the old deprecated functions with the new ones, but I am really stuck on understanding all the code.

Are there or on the net an updated ffmpeg and sfml tutorial or maybe can someone please convert or help me to convert one that is the most easily transferable to sfml 2.4 +?

Those are the tutorials or forum topics that I have followed:
https://en.sfml-dev.org/forums/index.php?topic=20593.0
https://github.com/shi-yan/videosamples
https://stackoverflow.com/questions/11701635/use-ffmpeg-in-visual-studio
https://en.sfml-dev.org/forums/index.php?topic=2474.0

Athenian Hoplite

  • Newbie
  • *
  • Posts: 19
  • Nenikikamen !
    • View Profile
Re: FFMpeg and SFML
« Reply #1 on: May 25, 2020, 09:45:44 pm »
Have you checked out sfeMovie ?
"By will of the Athenian People be it resolved:
If anyone rises up against the people for tyranny or join in establishing the tyranny or overthrow the People of the Athenians and the democracy in Athens, whoever kills him who does these things shall be blameless." - Athenian Law 337 BC

thunem

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: FFMpeg and SFML
« Reply #2 on: May 25, 2020, 10:18:23 pm »
Thanks for reply! I have already checked that, but last time I tried to compile first I had to download msys, after that even if sfml was found (with CMake) I had this error:

In reality the libraries are sfml 2.5.1 and 2.4.2



Selecting Windows SDK version 10.0.17763.0 to target Windows 10.0.15063.
Needs to (re)build FFmpeg: TRUE
Parallel jobs: 8
CMake Error at cmake/Modules/FindSFML.cmake:91 (FILE):
  FILE failed to open for reading (No such file or directory):

    C:/Users/pc/Documents/Visual Studio 2017/Resources/SFML-2.5.1/include/SFML/SFML/Config.hpp
Call Stack (most recent call first):
  CMakeLists.txt:104 (find_package)


CMake Error at cmake/Modules/FindSFML.cmake:356 (message):
  SFML found but version too low (requested: 2.3, found: 1.x.x)
Call Stack (most recent call first):
  CMakeLists.txt:104 (find_package)


Configuring incomplete, errors occurred!
See also "C:/Users/pc/Documents/Visual Studio 2017/Projects/sfeMovie/CMakeFiles/CMakeOutput.log".


thunem

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: FFMpeg and SFML
« Reply #3 on: May 26, 2020, 03:17:14 am »
Seems that the error is something FindSFML.cmake script.

Tried solutions over the web, in this link there the error reported:
https://github.com/SFML/SFML/issues/873

I have tried multiple solutions, from editing the file myself and hardcoding the version numbers but nothing. Also I have downloaded multiple SFML versions (2.3.2 , 2.4.2 , 2.5.1) and multiple FindSFML.cmake from various spots, but nothing...

Someone had those problems in the past? I have seen that this issue is relatively old (2015 is reported in the link above)

Thanks in advance!

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10801
    • View Profile
    • development blog
    • Email
Re: FFMpeg and SFML
« Reply #4 on: May 26, 2020, 10:07:58 am »
For SFML 2.5 you'd have to edit the CMake script to use the new approach without FindSFML.cmake: https://en.sfml-dev.org/forums/index.php?topic=24070.0

What exactly are you trying to achieve with ffmpeg and SFML?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

thunem

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: FFMpeg and SFML
« Reply #5 on: May 26, 2020, 03:37:22 pm »
Hi, thanks for your reply  :)

I want to play video and audio inside my application, I have at the end compiled some examples on the net but got around 1000 unresolved symbols, I have to investigate better on that  :(

About sfeMovie.
I put that with title modified to FindSFML.cmake as requested from the main cmake script in sfeMovie but eventually got another message:

Selecting Windows SDK version 10.0.17763.0 to target Windows 10.0.15063.
Needs to (re)build FFmpeg: TRUE
Parallel jobs: 8
CMake Error at cmake/Modules/FindSFML.cmake:139 (message):
  Requested SFML configuration (Shared) was not found
Call Stack (most recent call first):
  CMakeLists.txt:104 (find_package)


Configuring incomplete, errors occurred!
See also "C:/Users/pc/Documents/Visual Studio 2017/Projects/sfeMovie/CMakeFiles/CMakeOutput.log".

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10801
    • View Profile
    • development blog
    • Email
Re: FFMpeg and SFML
« Reply #6 on: May 28, 2020, 09:21:57 pm »
If anyone stumples up on this topic, here's an updated CMakeLists.txt for sfeMovie. I may try to push it upstream, but since it kind of makes sfeMovie only support SFML 2.5 and higher...

cmake_minimum_required (VERSION 2.8.12)


# set a default build type if none was provided
# this has to be done before the project() instruction!
if(NOT CMAKE_BUILD_TYPE)
    set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build (Debug or Release)" FORCE)
endif()

project (sfeMovie)

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/bin)

set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/bin)

set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/bin)

# Import required CMake files
set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/Modules")
include(${CMAKE_SOURCE_DIR}/Shell.cmake)
include(${CMAKE_SOURCE_DIR}/FFmpeg/FFmpeg.cmake)

# Detect the OS
if(${CMAKE_HOST_WIN32})
    set(WINDOWS 1)
elseif(${CMAKE_HOST_APPLE})
    set(MACOSX 1)
elseif(${CMAKE_HOST_UNIX})
    set(LINUX 1)
else()
    message(FATAL_ERROR "Unsupported operating system")
    return()
endif()

if (WINDOWS AND NOT MSVC)
    message(FATAL_ERROR "Only Visual Studio (2013 and later) is supported on Windows")
endif()

# Set some env vars
set (SFEMOVIE_LIB sfeMovie)
set (VERSION_MAJOR 2)
set (VERSION_MINOR 0)

set (SOURCES_DIR "src")
set (PUBLIC_HEADERS "include")
set (PRIVATE_HEADERS "src")
set (OTHER_LIBRARIES "")
set (LINKER_FLAGS "")

if (MSVC)
    if(MSVC_VERSION LESS 1800) # 1700 = VS 2013
        message(FATAL_ERROR "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.")
    endif()
else()
    include(CheckCXXCompilerFlag)
    CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
    CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
    if(COMPILER_SUPPORTS_CXX11)
        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
    elseif(COMPILER_SUPPORTS_CXX0X)
        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
    else()
        message(FATAL_ERROR "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.")
    endif()
endif()

#################################################################################################################
# ============================================== FFMPEG SETUP ================================================= #
#################################################################################################################

set (SFEMOVIE_BUILD_FFMPEG TRUE CACHE BOOL "TRUE to build sfeMovie with the provided FFmpeg sources, FALSE to build with the system libraries")
add_subdirectory(FFmpeg)

#################################################################################################################
# ============================================== LIBASS SETUP ================================================= #
#################################################################################################################

set (SFEMOVIE_ENABLE_ASS_SUBTITLES FALSE CACHE BOOL "TRUE to build sfeMovie with libass, which enable support of non-bitmap subtitles (ie. srt")
if (SFEMOVIE_ENABLE_ASS_SUBTITLES)
    find_package (ASS REQUIRED)
    add_definitions(-DSFEMOVIE_ENABLE_ASS_SUBTITLES)
endif()

#################################################################################################################
# ================================================ SFML SETUP ================================================= #
#################################################################################################################

# Static sfeMovie lib has no interest on Linux or OS X
if (WINDOWS)
    set (SFEMOVIE_BUILD_STATIC FALSE CACHE BOOL "TRUE to build static version of sfeMovie")
endif()

if (SFEMOVIE_BUILD_STATIC)
    set (SFML_STATIC_LIBRARIES TRUE)
endif()

find_package (SFML 2.5 COMPONENTS graphics audio REQUIRED)
message(STATUS "SFML libraries found")

#################################################################################################################
# ============================================== sfeMovie SETUP =============================================== #
#################################################################################################################

file(GLOB SOURCE_FILES ${SOURCES_DIR}/[a-z,A-Z]*.[c,h]* ${SOURCES_DIR}/DebugTools/[a-z,A-Z]*.[c,h]*)
file(GLOB HEADER_FILES RELATIVE ${PROJECT_SOURCE_DIR} "include/sfeMovie/[a-z,A-Z]*.[h]*")

add_definitions(-D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DSFE_EXPORTS)
if (APPLE) # ========================================== macOS ========================================== #
    # add an option to let the user specify a custom directory for framework installation
    set(CMAKE_INSTALL_FRAMEWORK_PREFIX "/Library/Frameworks" CACHE STRING "Frameworks installation directory")
endif()

# Set the search directories for compiling and link editing
set(SFEMOVIE_INCLUDE_DIRS "${PUBLIC_HEADERS};${PRIVATE_HEADERS};${FFMPEG_INCLUDE_DIRS}")
if (SFEMOVIE_ENABLE_ASS_SUBTITLES)
    set(SFEMOVIE_INCLUDE_DIRS "${SFEMOVIE_INCLUDE_DIRS};${LIBASS_INCLUDE_DIR}")
endif()

include_directories (${SFEMOVIE_INCLUDE_DIRS})
message (STATUS "Headers directories: ${SFEMOVIE_INCLUDE_DIRS}")

source_group("Public headers" FILES ${HEADER_FILES})
if (SFEMOVIE_BUILD_STATIC)
    add_library(${SFEMOVIE_LIB} STATIC ${SOURCE_FILES} ${HEADER_FILES})
else()
    add_library(${SFEMOVIE_LIB} SHARED ${SOURCE_FILES} ${HEADER_FILES})
endif()

if (NeedsFFmpegCompilation)
    add_dependencies(${SFEMOVIE_LIB} FFmpeg)
endif()

# Define the libraries sfeMovie should link against
if (SFEMOVIE_BUILD_STATIC)
    set_target_properties(${SFEMOVIE_LIB} PROPERTIES
        COMPILE_DEFINITIONS SFEMOVIE_STATIC
        COMPILE_DEFINITIONS SFML_STATIC)
    message(WARNING "You chose to build a static library of sfeMovie, this assumes that you will also statically link your software against SFML."
            "sfeMovie will be built with SFML_STATIC defined.")
else()
    set(SFEMOVIE_LIBRARIES ${FFMPEG_LIBRARIES} ${OTHER_LIBRARIES} sfml-graphics sfml-audio)
    if (SFEMOVIE_ENABLE_ASS_SUBTITLES)
        set(SFEMOVIE_LIBRARIES ${SFEMOVIE_LIBRARIES} ${LIBASS_LIBRARIES})
    endif()
    message(STATUS "Link sfeMovie against: ${LIBASS_LIBRARIES} ${SFML_LIBRARIES} ${FFMPEG_LIBRARIES} ${OTHER_LIBRARIES} ${SFML_DEPENDENCIES}")
    target_link_libraries(${SFEMOVIE_LIB} PRIVATE ${SFEMOVIE_LIBRARIES})
endif()

if (SFEMOVIE_BUILD_FFMPEG)
    if (LINUX)
        add_custom_command(TARGET ${SFEMOVIE_LIB} PRE_LINK
            COMMAND cp -R
                "${CMAKE_BINARY_DIR}/FFmpeg-binaries/lib/*"
                "$<TARGET_FILE_DIR:${SFEMOVIE_LIB}>")
    elseif(MACOSX)
        add_custom_command(TARGET ${SFEMOVIE_LIB} PRE_LINK
            COMMAND mkdir -p "$<TARGET_FILE_DIR:${SFEMOVIE_LIB}>/Libraries")
        add_custom_command(TARGET ${SFEMOVIE_LIB} PRE_LINK
            COMMAND cp -R
                "${CMAKE_BINARY_DIR}/FFmpeg-binaries/lib/*"
                "$<TARGET_FILE_DIR:${SFEMOVIE_LIB}>/Libraries")
    elseif(WINDOWS)
        add_custom_command(TARGET ${SFEMOVIE_LIB} PRE_LINK
            COMMAND ${CMAKE_COMMAND} -E copy_directory
                "${CMAKE_BINARY_DIR}/FFmpeg-binaries/lib"
                "$<TARGET_FILE_DIR:${SFEMOVIE_LIB}>")
        add_custom_command(TARGET ${SFEMOVIE_LIB} PRE_LINK
            COMMAND ${CMAKE_COMMAND} -E copy_directory
                "${CMAKE_BINARY_DIR}/FFmpeg-binaries/bin"
                "$<TARGET_FILE_DIR:${SFEMOVIE_LIB}>")
    endif()
endif()

include (${CMAKE_SOURCE_DIR}/cmake/Properties.cmake)
include (${CMAKE_SOURCE_DIR}/cmake/Install.cmake)

# Unit tests
set (SFEMOVIE_BUILD_UNIT_TESTS FALSE CACHE BOOL "TRUE to build the unit test system, requires Boost")
if (SFEMOVIE_BUILD_UNIT_TESTS)
    add_subdirectory(tests)
endif()

# Examples building
add_subdirectory(examples)

# add an option for building the documentation
set(SFEMOVIE_BUILD_DOC FALSE CACHE BOOL "Set to true to build the documentation, requires Doxygen")
if(SFEMOVIE_BUILD_DOC)
    add_subdirectory(doxygen)
endif()

# Define packaging
include(${CMAKE_SOURCE_DIR}/cmake/Packaging.cmake)

Other than that, using msys2 and VS 2019 I could build sfeMovie just fine with the given instructions.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

thunem

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: FFMpeg and SFML
« Reply #7 on: May 28, 2020, 10:48:33 pm »
Hey thanks for reply! I have tried to contact you but forum PM don't works, because on Sent Items there's nothing I sent... :(
One small addition to this puzzle is to remove FindSFML.cmake on the sfeMovie Because was not let me continue (same error even with your file)

So, I downloaded sfeMovie package
created a folder in VS2017 projects and placed the code there
changed cmakeLists.txt to this new one you've created
deleted FindSFML.cmake to be able to continue
OK solution built
Now compiling ALL_BUILD inside solution gave me this error:
Could not open those files:
#include <SFML/Config.hpp>
#include <SFML/Graphics.hpp>

But the inclusion on cmake was all correct, and all the paths correspond (you can see in the image):

Also do you have an email so I can contact you quickly? I need this because it's the best solution by now :)

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10801
    • View Profile
    • development blog
    • Email
Re: FFMpeg and SFML
« Reply #8 on: May 29, 2020, 12:47:28 am »
Hey thanks for reply! I have tried to contact you but forum PM don't works, because on Sent Items there's nothing I sent... :(
I received your PM and I've already replied. ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
Re: FFMpeg and SFML
« Reply #9 on: May 31, 2020, 04:15:51 pm »
Hello,

The changes suggested by eXpl0it3r should be appropriate (in addition to removing FindSFML.cmake from sfeMovie sources as you noted). Indeed sfeMovie was created before FindSFML.cmake was removed from CMake.

Seeing your last CMake screenshot, it looks like you still have input from a previous CMake session. I'd recommend that you delete the CMake cache from sfeMovie build directory and configure again in CMake. SFML_DIR entry is not supposed to appear again in CMake window.

I may try to push it upstream, but since it kind of makes sfeMovie only support SFML 2.5 and higher...
You know that I am rather fine with breaking compatibility with previous versions :) Especially if it means that it'll work out of the box with the latest SFML version. However I don't wish to spend time on sfeMovie at all, and merging PRs requires at least a bit of testing, so the best would likely to make this change in your own fork.
« Last Edit: May 31, 2020, 08:22:14 pm by Ceylo »
Want to play movies in your SFML application? Check out sfeMovie!

thunem

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: FFMpeg and SFML
« Reply #10 on: May 31, 2020, 07:37:11 pm »
Thanks for your replies, but I can't understand this error, I have deleted in sfeMovieRepo->cmake->Modules the FindSFML.cmake
Then in sfeMovieRepo I put the new CmakeLists.txt file from Exploiter, then ran CMake and set those variables in the image attached, but on Generate want again SFML_DIR?
And in any case is searching for those files I found no files with that name (when I built sfml repo I haven't found any on include directory), but found a cmake->SFMLConfig.cmake.in (in the SFML repo)
I have to rename and move that file somewhere in the SFML repo?

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
Re: FFMpeg and SFML
« Reply #11 on: May 31, 2020, 08:17:28 pm »
The prebuilt binaries at https://www.sfml-dev.org/download/sfml/2.5.1/ contain said SFMLConfig.cmake
As for helping CMake find it:
if the SFMLConfig.cmake file can't be automatically located, you can provide the directory containing said file by setting SFML_DIR
Want to play movies in your SFML application? Check out sfeMovie!

thunem

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: FFMpeg and SFML
« Reply #12 on: May 31, 2020, 11:54:00 pm »
Ok, thanks again, I was using the SFML compiled from source, the cmake was in a weird position
Now after the generate went fine, on project open and running the ALL_BUILD I had 2  compiled projects, and 4 failed ones, about ffmpeg for example in the output log is saying too much arguments passed to bash, what's happening from your experiences ?  :-\

(I am italian so I will try to translate the output messages ):

1>------ Start Building: Project: FFmpeg, Configuration: Debug Win32 ------
1>Generating ../FFmpeg-binaries/lib/avformat.lib, ../FFmpeg-binaries/lib/avdevice.lib, ../FFmpeg-binaries/lib/avcodec.lib, ../FFmpeg-binaries/lib/avutil.lib, ../FFmpeg-binaries/lib/swscale.lib, ../FFmpeg-binaries/lib/swresample.lib
1>/usr/bin/bash: riga 0: cd: too parameters /arguments
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(209,5): error MSB6006: "cmd.exe" terminated with code 1.
1>Building project"FFmpeg.vcxproj" NOT Completed.
2>------ Start building: project: sfeMovie, Configuration: Debug Win32 ------
2>Error copying directory from "C:/Users/pc/Documents/Visual Studio 2017/Projects/sfeMovieLaTest/build/FFmpeg-binaries/bin" to "C:/Users/pc/Documents/Visual Studio 2017/Projects/sfeMovieLaTest/build/bin".
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: uscita dal comando "setlocal
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: "C:\Program Files (x86)\CMake\bin\cmake.exe" -E copy_directory "C:/Users/pc/Documents/Visual Studio 2017/Projects/sfeMovieLaTest/build/FFmpeg-binaries/lib" "C:/Users/pc/Documents/Visual Studio 2017/Projects/sfeMovieLaTest/build/bin"
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: :cmEnd
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: :cmErrorLevel
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: exit /b %1
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: :cmDone
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: if %errorlevel% neq 0 goto :VCEnd
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: setlocal
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: "C:\Program Files (x86)\CMake\bin\cmake.exe" -E copy_directory "C:/Users/pc/Documents/Visual Studio 2017/Projects/sfeMovieLaTest/build/FFmpeg-binaries/bin" "C:/Users/pc/Documents/Visual Studio 2017/Projects/sfeMovieLaTest/build/bin"
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: :cmEnd
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: :cmErrorLevel
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: exit /b %1
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: :cmDone
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: if %errorlevel% neq 0 goto :VCEnd
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: :VCEnd" with code 1.
2>Project building "sfeMovie.vcxproj" NOT COMPLETED.
3>------ Start building: Project: sfeMovieDemo, Configuration: Debug Win32 ------
4>------ Start building: Project: sfeMovieMinimalistDemo, Configuration: Debug Win32 ------
3>main.cpp
4>main.cpp
4>C:\Users\pc\Documents\Visual Studio 2017\Projects\sfeMovieLaTest\examples\MinimalistDemo\main.cpp(26): fatal error C1083: It's not possible to open include file: 'SFML/Config.hpp': No such file or directory
3>C:\Users\pc\Documents\Visual Studio 2017\Projects\sfeMovieLaTest\examples\Demo\main.cpp(26): fatal error C1083: It's not possible to open include file: 'SFML/Config.hpp': No such file or directory
3>MediaInfo.cpp
4>Compilazione progetto "sfeMovieMinimalistDemo.vcxproj" NOT COMPLETED.
3>C:\Users\pc\Documents\Visual Studio 2017\Projects\sfeMovieLaTest\include\sfeMovie/Movie.hpp(29): fatal error C1083: It's not possible to open include file: 'SFML/Graphics.hpp': No such file or directory
3>StreamSelector.cpp
3>C:\Users\pc\Documents\Visual Studio 2017\Projects\sfeMovieLaTest\include\sfeMovie/Movie.hpp(29): fatal error C1083: It's not possible to open include file: 'SFML/Graphics.hpp': No such file or directory
3>UserInterface.cpp
3>c:\users\pc\documents\visual studio 2017\projects\sfemovielatest\examples\demo\UserInterface.hpp(29): fatal error C1083: It's not possible to open include file: 'SFML/Graphics/RenderWindow.hpp': No such file or directory
3>Generating code...
3>Project building "sfeMovieDemo.vcxproj" NOT COMPLETED.
========== Compilazione: 2 completed, 4 non riuscite, 0 updated, 0 ignored ==========


Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
Re: FFMpeg and SFML
« Reply #13 on: June 01, 2020, 10:14:20 am »
1>/usr/bin/bash: riga 0: cd: too parameters /arguments
This one I don't know, and as I'm not maintaining sfeMovie anymore, you'll need to figure out by yourself. The only idea that comes to my mind right now is to try to avoid spaces in your sources path and build path. But it is one of the most important error here and is the consequence of almost all other logs.

3>------ Start building: Project: sfeMovieDemo, Configuration: Debug Win32 ------
4>------ Start building: Project: sfeMovieMinimalistDemo, Configuration: Debug Win32 ------
3>main.cpp
4>main.cpp
4>C:\Users\pc\Documents\Visual Studio 2017\Projects\sfeMovieLaTest\examples\MinimalistDemo\main.cpp(26): fatal error C1083: It's not possible to open include file: 'SFML/Config.hpp': No such file or directory
3>C:\Users\pc\Documents\Visual Studio 2017\Projects\sfeMovieLaTest\examples\Demo\main.cpp(26): fatal error C1083: It's not possible to open include file: 'SFML/Config.hpp': No such file or directory
3>MediaInfo.cpp
4>Compilazione progetto "sfeMovieMinimalistDemo.vcxproj" NOT COMPLETED.
3>C:\Users\pc\Documents\Visual Studio 2017\Projects\sfeMovieLaTest\include\sfeMovie/Movie.hpp(29): fatal error C1083: It's not possible to open include file: 'SFML/Graphics.hpp': No such file or directory
3>StreamSelector.cpp
3>C:\Users\pc\Documents\Visual Studio 2017\Projects\sfeMovieLaTest\include\sfeMovie/Movie.hpp(29): fatal error C1083: It's not possible to open include file: 'SFML/Graphics.hpp': No such file or directory
3>UserInterface.cpp
3>c:\users\pc\documents\visual studio 2017\projects\sfemovielatest\examples\demo\UserInterface.hpp(29): fatal error C1083: It's not possible to open include file: 'SFML/Graphics/RenderWindow.hpp': No such file or directory
3>Generating code...
3>Project building "sfeMovieDemo.vcxproj" NOT COMPLETED.
These are also related to CMake update with SFML 2.5, but are just the examples, not the library itself. If you want to fix them, update their CMakeLists.txt in target_link_library() call to link against sfml-graphics and sfml-audio.
Want to play movies in your SFML application? Check out sfeMovie!

thunem

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: FFMpeg and SFML
« Reply #14 on: June 01, 2020, 01:04:47 pm »
Many thanks  :) ! I will try to address this issue, on stack overflow website they said that may be a spaced directory path, so I will try to compile somewher in C root

https://stackoverflow.com/questions/13118947/error-msb6006-cmd-exe-exited-with-code-1

I imagine that too arguments error is because the paths are passed without quotation marks " " and they are seen as multiple parameters like "C:\My" "BeautifulPath\SFML\include"

If someone in the meantime solved this issue or can give a clue I will listen with all my ears (o) o_o (o)  :)

 

anything