
Recherche avancée
Médias (10)
-
Demon Seed
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Demon seed (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
The four of us are dying (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Corona radiata (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Lights in the sky (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Head down (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
Autres articles (86)
-
La file d’attente de SPIPmotion
28 novembre 2010, parUne file d’attente stockée dans la base de donnée
Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...) -
Mediabox : ouvrir les images dans l’espace maximal pour l’utilisateur
8 février 2011, parLa visualisation des images est restreinte par la largeur accordée par le design du site (dépendant du thème utilisé). Elles sont donc visibles sous un format réduit. Afin de profiter de l’ensemble de la place disponible sur l’écran de l’utilisateur, il est possible d’ajouter une fonctionnalité d’affichage de l’image dans une boite multimedia apparaissant au dessus du reste du contenu.
Pour ce faire il est nécessaire d’installer le plugin "Mediabox".
Configuration de la boite multimédia
Dès (...) -
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...)
Sur d’autres sites (5541)
-
ffmpeg Undefined referance to several swr functions [duplicate]
21 mai 2022, par user19068953I'm trying to staticly link ffmpeg to my project, i downloaded the ffmpeg source files from a github repo because it had pre writen cmake files, which i needed for this exact problem but it changed nothing (https://github.com/Pawday/ffmpeg-cmake). I edited the file a little and posted it below, and added them to lib/ffmpeg in my project directory. I first ran ./configure, then ran make, then make install like the install guide suggested. Then i ran cmake . followed by make. It compiled just fine and i ran a test without any errors :


extern "C"{
 #include <libavcodec></libavcodec>avcodec.h>
}

#include <iostream>
int main(int argc, char* argv[]) {
 if (argc < 2) {
 std::cout << "provide a filename" << std::endl;
 return -1;
 AVPacket *pkt = av_packet_alloc();
 }
}
</iostream>


I was following the examples that ffmpeg provides, so i added this :


const AVCodec *codec = avcodec_find_decoder(AV_CODEC_ID_MPEG1VIDEO);



But now i have this huge error :


/usr/bin/ld: /usr/local/lib/libavcodec.a(opusdec.o): in function 

`opus_decode_subpacket':
/home/t/Desktop/Code/lib/ffmpeg/libavcodec/opusdec.c:346: undefined reference to `swr_is_initialized'
/usr/bin/ld: /usr/local/lib/libavcodec.a(opusdec.o): in function `opus_decode_frame':
/home/t/Desktop/Code/lib/ffmpeg/libavcodec/opusdec.c:188: undefined reference to `swr_is_initialized'
/usr/bin/ld: /usr/local/lib/libavcodec.a(opusdec.o): in function `opus_init_resample':
/home/t/Desktop/Code/lib/ffmpeg/libavcodec/opusdec.c:136: undefined reference to `swr_init'
/usr/bin/ld: /home/t/Desktop/Code/lib/ffmpeg/libavcodec/opusdec.c:142: undefined reference to `swr_convert'
/usr/bin/ld: /usr/local/lib/libavcodec.a(opusdec.o): in function `opus_decode_frame':
/home/t/Desktop/Code/lib/ffmpeg/libavcodec/opusdec.c:202: undefined reference to `swr_convert'
/usr/bin/ld: /usr/local/lib/libavcodec.a(opusdec.o): in function `opus_flush_resample':
/home/t/Desktop/Code/lib/ffmpeg/libavcodec/opusdec.c:90: undefined reference to `swr_convert'
/usr/bin/ld: /usr/local/lib/libavcodec.a(opusdec.o): in function `opus_decode_subpacket':
/home/t/Desktop/Code/lib/ffmpeg/libavcodec/opusdec.c:379: undefined reference to `swr_close'
/usr/bin/ld: /home/t/Desktop/Code/lib/ffmpeg/libavcodec/opusdec.c:346: undefined reference to `swr_is_initialized'
/usr/bin/ld: /usr/local/lib/libavcodec.a(opusdec.o): in function `opus_decode_flush':
/home/t/Desktop/Code/lib/ffmpeg/libavcodec/opusdec.c:582: undefined reference to `swr_close'
/usr/bin/ld: /usr/local/lib/libavcodec.a(opusdec.o): in function `opus_decode_close':
/home/t/Desktop/Code/lib/ffmpeg/libavcodec/opusdec.c:607: undefined reference to `swr_free'
/usr/bin/ld: /usr/local/lib/libavcodec.a(opusdec.o): in function `opus_decode_init':
/home/t/Desktop/Code/lib/ffmpeg/libavcodec/opusdec.c:660: undefined reference to `swr_alloc'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/Interview.dir/build.make:122: bin/Interview] Error 1
make[1]: *** [CMakeFiles/Makefile2:420: CMakeFiles/Interview.dir/all] Error 2
make: *** [Makefile:84: all] Error 2



I find some questions with similar issues to no avail :


FFmpeg seems to be version conflict
Linking libavcodec and libavformat : Undefined references


NOTE : previously i tried downloading ffmpeg with home-brew and pkg-config maybe that is causing an error, but my guess is my cmake file is faulty.


project/CMakeLists :


cmake_minimum_required(VERSION 3.14)

project(Interview C CXX)
set(CMAKE_CXX_STANDARD 14)

SET( EXECUTABLE_OUTPUT_PATH ${dir}/bin )
set( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/bin )
set( CMAKE_C_FLAGS "-lswresample")

add_subdirectory(lib/ffmpeg)

add_definitions(-DGL_SILENCE_DEPRECATION)

list(APPEND SOURCES
 src/main.cpp
 src/vipch.h
 src/VideoDecoder.cpp
 src/VideoDecoder.h
 src/Application.cpp
 src/Application.h
 #src/OpenGLRenderer.cpp
 #src/OpenGLRenderer.h
 #src/Layer.h
 #src/Layer.cpp
)

find_path(AVCODEC_INCLUDE_DIR libavcodec/avcodec.h)
find_library(AVCODEC_LIBRARY avcodec)

find_path(AVFORMAT_INCLUDE_DIR libavformat/avformat.h)
find_library(AVFORMAT_LIBRARY avformat)

find_path(AVDEVICE_INCLUDE_DIR libavdevice/avdevice.h)
find_library(AVDEVICE_LIBRARY avdevice)

find_path(AVCODEC_INCLUDE_DIR libavcodec/avcodec.h)
find_library(AVCODEC_LIBRARY avcodec)

set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)

add_executable(Interview src/main.cpp src/Application.cpp src/Application.h ${SOURCES})

target_link_libraries(Interview PRIVATE Threads::Threads)

if(APPLE)
 list(APPEND EXTRA_LIBS
 "-framework OpenGL"
 )

 configure_file(
 ${CMAKE_CURRENT_SOURCE_DIR}/assets/MacOSXBundleInfo.plist.in
 ${CMAKE_CURRENT_BINARY_DIR}/assets/MacOSXBundleInfo.plist
 )

 set_target_properties(Interview PROPERTIES
 MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_BINARY_DIR}/assets/MacOSXBundleInfo.plist
 )

elseif(WIN32)
 list(APPEND EXTRA_LIBS
 "-lglu32 -lopengl32"
 )
 set(CMAKE_EXE_LINKER_FLAGS "-std=gnu99 -static -static-libgcc -static-libstdc++ -mwindows")

endif()

list(APPEND EXTRA_LIBS
"-lGL -lGLU -lX11 -lz -lva -lswresample"
)

find_package(OpenGL REQUIRED)
find_package(GLEW REQUIRED)

#target_link_libraries(Interview ${CORELIBS})


target_include_directories(Interview PRIVATE 
 ${AVCODEC_INCLUDE_DIR} 
 ${AVFORMAT_INCLUDE_DIR}
 ${AVUTIL_INCLUDE_DIR}
 ${AVDEVICE_INCLUDE_DIR} 
 ${OPENGL_INCLUDE_DIR}
 ${GLEW_INCLUDE_DIRS}
)

target_link_libraries(Interview PRIVATE 
 ${AVCODEC_LIBRARY} 
 ${AVFORMAT_LIBRARY} 
 ${AVUTIL_LIBRARY} 
 ${AVDEVICE_LIBRARY} 
 ${OPENGL_LIBRARY}
 ${GLEW_LIBRARIES}
)



NOTE : i previously had a really similar error with pthread but with some fixes to cmake and installing pthread i fixed it.


project/lib/ffmpeg/CMakeLists :


cmake_minimum_required(VERSION 3.15)

project(FFMPEG C CXX)

add_library(ffmpeg_config INTERFACE)

#TODO:[cmake] COMMON DEFINES (config.h)
# create list with all that and then pick required from that list in each target
target_compile_definitions(ffmpeg_config INTERFACE FFMPEG_CONFIGURATION="")
target_compile_definitions(ffmpeg_config INTERFACE FFMPEG_DATADIR="")
target_compile_definitions(ffmpeg_config INTERFACE AVCONV_DATADIR="")
target_compile_definitions(ffmpeg_config INTERFACE FFMPEG_LICENSE="")

target_compile_definitions(ffmpeg_config INTERFACE CC_IDENT="")

target_compile_definitions(ffmpeg_config INTERFACE HAVE_THREADS=0)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_PTHREADS=0)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_W32THREADS=0)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_OS2THREADS=0)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_ISNAN=0)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_MMXEXT=0)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_MMX2=HAVE_MMXEXT)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_MMX2=HAVE_MMXEXT)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_MMX_INLINE=0)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_MMX=0)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_AV_CONFIG_H=1)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_ALTIVEC=0)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_MMXEXT_INLINE=0)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_NEON=0)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_AMD3DNOW_INLINE=0)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_X86ASM=0)
if(WIN32)
 target_compile_definitions(ffmpeg_config INTERFACE HAVE_MKSTEMP=0)
