Recherche avancée

Médias (9)

Mot : - Tags -/soundtrack

Autres articles (69)

  • Mise à jour de la version 0.1 vers 0.2

    24 juin 2013, par

    Explications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
    Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...)

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

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

Sur d’autres sites (11763)

  • How to stream mp4 file with fluent-ffmpeg ?

    2 avril 2024, par user3184735

    I am trying to stream a video file with fluent-ffmpeg. But i could't do it.
Here is my code

    



    var filePath = null;
filePath     = "video.mp4";

var stat  = fs.statSync(filePath);

var range        = req.headers.range;
var parts        = range.replace(/bytes=/, "").split("-");
var partialstart = parts[0];
var partialend   = parts[1];

var start     = parseInt(partialstart, 10);
var end       = partialend ? parseInt(partialend, 10) : total-1;
var chunksize = (end-start)+1;

var file = fs.createReadStream(filePath, {start: start, end: end});

res.writeHead(206, {
 'Content-Range  ': 'bytes ' + start + '-' + end + '/' + total,
 'Accept-Ranges'  : 'bytes',
 'Content-Length' : chunksize,
 'Content-Type'   : 'video/mp4'
});

ffmpeg(file)
.videoCodec('libx264')
.withAudioCodec('aac')
.format('mp4')
.videoFilters({
 filter: 'drawtext',
 options: {
  fontsize:20,
  fontfile: 'public/fonts/Roboto-Black.ttf',
  text: "USERNAME",
  x:10,
  y:10,
  fontcolor:"red"
 }})
 .outputOptions(['-frag_duration 100','-movflags frag_keyframe+faststart','-pix_fmt yuv420p'])
 .output(res,{ end:true })
 .on('error', function(err, stdout, stderr) {
  console.log('an error happened: ' + err.message + stdout + stderr);
 })
 .run();


    



    When i run this code block, video not playing and throws an error :

    



    an error happened: ffmpeg exited with code 1: pipe:0: Invalid data found when processing input


    



    when i do not use stream as input, video is playing in Chrome but after a little time, video player throws error.

    



    Is there any way that i can show text while playing video with ffmpeg or without it ?

    


  • Catch if the Java process crashed

    10 mai 2018, par Victor Sheyanov

    I run java process to convert video using ffmpeg.exe.

    Runtime rt = Runtime.getRuntime();
    String cmd = FFMPEGFULLPATH + " -y -i " + '"' + mpeg4File + '"' + " -vcodec libx264 -vsync 2 " + '"' + H264file + '"';

    Process pr = rt.exec(cmd);

    ThreadedTranscoderIO errorHandler = new ThreadedTranscoderIO(pr.getErrorStream(), "Error Stream");
    errorHandler.start();
    ThreadedTranscoderIO inputHandler = new ThreadedTranscoderIO(pr.getInputStream(), "Output Stream");
    inputHandler.start();

    try {
         pr.waitFor();
    } catch (InterruptedException e) {
         LiveApplication.logger.info("Some shit happens during convertation 2 ");
         throw new IOException("UseTranscoderBlocking - Run_FFMPEG - process interrupted " + e);                  
    }

    But when the process started, sometimes especially with big files, but not always i get this windows message :

    enter image description here

    This happens only on Windows server 2008 and didn’t happened on Windows 7.

    I have 2 questions :

    1. Why this process fails ?
    2. Can I catch this fail in Java, close
      this window and continue thread execution (maybe I’ll restart this
      proccess).
  • FFMPEG WAV file not spitting out correct audio length

    7 juin 2018, par Alexander Leon

    I am piping the audio out with the ’attachment’ header so that the result is immediately downloaded. With other formats, such as mp3, the duration on the downloaded file metadata is set correctly. With WAV tho, the duration reads 00:00, which makes it basically unusable by audio players like iTunes. Any help ?

    app.get('/', (req, res) => {
       res.contentType('audio/wav');
       res.attachment('somefile.wav');
       var pathToAudio = 'https://dl.dropbox.com/s/pc7qp4wrf46t9op/test-clip.webm?dl=0';
       ffmpeg(pathToAudio)
           // .output(stream, {end: true})
           .toFormat('wav')
           // setup event handlers
           .on('error', function(err) {
               console.log('an error happened: ' + err.message);
           })
           .pipe(res {end: true})
    });