Recherche avancée

Médias (1)

Mot : - Tags -/bug

Autres articles (63)

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

Sur d’autres sites (10545)

  • How to apply 2 filters drawtext and drawbox using FFMPEG

    9 juillet 2017, par user6972

    I’m having problems combining filters. I’m trying to take video from the camera, apply a timer on it and also overlay a box in the center. I can put a time code (local time and pts) using the -vf drawtext command no problems :

    ffmpeg -f video4linux2 -input_format mjpeg -s 1280x720 -i /dev/video0 \
    -vf "drawtext=fontfile=/usr/share/fonts/truetype/freefont/FreeSerif.ttf: \
    text='%{localtime} %{pts\:hms}':  fontcolor=white: fontsize=24: box=1: \
    boxcolor=black@0.8: boxborderw=5: x=0: y=0" -vcodec libx264 \
    -preset ultrafast -f mp4 -pix_fmt yuv420p -y output.mp4

    Then I have one that draws a small box using drawbox :

    ffmpeg -f video4linux2 -input_format mjpeg -s 1280x720 -i /dev/video0 \
    -filter_complex " drawbox=x=iw/2:y=0:w=10:h=ih:color=red@0.1": \
    -vcodec libx264 -preset ultrafast -f mp4 -pix_fmt yuv420p -y output.mp4

    I assumed I could combine these with the filter_complex switch and separate them using the semicolon like this

    ffmpeg -f video4linux2 -input_format mjpeg -s 1280x720 -i /dev/video0 -filter_complex "drawtext=fontfile=/usr/share/fonts/truetype/freefont/FreeSerif.ttf: text='%{localtime} %{pts\:hms}':  fontcolor=white: fontsize=24: box=1: boxcolor=black@0.8;drawbox=x=iw/2:y=0:w=10:h=ih:color=red@0.1": -vcodec libx264 -preset ultrafast -f mp4 -pix_fmt yuv420p -y output.mp4

    But it fails to find the input stream on the second filter :

    Input #0, video4linux2,v4l2, from ’/dev/video0’ :

    Duration : N/A, start : 10651.720690, bitrate : N/A

    Stream #0:0 : Video : mjpeg, yuvj422p(pc, bt470bg/unknown/unknown), 1280x720, -5 kb/s, 30 fps, 30 tbr, 1000k tbn, 1000k tbc

    Cannot find a matching stream for unlabeled input pad 0 on filter Parsed_drawbox_1

    I tried to direct it to [0] like this :

    ffmpeg -f video4linux2 -input_format mjpeg -s 1280x720 -i /dev/video0 -filter_complex " \
    drawtext=fontfile=/usr/share/fonts/truetype/freefont/FreeSerif.ttf: \
    text='%{localtime} %{pts\:hms}':  fontcolor=white: fontsize=24: box=1: \
    boxcolor=black@0.8;[0] drawbox=x=iw/2:y=0:w=10:h=ih:color=red@0.1": \
    -vcodec libx264 -preset ultrafast -f mp4 -pix_fmt yuv420p -y output.mp4

    But it fails to put the box on the output.

    So I tried to split streams like this

    ffmpeg -f video4linux2 -input_format mjpeg -s 1280x720 -i /dev/video0 -filter_complex " \
    split [main][tmp];\
    [main] drawtext=fontfile=/usr/share/fonts/truetype/freefont/FreeSerif.ttf: \
    text='%{localtime} %{pts\:hms}':  fontcolor=white: fontsize=24: box=1: boxcolor=black@0.8 [tmp];\
    [main] drawbox=x=iw/2:y=0:w=10:h=ih:color=red@0.1 [tmp2]; [tmp][tmp2] overlay": \
    -vcodec libx264 -preset ultrafast -f mp4 -pix_fmt yuv420p -y output.mp4

    But my build doesn’t have the overlay filter complied with it. At this point I decided to stop and ask if I’m making this harder than it should be. The end result is I just want a timer and a box drawn on the video. Is there a better way or a formatting trick to do this ?

    Thanks

  • How do I include FFMpeg for development in a windows program ?

    4 août 2024, par Lama Mao

    I'm trying to follow a tutorial about using the FFMpeg libraries to extract frames from videos in C++ (by Bartholomew).

    


    In order to include the libraries, according to the tutorial, it is advised to use pkg-config to find the libraries and put them together so that CMake can include them. In the video he uses homebrew to install ffmpeg and somehow pkg-config is able to find the header files for ffmpeg (libavcodec, libavformat, libavdevice ...)

    


    The problem is I don't know how to get the ffmpeg libraries installed so that pkg-config can find them.

    


    On windows, I've tried installing the compiled windows binaries, and I've tried installing ffmpeg-full package using chocolatey. However, I fail to see where these header files are installed to.

    


    There's a ffmpeg folder in C:/ffmpeg/ but when I look in that there's no header files or libraries, just the binaries. Perhaps I need to clone the entire source project, but then how is pkg-config supposed to find them ? When I try and compile I get this output :

    


     Found PkgConfig: C:/Strawberry/perl/bin/pkg-config.bat (found version "0.26") 
 Checking for module 'libavcodec'
 Can't find libavcodec.pc in any of C:/Strawberry/c/lib/pkgconfig
 use the PKG_CONFIG_PATH environment variable, or
 specify extra search paths via 'search_paths'
 CMake Error at C:/Program Files/CMake/share/cmake-3.24/Modules/FindPkgConfig.cmake:607 (message):
 A required package was not found
 Call Stack (most recent call first):
 C:/Program Files/CMake/share/cmake-3.24/Modules/FindPkgConfig.cmake:829 (_pkg_check_modules_internal)
 lib/FFMpeg/CMakeLists.txt:5 (pkg_check_modules)
 Checking for module 'libavcodec'        <----- here
 Can't find libavcodec.pc in any of C:/Strawberry/c/lib/pkgconfig
 use the PKG_CONFIG_PATH environment variable, or
 specify extra search paths via 'search_paths'
 CMake Error at C:/Program Files/CMake/share/cmake-3.24/Modules/FindPkgConfig.cmake:607 (message):
 A required package was not found
 Call Stack (most recent call first):
 C:/Program Files/CMake/share/cmake-3.24/Modules/FindPkgConfig.cmake:829 (_pkg_check_modules_internal)
 lib/FFMpeg/CMakeLists.txt:5 (pkg_check_modules)


    


    The contents of C:/Strawberry/c/lib/pkgconfig seem to be a whole load of libraries none of which are from ffmpeg.

    


    In case the problem is in my CMakeLists file, here are the contents of the subdirectory file :

    


    cmake_minimum_required(VERSION 3.9)
