Recherche avancée

Médias (1)

Mot : - Tags -/intégration

Autres articles (111)

  • 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

  • Script d’installation automatique de MediaSPIP

    25 avril 2011, par

    Afin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
    Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
    La documentation de l’utilisation du script d’installation (...)

  • Les formats acceptés

    28 janvier 2010, par

    Les commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
    ffmpeg -codecs ffmpeg -formats
    Les format videos acceptés en entrée
    Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
    Les formats vidéos de sortie possibles
    Dans un premier temps on (...)

Sur d’autres sites (11405)

  • Split audio in segments on silence with ffmpeg

    28 mars 2020, par Maral

    I’m trying to automatically split audio files in 5min segments without splitting words and by splitting on silent parts.
    Do you know any ways to do this ?

    Is there a way I can combine these 2 scripts and also make the duration of the splits less than (around) 5 mins ?

    ffmpeg -i filename -af silencedetect=noise=-30dB:d=0.5 -f null - 2

    and

    ffmpeg -i test.mp3 -ss 00:00:20 -to 00:00:40 -c copy -y temp.mp3

    I tried using these in my Go code like this, but it looks like it isn’t the right way.

    package main


    import (
    "fmt"
    "os/exec"
    "os"
    "io/ioutil"
    "log"
    )

    func main() {
    filename := "test.wav"
    args := []string{"-i", filename, "-af", "silentdetect=noise=-30dB:d=0.5","-f", "null", "-","2>", "output.txt"}
       cmd := exec.Command("ffmpeg", args...)
       errcmd := cmd.Run()
       if errcmd != nil {
           fmt.Println(errcmd)
           fmt.Println("problem detecting silence")
       } else {
           fmt.Println("silence detected")
       }

    file, err := os.Open("output.txt")
       if err != nil {
           fmt.Println(err)
       }

    body, readErr := ioutil.ReadAll(file)
       if readErr != nil {
           log.Fatal(readErr)
       }

    //somehow read silent start time and end time from the file and split

    }
  • How to determine if a ffmpeg subprocess has fallen

    9 avril 2020, par TiHan

    I have an issue

    



    I want to create a new ffmpeg process using subprocess.popen
find out his pid
and in the body of a python program to see if the process is alive or not

    



    args = shlex.split ('ffmpeg -i rtsp: //192.168.1.68: 8554 / mystream -f segment -strftime 1 -segment_time 5 13_REG1_CHANNEL3_% Y-% m-% d_% H-% M-% S-% s .mp3 ')
print (args)
proc = subprocess.Popen (args, stdout = subprocess.PIPE)
ch_pid = proc.pid
print (proc.pid)
proc.wait ()
print (proc.communicate ())
while (1):
 if (os.system (str ('kill -0 {PID}'). format (PID = ch_pid)) == 0):
   print ('proc is alive')
 else:
   break


    



    at while loop i tried to check this process pid via kill -0 pid
this command will return zero if everything is alright and process is running

    



    BUT

    



    IF ffmpeg will fall
there will be no changes

    



    kill -0 pid will continue to returning zero code that everything is good

    



    What should i do ?

    


  • 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);

};