
Recherche avancée
Autres articles (48)
-
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs -
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 -
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 (7522)
-
FFMPEG crop a portrait image square with respect to the zoomed dimensions and x/y pan
3 octobre 2022, par huggerI am making a photo crop component for my mobile app.


If an image is selected from the image picker and it is above 4:5 ratio, using FFMPEG I need to crop this image 1:1 using the dynamic X/Y values along with the scale value from pinching (1.00 - 10).


I trying to use these values with the FFMPEG crop/scale filter, but no matter what I try I cant seem to get the crop to work as expected... It is not matching up from the UI pan / zoom.


My FFMPEG command looks like this, along with some other relevant variable code :


let zoom = this._scale.__getValue(); //set dynamically by the user; ranges from 0.1 to 10
let translateY = this._translateX.__getValue(); //amount from left side
let translateX = this._translateY.__getValue(); // amount from top

//trying to first crop the width and height / the zoom for the zoom scaling..?
//then I am using translate X/Y to get my coordinates (not matching up)
//I tried to use translateXY * zoom to get the scaling factor but it still did not work...
//the image needs to be square, chain scale filter to make this happen after the original crop?)
FFmpegKit.execute(
 `-y -i ${this.state.mediaSource} -vf "crop=iw/${zoom}:ih/${zoom}:${translateX}:${translateY}, scale=iw:iw:0:0" -qscale 0 -frames:v 1 ${filterPathPostCrop}`
).then(async (session) => {
 const returnCode = await session.getReturnCode();
 if (ReturnCode.isSuccess(returnCode)) {
 this.setState({
 mediaSource: filterPathPostCrop,
 videoSourcePreview: `${filterPathPostCrop}?${new Date().getTime()}`,
 ffMPEGinProgress: null,
 aspectRatio: 1080 / 1080,
 videoTime: 0,
 isPlayingVideo: false,
 isCropping: false,
 filterOutputIsAlt: !this.state.filterOutputIsAlt,
 wasCropped: true,
 });
 } else if (ReturnCode.isCancel(returnCode)) {
 // CANCEL
 } else {
 // ERROR
 alert('error');
 }
});



I appreciate any guidance I can get with this, I feel like I am close I just cant seem to get this calculation working...


-
ffmpeg fade in animation and logo overlay in a single step
24 octobre 2018, par Amin BaigI have the following commands to create a fade in effect with a series of images and then place a water mark png using the lut filter on the generated video :
//Creating the fade in video :
ffmpeg -t 5 -i 1.jpg -t 5 -i 2.jpg -t 5 -i 3.jpg -t 5 -i 4.jpg -i 5.jpg -filter_complex "[0:v]zoompan=z='min(zoom+0.0015,1.5)':d=125,fade=t=out:st=4:d=1[v0];[1:v]zoompan=z='min(zoom+0.0015,1.5)':d=125,fade=t=in:st=0:d=1,fade=t=out:st=4:d=1[v1];[2:v]zoompan=z='min(zoom+0.0015,1.5)':d=125,fade=t=in:st=0:d=1,fade=t=out:st=4:d=1[v2];[3:v]zoompan=z='min(zoom+0.0015,1.5)':d=125,fade=t=in:st=0:d=1,fade=t=out:st=4:d=1[v3];[4:v]zoompan=z='min(zoom+0.0015,1.5)':d=125,fade=t=in:st=0:d=1,fade=t=out:st=4:d=1[v4];[v0][v1][v2][v3][v4]concat=n=5:v=1:a=0,format=yuva444p[v]" -map "[v]" -s "480x600" -t 40 series_out_fade_v2_5images.mp4
After the video is created I use the following command to place a water mark logo over it :
//Water mark
ffmpeg -y -i series_out_fade_v2_5images.mp4 -i optimaken_logo.png -filter_complex "[1]lut=a=val*0.5[a];[0][a]overlay=0:0" -c:v libx264 -an v4_output.mp4
my questions are :
- How can I achieve both in a single command
- How do I scale overlay proportionally so that the height of the water mark is always 65 pixels and the width is scaled
proportionally - Explicitly tell where to place the logo to the top right corner with a padding of 10 pixels for both x and y
- How do I scale overlay proportionally so that the height of the water mark is always 65 pixels and the width is scaled
- How can I achieve both in a single command
-
Heroku ffmpeg buildpack
20 octobre 2015, par Manuel QuintanillaPutting together the video upload section in my rails app and am having some issues with video play on mobile phones. Im using
paperclip-av-transcoder, s3 and Heroku
On my laptop I can visit the page and see the video thumbnails and play the videos only because I have previously installed ffmpeg to my machine.
Remotely on Heroku I’ve set the appropriate buildpacks for ffmpeg and have run push heroku master to install the buildpacks - Now when I visit the page on my mobile iPhone I don’t get a thumbnail but when I play the video it plays - on the other hand when I visit the page on my Android phone I don’t get a thumbnail and the video dose not play but I can upload mp4s on Android.
Check out my set up here : Heroku ffmpeg buildpacks for video uploads
It seems I don’t have the proper buildpack setup or some other heroku setting with ffmpeg.
Any suggestions ? Thanks in advance !