else()
 target_compile_definitions(ffmpeg_config INTERFACE HAVE_MKSTEMP=1)
endif()


#TODO:[cmake] detect each function and set to 0 if missing (they are in math.h)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_CBRT=1)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_CBRTF=1)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_COPYSIGN=1)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_ERF=1)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_HYPOT=1)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_RINT=1)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_LRINT=1)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_LRINTF=1)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_ROUND=1)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_ROUNDF=1)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_TRUNC=1)
target_compile_definitions(ffmpeg_config INTERFACE HAVE_TRUNCF=1)


target_link_libraries(ffmpeg_config INTERFACE ffmpeg_compat)

include (TestBigEndian)
TEST_BIG_ENDIAN(IS_BIG_ENDIAN)
if(IS_BIG_ENDIAN)
 target_compile_definitions(ffmpeg_config INTERFACE HAVE_BIGENDIAN=1)
else()
 target_compile_definitions(ffmpeg_config INTERFACE HAVE_BIGENDIAN=0)
endif()

target_compile_definitions(ffmpeg_config INTERFACE av_restrict=)

target_compile_definitions(ffmpeg_config INTERFACE CONFIG_THIS_YEAR=2021)

target_compile_definitions(ffmpeg_config INTERFACE CONFIG_MEMORY_POISONING=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_FRAME_THREAD_ENCODER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_MEMORY_POISONING=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_GRAY=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_ERROR_RESILIENCE=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_MPEGVIDEODEC=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_SMALL=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_H264_D3D11VA_HWACCEL=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_H264_DXVA2_HWACCEL=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_H264_NVDEC_HWACCEL=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_H264_VAAPI_HWACCEL=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_H264_VIDEOTOOLBOX_HWACCEL=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_H264_VDPAU_HWACCEL=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_NETWORK=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_XVMC=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_FORMAT_FILTER=1)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_PNG_DECODER=1)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_APNG_DECODER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_INFLATE_WRAPPER=1)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_DEFLATE_WRAPPER=1)

