Recherche avancée

Médias (1)

Mot : - Tags -/copyleft

Autres articles (74)

  • 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 (...)

  • Supporting all media types

    13 avril 2011, par

    Unlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, 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 (...)

Sur d’autres sites (9210)

  • AWS Lambda Docker image with librosa and ffmpeg

    4 août 2022, par loretoparisi

    I'm using this Dockerfile to build an image for AWS Lambda having librosa and ffmpeg with python3.7 :

    


    ARG FUNCTION_DIR="/function"
FROM python:3.7.4-slim-buster as build-image

# librosa and ffmpeg dependencies
RUN apt-get update && apt-get install -y \
    software-properties-common \
    libsndfile1-dev \
    ffmpeg

# Install aws-lambda-cpp build dependencies
RUN apt-get update && \
  apt-get install -y \
  g++ \
  make \
  cmake \
  unzip \
  libcurl4-openssl-dev

# Include global arg in this stage of the build
ARG FUNCTION_DIR
# Create function directory
RUN mkdir -p ${FUNCTION_DIR}

# Copy function code
COPY app.py ${FUNCTION_DIR}

# Install the runtime interface client
RUN pip install \
        --target ${FUNCTION_DIR} \
        awslambdaric

# Multi-stage build: grab a fresh copy of the base image
FROM python:3.7.4-slim-buster

# Include global arg in this stage of the build
ARG FUNCTION_DIR
# Set working directory to function root directory
WORKDIR ${FUNCTION_DIR}

# Copy in the build image dependencies
COPY --from=build-image ${FUNCTION_DIR} ${FUNCTION_DIR}

