
Recherche avancée
Autres articles (43)
-
La file d’attente de SPIPmotion
28 novembre 2010, parUne 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 (...) -
La sauvegarde automatique de canaux SPIP
1er avril 2010, parDans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...) -
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains 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 ;
Sur d’autres sites (7014)
-
Can I use the file buffer or stream as input for fluent-ffmpeg ? I am trying to avoid saving the video locally to get its path before removing
22 avril 2023, par Moath ThawahrehI am receiving the file via an api, I was trying to process the file.buffer as input for FFmpeg but it did not work, I had to save the video locally first and then process the path and remove the saved video later on.
I don't want to believe that there is no other way to solve this and I have been looking for solutions and workarounds but it was all about ffmpeg input as a path.


I would love to find a solution using fluent-ffmpeg because it has some other great features, but I won't mind any suggestions for compressing the video using any different approaches if it's more efficient


Again my code below works fine but I have to save the video and then remove it I am hoping for a more efficient solution :


fs.writeFileSync('temp.mp4', file.buffer);

 // Resize the temporary file using ffmpeg
 ffmpeg('temp.mp4') // here I tried pass file.buffer as readable stream,it receives paths only 
 .format('mp4')
 .size('50%')
 .save('resized.mp4')
 .on('end', async () => {
 // Upload the resized file to Firebase
 const resizedFileStream = bucket.file(`video/${uniqueId}`).createWriteStream();
 fs.createReadStream('resized.mp4').pipe(resizedFileStream);

 await new Promise<void>((resolve, reject) => {
 resizedFileStream
 .on('finish', () => {
 // Remove the local files after they have been uploaded
 fs.unlinkSync('temp.mp4');
 fs.unlinkSync('resized.mp4');
 resolve();
 })
 .on('error', reject);
 });

 // Get the URL of the uploaded resized version
 const resizedFile = bucket.file(`video/${uniqueId}`);
 const url = await resizedFile.getSignedUrl({
 action: 'read',
 expires: '03-17-2025', // Change this to a reasonable expiration date
 });

 console.log('Resized file uploaded successfully.');
 })
 .on('error', (err) => {
 console.log('An error occurred: ' + err.message);
 });
</void>


-
FFmpeg get frame rate
22 septembre 2021, par zhin dinsI have several images and I am reproducing them in 78.7ms, I am creating like the 80s video effect. But, I am unable to find the correct ms, and this images with the original videos are unsync.


I dumped the video to images using this command => ffmpeg -i *.mp4 the80effect/img-%d.jpg And now, I have 48622 frames. The video FPS is 24


So, 48622/24 = 2025 +- I cannot use 2025ms since those images will load very slow. And the and the approximate value is 78.7ms per frame/image


How can I find the correct value ? The video duration in seconds is 2026. I have tried all math to find this but I'm failing. How many images (one frame) per msCould you help me ? Thank you.


