// infile options command << "-y "// overwrite output files << "-an "// disable audio << "-f rawvideo "// force format to rawvideo << "-vcodec rawvideo "// force video rawvideo ('copy' to copy stream) << "-pix_fmt bgr24 "// set pixel format to bgr24 << "-s 1280x720 "// set frame size (WxH or abbreviation) << "-r 30 "; // set frame rate (Hz value, fraction or abbreviation)
command << "-i - "; //
// outfile options command << "-c:v libx264 "// Hyper fast Audio and Video encoder << "-pix_fmt yuv420p "// set pixel format to yuv420p << "-preset ultrafast "// set the libx264 encoding preset to ultrafast << "-f flv "// force format to flv << rtmp_server_url;
message("") message("Operation system is ${CMAKE_SYSTEM}") if (CMAKE_SYSTEM_NAME MATCHES"Linux") message("Current platform: Linux") link_directories(/usr/local/lib) include_directories(/usr/local/include) message(STATUS "Load link directories from /usr/local/lib") message(STATUS "Load include directories from /usr/local/include") elseif (CMAKE_SYSTEM_NAME MATCHES"Darwin") message("Current platform: Darwin") link_directories(/opt/homebrew/lib) include_directories(/opt/homebrew/include) message(STATUS "Load link directories from /opt/homebrew/lib") message(STATUS "Load include directories from /opt/homebrew/include") SET(OPENSSL_ROOT_DIR /opt/homebrew/Cellar/openssl@1.1/1.1.1l) SET(OPENSSL_INCLUDE_DIR /opt/homebrew/Cellar/openssl@1.1/1.1.1l/include) else () message(FATAL_ERROR "Platform ${CMAKE_SYSTEM_NAME} is not support for this project") endif ()