
Recherche avancée
Médias (1)
-
Bug de détection d’ogg
22 mars 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Video
Autres articles (5)
-
Participer à sa traduction
10 avril 2011Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
Actuellement MediaSPIP n’est disponible qu’en français et (...) -
Contribute to translation
13 avril 2011You can help us to improve the language used in the software interface to make MediaSPIP more accessible and user-friendly. You can also translate the interface into any language that allows it to spread to new linguistic communities.
To do this, we use the translation interface of SPIP where the all the language modules of MediaSPIP are available. Just subscribe to the mailing list and request further informantion on translation.
MediaSPIP is currently available in French and English (...) -
Sélection de projets utilisant MediaSPIP
29 avril 2011, parLes exemples cités ci-dessous sont des éléments représentatifs d’usages spécifiques de MediaSPIP pour certains projets.
Vous pensez avoir un site "remarquable" réalisé avec MediaSPIP ? Faites le nous savoir ici.
Ferme MediaSPIP @ Infini
L’Association Infini développe des activités d’accueil, de point d’accès internet, de formation, de conduite de projets innovants dans le domaine des Technologies de l’Information et de la Communication, et l’hébergement de sites. Elle joue en la matière un rôle unique (...)
Sur d’autres sites (3584)
-
How to crop and scale multiple landscape regions into a new portrait video ? FFmpeg
27 août 2023, par 3V1LXDI have an electron program that selects multiple regions of a landscape video and lets you rearrange them in a portrait canvas. I'm having trouble building the proper ffmpeg command to create the video. I have this somewhat working. I can export 2 layers, but i can't export if i only have 1 layer or if i have 3 or more layers selected.


2 regions of video selected


layers [
 { top: 0, left: 658, width: 576, height: 1080 },
 { top: 262, left: 0, width: 576, height: 324 }
]
newPositions [
 { top: 0, left: 0, width: 576, height: 1080 },
 { top: 0, left: 0, width: 576, height: 324 }
]
filtergraph [0]crop=576:1080:658:0,scale=576:1080[v0];[0]crop=576:324:0:262,scale=576:324[v1];[v0][v1]overlay=0:0:0:0[out]

No Error export successful



1 region selected


layers [ { top: 0, left: 650, width: 576, height: 1080 } ]
newPositions [ { top: 0, left: 0, width: 576, height: 1080 } ]
filtergraph [0]crop=576:1080:650:0,scale=576:1080[v0];[v0]overlay=0:0[out]