project(FFMpeg)

find_package(PkgConfig REQUIRED)
pkg_check_modules(AVCODEC    REQUIRED    IMPORTED_TARGET libavcodec)
pkg_check_modules(AVFILTER   REQUIRED    IMPORTED_TARGET libavformat)
pkg_check_modules(AVDEVICE   REQUIRED    IMPORTED_TARGET libavdevice)
pkg_check_modules(AVUTIL     REQUIRED    IMPORTED_TARGET libavutil)
pkg_check_modules(SWRESAMPLE REQUIRED    IMPORTED_TARGET libswresample)
pkg_check_modules(SWSCALE    REQUIRED    IMPORTED_TARGET libswscale)

add_library(FFMpeg INTERFACE IMPORTED GLOBAL)

target_include_directories(
    FFmpeg INTERFACE
    ${AVCODEC_INCLUDE_DIRS}
    ${AVFILTER_INCLUDE_DIRS}
    ${AVDEVICE_INCLUDE_DIRS}
    ${AVUTIL_INCLUDE_DIRS}
    ${SWRESAMPLE_INCLUDE_DIRS}
    ${SWSCALE_INCLUDE_DIRS}
)

target_link_options(
    FFmpeg INTERFACE
    ${AVCODEC_LDFLAGS}
    ${AVFILTER_LDFLAGS}
    ${AVDEVICE_LDFLAGS}
    ${AVUTIL_LDFLAGS}
    ${SWRESAMPLE_LDFLAGS}
    ${SWSCALE_LDFLAGS}
)


    


    What have I done wrong/am not understanding ?

    


  • Unknown encoder 'libvorbis'

    5 juin 2015, par Aisha

    I am facing problem in converting videos by using ffmpeg. Its installed and all the libraries are also there. but using certain commands its showing for different encoders that they are Unknown.

    Unknown libvorbis

    Unknown libvpx

    Unknown libogg
    etc

    Can anyone help please.

    /bin$ ffmpeg
    ffmpeg version 0.10.15 Copyright (c) 2000-2014 the FFmpeg developers
     built on Aug 30 2014 15:49:19 with gcc 4.4.7 20120313 (Red Hat 4.4.7-3)
     configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' --enable-bzlib --disable-crystalhd --enable-gnutls --enable-libass --enable-libcdio --enable-libcelt --enable-libdc1394 --disable-indev=jack --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-openal --enable-libopenjpeg --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libx264 --enable-libxvid --enable-x11grab --enable-avfilter --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-runtime-cpudetect
     libavutil      51. 35.100 / 51. 35.100
     libavcodec     53. 61.100 / 53. 61.100
     libavformat    53. 32.100 / 53. 32.100
     libavdevice    53.  4.100 / 53.  4.100
     libavfilter     2. 61.100 /  2. 61.100
     libswscale      2.  1.100 /  2.  1.100
     libswresample   0.  6.100 /  0.  6.100
     libpostproc    52.  0.100 / 52.  0.100
    Hyper fast Audio and Video encoder
    usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

    Use -h to get full help or, even better, run 'man ffmpeg'