Recherche avancée

Médias (91)

Autres articles (54)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

Sur d’autres sites (7613)

  • avcodec/msrledec : implement vertical offset in 4-bit RLE

    29 novembre 2016, par Daniel Verkamp
    avcodec/msrledec : implement vertical offset in 4-bit RLE
    

    The delta escape (2) is supposed to work the same in 4-bit RLE as in
    8-bit RLE. This is documented in the MSDN Bitmap Compression page :
    https://msdn.microsoft.com/en-us/library/windows/desktop/dd183383(v=vs.85).aspx

    The unchecked modification of line is safe, since the loop condition
    (line >= 0) will check it before any pixel data is written.

    Fixes ticket #5153 (output now matches ImageMagick for the provided sample).

    Signed-off-by : Daniel Verkamp <daniel@drv.nu>

    • [DH] libavcodec/msrledec.c
  • Not able to link ffmpeg library in cython package

    12 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 when i try to build my code i got and linking issue&#xA;In header file add include ffmpeg header file to call ffmpeg library function

    &#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 using ffmpeg example code to test ffmpeg my code where i call 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 form pyx file

    &#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 setuptools import setup,Extension&#xA;from Cython.Build import cythonize &#xA;&#xA;&#xA;directives={&#x27;linetrace&#x27;:False, &#x27;language_level&#x27;:3}&#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([&#xA;    Extension(&#xA;        &#x27;demo&#x27;,["rect.pyx"],&#xA;        include_dirs=[&#x27;ffmpeg\\include&#x27;],)&#xA;        library_dirs=["ffmpeg\\lib"],&#xA;        libraries=["avcodec","avformat","avutil","swscale","avdevice","avfilter","postproc","swresample"]),&#xA;        &#xA;]))&#xA;

    &#xA;

    getting below error

    &#xA;

    PS D:\SiVUE\Backend\Cython\demo> python setup.py build_ext --inplace&#xA;Compiling rect.pyx because it depends on .\Rectangle.pxd.&#xA;[1/1] Cythonizing rect.pyx&#xA;C:\python3.8\lib\site-packages\Cython\Compiler\Main.py:369: FutureWarning: Cython directive &#x27;language_level&#x27; not set, using 2 for now (Py2). This will change in a later release! File: D:\SiVUE\Backend\Cython\demo\rect.pyx&#xA;  tree = Parsing.p_module(s, pxd, full_module_name)&#xA;running build_ext&#xA;building &#x27;demo&#x27; extension&#xA;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\HostX86\x86\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -I. -Iffmpeg\include -IC:\python3.8\include -IC:\python3.8\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt" /EHsc /Tprect.cpp /Fobuild\temp.win32-3.8\Release\rect.obj&#xA;rect.cpp&#xA;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\HostX86\x86\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:ffmpeg\lib /LIBPATH:C:\python3.8\libs /LIBPATH:C:\python3.8\PCbuild\win32 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\lib\x86" "/LIBPATH:C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\lib\um\x86" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\ucrt\x86" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\um\x86" avcodec.lib avformat.lib avutil.lib swscale.lib avdevice.lib avfilter.lib postproc.lib swresample.lib /EXPORT:PyInit_demo build\temp.win32-3.8\Release\rect.obj /OUT:build\lib.win32-3.8\demo.cp38-win32.pyd /IMPLIB:build\temp.win32-3.8\Release\demo.cp38-win32.lib&#xA;   Creating library build\temp.win32-3.8\Release\demo.cp38-win32.lib and object build\temp.win32-3.8\Release\demo.cp38-win32.exp&#xA;rect.obj : error LNK2001: unresolved external symbol _avformat_open_input&#xA;rect.obj : error LNK2001: unresolved external symbol _av_log&#xA;rect.obj : error LNK2001: unresolved external symbol _avformat_close_input&#xA;rect.obj : error LNK2001: unresolved external symbol _avformat_find_stream_info&#xA;rect.obj : error LNK2001: unresolved external symbol _av_dict_get&#xA;build\lib.win32-3.8\demo.cp38-win32.pyd : fatal error LNK1120: 5 unresolved externals&#xA;error: command &#x27;C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.26.28801\\bin\\HostX86\\x86\\link.exe&#x27; failed with exit status 1120&#xA;

    &#xA;

    Thank You

    &#xA;

  • FFMpegCore .Net cuts off the fist few ( 1.5) seconds of audio

    28 mai 2024, par Tim

    I want to use FFMpegCore to convert some audio files to raw pcm. I noticed that this always cuts off 1.5 seconds of my audio from the start. I check my input stream, saved it to HD all good. If use it from cli with the same arguments everything seem fine. I tried -ss 0, no luck. This behavior is observed with .wav (RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, stereo 44100 Hz), same issue with different sample rate. I tested mp3 works fine.

    &#xA;

    public async Task<memorystream> ConvertToPcmStreamAsync(Stream inputStream)&#xA;{&#xA;    var outputStream = new MemoryStream();&#xA;    &#xA;    var audioInput = new StreamPipeSource(inputStream);&#xA;    var audioOutput = new StreamPipeSink(outputStream);&#xA;&#xA;    await FFMpegArguments&#xA;        .FromPipeInput(audioInput)&#xA;        .OutputToPipe(audioOutput, options => options&#xA;            .WithCustomArgument("-ss 0 -f s16le -acodec pcm_s16le -ac 1"))&#xA;        .ProcessAsynchronously();&#xA;&#xA;    // Reset the position of the memory stream to the beginning&#xA;    outputStream.Position = 0;&#xA;&#xA;    return outputStream;&#xA;}&#xA;</memorystream>

    &#xA;