Recherche avancée

Médias (91)

Autres articles (102)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

  • L’agrémenter visuellement

    10 avril 2011

    MediaSPIP est basé sur un système de thèmes et de squelettes. Les squelettes définissent le placement des informations dans la page, définissant un usage spécifique de la plateforme, et les thèmes l’habillage graphique général.
    Chacun peut proposer un nouveau thème graphique ou un squelette et le mettre à disposition de la communauté.

  • Possibilité de déploiement en ferme

    12 avril 2011, par

    MediaSPIP peut être installé comme une ferme, avec un seul "noyau" hébergé sur un serveur dédié et utilisé par une multitude de sites différents.
    Cela permet, par exemple : de pouvoir partager les frais de mise en œuvre entre plusieurs projets / individus ; de pouvoir déployer rapidement une multitude de sites uniques ; d’éviter d’avoir à mettre l’ensemble des créations dans un fourre-tout numérique comme c’est le cas pour les grandes plate-formes tout public disséminées sur le (...)

Sur d’autres sites (8056)

  • No such file or directory : 'ffmpeg' in Django/Docker

    6 avril 2024, par tthheemmaannii

    I run my Django code in Docker. I run transcription software that requires ffmpeg to function. However I've been getting the error [Errno 2] No such file or directory: 'ffmpeg' whenever I try to run my code.

    


    Here's my views.py :

    


    def initiate_transcription(request, session_id):
    ...
                with open(file_path, 'rb') as f:
                    path_string = f.name
                    transcript = transcribe_file(path_string,audio_language, output_file_type)

   ...


    


    Here's my Dockerfile :

    


    # Pull base image
FROM python:3.11.4-slim-bullseye

# Set environment variables
ENV PIP_NO_CACHE_DIR off
ENV PIP_DISABLE_PIP_VERSION_CHECK 1
ENV PYTHONUNBUFFERED 1
ENV PYTHONDONTWRITEBYTECODE 1
ENV COLUMNS 80

#install Debian and other dependencies that are required to run python apps(eg. git, python-magic).
RUN apt-get update \
 && apt-get install -y --force-yes \
 nano python3-pip gettext chrpath libssl-dev libxft-dev \
 libfreetype6 libfreetype6-dev  libfontconfig1 libfontconfig1-dev\
  && rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install -y git
RUN apt-get update && apt-get install -y libmagic-dev
RUN apt-get -y update && apt-get -y upgrade && apt-get install -y --no-install-recommends ffmpeg


# Set working directory for Docker image
WORKDIR /code/

RUN apt-get update \
    && apt-get -y install libpq-dev gcc

# Install dependencies
COPY requirements.txt .
RUN pip install -r requirements.txt

# Copy project
COPY . .


    


    I've searched online for possible solutions but have not been able to find anything similar to my problem

    


  • Parsing the STDERR output of node.js child_process line by line

    3 janvier 2012, par primer

    I'm writing a simple online conversion tool using FFMPEG and Node.js. I'm trying to figure out how to parse each line of the conversion output received from FFMPEG and only display pertinent results client side in the browser. In my case I want the encoding time counter that FFMPEG spits out on the command line.

    My function thus far is :

    function metric(ffmpeg, res) {

     ffmpeg.stdout.on('data', function(data) {
        res.writeHead(200, {'content-type': 'text/html'});
        res.write('received upload:\n\n');
        console.log(data);
     });

     ffmpeg.stderr.on('data', function (data) {
        var temp += data.toString();
               var lines = temp.split('\n');

               //for debugging purposes
               for(var i = 0;icode>

    What this ends up returning is multiple arrays, each of which includes the data from the previous array as well as the next data chunk. For example, the function returns array 1 :0=>A, 1=>B, array 2 :0=>A, 1=>B, 2=>C, array 3 :0=>A, 1=>B, 2=>C, 3=>D, and so on.

    I'm quite new to Node so I'm probably missing something simple. Any guidance would be much appreciated !

  • Ffmpeg compression cron cutting video to 1 second

    6 août 2022, par BlackThorn

    I have a cron setup to take locally uploaded videos, create a screengrab, compress the video and upload to online storage. I am using ffmpeg with php and have tried a few different ways but though it does compress the file size I keep getting a saved file of just the first second of the video. I tried delaying the process in case it just didn't have enough time to do the video and that was the cause but it didn't seem to do much. Here are some of the examples of the code I've tried all together (commented out as tried each but you can see the different ways) :

    


    try {
    // compress video if needed
    $bitrate = "5000k";
    // $command = "ffmpeg -i ".($temp_dir."/".$folder."/".$sub_file)." -b:v $bitrate -bufsize $bitrate ".$temp_dir."/".$folder."/edit-".$sub_file;
    // $command = "ffmpeg -i $temp_video -qscale 0 ".$temp_dir."/".$folder."/edit-".$sub_file;
    $command = "ffmpeg -i ".($temp_dir."/".$folder."/".$sub_file)." -vf scale=1280:-1 -c:v libx264 -preset veryslow -crf 24 ".$temp_dir."/".$folder."/edit-".$sub_file;
    //system($command);
    $output=null;
    $retval=null;
    exec($command, $output, $retval);
    $temp_video = $temp_dir."/".$folder."/edit-".$sub_file."";
} catch (Exception $e) {
    // log output
}


    


    Is there a known issue with this or something I'm missing ?

    


    Thanks