target_compile_definitions(ffmpeg_config INTERFACE CONFIG_AVUTIL=1)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_AVCODEC=1)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_AVFORMAT=1)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_AVDEVICE=1)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_SWSCALE=1)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_SWRESAMPLE=1)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_POSTPROC=1)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_AVFILTER=1)



#CONFIG MUXERS
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_H264_MUXER=1)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE2_MUXER=1)

#CONFIG DEMUXERS
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE2_DEMUXER=1)

# look at the end of libavformat/img2dec.c file
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_BMP_PIPE_DEMUXER=1)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_CRI_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_DDS_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_DPX_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_EXR_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_GEM_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_GIF_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_J2K_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_JPEG_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_JPEGLS_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_PAM_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_PBM_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_PCX_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_PGM_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_PGMYUV_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_PGX_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_PHOTOCD_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_PICTOR_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_PNG_PIPE_DEMUXER=1)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_PPM_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_PSD_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_QDRAW_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_SGI_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_SUNRAST_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_SVG_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_TIFF_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_WEBP_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_XBM_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_XPM_PIPE_DEMUXER=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_IMAGE_XWD_PIPE_DEMUXER=0)


#CONFIG PROTOCOLS
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_FILE_PROTOCOL=1)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_PIPE_PROTOCOL=1)

