
Recherche avancée
Médias (1)
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (104)
-
Les formats acceptés
28 janvier 2010, parLes 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 (...) -
Encoding and processing into web-friendly formats
13 avril 2011, parMediaSPIP automatically converts uploaded files to internet-compatible formats.
Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
All uploaded files are stored online in their original format, so you can (...) -
Ajouter notes et légendes aux images
7 février 2011, parPour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
Modification lors de l’ajout d’un média
Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)
Sur d’autres sites (8399)
-
node-fluent-ffmpeg doesn't resize videos correctly when given specific size
8 décembre 2019, par YagizVersion information
- fluent-ffmpeg version : 2.1.2
- ffmpeg version : ffmpeg version 4.1.3
- OS : mac os x mojave 10.14.3
Code to reproduce
First cut the videos using this command :
const cutVideo = async (currentWord) => {
return new Promise((resolve, reject) => {
console.log('cutting video', currentWord.file)
ffmpeg(currentWord.file)
.videoCodec('libx264')
// .addOptions('-vf "setdar=ratio=16/9:max=1000"')
.on('start', command => console.log('command', command))
.on('error', reject)
.on('end', resolve)
.withSize('640x360')
.withAspect('16:9')
.applyAutopadding(true, 'black')
.saveToFile(currentWord.file.replace('-unfinished', ''), './')
})
}Later merge them together using
.mergeToFile()
command :const mergeFilesAsync = async function(files, folder, filename)
{
return new Promise((resolve, reject) => {
console.log('merging files', files)
var cmd = ffmpeg({ logger: console })
.videoCodec('libx264')
.on('start', command => console.log('command', command))
.on('error', reject)
.on('end', resolve)
for (var i = 0; i < files.length; i++)
{
const currentWord = files[i]
cmd.input(currentWord.file.replace('-unfinished', ''))
}
cmd.mergeToFile(folder + "/" + filename, folder);
});
}Expected results
The videos resized in cutVideo function should have 640x360 size with 16:9 aspect ratio.
Observed results
The first video processed had a dimension of : 850 × 480, the output after processing it is : 642 × 360 (It should be 640x360)
The second video processed had a dimension of : 1152 × 480, the output after processing it is : 638 × 360
The third video processed had a dimension of 853 × 480, the output after processing it is : 642 × 360
FFmpeg command produced by fluent-ffmpeg :
ffmpeg -i /Users/yagiz/Desktop/video-creator/what's-unfinished.mp4 -y -vcodec libx264 -filter:v scale=w='if(gt(a,1.7777777777777777),640,trunc(360*a/2)*2)':h='if(lt(a,1.7777777777777777),360,trunc(640/a/2)*2)',pad=w=640:h=360:x='if(gt(a,1.7777777777777777),0,(640-iw)/2)':y='if(lt(a,1.7777777777777777),0,(360-ih)/2)':color=black /Users/yagiz/Desktop/video-creator/what's.mp4
cutting video /Users/yagiz/Desktop/video-creator/up?-unfinished.mp4and
ffmpeg -i /Users/yagiz/Desktop/video-creator/up?-unfinished.mp4 -y -vcodec libx264 -filter:v scale=w='if(gt(a,1.7777777777777777),640,trunc(360*a/2)*2)':h='if(lt(a,1.7777777777777777),360,trunc(640/a/2)*2)',pad=w=640:h=360:x='if(gt(a,1.7777777777777777),0,(640-iw)/2)':y='if(lt(a,1.7777777777777777),0,(360-ih)/2)':color=black /Users/yagiz/Desktop/video-creator/up?.mp4
I think that 1.77777 value in this command produces a lower bound or an upper bound of the actual item.
Any idea where the issue lies ?
Thanks !
-
vf_scale_vaapi : Add options to configure output colour properties
28 février 2019, par Mark Thompson -
Gracefully closing FFMPEG child processes from node
10 juin 2019, par GordonI am trying to record numerous audio feeds using ffmpeg. Node downloads a config file with the stream URLS (HLS M3U8 playlists), parses it and starts the appropriate number of ffmpeg instances. When I go to shut them down, nothing happens and I have to kill them with task manager, resulting in corrupt files. When I am debugging and hit control-c within a minute or two of starting the program, it works without issue. When I need to record more than 5-10 minutes that I have problems.
I found this related question from 2013, and adapted it to fit my multiple stream situation.
The recorder processes are started with the following code (inside the http request callback) :
config.audio_config.forEach((channel,i)=>{
self.liveChannels++;
console.log(` ${channel.number}`);
self.Channels[i] = spawn('ffmpeg', ['-i', `${channel.base_url + channel.stream_ios}`, '-c:v', 'none', '-c:a', 'copy', `Output\\${config.folder}\\${channel.number}.m4a`]);
self.Channels[i].stdin.setEncoding('utf8');
self.Channels[i].chNum = channel.number;
self.Channels[i].on('exit',(code,sig)=>{
console.log(` Channel ${channel.number} recorder closed.`);
self.liveChannels--;
if(self.liveChannels === 0){
process.exit();
}
});
});
console.log('Press Ctl-C to start Shutdown');My shutdown function (triggered by
SIGINT
to main process) is :function shutdown() {
self.Channels.forEach((chan)=>{
chan.stdin.write('q');
chan.stdin.end(); //I have tried both with and without this line and chan.stdin.end('q')
});
}UPDATE :
Switching to an AAC container file (simply changed the extension on the output) removed the need for a graceful FFMPEG exit. I still would like to know why sending ’q’ to stdin only kills the FFMPEG process for the first 10 minutes.