
Recherche avancée
Autres articles (65)
-
Publier sur MédiaSpip
13 juin 2013Puis-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 -
Submit bugs and patches
13 avril 2011Unfortunately a software is never perfect.
If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
You may also (...) -
Dépôt de média et thèmes par FTP
31 mai 2013, parL’outil MédiaSPIP traite aussi les média transférés par la voie FTP. Si vous préférez déposer par cette voie, récupérez les identifiants d’accès vers votre site MédiaSPIP et utilisez votre client FTP favori.
Vous trouverez dès le départ les dossiers suivants dans votre espace FTP : config/ : dossier de configuration du site IMG/ : dossier des média déjà traités et en ligne sur le site local/ : répertoire cache du site web themes/ : les thèmes ou les feuilles de style personnalisées tmp/ : dossier de travail (...)
Sur d’autres sites (6935)
-
libavfilter : Add dehaze-filter option in existing derain.
22 août 2019, par Xuewei Menglibavfilter : Add dehaze-filter option in existing derain.
Add the support of dehaze filter in existing derain filter source
code. As the processing procedure in FFmpeg is the same for current
derain and dehaze, we reuse the derain filter source code. The
model training and generation scripts are in repo
https://github.com/XueweiMeng/derain_filter.gitReviewed-by : Steven Liu <lq@onvideo.cn>
Signed-off-by : Xuewei Meng <xwmeng96@gmail.com> -
How to stop perl buffering ffmpeg output
4 février 2017, par Sebastian KingI am trying to have a Perl program process the output of an ffmpeg encode, however my test program only seems to receive the output of ffmpeg in periodic chunks, thus I am assuming there is some sort of buffering going on. How can I make it process it in real-time ?
My test program (the
tr
command is there because I thought maybe ffmpeg’s carriage returns were causing perl to see one big long line or something) :#!/usr/bin/perl
$i = "test.mkv"; # big file, long encode time
$o = "test.mp4";
open(F, "-|", "ffmpeg -y -i '$i' '$o' 2>&1 | tr '\r' '\n'")
or die "oh no";
while(<f>) {
print "A12345: $_"; # some random text so i know the output was processed in perl
}
</f>Everything works fine when I replace the
ffmpeg
command with this script :#!/bin/bash
echo "hello";
for i in `seq 1 10`; do
sleep 1;
echo "hello $i";
done
echo "bye";When using the above script I see the output each second as it happens. With
ffmpeg
it is some 5-10 seconds or so until it outputs and will output sometimes 100 lines each output.I have tried using the program
unbuffer
ahead offfmpeg
in the command call but it seems to have no effect. Is it perhaps the2>&1
that might be buffering ?
Any help is much appreciated.If you are unfamiliar with ffmpeg’s output, it outputs a bunch of file information and stuff to
STDOUT
and then during encoding it outputs lines likeframe= 332 fps= 93 q=28.0 size= 528kB time=00:00:13.33 bitrate= 324.2kbits/s speed=3.75x
which begin with carriage returns instead of new lines (hence
tr
) onSTDERR
(hence2>&1
). -
Ffmpeg output stream closed
29 novembre 2023, par excaliburThere is one problem in my code that uses ffmpeg to convert webm videos to mp4 and set duration to 10 seconds, it works well but, sometimes returns "output Stream closed" error. What can be a reason of this problem, and how can i solve it ?


My code :


async convertWebmVideoToMp4(buffer: any) {
 try {
 return new Promise((resolve, reject) => {
 const videoMp4Buffer = Buffer.from(buffer);

 const readable = Readable.from(videoMp4Buffer);

 const outputBuffer = [];

 const outputStream = new Writable({
 write(chunk, encoding, callback) {
 outputBuffer.push(chunk);
 callback();
 },
 });

 const ffmpegProcess = ffmpeg()
 .input(readable)
 .outputFormat('mp4')
 .videoCodec('libx264')
 .audioCodec('aac')
 .duration(10)
 .outputOptions([
 '-movflags frag_keyframe+empty_moov',
 '-preset ultrafast',
 '-c:a aac',
 '-r 30',
 '-tune fastdecode',
 ])
 .on('end', () => {
 outputStream.end();
 const finalOutputBuffer = Buffer.concat(outputBuffer);
 resolve(finalOutputBuffer);
 })
 .on('error', (err, stdout, stderr) => {
 console.error(err);
 reject(err);
 });

 outputStream.on('error', err => {
 this.logger.error(err);
 });

 ffmpegProcess.pipe(outputStream, { end: true });
 });
 } catch (error) {
 throw error;
 }
}



My code should return the buffer of video that type is mp4 and length is 10 seconds, but it returns "output stream closed" error.