target_compile_definitions(ffmpeg_config INTERFACE CONFIG_ZLIB=0)
target_compile_definitions(ffmpeg_config INTERFACE CONFIG_SWSCALE_ALPHA=0)

target_compile_definitions(ffmpeg_config INTERFACE ARCH_X86_32=0)
target_compile_definitions(ffmpeg_config INTERFACE ARCH_X86_64=0)
target_compile_definitions(ffmpeg_config INTERFACE ARCH_AARCH64=0)
target_compile_definitions(ffmpeg_config INTERFACE ARCH_ARM=0)
target_compile_definitions(ffmpeg_config INTERFACE ARCH_PPC=0)
target_compile_definitions(ffmpeg_config INTERFACE ARCH_X86=0)
target_compile_definitions(ffmpeg_config INTERFACE ARCH_MIPS=0)
target_compile_definitions(ffmpeg_config INTERFACE ARCH_ALPHA=0)
target_compile_definitions(ffmpeg_config INTERFACE ARCH_LOONGARCH=0)
target_compile_definitions(ffmpeg_config INTERFACE ARCH_LOONGARCH64=0)

target_compile_definitions(ffmpeg_config INTERFACE SWS_MAX_FILTER_SIZE=256)

#_________________________WARNINGS__________________________________________
#TODO[cmake]: set it for all targets individually or remove for WARNING HELL
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
 add_compile_options("-w")
endif()

if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
 add_compile_options("-w")
endif()

if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
 cmake_policy(SET CMP0092 NEW) #cmake disable std MSVC warnings in CMAKE_C_FLAGS
 #CMAKE_DEPFILE_FLAGS_C var in windows contains only /showIncludes and produce include tree
 set(CMAKE_DEPFILE_FLAGS_C "") #erase it
 add_compile_options("/w")
endif()

file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/include/config.h "//cmake config will define all that")
target_include_directories(ffmpeg_config INTERFACE ${CMAKE_CURRENT_BINARY_DIR}/include)

#TODO[cmake]: resolve config_components.h
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/include/config_components.h "//")
target_include_directories(ffmpeg_config INTERFACE ${CMAKE_CURRENT_BINARY_DIR}/include)

add_subdirectory(compat)
add_subdirectory(libavutil)
add_subdirectory(libavcodec)
add_subdirectory(libavformat)
add_subdirectory(libavdevice)
add_subdirectory(libavfilter)
add_subdirectory(libswresample)
add_subdirectory(libswscale)
add_subdirectory(libpostproc)

add_subdirectory(fftools)

add_subdirectory(doc/examples)


find_path(AVCODEC_INCLUDE_DIR libavcodec/avcodec.h)
find_library(AVCODEC_LIBRARY avcodec)

find_path(AVFORMAT_INCLUDE_DIR libavformat/avformat.h)
find_library(AVFORMAT_LIBRARY avformat)

find_path(AVDEVICE_INCLUDE_DIR libavdevice/avdevice.h)
find_library(AVDEVICE_LIBRARY avdevice)

find_path(AVCODEC_INCLUDE_DIR libavcodec/avcodec.h)
find_library(AVCODEC_LIBRARY avcodec)

if(APPLE)
 list(APPEND EXTRA_LIBS
 "-framework OpenGL"
 )

 configure_file(
 ${CMAKE_CURRENT_SOURCE_DIR}/assets/MacOSXBundleInfo.plist.in
 ${CMAKE_CURRENT_BINARY_DIR}/assets/MacOSXBundleInfo.plist
 )

 set_target_properties(FFMPEG PROPERTIES
 MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_BINARY_DIR}/assets/MacOSXBundleInfo.plist
 )

elseif(WIN32)
 list(APPEND EXTRA_LIBS
 "-lglu32 -lopengl32"
 )
 set(CMAKE_EXE_LINKER_FLAGS "-std=gnu99 -static -static-libgcc -static-libstdc++ -mwindows")
else()
 list(APPEND EXTRA_LIBS
 "-lGL -lGLU -lX11"
 )
endif()


#target_link_libraries(Interview ${CORELIBS})

set( CMAKE_C_FLAGS "-lswresample")

