
Recherche avancée
Médias (1)
-
Revolution of Open-source and film making towards open film making
6 octobre 2011, par
Mis à jour : Juillet 2013
Langue : English
Type : Texte
Autres articles (74)
-
MediaSPIP version 0.1 Beta
16 avril 2011, parMediaSPIP 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, parUnlike 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, parMediaSPIP 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 loretoparisiI'm using this
Dockerfile
to build an image for AWS Lambda havinglibrosa
andffmpeg
withpython3.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
Executing 'app.handler' in function directory '/function'
[ERROR] [1628271126733] LAMBDA_RUNTIME Failed to get next invocation. No Response from endpoint
Traceback (most recent call last):
 File "/usr/local/lib/python3.7/runpy.py", line 193, in _run_module_as_main
 "__main__", mod_spec)
 File "/usr/local/lib/python3.7/runpy.py", line 85, in _run_code
 exec(code, run_globals)
 File "/function/awslambdaric/__main__.py", line 21, in <module>
 main(sys.argv)
 File "/function/awslambdaric/__main__.py", line 17, in main
 bootstrap.run(app_root, handler, lambda_runtime_api_addr)
 File "/function/awslambdaric/bootstrap.py", line 399, in run
 event_request = lambda_runtime_client.wait_next_invocation()
 File "/function/awslambdaric/lambda_runtime_client.py", line 76, in wait_next_invocation
 response_body, headers = runtime_client.next()
RuntimeError: Failed to get next
</module>


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

FROM public.ecr.aws/lambda/python:3.8

# libsndfile
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 
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
#ffmpeg
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 

RUN yum localinstall \
 libsndfile-devel-1.0.28-alt1.x86_64.rpm \
 fmpeg-4.4-alt5.x86_64.rpm

# Create function directory
WORKDIR /app

# Copy function code
COPY app.py .

COPY requirements.txt .
RUN pip install -r requirements.txt

EXPOSE 8080
# Set the CMD to your handler (could also be done as a parameter override outside of the Dockerfile)
CMD ["/app/app.handler"]



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


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



but I
librosa
complains about thelibsndfile1
installation :

Traceback (most recent call last):
 File "/var/runtime/bootstrap.py", line 452, in main
 request_handler = _get_handler(handler)
 File "/var/runtime/bootstrap.py", line 46, in _get_handler
 m = imp.load_module(modname, file_handle, pathname, desc)
 File "/var/lang/lib/python3.8/imp.py", line 234, in load_module
 return load_source(name, filename, file)
 File "/var/lang/lib/python3.8/imp.py", line 171, in load_source
 module = _load(spec)
 File "<frozen>", line 702, in _load
 File "<frozen>", line 671, in _load_unlocked
 File "<frozen>", line 848, in exec_module
 File "<frozen>", line 219, in _call_with_frames_removed
 File "/app/app.py", line 7, in <module>
 import librosa
 File "/var/lang/lib/python3.8/site-packages/librosa/__init__.py", line 211, in <module>
 from . import core
 File "/var/lang/lib/python3.8/site-packages/librosa/core/__init__.py", line 6, in <module>
 from .audio import * # pylint: disable=wildcard-import
 File "/var/lang/lib/python3.8/site-packages/librosa/core/audio.py", line 8, in <module>
 import soundfile as sf
 File "/var/lang/lib/python3.8/site-packages/soundfile.py", line 142, in <module>
 raise OSError('sndfile library not found')
OSError: sndfile library not found

During handling of the above exception, another exception occurred:

 Traceback (most recent call last):
 File "/var/runtime/bootstrap.py", line 480, in <module>
 main()
 File "/var/runtime/bootstrap.py", line 457, in main
 lambda_runtime_client.post_init_error(to_json(error_result))
 File "/var/runtime/lambda_runtime_client.py", line 42, in post_init_error
 response = runtime_connection.getresponse()
 File "/var/lang/lib/python3.8/http/client.py", line 1344, in getresponse
 response.begin()
 File "/var/lang/lib/python3.8/http/client.py", line 307, in begin
 version, status, reason = self._read_status()
 File "/var/lang/lib/python3.8/http/client.py", line 276, in _read_status
 raise RemoteDisconnected("Remote end closed connection without"
 http.client.RemoteDisconnected: Remote end closed connection without response
 WARN[0023] First fatal error stored in appctx: Runtime.ExitError 
 WARN[0023] Process 16(bootstrap) exited: Runtime exited with error: exit status 1 
 ERRO[0023] Init failed InvokeID= error="Runtime exited with error: exit status 1"
 WARN[0023] Failed to send default error response: ErrInvalidInvokeID 
 ERRO[0023] INIT DONE failed: Runtime.ExitError 
 WARN[0023] Reset initiated: ReserveFail 
</module></module></module></module></module></module></frozen></frozen></frozen></frozen>


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

=> 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
 => 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
 => 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
 => CACHED [5/9] RUN yum localinstall libsndfile-devel-1.0.28-alt1.x86_64.rpm fmpeg-4.4-alt5.x86_64.rpm 



-
Error trying to load ffmpeg library in dart
24 juillet 2021, par Vinícius PereiraI'm a new programmer in de Dart world and I'm trying some stuff to learn more.
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.


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


This is my code.


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



This is the error I got :


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



What I've tried so far :


- 

- Checked the path, it's right ;
- Tried to import another library (sqlite3) with success ;
- Tried to compile the DLLs myself and also tried prebuilt ones (from the links on ffmpeg site)








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


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


-
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 ofMediaBuilder
. When I hit run I get this error message :

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

Process finished with exit code 134.



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




Linux - Download FFmpeg using your package manager.


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


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




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

How can I fix this so I can use
FFMediaToolkit
without problem on linux ?

Thank you for help

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