FFmpeg error: [fc#0 @ 000001dd3b6db0c0] Cannot find a matching stream for unlabeled input pad overlay
Error initializing complex filters: Invalid argument



3 regions of video selected


layers [
 { top: 0, left: 641, width: 576, height: 1080 },
 { top: 250, left: 0, width: 576, height: 324 },
 { top: 756, left: 0, width: 576, height: 324 }
]
newPositions [
 { top: 0, left: 0, width: 576, height: 1080 },
 { top: 0, left: 0, width: 576, height: 324 },
 { top: 756, left: 0, width: 576, height: 324 }
]
filtergraph [0]crop=576:1080:641:0,scale=576:1080[v0];[0]crop=576:324:0:250,scale=576:324[v1];[0]crop=576:324:0:756,scale=576:324[v2];[v0][v1][v2]overlay=0:0:0:0:0:756[out]

FFmpeg error: [AVFilterGraph @ 0000018faf2189c0] More input link labels specified for filter 'overlay' than it has inputs: 3 > 2
[AVFilterGraph @ 0000018faf2189c0] Error linking filters

FFmpeg error: Failed to set value '[0]crop=576:1080:698:0,scale=576:1080[v0];[0]crop=576:324:0:264,scale=576:324[v1];[0]crop=576:324:0:756,scale=576:324[v2];[v0][v1][v2]overlay=0:0:0:0:0:0[out]' for option 'filter_complex': Invalid argument
Error parsing global options: Invalid argument



I can't figure out how to construct the proper overlay command. Here is the js code i'm using from my electron app.


ipcMain.handle('export-video', async (_event, args) => {
 const { videoFile, outputName, layers, newPositions } = args;
 const ffmpegPath = path.join(__dirname, 'bin', 'ffmpeg');
 const outputDir = checkOutputDir();
 
 // use same video for each layer as input
 // crop, scale, and position each layer
 // overlay each layer on top of each other

 // export video
 console.log('layers', layers);
 console.log('newPositions', newPositions);

 let filtergraph = '';

 for (let i = 0; i < layers.length; i++) {
 const { top, left, width, height } = layers[i];
 const { width: newWidth, height: newHeight } = newPositions[i];
 const filter = `[0]crop=${width}:${height}:${left}:${top},scale=${newWidth}:${newHeight}[v${i}];`;
 filtergraph += filter;
 }

 for (let i = 0; i < layers.length; i++) {
 const filter = `[v${i}]`;
 filtergraph += filter;
 }

 filtergraph += `overlay=`;
 for (let i = 0; i < layers.length; i++) {
 const { top: newTop, left: newLeft } = newPositions[i];
 const overlay = `${newLeft}:${newTop}:`;
 filtergraph += overlay;
 }

 filtergraph = filtergraph.slice(0, -1); // remove last comma
 filtergraph += `[out]`;
 
 console.log('filtergraph', filtergraph);

 const ffmpeg = spawn(ffmpegPath, [
 '-i', videoFile,
 '-filter_complex', filtergraph,
 '-map', '[out]',
 '-c:v', 'libx264',
 '-preset', 'ultrafast',
 '-crf', '18',
 '-y',
 path.join(outputDir, `${outputName}`)
 ]); 

 ffmpeg.stdout.on('data', (data) => {
 console.log(`FFmpeg output: ${data}`);
 });

 ffmpeg.stderr.on('data', (data) => {
 console.error(`FFmpeg error: ${data}`);
 });

 ffmpeg.on('close', (code) => {
 console.log(`FFmpeg process exited with code ${code}`);
 // event.reply('ffmpeg-export-done'); // Notify the renderer process
 });
});



Any advice might be helpful, The docs are confusing, Thanks.


-
ffmpeg command to scale, show images at exactly 130bpm [closed]
17 août 2023, par S. ImpI have a sequence of images which I would like to display to some music that plays at 130bpm. I'll also need to scale the images, which are a rather strange 2673x2151 pixels each down to something, ideally something that would fit without stretching inside a 1080p frame — e.g. 1342x1080.


130BPM yields weirdness with frame rates. There are 2.16666666667 (13/6) beats per second. This being the case, I can't figure out how many frames to show each each image at the usual frame rates (24, 25, 30 fps). If I could make a movie with a frame rate of 2.16666667 frames per second, i could simply show each image for one frame. This seems like it might actually be optimal — it would probably make a a very compact video file, right ??


Alternatively, if we must set the frame rate to an positive integer value, 13 frames per second works if we just display each image for six frames. 13 FPS means 780 frames per minute. 780 frames divided by 130 beats means 6 frames per beat.


Finally, my images are named j1.jpg, j2.jpg, j3.jpg, etc.


Can someone help me concoct an ffmpeg command to assemble these images into a video with each image lasting one beat at 130BPM ? I've been trying to massage this command, which does assemble the images into a movie, but my attempts to specify a frame rate have had weird effects. E.g., doing a -r results in strange videos that change image very erratically. I think it's because there's a
setpts=N/25/TB
bit in there.

ffmpeg -pattern_type glob -i "j*.jpg" -filter_complex "[0]reverse[r];[0][r]concat,loop=2:250,setpts=N/25/TB,scale=1342:1080" -pix_fmt yuv420p -c:v libx264 -preset slow -b:v 3500k output_looped.mp4



Also, I don't understand what the 250 means in
loop=2:250
. If someone could explain that to me, I'd be grateful.

-
Drawtext Effects Clipping with Zoom in and Scale animation When combining with xfade wipe
2 août 2023, par CRAIGThe following ffmpeg drawtext command is meant to manipulate the text with a number of filters. First it adds a wipe, then a "grow" effect and a fade.


The issue is when the wipe AND scale are together the end result is partially clipped and the wipe doesn't seem to fully reveal the text as it should be doing. Almost like the scale or wipe was delayed.


I have two example commands one with an xfade wipe effect and one without below.


The one with xfade wipe clips text and looks like it is messing with the timing in some way as if the scale doesn't have time to finish. If I remove the xfade wipe, the scale animation and fadein are fine.


I have tried to put the xfade at the end, but it has caused me more issues.


Command without xfade : (Final result is not clipped)


ffmpeg -f lavfi -i color=c=black@0.0:s=129x129:r=30:d=0.137,format=rgba -f lavfi -i color=c=black@0.0:s=129x129:r=30:d=0.137,format=rgba -filter_complex "[1:v]drawtext=expansion=none:enable='between(t,0,0.138)':fontsize=97.7886:fontcolor=0xff0000ff:text='Of':shadowcolor=0x00ff3fff:shadowx=5.9:shadowy=5.9:borderw='2.95':bordercolor='0xa200ffff':x=(w-text_w)/2:y=(h-text_h)/2[1v];[0:v]settb=AVTB,format=rgba[0v];[1v]settb=AVTB,format=rgba[1v];[1v]scale='if(between(t,0,0+0.137),0.645+((t-0)*128.355/0.137),if(gte(t,0.137),129,129))':-1:eval=frame,fade=in:st=0:d=0.137[1v];[0v][1v]overlay=x=(W-w)/2:y=(H-h)/2:threads=1" -copyts -c:v prores_ks -profile:v 4 -pix_fmt rgba -movflags faststart -r 30 -t 0.137 -y /home/encodertraffic/subtitles/mymovie.mov


Command with xfade wipe :


ffmpeg -f lavfi -i color=c=black@0.0:s=129x129:r=30:d=0.137,format=rgba -f lavfi -i color=c=black@0.0:s=129x129:r=30:d=0.137,format=rgba -filter_complex "[1:v]drawtext=expansion=none:enable='between(t,0,0.138)':fontsize=97.7886:fontcolor=0xff0000ff:text='Of':shadowcolor=0x00ff3fff:shadowx=5.9:shadowy=5.9:borderw='2.95':bordercolor='0xa200ffff':x=(w-text_w)/2:y=(h-text_h)/2[1v];[0:v]settb=AVTB,format=rgba[0v];[1v]settb=AVTB,format=rgba[1v];[0v][1v]xfade=transition=wiperight:duration=0.137:offset=0,settb=AVTB,setpts=PTS-STARTPTS[1v];[1v]scale='if(between(t,0,0+0.137),0.645+((t-0)*128.355/0.137),if(gte(t,0.137),129,129))':-1:eval=frame,fade=in:st=0:d=0.137[1v];[0v][1v]overlay=x=(W-w)/2:y=(H-h)/2:threads=1" -copyts -c:v prores_ks -profile:v 4 -pix_fmt rgba -movflags faststart -r 30 -t 0.137 -y mymovie2.mov


Here are a couple of screenshots comparing the two at the same timestamp (the very end).


The one on the left is without the wipe, the one on the right at the same timestamp is with the wipe, but you can see the text is partially clipped, it isn't at the same sacale and it isn't at full brightness almost as if the something is delaying all aspects of each filter.