list(APPEND EXTRA_LIBS
"-lGL -lGLU -lX11 -lz -lva -lswresample"
)

target_include_directories(ffmpeg_config INTERFACE
 ${AVCODEC_INCLUDE_DIR} 
 ${AVFORMAT_INCLUDE_DIR}
 ${AVUTIL_INCLUDE_DIR}
 ${AVDEVICE_INCLUDE_DIR} 
 ${OPENGL_INCLUDE_DIR}
 ${GLEW_INCLUDE_DIRS}
)

target_link_libraries(ffmpeg_config INTERFACE
 ${AVCODEC_LIBRARY} 
 ${AVFORMAT_LIBRARY} 
 ${AVUTIL_LIBRARY} 
 ${AVDEVICE_LIBRARY} 
 ${OPENGL_LIBRARY}
 ${GLEW_LIBRARIES}
)



Ubuntu 22.04, cmake 3.16.3, ffmpeg version git-2022-05-20-cb47f66


-
FFMPEG killed - not much information for troubleshooting
26 juin 2022, par Daniel Shencan't find out what might be causing this killed. Any tips ? or what kind of logs might help to troubleshoot ? It just says 'KILLED'.


This FFMPEG is installed in my AWS Linux (centos rhel fedora)
I am quite confident the file is OK as the ffmpeg runs ok on my local macos (but different ffmpeg installation from brew).


Stream mapping:
 Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
 Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
[libx264 @ 0x927f20] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
[libx264 @ 0x927f20] profile High, level 5.1
[libx264 @ 0x927f20] 264 - core 148 r2795 aaa9aa8 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=3 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'fail.mp4':= 0kB time=-577014:32:22.77 bitrate= -0.0kbits/s speed=N/A 
 Metadata:
 major_brand : mp42
 minor_version : 0
 compatible_brands: mp42mp41
 encoder : Lavf57.83.100
 Stream #0:0(eng): Video: h264 (libx264) (avc1 / 0x31637661), yuv420p(progressive), 3840x2160, q=-1--1, 30 fps, 15360 tbn, 30 tbc (default)
 Metadata:
 creation_time : 2022-04-27T17:14:43.000000Z
 handler_name : Alias Data Handler
 encoder : Lavc57.107.100 libx264
 Side data:
 cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
 Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default)
 Metadata:
 creation_time : 2022-04-27T17:14:45.000000Z
 handler_name : Alias Data Handler
 encoder : Lavc57.107.100 aac
Killed 37 fps= 18 q=0.0 size= 0kB time=00:00:01.00 bitrate= 0.0kbits/s speed=0.484x



Here is my FFMPEG


ffmpeg version N-60236-gffb000fff8-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2022 the FFmpeg developers
 built with gcc 8 (Debian 8.3.0-6)
 configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg
 libavutil 57. 18.100 / 57. 18.100
 libavcodec 59. 20.100 / 59. 20.100
 libavformat 59. 17.100 / 59. 17.100
 libavdevice 59. 5.100 / 59. 5.100
 libavfilter 8. 25.100 / 8. 25.100
 libswscale 6. 5.100 / 6. 5.100
 libswresample 4. 4.100 / 4. 4.100
 libpostproc 56. 4.100 / 56. 4.100
Hyper fast Audio and Video encoder



I just got a debug log


Successfully opened the file.
Parsing a group of options: output url failed.mp4.
Successfully parsed a group of options.
Opening an output file: failed.mp4.
[file @ 0x6c3d340] Setting default whitelist 'file,crypto,data'
Successfully opened the file.
detected 2 logical cores
[h264 @ 0x6c407c0] nal_unit_type: 7(SPS), nal_ref_idc: 1
[h264 @ 0x6c407c0] nal_unit_type: 8(PPS), nal_ref_idc: 1
Stream mapping:
 Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
 Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0x6c407c0] nal_unit_type: 7(SPS), nal_ref_idc: 1
