Recherche avancée

Médias (0)

Mot : - Tags -/diogene

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (61)

  • Mise à jour de la version 0.1 vers 0.2

    24 juin 2013, par

    Explications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
    Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Dépôt de média et thèmes par FTP

    31 mai 2013, par

    L’outil MédiaSPIP traite aussi les média transférés par la voie FTP. Si vous préférez déposer par cette voie, récupérez les identifiants d’accès vers votre site MédiaSPIP et utilisez votre client FTP favori.
    Vous trouverez dès le départ les dossiers suivants dans votre espace FTP : config/ : dossier de configuration du site IMG/ : dossier des média déjà traités et en ligne sur le site local/ : répertoire cache du site web themes/ : les thèmes ou les feuilles de style personnalisées tmp/ : dossier de travail (...)

Sur d’autres sites (10914)

  • Getting error "DLL load failed while importing rect : %1 is not a valid Win32 application" while importing package

    17 août 2020, par Sagar Donadkar

    I am using cython package to call Cpp API and in my cpp code i am using ffmpeg library and able to build my code successfully using bellow command

    


    python setup.py build_ext --inplace --compiler=msvc


    


    but when i try to import generated pyd file then i get error

    


    PS D:\SiVUE\Backend\Cython\demo> python&#xA;Python 3.8.3 (tags/v3.8.3:6f8c832, May 13 2020, 22:20:19) [MSC v.1925 32 bit (Intel)] on win32&#xA;Type "help", "copyright", "credits" or "license" for more information.&#xA;>>> import rect&#xA;Traceback (most recent call last):&#xA;  File "<stdin>", line 1, in <module>&#xA;ImportError: DLL load failed while importing rect: %1 is not a valid Win32 application.&#xA;>>> &#xA;</module></stdin>

    &#xA;

    My entire code is provided bellow

    &#xA;

    header file&#xA;#ifndef RECTANGLE_H&#xA;#define RECTANGLE_H&#xA;#include <iostream>&#xA;&#xA;extern "C"&#xA;{&#xA;    #include "libavformat/avformat.h"&#xA;    #include "libavutil/dict.h"&#xA;}&#xA;&#xA;using namespace std;&#xA;&#xA;namespace shapes &#xA;{&#xA;    class Rectangle {&#xA;        public:&#xA;            int x0, y0, x1, y1;&#xA;            Rectangle();&#xA;            Rectangle(int x0, int y0, int x1, int y1);&#xA;            ~Rectangle();&#xA;            int getArea();&#xA;            int ffmpegFile();&#xA;            void getSize(int* width, int* height);&#xA;            void move(int dx, int dy);&#xA;    };&#xA;}&#xA;&#xA;#endif&#xA;</iostream>

    &#xA;

    Rectangle.Cpp file in ffmpegFile() i am calling mostly ffmpeg API

    &#xA;

    &#xA;#include <iostream>&#xA;#include "Rectangle.hpp"&#xA;&#xA;namespace shapes {&#xA;    &#xA;&#xA;    // Default constructor&#xA;    Rectangle::Rectangle () {}&#xA;&#xA;    // Overloaded constructor&#xA;    Rectangle::Rectangle (int x0, int y0, int x1, int y1) {&#xA;        this->x0 = x0;&#xA;        this->y0 = y0;&#xA;        this->x1 = x1;&#xA;        this->y1 = y1;&#xA;    }&#xA;&#xA;    // Destructor&#xA;    Rectangle::~Rectangle () {}&#xA;&#xA;    // Return the area of the rectangle&#xA;    int Rectangle::getArea () {&#xA;        return 10;&#xA;    }&#xA;&#xA;    // Get the size of the rectangle.&#xA;    // Put the size in the pointer args&#xA;    void Rectangle::getSize (int *width, int *height) {&#xA;        (*width) = x1 - x0;&#xA;        (*height) = y1 - y0;&#xA;    }&#xA;&#xA;    // Move the rectangle by dx dy&#xA;    void Rectangle::move (int dx, int dy) {&#xA;        this->x0 &#x2B;= dx;&#xA;        this->y0 &#x2B;= dy;&#xA;        this->x1 &#x2B;= dx;&#xA;        this->y1 &#x2B;= dy;&#xA;    }&#xA;    int Rectangle::ffmpegFile()&#xA;    {&#xA;        AVFormatContext *fmt_ctx = NULL;&#xA;        AVDictionaryEntry *tag = NULL;&#xA;        int ret = 0;&#xA;        char* filename = "D:\\Discovery.mp4";&#xA;&#xA;        if ((ret = avformat_open_input(&amp;fmt_ctx, filename, NULL, NULL)))&#xA;            return ret;&#xA;&#xA;        if ((ret = avformat_find_stream_info(fmt_ctx, NULL)) &lt; 0) {&#xA;            av_log(NULL, AV_LOG_ERROR, "Cannot find stream information\n");&#xA;            return ret;&#xA;        }&#xA;&#xA;        while ((tag = av_dict_get(fmt_ctx->metadata, "", tag, AV_DICT_IGNORE_SUFFIX)))&#xA;            printf("%s=%s\n", tag->key, tag->value);&#xA;&#xA;        avformat_close_input(&amp;fmt_ctx);&#xA;        return ret;&#xA;    }&#xA;}&#xA;</iostream>

    &#xA;

    Rectangle.pxd file declaration for cpp file function and variable

    &#xA;

    cdef extern from "Rectangle.cpp":&#xA;    pass&#xA;cdef extern from "Rectangle.hpp" namespace "shapes":&#xA;    cdef cppclass Rectangle:&#xA;        Rectangle() except &#x2B;&#xA;        Rectangle(int, int, int, int) except &#x2B;&#xA;        int x0, y0, x1, y1&#xA;        int getArea()&#xA;        void getSize(int* width, int* height)&#xA;        void move(int, int)&#xA;        int ffmpegFile()&#xA;

    &#xA;

    rect.pyx file i am calling cpp API

    &#xA;

    # distutils: language = c&#x2B;&#x2B;&#xA;&#xA;from Rectangle cimport Rectangle&#xA;&#xA;cdef class PyRectangle:&#xA;    cdef Rectangle c_rect  # Hold a C&#x2B;&#x2B; instance which we&#x27;re wrapping&#xA;&#xA;    def __cinit__(self, int x0, int y0, int x1, int y1):&#xA;        self.c_rect = Rectangle(x0, y0, x1, y1)&#xA;&#xA;    def get_area(self):&#xA;        return self.c_rect.getArea()&#xA;&#xA;    def get_size(self):&#xA;        cdef int width, height&#xA;        self.c_rect.getSize(&amp;width, &amp;height)&#xA;        return width, height&#xA;&#xA;    def move(self):&#xA;        print(self.c_rect.ffmpegFile())&#xA;

    &#xA;

    setup.py&#xA;I provided pyx file and ffmpeg library path as well as include path

    &#xA;

    from distutils.core import setup&#xA;from setuptools import Extension&#xA;from Cython.Build import cythonize &#xA;&#xA;sfc_module = [Extension(&#x27;rect&#x27;, sources = [&#x27;rect.pyx&#x27;],&#xA;                       include_dirs = [&#x27;D:\\SiVUE\\Backend\\Cython\\demo\\ffmpeg\\include\\&#x27;],&#xA;                       library_dirs = [&#x27;D:\\SiVUE\\Backend\\Cython\\demo\\ffmpeg\\lib\\&#x27;],&#xA;                       libraries = [&#x27;avcodec&#x27;,&#x27;avdevice&#x27;,&#x27;avfilter&#x27;,&#x27;avformat&#x27;,&#x27;avutil&#x27;,&#x27;postproc&#x27;,&#x27;swresample&#x27;,&#x27;swscale&#x27;],&#xA;                       language=&#x27;c&#x2B;&#x2B;&#x27;)]&#xA;&#xA;setup(name = &#x27;superfastcode&#x27;, version = &#x27;1.0&#x27;,&#xA;    description = &#x27;Python Package with superfastcode C&#x2B;&#x2B; extension&#x27;,&#xA;    ext_modules = cythonize(sfc_module),&#xA;    include_dirs = [&#x27;D:\\SiVUE\\Backend\\Cython\\demo\\ffmpeg\\include\\&#x27;]&#xA;    )&#xA;

    &#xA;

    Thank You

    &#xA;

  • Sound is lost when concatenate several videos with ffmpeg

    18 août 2020, par Yevhenii Molodtsov

    I have a python script that generates an FFmpeg command and then runs it with shell.&#xA;Everything is going okay (the videos are concatenated, the needed cross-dissolve effect is also great), but there are two problems I am trying to fix :

    &#xA;

      &#xA;
    1. The output loses the sound.
    2. &#xA;

    3. The output is frizzing a little bit (it seems like there are about 10 fps).
    4. &#xA;

    &#xA;

    The example of command generatede by the script is here :

    &#xA;

    ffmpeg -i /tmp/media/import-2020-Aug-18-Tuesday-08-31-10/temp_8ce3c8ac-&#xA;1379-4a16-b141-ebdc910e1142.mp4 -i /tmp/media/import-2020-Aug-18-&#xA;Tuesday-08-31-10/temp_d9f60ffb-0a83-4052-8ebb-620a574d1871.mp4 -i &#xA;/tmp/media/import-2020-Aug-18-Tuesday-08-31-10/temp_93934eaa-9589-4736-&#xA;8d11-fd8c1bdf0b92.mp4  -filter_complex "&#xA;[0:v]trim=start=0:end=4.038,setpts=PTS-STARTPTS[clip0];&#xA;[1:v]trim=start=2:end=4.038,setpts=PTS-STARTPTS[clip1];&#xA;[2:v]trim=start=2,setpts=PTS-STARTPTS[clip2];&#xA;[0:v]trim=start=5.038:end=6.038,setpts=PTS-STARTPTS[out0];&#xA;[1:v]trim=start=5.038:end=6.038,setpts=PTS-STARTPTS[out1];&#xA;[1:v]trim=start=0:end=2,setpts=PTS-STARTPTS[in1];&#xA;[2:v]trim=start=0:end=2,setpts=PTS-STARTPTS[in2];&#xA;[in1]format=pix_fmts=yuva420p,fade=t=in:st=0:d=2:alpha=1[fadein1];&#xA;[in2]format=pix_fmts=yuva420p,fade=t=in:st=0:d=2:alpha=1[fadein2];&#xA;[out0]format=pix_fmts=yuva420p,fade=t=out:st=0:d=2:alpha=1[fadeout0];&#xA;[out1]format=pix_fmts=yuva420p,fade=t=out:st=0:d=2:alpha=1[fadeout1];&#xA;[fadein1]fifo[fadein1fifo];[fadein2]fifo[fadein2fifo];&#xA;[fadeout0]fifo[fadeout0fifo];[fadeout1]fifo[fadeout1fifo];[fadeout0fifo]&#xA;[fadein1fifo]overlay[crossfade0];[fadeout1fifo]&#xA;[fadein2fifo]overlay[crossfade1];[clip0][crossfade0][clip1][crossfade1]&#xA;[clip2]concat=n=5[output]" -map "[output]" &#xA;/tmp/media/final/some_filename_c8e898b2-e3f7-4656-b3b9-1e8fb93cd75c.mp4&#xA;

    &#xA;

    I would much appreciate any help because I am new to this tool and here I got stuck.

    &#xA;

  • PHP ffmpeg convert GIF to MP4

    17 août 2020, par Eduard Unruh

    I use this code to convert GIFs to MP4 :

    &#xA;

    $videoname = str_replace(&#x27;.gif&#x27;, &#x27;.mp4&#x27;, $picname);&#xA;$ffmpeg = FFMpeg\FFMpeg::create(array(&#xA;    &#x27;ffmpeg.binaries&#x27;  => &#x27;ffmpeg/bin/ffmpeg.exe&#x27;,&#xA;    &#x27;ffprobe.binaries&#x27; => &#x27;ffmpeg/bin/ffprobe.exe&#x27;,&#xA;    &#x27;timeout&#x27;          => 6600, // The timeout for the underlying process&#xA;    &#x27;ffmpeg.threads&#x27;   => 12,   // The number of threads that FFMpeg should use&#xA;), $logger);&#xA;&#xA;$video = $ffmpeg->open(&#x27;memes/&#x27; . $folder . &#x27;/&#x27; . $picname);&#xA;&#xA;$format = new \FFMpeg\Format\Video\X264(&#x27;libvo_aacenc&#x27;, &#x27;libx264&#x27;);&#xA;$format->setAdditionalParameters(array(&#x27;-profile:v&#x27;, &#x27;baseline&#x27;, &#x27;-pix_fmt&#x27;, &#x27;yuv420p&#x27;));&#xA;&#xA;$video&#xA;    ->save($format, &#x27;memes/&#x27; . $folder . &#x27;/&#x27; . $videoname);&#xA;

    &#xA;

    Some GIFs are getting converted but some not, this is the error message :

    &#xA;

    [16-Aug-2020 14:47:21 Europe/Berlin] PHP Fatal error:  Uncaught Alchemy\BinaryDriver\Exception\ExecutionFailureException: ffmpeg failed to execute command "ffmpeg/bin/ffmpeg.exe" -y -i "memes/38/Dr5W6yzR_gif_38.gif" -threads 12 -vcodec libx264 -acodec libvo_aacenc -b:v 1000k -refs 6 -coder 1 -sc_threshold 40 -flags &#x2B;loop -me_range 16 -subq 7 -i_qfactor 0.71 -qcomp 0.6 -qdiff 4 -trellis 1 -b:a 128k -profile:v baseline -pix_fmt yuv420p -pass 1 -passlogfile "C:\Windows\TEMP\ffmpeg-passes5f392ad8ba750qewzr/pass-5f392ad8bb9b7" "memes/38/Dr5W6yzR_gif_38.mp4":&#xA;&#xA;Error Output:&#xA;&#xA; ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers&#xA;  built with gcc 9.2.1 (GCC) 20200122&#xA;  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --e in C:\Inetpub\vhosts\yolol.de\vendor\php-ffmpeg\php-ffmpeg\src\FFMpeg\Media\AbstractVideo.php on line 106&#xA;

    &#xA;

    What is all this crap ?

    &#xA;

    Please help !

    &#xA;

    EDIT :

    &#xA;

    This is what I'm getting when running this code in cmd :

    &#xA;

    ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers&#xA;  built with gcc 9.2.1 (GCC) 20200122&#xA;  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt&#xA;  libavutil      56. 31.100 / 56. 31.100&#xA;  libavcodec     58. 54.100 / 58. 54.100&#xA;  libavformat    58. 29.100 / 58. 29.100&#xA;  libavdevice    58.  8.100 / 58.  8.100&#xA;  libavfilter     7. 57.100 /  7. 57.100&#xA;  libswscale      5.  5.100 /  5.  5.100&#xA;  libswresample   3.  5.100 /  3.  5.100&#xA;  libpostproc    55.  5.100 / 55.  5.100&#xA;Input #0, gif, from &#x27;C://ttt.gif&#x27;:&#xA;  Duration: 00:00:03.08, start: 0.000000, bitrate: 10411 kb/s&#xA;    Stream #0:0: Video: gif, bgra, 636x357, 14.25 fps, 14.29 tbr, 100 tbn, 100 tbc&#xA;Stream mapping:&#xA;  Stream #0:0 -> #0:0 (gif (native) -> h264 (libx264))&#xA;Press [q] to stop, [?] for help&#xA;[libx264 @ 0000021dca771a40] height not divisible by 2 (636x357)&#xA;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&#xA;Conversion failed!&#xA;

    &#xA;

    So the error is height not divisible by 2 (636x357) I guess, but what would be the solution ?

    &#xA;