EXPOSE 8080
ENTRYPOINT [ "/usr/local/bin/python", "-m", "awslambdaric" ]
CMD [ "app.handler" ]


    


    The build works ok, but I cannot run the image :

    


    docker run -e AWS_LAMBDA_RUNTIME_API=localhost:9000 --rm -it -p 9000:8080  lambda:latest&#xA;Executing &#x27;app.handler&#x27; in function directory &#x27;/function&#x27;&#xA;[ERROR] [1628271126733] LAMBDA_RUNTIME Failed to get next invocation. No Response from endpoint&#xA;Traceback (most recent call last):&#xA;  File "/usr/local/lib/python3.7/runpy.py", line 193, in _run_module_as_main&#xA;    "__main__", mod_spec)&#xA;  File "/usr/local/lib/python3.7/runpy.py", line 85, in _run_code&#xA;    exec(code, run_globals)&#xA;  File "/function/awslambdaric/__main__.py", line 21, in <module>&#xA;    main(sys.argv)&#xA;  File "/function/awslambdaric/__main__.py", line 17, in main&#xA;    bootstrap.run(app_root, handler, lambda_runtime_api_addr)&#xA;  File "/function/awslambdaric/bootstrap.py", line 399, in run&#xA;    event_request = lambda_runtime_client.wait_next_invocation()&#xA;  File "/function/awslambdaric/lambda_runtime_client.py", line 76, in wait_next_invocation&#xA;    response_body, headers = runtime_client.next()&#xA;RuntimeError: Failed to get next&#xA;</module>

    &#xA;

    I therefore tried this simplified Dockerfile that is based on the AWS EC2 CentOS with package manager yum :

    &#xA;

    FROM public.ecr.aws/lambda/python:3.8&#xA;&#xA;# libsndfile&#xA;RUN curl -o libsndfile-1.0.28-alt1.x86_64.rpm http://ftp.altlinux.org/pub/distributions/ALTLinux/Sisyphus/x86_64/RPMS.classic//libsndfile-1.0.28-alt1.x86_64.rpm &#xA;RUN curl -o libsndfile-devel-1.0.28-alt1.x86_64.rpm http://ftp.altlinux.org/pub/distributions/ALTLinux/Sisyphus/x86_64/RPMS.classic//libsndfile-devel-1.0.28-alt1.x86_64.rpm&#xA;#ffmpeg&#xA;RUN curl -o ffmpeg-4.4-alt5.x86_64.rpm  http://ftp.altlinux.org/pub/distributions/ALTLinux/Sisyphus/x86_64/RPMS.classic//ffmpeg-4.4-alt5.x86_64.rpm &#xA;&#xA;RUN yum localinstall \&#xA;    libsndfile-devel-1.0.28-alt1.x86_64.rpm \&#xA;    fmpeg-4.4-alt5.x86_64.rpm&#xA;&#xA;# Create function directory&#xA;WORKDIR /app&#xA;&#xA;# Copy function code&#xA;COPY app.py .&#xA;&#xA;COPY requirements.txt .&#xA;RUN pip install -r requirements.txt&#xA;&#xA;EXPOSE 8080&#xA;# Set the CMD to your handler (could also be done as a parameter override outside of the Dockerfile)&#xA;CMD ["/app/app.handler"]&#xA;

    &#xA;

    In this case, the image builds and run and I can invoke the handler :

    &#xA;

    docker run --rm -it -p 9000:8080  lambda:latest&#xA;INFO[0000] exec &#x27;/var/runtime/bootstrap&#x27; (cwd=/app, handler=) &#xA;curl -XPOST "http://localhost:9000/2015-03-31/functions/function/invocations" -d &#x27;{}&#x27;&#xA;

    &#xA;

    but I librosa complains about the libsndfile1 installation :

    &#xA;

    Traceback (most recent call last):&#xA;  File "/var/runtime/bootstrap.py", line 452, in main&#xA;    request_handler = _get_handler(handler)&#xA;  File "/var/runtime/bootstrap.py", line 46, in _get_handler&#xA;    m = imp.load_module(modname, file_handle, pathname, desc)&#xA;  File "/var/lang/lib/python3.8/imp.py", line 234, in load_module&#xA;    return load_source(name, filename, file)&#xA;  File "/var/lang/lib/python3.8/imp.py", line 171, in load_source&#xA;    module = _load(spec)&#xA;  File "<frozen>", line 702, in _load&#xA;  File "<frozen>", line 671, in _load_unlocked&#xA;  File "<frozen>", line 848, in exec_module&#xA;  File "<frozen>", line 219, in _call_with_frames_removed&#xA;  File "/app/app.py", line 7, in <module>&#xA;    import librosa&#xA;  File "/var/lang/lib/python3.8/site-packages/librosa/__init__.py", line 211, in <module>&#xA;    from . import core&#xA;  File "/var/lang/lib/python3.8/site-packages/librosa/core/__init__.py", line 6, in <module>&#xA;    from .audio import *  # pylint: disable=wildcard-import&#xA;  File "/var/lang/lib/python3.8/site-packages/librosa/core/audio.py", line 8, in <module>&#xA;    import soundfile as sf&#xA;  File "/var/lang/lib/python3.8/site-packages/soundfile.py", line 142, in <module>&#xA;    raise OSError(&#x27;sndfile library not found&#x27;)&#xA;OSError: sndfile library not found&#xA;&#xA;During handling of the above exception, another exception occurred:&#xA;&#xA;    Traceback (most recent call last):&#xA;      File "/var/runtime/bootstrap.py", line 480, in <module>&#xA;        main()&#xA;      File "/var/runtime/bootstrap.py", line 457, in main&#xA;        lambda_runtime_client.post_init_error(to_json(error_result))&#xA;      File "/var/runtime/lambda_runtime_client.py", line 42, in post_init_error&#xA;        response = runtime_connection.getresponse()&#xA;      File "/var/lang/lib/python3.8/http/client.py", line 1344, in getresponse&#xA;        response.begin()&#xA;      File "/var/lang/lib/python3.8/http/client.py", line 307, in begin&#xA;        version, status, reason = self._read_status()&#xA;      File "/var/lang/lib/python3.8/http/client.py", line 276, in _read_status&#xA;        raise RemoteDisconnected("Remote end closed connection without"&#xA;    http.client.RemoteDisconnected: Remote end closed connection without response&#xA;    WARN[0023] First fatal error stored in appctx: Runtime.ExitError &#xA;    WARN[0023] Process 16(bootstrap) exited: Runtime exited with error: exit status 1 &#xA;    ERRO[0023] Init failed                                   InvokeID= error="Runtime exited with error: exit status 1"&#xA;    WARN[0023] Failed to send default error response: ErrInvalidInvokeID &#xA;    ERRO[0023] INIT DONE failed: Runtime.ExitError          &#xA;    WARN[0023] Reset initiated: ReserveFail &#xA;</module></module></module></module></module></module></frozen></frozen></frozen></frozen>

    &#xA;

    The strange thing in this case (yum and rmp) is that the installation seems to work fine :

    &#xA;

    => CACHED [2/9] RUN curl -o libsndfile-1.0.28-alt1.x86_64.rpm http://ftp.altlinux.org/pub/distributions/ALTLinux/Sisyphus/x86_64/RPMS.classic//libsndfile-1.0.2  0.0s&#xA; => CACHED [3/9] RUN curl -o libsndfile-devel-1.0.28-alt1.x86_64.rpm http://ftp.altlinux.org/pub/distributions/ALTLinux/Sisyphus/x86_64/RPMS.classic//libsndfile  0.0s&#xA; => CACHED [4/9] RUN curl -o ffmpeg-4.4-alt5.x86_64.rpm  http://ftp.altlinux.org/pub/distributions/ALTLinux/Sisyphus/x86_64/RPMS.classic//ffmpeg-4.4-alt5.x86_64  0.0s&#xA; => CACHED [5/9] RUN yum localinstall     libsndfile-devel-1.0.28-alt1.x86_64.rpm     fmpeg-4.4-alt5.x86_64.rpm  &#xA;

    &#xA;

  • Error trying to load ffmpeg library in dart

    24 juillet 2021, par Vinícius Pereira

    I'm a new programmer in de Dart world and I'm trying some stuff to learn more.&#xA;I'm trying to create a application that outputs audio from a file. I checked pub and I haven't found anything that suits my needs. So I found about dart:ffi and about ffmpeg capabilities.

    &#xA;

    For the past few days I'm trying to load the ffmpeg libraries (avcodec, avformat, etc.) into my code but I haven't succeded.

    &#xA;

    This is my code.

    &#xA;

    var libraryPath = path.join(Directory.current.path, &#x27;bin&#x27;, &#x27;avcodec.dll&#x27;);&#xA;final dylib = ffi.DynamicLibrary.open(libraryPath);&#xA;

    &#xA;

    This is the error I got :

    &#xA;

    Exception has occurred.&#xA;ArgumentError (Invalid argument(s): Failed to load dynamic library &#x27;C:\Users\[MYUSER]\Documents\Code\Dart\ffmpeg\bin\avcodec.dll&#x27;: 126)&#xA;

    &#xA;

    What I've tried so far :

    &#xA;

      &#xA;
    • Checked the path, it's right ;
    • &#xA;

    • Tried to import another library (sqlite3) with success ;
    • &#xA;

    • Tried to compile the DLLs myself and also tried prebuilt ones (from the links on ffmpeg site)
    • &#xA;

    &#xA;

    My dart version Dart SDK version: 2.13.4 (stable) on "windows_x64"

    &#xA;

    Whats the procedure to properly use the ffmpeg library with dart ?

    &#xA;

  • C# on linux : FFmpeg (FFMediaToolkit) on linux System.IO.DirectoryNotFoundException : Cannot found the default FFmpeg directory

    6 mai 2021, par Jan Černý

    I have C# project in rider and FFMediaToolkit installed via NuGet. I made instance of MediaBuilder. When I hit run I get this error message :

    &#xA;

    /home/john/Projects/Slimulator/bin/Debug/net5.0/Slimulator /home/john/Projects/Slimulator/test_mazes/small-maze-food2.png&#xA;Loading file /home/john/Projects/Slimulator/test_mazes/small-maze-food2.png&#xA;Unhandled exception. System.IO.DirectoryNotFoundException: Cannot found the default FFmpeg directory.&#xA;On Windows you have to set "FFmpegLoader.FFmpegPath" with full path to the directory containing FFmpeg shared build ".dll" files&#xA;For more informations please see https://github.com/radek-k/FFMediaToolkit#setup&#xA;   at FFMediaToolkit.FFmpegLoader.LoadFFmpeg()&#xA;   at FFMediaToolkit.Encoding.Internal.OutputContainer.Create(String extension)&#xA;   at FFMediaToolkit.Encoding.MediaBuilder..ctor(String path, Nullable`1 format)&#xA;   at FFMediaToolkit.Encoding.MediaBuilder.CreateContainer(String path)&#xA;   at Slimulator.AnimationBuffer..ctor(String videoPath, Int32 height, Int32 width, Int32 frameRate) in /home/john/Projects/Slimulator/AnimationBuffer.cs:line 11&#xA;   at Slimulator.Simulation..ctor(Space space, String seed, String outputVideoPath) in /home/john/Projects/Slimulator/Simulation.cs:line 12&#xA;   at Slimulator.Launcher.Main(String[] args) in /home/john/Projects/Slimulator/Launcher.cs:line 8&#xA;&#xA;Process finished with exit code 134.&#xA;

    &#xA;

    When I go to https://github.com/radek-k/FFMediaToolkit#setup I find just this :

    &#xA;

    &#xA;

    Linux - Download FFmpeg using your package manager.

    &#xA;

    You need to set FFmpegLoader.FFmpegPath with a full path to FFmpeg libraries.

    &#xA;

    If you want to use 64-bit FFmpeg, you have to disable the Build -> Prefer 32-bit option in&#xA;Visual Studio project properties.

    &#xA;

    &#xA;

    I have already installed FFmpeg package via pacman and I am still getting these error.

    &#xA;

    How can I fix this so I can use FFMediaToolkit without problem on linux ?
    &#xA;Thank you for help

    &#xA;

    EDIT1 : I use Arch linux.&#xA;EDIT2 : There is related issue on github : https://github.com/radek-k/FFMediaToolkit/issues/80

    &#xA;