[h264 @ 0x6c407c0] nal_unit_type: 8(PPS), nal_ref_idc: 1
[h264 @ 0x6c407c0] nal_unit_type: 6(SEI), nal_ref_idc: 0
[h264 @ 0x6c407c0] nal_unit_type: 5(IDR), nal_ref_idc: 1
[h264 @ 0x6c407c0] Format yuv420p chosen by get_format().
[h264 @ 0x6c407c0] Reinit context to 3840x2160, pix_fmt: yuv420p
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0x6c407c0] no picture 
[h264 @ 0x6c44900] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0x70354c0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0x6c407c0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1
[graph 0 input from stream 0:0 @ 0x6fe9780] Setting 'video_size' to value '3840x2160'
[graph 0 input from stream 0:0 @ 0x6fe9780] Setting 'pix_fmt' to value '0'
[graph 0 input from stream 0:0 @ 0x6fe9780] Setting 'time_base' to value '1/30000'
[graph 0 input from stream 0:0 @ 0x6fe9780] Setting 'pixel_aspect' to value '0/1'
[graph 0 input from stream 0:0 @ 0x6fe9780] Setting 'frame_rate' to value '30/1'
[graph 0 input from stream 0:0 @ 0x6fe9780] w:3840 h:2160 pixfmt:yuv420p tb:1/30000 fr:30/1 sar:0/1
[format @ 0x77af200] Setting 'pix_fmts' to value 'yuv420p|yuvj420p|yuv422p|yuvj422p|yuv444p|yuvj444p|nv12|nv16|nv21|yuv420p10le|yuv422p10le|yuv444p10le|nv20le|gray|gray10le'
[AVFilterGraph @ 0x6fe8a00] query_formats: 4 queried, 3 merged, 0 already done, 0 delayed
[libx264 @ 0x70e7800] using mv_range_thread = 360
[libx264 @ 0x70e7800] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2 AVX512
[libx264 @ 0x70e7800] profile High, level 5.1, 4:2:0, 8-bit
[libx264 @ 0x70e7800] 264 - core 164 r3081 19856cc - H.264/MPEG-4 AVC codec - Copyleft 2003-2021 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=3 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Clipping frame in rate conversion by 0.000008
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
cur_dts is invalid st:1 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0x6c44900] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
cur_dts is invalid st:1 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0x70354c0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
cur_dts is invalid st:1 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0x6c407c0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
cur_dts is invalid st:1 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0x6c44900] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
cur_dts is invalid st:1 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0x70354c0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
cur_dts is invalid st:1 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0x6c407c0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
cur_dts is invalid st:1 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[graph_1_in_0_1 @ 0x6fc91c0] Setting 'time_base' to value '1/48000'
[graph_1_in_0_1 @ 0x6fc91c0] Setting 'sample_rate' to value '48000'
[graph_1_in_0_1 @ 0x6fc91c0] Setting 'sample_fmt' to value 'fltp'
[graph_1_in_0_1 @ 0x6fc91c0] Setting 'channel_layout' to value '0x3'
[graph_1_in_0_1 @ 0x6fc91c0] tb:1/48000 samplefmt:fltp samplerate:48000 chlayout:0x3
[format_out_0_1 @ 0x70e6a80] Setting 'sample_fmts' to value 'fltp'
[format_out_0_1 @ 0x70e6a80] Setting 'sample_rates' to value '96000|88200|64000|48000|44100|32000|24000|22050|16000|12000|11025|8000|7350'
[AVFilterGraph @ 0x70f2400] query_formats: 4 queried, 9 merged, 0 already done, 0 delayed
Output #0, mp4, to 'failed.mp4':
 Metadata:
 major_brand : mp42
 minor_version : 0
 compatible_brands: mp42mp41
 encoder : Lavf59.17.100
 Stream #0:0(eng), 0, 1/15360: Video: h264, 1 reference frame (avc1 / 0x31637661), yuv420p(tv, bt709, progressive, left), 3840x2160 (0x0), 0/1, q=2-31, 30 fps, 15360 tbn (default)
 Metadata:
 creation_time : 2022-04-27T17:14:43.000000Z
 handler_name : ?Mainconcept Video Media Handler
 vendor_id : [0][0][0][0]
 encoder : Lavc59.20.100 libx264
 Side data:
 cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
 Stream #0:1(eng), 0, 1/48000: Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, delay 1024, 128 kb/s (default)
 Metadata:
 creation_time : 2022-04-27T17:14:45.000000Z
 handler_name : #Mainconcept MP4 Sound Media Handler
 vendor_id : [0][0][0][0]
 encoder : Lavc59.20.100 aac
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
cur_dts is invalid st:1 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
 Last message repeated 14 times