-
FFMpeg with PHP-7.0 on Ubuntu
25 octobre 2018, par Gabriel Bueno Lemes da SilvaI have a NGINX server with PHP-7.0 and I would like to install the ffmpeg-php extension. I’ve been trying for a few days now and in many ways.
The method that worked so far was compiling ffmpeg (https://ffmpeg.org/releases/ffmpeg-4.0.2.tar.bz2) manually, but when trying to compile ffmpeg-php (https: // sourceforge. net / projects / ffmpeg-php / files / ffmpeg-php / 0.6.0 / ffmpeg-php-0.6.0.tbz2 / download) I am encountering the following error message :
root@zumbiserver-mercury : /php7-ffmpeg# make /bin/bash
/root/php7-ffmpeg/libtool —mode=compile cc -I. -I/root/php7-ffmpeg
-DPHP_ATOM_INC -I/root/php7-ffmpeg/include -I/root/php7-ffmpeg/main -I/root/php7-ffmpeg -I/usr/include/php/20151012 -I/usr/include/php/20151012/main -I/usr/include/php/20151012/TSRM -I/usr/include/php/20151012/Zend -I/usr/include/php/20151012/ext -I/usr/include/php/20151012/ext/date/lib -I/usr/local/include/libavcodec/ -I/usr/local/include/libavformat/ -I/usr/local/include/libavutil/ -I/usr/local/include/libswscale/ -I/usr/local/include/libavfilter/ -I/usr/local/include/libavdevice/ -DHAVE_CONFIG_H -g -O2 -Wall -fno-strict-aliasing -c /root/php7-ffmpeg/ffmpeg-php.c -o ffmpeg-php.lo libtool : compile : cc
-I. -I/root/php7-ffmpeg -DPHP_ATOM_INC -I/root/php7-ffmpeg/include -I/root/php7-ffmpeg/main -I/root/php7-ffmpeg -I/usr/include/php/20151012 -I/usr/include/php/20151012/main -I/usr/include/php/20151012/TSRM -I/usr/include/php/20151012/Zend -I/usr/include/php/20151012/ext -I/usr/include/php/20151012/ext/date/lib -I/usr/local/include/libavcodec/ -I/usr/local/include/libavformat/ -I/usr/local/include/libavutil/ -I/usr/local/include/libswscale/ -I/usr/local/include/libavfilter/ -I/usr/local/include/libavdevice/ -DHAVE_CONFIG_H -g -O2 -Wall -fno-strict-aliasing -c /root/php7-ffmpeg/ffmpeg-php.c -fPIC -DPIC -o .libs/ffmpeg-php.o In
file included from /usr/include/x86_64-linux-gnu/sys/stat.h:104:0,
from /usr/include/php/20151012/Zend/zend_stream.h:28,
from /usr/include/php/20151012/Zend/zend.h:41,
from /usr/include/php/20151012/main/php.h:36,
from /root/php7-ffmpeg/ffmpeg-php.c:40 : /usr/include/x86_64-linux-gnu/bits/stat.h:91:21 : error : field
‘st_atim’ has incomplete type
struct timespec st_atim ; /* Time of last access. /
^ /usr/include/x86_64-linux-gnu/bits/stat.h:92:21 : error : field
‘st_mtim’ has incomplete type
struct timespec st_mtim ; / Time of last modification. /
^ /usr/include/x86_64-linux-gnu/bits/stat.h:93:21 : error : field
‘st_ctim’ has incomplete type
struct timespec st_ctim ; / Time of last status change. /
^ /usr/include/x86_64-linux-gnu/bits/stat.h:152:21 : error : field
‘st_atim’ has incomplete type
struct timespec st_atim ; / Time of last access. /
^ /usr/include/x86_64-linux-gnu/bits/stat.h:153:21 : error : field
‘st_mtim’ has incomplete type
struct timespec st_mtim ; / Time of last modification. /
^ /usr/include/x86_64-linux-gnu/bits/stat.h:154:21 : error : field
‘st_ctim’ has incomplete type
struct timespec st_ctim ; / Time of last status change. /
^ In file included from /usr/include/php/20151012/Zend/zend_stream.h:28:0,
from /usr/include/php/20151012/Zend/zend.h:41,
from /usr/include/php/20151012/main/php.h:36,
from /root/php7-ffmpeg/ffmpeg-php.c:40 : /usr/include/x86_64-linux-gnu/sys/stat.h:364:31 : error : array type has
incomplete element type ‘struct timespec’
const struct timespec __times[2],
^ /usr/include/x86_64-linux-gnu/sys/stat.h:371:54 : error : array type has
incomplete element type ‘struct timespec’ extern int futimens (int
__fd, const struct timespec __times[2]) __THROW ;
^ In file included from /usr/include/php/20151012/main/php.h:395:0,
from /root/php7-ffmpeg/ffmpeg-php.c:40 : /usr/include/php/20151012/Zend/zend_virtual_cwd.h:218:2 : error :
unknown type name ‘time_t’ time_t expires ;
^ /usr/include/php/20151012/Zend/zend_virtual_cwd.h:248:86 : error :
unknown type name ‘time_t’ CWD_API realpath_cache_bucket
realpath_cache_lookup(const char *path, int path_len, time_t t) ;
^ /root/php7-ffmpeg/ffmpeg-php.c : In function ‘zm_startup_ffmpeg’ :
/root/php7-ffmpeg/ffmpeg-php.c:108:5 : warning : implicit declaration of
function ‘avcodec_init’ [-Wimplicit-function-declaration]
avcodec_init() ;
^ /root/php7-ffmpeg/ffmpeg-php.c:111:5 : warning : ‘av_register_all’ is deprecated [-Wdeprecated-declarations]
av_register_all() ;
^ In file included from /root/php7-ffmpeg/ffmpeg-php.c:43:0 : /usr/local/include/libavformat/avformat.h:2025:6 : note : declared here
void av_register_all(void) ;^ Makefile:194: recipe for target 'ffmpeg-php.lo' failed make: *** [ffmpeg-php.lo] Error 1
Can someone give me a light ? I do not know what else to do !