Recherche avancée

Médias (91)

Autres articles (82)

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

  • Menus personnalisés

    14 novembre 2010, par

    MediaSPIP utilise le plugin Menus pour gérer plusieurs menus configurables pour la navigation.
    Cela permet de laisser aux administrateurs de canaux la possibilité de configurer finement ces menus.
    Menus créés à l’initialisation du site
    Par défaut trois menus sont créés automatiquement à l’initialisation du site : Le menu principal ; Identifiant : barrenav ; Ce menu s’insère en général en haut de la page après le bloc d’entête, son identifiant le rend compatible avec les squelettes basés sur Zpip ; (...)

  • Déploiements possibles

    31 janvier 2010, par

    Deux types de déploiements sont envisageable dépendant de deux aspects : La méthode d’installation envisagée (en standalone ou en ferme) ; Le nombre d’encodages journaliers et la fréquentation envisagés ;
    L’encodage de vidéos est un processus lourd consommant énormément de ressources système (CPU et RAM), il est nécessaire de prendre tout cela en considération. Ce système n’est donc possible que sur un ou plusieurs serveurs dédiés.
    Version mono serveur
    La version mono serveur consiste à n’utiliser qu’une (...)

Sur d’autres sites (5970)

  • AWS Lambda Error : Cant find ffmpeg

    31 août 2016, par rpm

    I am building a lambda function that requires ffmpeg. The error that I am getting is :

    ERROR :: Error: Cannot find ffmpeg

    Relevant code to the problem is below...

    process.env['PATH'] = process.env['PATH'] + "/" + process.env['LAMBDA_TASK_ROOT']
    process.env['PATH'] = process.env['PATH'] + ':/tmp/'

    var ffmpeg = require('fluent-ffmpeg')

    exports.handler = (event, context, callback) => {

      var proc = new ffmpeg();

      proc.addInput('testfile.mp4)
      .on('start', function(ffmpegCommand) {
       })
      .on('progress', function(data) {
      })
      .on('end', function() {
      })
      .on('error', function(error) {
        /// ERROR IS HERE
      })
      .outputOptions(['-hls_time 10'])
      .output(fileName + '.m3u8')
      .run();

    }

    Here’s my ZIP structure :

    ./ffmpeg
    ./ffprobe
    ./index.js
    ./node_modules
    ./node_modules/aws-sdk
    ./node_modules/ffmpeg
    ./node_modules/fluent-ffmpeg
    ./package.json

    I’ve read around and have seen people mention chmod-ing ffmpeg and ffprobe, and I tried that using chmod 755 on both executables, and that didn’t work.

    Also read about having to change the path. I tried what I could, and was unsuccessful again. I am not sure where to turn from here, or how to further diagnose what I am doing wrong. Any help would be greatly appreciated. Thanks !

  • AWS Lambda Error : Cant find ffmpeg

    21 octobre 2022, par raisedandglazed

    I am building a lambda function that requires ffmpeg. The error that I am getting is :

    



    ERROR :: Error: Cannot find ffmpeg


    



    Relevant code to the problem is below...

    



    process.env['PATH'] = process.env['PATH'] + "/" + process.env['LAMBDA_TASK_ROOT']
process.env['PATH'] = process.env['PATH'] + ':/tmp/'

var ffmpeg = require('fluent-ffmpeg')

exports.handler = (event, context, callback) => {

   var proc = new ffmpeg();

   proc.addInput('testfile.mp4)
   .on('start', function(ffmpegCommand) {
    })
   .on('progress', function(data) {
   })
   .on('end', function() {
   })
   .on('error', function(error) {
     /// ERROR IS HERE
   })
   .outputOptions(['-hls_time 10'])
   .output(fileName + '.m3u8')
   .run();

}


    



    Here's my ZIP structure :

    



    ./ffmpeg
./ffprobe
./index.js
./node_modules
./node_modules/aws-sdk
./node_modules/ffmpeg
./node_modules/fluent-ffmpeg
./package.json


    



    I've read around and have seen people mention chmod-ing ffmpeg and ffprobe, and I tried that using chmod 755 on both executables, and that didn't work.

    



    Also read about having to change the path. I tried what I could, and was unsuccessful again. I am not sure where to turn from here, or how to further diagnose what I am doing wrong. Any help would be greatly appreciated. Thanks !

    


  • Docker fails to import FFMPEG or does not find it

    8 décembre 2022, par stxss

    So I'm trying to create a telegram bot using python and ffmpeg and I want to deploy it to a server through a docker image.

    


    I already looked through a lot of resources as I've been looking at the same 5 lines of code for the past three days and neither discords, stack overflow previous answers have helped me.

    


    This is my dockerfile where half of the program works (apart from the ffmpeg functionality).

    


    FROM python:3.9

RUN mkdir /app
WORKDIR /app

COPY requirements.txt ./
RUN pip3 install --no-cache-dir --user -r requirements.txt

COPY . .

ENTRYPOINT ["/usr/bin/python3", "./app.py" ]


    


    With this code I get the following error when trying to use a function that invokes ffmpeg functionality.

    


    Traceback (most recent call last):
File "/root/.local/lib/python3.9/site-packages/pyrogram/dispatcher.py", line 240, in handler_worker
await handler.callback(self.client, *args)
File "/app/./app.py", line 274, in choice_from_inline
await helpers.trim_file(trim_length, "audio", chat_id_for_join.strip())
File "/app/helpers.py", line 53, in trim_file
output = ffmpeg.output(
File "/root/.local/lib/python3.9/site-packages/ffmpeg/_run.py", line 313, in run
process = run_async(
File "/root/.local/lib/python3.9/site-packages/ffmpeg/_run.py", line 284, in run_async
return subprocess.Popen(
File "/usr/lib/python3.9/subprocess.py", line 951, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.9/subprocess.py", line 1823, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'ffmpeg'


    


    Another issue is that when changing the ENTRYPOINT (or using CMD) to ["python3", "./app.py" ] everything works well locally but as soon as I try to deploy, the deployment/docker container just doesn't work or crash because I get the error of ModuleNotFoundError: No module named 'ffmpeg'.

    


    I have already tried setting up different ENV PATH and ENV PYTHONPATH, does absolutely nothing.
I have tried to use COPY --from=jrottenberg/ffmpeg /usr/local ./ and it also doesn't work.
I have tried to explicitly use RUN apt-get install -y ffmpeg and similar commands, pip, pip3, etc.. it just doesn't work.

    


    I tried to use the copy command to access the /root/.local/lib/python3.9/site-packages/ffmpeg/_run.py but I either get a permission denied or a file does not exist error.

    


    I am also using the ffmpeg-python wrapper and am using a windows machine if that's of any importance.

    


    At this point I'm contemplating of finding another way of implementing the functionality I want without using ffmpeg.

    


    I think I added everything I had, if needed more I can provide.