[h264 @ 0x6c44900] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0x70354c0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0x6c407c0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0x6c44900] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0x70354c0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0x6c407c0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0x6c44900] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0x70354c0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0x6c407c0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0x6c44900] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
 Last message repeated 16 times
[h264 @ 0x70354c0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0x6c407c0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0x6c44900] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0x70354c0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0x6c407c0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0x6c44900] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0x70354c0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0x6c407c0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0x6c44900] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0x70354c0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
 Last message repeated 15 times
[h264 @ 0x6c407c0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0x6c44900] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0x70354c0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0x6c407c0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0x6c44900] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0x70354c0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0x6c407c0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0x6c44900] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0x70354c0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0x6c407c0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
 Last message repeated 16 times
[h264 @ 0x6c44900] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0x70354c0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0x6c407c0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
Killed



-
Video conversion (using ffmpeg) fails only on apache server
25 avril 2022, par wb.waldemarI'm trying to convert a video using latest static build of ffmpeg and following command :


ffmpeg -report -y -loglevel info -i en--story-video.mp4 -c:v libx264 -preset slow -crf 22 -c:a copy en--story-video-out.mp4



This works actually fine on Ubuntu (desktop) and the same command works also on Win 10 but not on the server (Debian GNU/Linux 10) where it should actually work. I can't install or build ffmpeg directly so I've to use a static build. Also simple remux works on the server but not the converion and I do not understand why. I've also read and tried different approaches and suggestions, but none of them could solve the problem.


Does someone have an idea what goes wrong ?


ffmpeg started on 2022-04-22 at 13:02:44
Report written to "ffmpeg-20220422-130244.log"
Log level: 48
Command line:
/dev/tools/ffmpeg -report -y -loglevel info -i en--story-video.mp4 -c:v libx264 -preset slow -crf 22 -c:a copy en--story-video-out.mp4
ffmpeg version N-60837-ge81242bb13-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2022 the FFmpeg developers
 built with gcc 8 (Debian 8.3.0-6)
 configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libfribidi --enable-libass --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg
 libavutil 57. 22.100 / 57. 22.100
 libavcodec 59. 21.103 / 59. 21.103
 libavformat 59. 17.102 / 59. 17.102
 libavdevice 59. 5.100 / 59. 5.100
 libavfilter 8. 27.100 / 8. 27.100
 libswscale 6. 5.100 / 6. 5.100
 libswresample 4. 4.100 / 4. 4.100
 libpostproc 56. 4.100 / 56. 4.100
Splitting the commandline.
Reading option '-report' ... matched as option 'report' (generate a report) with argument '1'.
Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'info'.
Reading option '-i' ... matched as input url with argument 'en--story-video.mp4'.
Reading option '-c:v' ... matched as option 'c' (codec name) with argument 'libx264'.
Reading option '-preset' ... matched as AVOption 'preset' with argument 'slow'.
Reading option '-crf' ... matched as AVOption 'crf' with argument '22'.
Reading option '-c:a' ... matched as option 'c' (codec name) with argument 'copy'.
Reading option 'en--story-video-out.mp4' ... matched as output url.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option report (generate a report) with argument 1.
Applying option y (overwrite output files) with argument 1.
Applying option loglevel (set logging level) with argument info.
Successfully parsed a group of options.
Parsing a group of options: input url en--story-video.mp4.
Successfully parsed a group of options.
Opening an input file: en--story-video.mp4.
[NULL @ 0xb9b3b80] Opening 'en--story-video.mp4' for reading
[file @ 0xb9b41c0] Setting default whitelist 'file,crypto,data'
[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb9b3b80] Format mov,mp4,m4a,3gp,3g2,mj2 probed with size=2048 and score=100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb9b3b80] ISO: File Type Major Brand: isom
[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb9b3b80] Unknown dref type 0x206c7275 size 12
[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb9b3b80] Processing st: 0, edit list 0 - media time: 512, duration: 522240
[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb9b3b80] Offset DTS by 512 to make first pts zero.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb9b3b80] Setting codecpar->delay to 2 for stream st: 0
[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb9b3b80] Unknown dref type 0x206c7275 size 12
[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb9b3b80] Processing st: 1, edit list 0 - media time: 0, duration: 1502222
[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb9b3b80] Before avformat_find_stream_info() pos: 15666151 bytes read:88959 seeks:1 nb_streams:2
[h264 @ 0xb9b6380] nal_unit_type: 7(SPS), nal_ref_idc: 3
[h264 @ 0xb9b6380] nal_unit_type: 8(PPS), nal_ref_idc: 3
[h264 @ 0xb9b6380] nal_unit_type: 7(SPS), nal_ref_idc: 3
[h264 @ 0xb9b6380] nal_unit_type: 8(PPS), nal_ref_idc: 3
[h264 @ 0xb9b6380] nal_unit_type: 6(SEI), nal_ref_idc: 0
[h264 @ 0xb9b6380] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 0xb9b6380] Format yuv420p chosen by get_format().
[h264 @ 0xb9b6380] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0xb9b6380] no picture 
[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb9b3b80] All info found
[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb9b3b80] After avformat_find_stream_info() pos: 43534 bytes read:155045 seeks:2 frames:4
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'en--story-video.mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf59.17.102
 Duration: 00:00:34.06, start: 0.000000, bitrate: 3679 kb/s
 Stream #0:0[0x1](und), 3, 1/15360: Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 3544 kb/s, 60 fps, 60 tbr, 15360 tbn (default)
 Metadata:
 handler_name : ISO Media file produced by Google Inc. Created on: 04/10/2019.
 vendor_id : [0][0][0][0]
 Stream #0:1[0x2](eng), 1, 1/44100: Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)
 Metadata:
 handler_name : ISO Media file produced by Google Inc. Created on: 04/10/2019.
 vendor_id : [0][0][0][0]
