Recherche avancée

Médias (0)

Mot : - Tags -/protocoles

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (53)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

Sur d’autres sites (8148)

  • Error compiling FFMPEG / libav code after adding avfilter

    9 mai 2020, par Daniel Kobe

    My encoding and decoding was working fine using ffmpeg and libav, but then I added a filter in the encoding step to rotate my video and it no longer works in my docker machine, BUT it does work locally.

    



    The error message when compiling in docker is

    



    //usr/local/lib/libavfilter.a(vf_pp.o): In function `pp_init':
/var/tmp/ffmpeg/libavfilter/vf_pp.c:56: undefined reference to `pp_get_mode_by_name_and_quality'
//usr/local/lib/libavfilter.a(vf_pp.o): In function `pp_uninit':
/var/tmp/ffmpeg/libavfilter/vf_pp.c:161: undefined reference to `pp_free_mode'
/var/tmp/ffmpeg/libavfilter/vf_pp.c:163: undefined reference to `pp_free_context'
//usr/local/lib/libavfilter.a(vf_pp.o): In function `pp_filter_frame':
/var/tmp/ffmpeg/libavfilter/vf_pp.c:142: undefined reference to `pp_postprocess'
//usr/local/lib/libavfilter.a(vf_pp.o): In function `pp_config_props':
/var/tmp/ffmpeg/libavfilter/vf_pp.c:115: undefined reference to `pp_get_context'
collect2: error: ld returned 1 exit status


    



    These are my relevant configurations in docker file

    



    # Install libx264 for video encoding.
RUN cd /var/tmp && curl -L http://ftp.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20190103-2245-stable.tar.bz2 > x264.tar.bz2 && \
    echo "21cb6e2bb660f863713fb9f752654c65191e032dac1329ec113786c69f0f75c1  x264.tar.bz2" > x264.sha256sum && \
    shasum -a 256 -c x264.sha256sum && \
    tar xjf x264.tar.bz2 && \
    cd x264-snapshot-20190103-2245-stable && \
    ./configure \
        --enable-static \
        --enable-pic \
        --disable-cli \
        --disable-avs \
        --disable-opencl && \
    make -j8 && \
    make install-lib-static

# Compile ffmpeg.
COPY ffmpeg.tar /var/tmp/ffmpeg.tar
RUN cd /var/tmp && tar xf ffmpeg.tar && \
    cd ffmpeg && \
    ./configure \
        --cc=/usr/bin/clang-6.0 \
        --cxx=/usr/bin/clang++-6.0 \
        --extra-libs="-lpthread" \
        --enable-gpl \
        # without pic - opencv will throw up errors
        --enable-pic \
        --enable-libx264 \
        --disable-network && \
     make -j 8 && \
     make install


    



    Not sure this is relevant but here are my flags

    



    LDFLAGS: -lavcodec -lavfilter -lswscale -lavutil -lswresample -lx264 -lm -lz


    



    Here's my local ffmpeg configuration and version

    



    ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
  built with Apple clang version 11.0.0 (clang-1100.0.33.17)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/4.2.2_2 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librubberband --enable-libsnappy --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-libsoxr --enable-videotoolbox --disable-libjack --disable-indev=jack
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100


    



    Here's the output from my docker machine

    



    ffmpeg version 4.1.1 Copyright (c) 2000-2019 the FFmpeg developers
  built with clang version 6.0.0-1~bpo9+1 (tags/RELEASE_600/final)
  configuration: --cc=/usr/bin/clang-6.0 --cxx=/usr/bin/clang++-6.0 --extra-libs=-lpthread --enable-gpl --enable-pic --enable-libx264 --disable-network
  libavutil      56. 22.100 / 56. 22.100
  libavcodec     58. 35.100 / 58. 35.100
  libavformat    58. 20.100 / 58. 20.100
  libavdevice    58.  5.100 / 58.  5.100
  libavfilter     7. 40.101 /  7. 40.101
  libswscale      5.  3.100 /  5.  3.100
  libswresample   3.  3.100 /  3.  3.100
  libpostproc    55.  3.100 / 55.  3.100


    



    How can I get my configuration fixed so it works like in local ? I didn't specifically configure my local environment so it's going to be using default configuration.

    


  • Writing an MP4 slideshow video to S3 using the Lambda FFmpeg Layer

    15 avril 2020, par Gracie

    I am using AWS Lambda with the FFmpeg layer to try and build a 15 second MP4 file (beach.mp4) - from 3 static images that show for 3, 5 and 7 seconds in sequence.
These 3 images are within my Lambda upload deployment zip on S3, along with the sequence.txt file needed for the function.

    



    SEQUENCE.TXT

    



    file beach1.jpg
outpoint 3
file beach2.jpg
outpoint 8
file beach3.jpg
outpoint 15

    



    FFMPEG COMMAND

    



    ffmpeg -f concat -i sequence.txt -c:v libx264 -tune stillimage -c:a aac -b:a 192k -pix_fmt yuv420p -shortest beach.mp4

    



    I am writing a file to S3, but it is blank, only 15 bytes. So doesn't contain the MP4 file created by FFmpeg. I think this has something to do with sync or streaming the video file so both the txt can be read and the MP4 can be written to a file, but not sure.

    



    How can I read the .txt contents and then write the ffmpeg command to a file in /tmp/ ?

    



    You can download or view the files at https://lifeisabeach.netlify.app/
(For some strange reason the MP4 length when built locally is 19 seconds, when it should be 15 !)

    



    const util = require('util');
const AWS = require('aws-sdk');
const s3 = new AWS.S3();
const { readFileSync, writeFileSync, unlinkSync, writeFile, readdir } = require('fs');
//const fs = require('fs');
const path = require('path');
const { spawnSync } = require('child_process');

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

    const outputBucket = 'mys3bucket';
    const sequenceTXT = "sequence.txt";

    // FFmpeg creates the file, using the contents of sequence.txt to create timed image slides
    const mp4create = await spawnSync(
        '/opt/bin/ffmpeg',
        [
            '-f',
            'concat',
            '-i',
            sequenceTXT,
            '-c:v',
            'libx264',
            '-tune',
            'stillimage',
            '-c:a',
            'aac',
            '-b:a',
            '192k',
            '-pix_fmt',
            'yuv420p',
            '-shortest',
            'beach.mp4'
        ]
    );

    // Write ffmpeg output to a file in /tmp/
    const writeMP4File = util.promisify(writeFile);
    await writeMP4File('/tmp/beach.mp4', mp4create, 'binary');
    console.log('MP4 content written to /tmp/');

    // Copy MP4 data to a variable to enable write to S3 Bucket
    let result = mp4create;
    console.log('MP4 Result contents ', result);

    const vidFile = readFileSync('/tmp/beach.mp4');

    // Set S3 bucket details and put MP4 file into S3 bucket from /tmp/
    const s3 = new AWS.S3();
    const params = {
        Bucket: outputBucket,
        Key: 'beach.mp4',
        ACL: 'private',
        Body: vidFile
    };

    // Put MP4 file from AWS Lambda function /tmp/ to an S3 bucket
    const s3Response = await s3.putObject(params).promise();
    callback(null, s3Response);

};


    


  • Writing an MPEG video to S3 using the Lambda FFmpeg Layer

    12 avril 2020, par Gracie

    I am using AWS Lambda with the FFmpeg layer to try and convert an existing local MP4 file (beach.mp4) - that is within my upload deployment zip to S3 - into to MPEG video and then write that file to S3.

    



    I have used ffprobe, which works, so the FFmpeg layer is setup correctly.

    



    I am writing a file to S3, but it is blank, only 15 bytes. So doesn't contain the MPEG file created by FFmpeg.

    



    I think this has something to do with sync or streaming the video file so it can be written, but not sure.

    



    Here is my code, if anyone could help figure this out :

    



    const util = require('util');
const AWS = require('aws-sdk');
const s3 = new AWS.S3();
const { readFileSync, writeFileSync, unlinkSync, writeFile, readdir } = require('fs');
//const fs = require('fs');
const path = require('path');
const { spawnSync } = require('child_process');

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

    const outputBucket = 'mys3bucket';

    const mpegcreate = await spawnSync(
        '/opt/bin/ffmpeg',
        [
            '-i',
            'beach.mp4',
            'beach.mpeg'
        ]
    );

    // Write ffmpeg output to a file in /tmp/
    const writeMPEGFile = util.promisify(writeFile);
    await writeMPEGFile('/tmp/beach.mpeg', mpegcreate, 'binary');
    console.log('MPEG content written to /tmp/');

    // Copy MPEG data to a variable to enable write to S3 Bucket
    let result = mpegcreate;
    console.log('MPEG Result contents ', result);

    const vidFile = readFileSync('/tmp/beach.mpeg');

    // Set S3 bucket details and put MPEG file into S3 bucket from /tmp/
    const s3 = new AWS.S3();
    const params = {
        Bucket: outputBucket,
        Key: 'beach.mpeg',
        ACL: 'private',
        Body: vidFile
    };

    // Put MPEG file from AWS Lambda function /tmp/ to an S3 bucket
    const s3Response = await s3.putObject(params).promise();
    callback(null, s3Response);

};