Successfully opened the file.
Parsing a group of options: output url en--story-video-out.mp4.
Applying option c:v (codec name) with argument libx264.
Applying option c:a (codec name) with argument copy.
Successfully parsed a group of options.
Opening an output file: en--story-video-out.mp4.
[file @ 0xb9fbec0] Setting default whitelist 'file,crypto,data'
Successfully opened the file.
detected 20 logical cores
[h264 @ 0xba04680] nal_unit_type: 7(SPS), nal_ref_idc: 3
[h264 @ 0xba04680] nal_unit_type: 8(PPS), nal_ref_idc: 3
Stream mapping:
 Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
 Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0xba04680] nal_unit_type: 6(SEI), nal_ref_idc: 0
[h264 @ 0xba04680] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 0xba04680] Format yuv420p chosen by get_format().
[h264 @ 0xba04680] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0xba04680] no picture 
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0xbaa3b80] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2
[h264 @ 0xbaa3b80] no picture 
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0xba067c0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0xba9c2c0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0xba21fc0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0xbab8e80] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0xbac7b00] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0xbad6840] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0xbae5580] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0xbaf42c0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0xbb03000] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0xbb11d40] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0xbb20a80] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0xbb2f7c0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0xbb3e500] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0xbb4d240] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0xba04680] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
[h264 @ 0xbaa3b80] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2
[graph 0 input from stream 0:0 @ 0xba9f800] Setting 'video_size' to value '1920x1080'
[graph 0 input from stream 0:0 @ 0xba9f800] Setting 'pix_fmt' to value '0'
[graph 0 input from stream 0:0 @ 0xba9f800] Setting 'time_base' to value '1/15360'
[graph 0 input from stream 0:0 @ 0xba9f800] Setting 'pixel_aspect' to value '1/1'
[graph 0 input from stream 0:0 @ 0xba9f800] Setting 'frame_rate' to value '60/1'
[graph 0 input from stream 0:0 @ 0xba9f800] w:1920 h:1080 pixfmt:yuv420p tb:1/15360 fr:60/1 sar:1/1
[format @ 0xbaa0540] Setting 'pix_fmts' to value 'yuv420p|yuvj420p|yuv422p|yuvj422p|yuv444p|yuvj444p|nv12|nv16|nv21|yuv420p10le|yuv422p10le|yuv444p10le|nv20le|gray|gray10le'
[AVFilterGraph @ 0xba16380] query_formats: 4 queried, 3 merged, 0 already done, 0 delayed
[libx264 @ 0xba03c80] using mv_range_thread = 24
[libx264 @ 0xba03c80] using SAR=1/1
[libx264 @ 0xba03c80] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
[AVIOContext @ 0xb9fba00] Statistics: 0 bytes written, 0 seeks, 0 writeouts
[AVIOContext @ 0xb9b4480] Statistics: 220581 bytes read, 2 seeks
Conversion failed!