
Recherche avancée
Médias (1)
-
The pirate bay depuis la Belgique
1er avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
Autres articles (33)
-
Gestion générale des documents
13 mai 2011, parMédiaSPIP ne modifie jamais le document original mis en ligne.
Pour chaque document mis en ligne il effectue deux opérations successives : la création d’une version supplémentaire qui peut être facilement consultée en ligne tout en laissant l’original téléchargeable dans le cas où le document original ne peut être lu dans un navigateur Internet ; la récupération des métadonnées du document original pour illustrer textuellement le fichier ;
Les tableaux ci-dessous expliquent ce que peut faire MédiaSPIP (...) -
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page. -
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...)
Sur d’autres sites (5136)
-
How can I resize an image then centralize it with a white background ? Can it be done using php-Imagine library ?
6 février 2017, par BOBOThe effect I would like to generate is exactly like the example in
this StackOverflow thread : (Related Question)1.Resize image
2.Keep proportion
3.Add or Fill none-image areas with white backgroundHere are three examples of this process below :
1. If original is square no matter 640*640 or 1024*1024, just resize it to target dimension e.g. 480*480 will work.
-
If the original input is vertical rectangular,the output should not be cropped
and still be centerlized as below (the red dash edge marker is just make it easier to see the background is white and the proportion is kept after image resized to 480*480 px)
-
if the original input is horizontal rectangular, output like below, white background, keeps proportion and image uncroped , thus without losing anything after the image processing.
So after I’ve clarified such a question,
I would like to know :- Is there a general name of such Custom Image Resize mentioned above ?
- would like to know how to achieve it using php image library Imagine ?
is it doable using php-imagine, or have to switch to another library, e.g imagemagick ?
P.S. If you would like to achieve the effect either in image-resizing or video resizing, you can use below FFMPEG single-line command.
(thanks to @Mulvya, yes below code applies both to videos and image formats)[run below built-in code in ffmpeg console to achieve the mentioned resize effect]
[video resize]
ffmpeg -i "[raw video url or videofile location.mp4]" -vf "scale=iw*min(480/iw\,480/ih):ih*min(480/iw\,480/ih),pad=480:480:(480-iw)/2:(480-ih)/2:color=white" [save_path_and_filename].mp4
[image resize]
ffmpeg -i "[raw image url or imagefile location.jpg]" -vf "scale=iw*min(480/iw\,480/ih):ih*min(480/iw\,480/ih),pad=480:480:(480-iw)/2:(480-ih)/2:color=white" [save_path_and_filename].jpg
-
-
ffmpeg : pad filter with transparent background for GIF input/output ?
23 janvier 2023, par Yami OdymelI'm trying to pad the GIF source to a square thumbnail and the extended area should be transparent.


(image source : https://store.steampowered.com/app/2113680/The_Dot/)




To achieve the goal, I used the following command :


ffmpeg -i ./test/source.gif -filter_complex "[0]scale=255:144[s1];[s1]pad=256:256:0:-56:blue[s2];[s2]split[s3][s4];[s3]palettegen=reserve_transparent=on:transparency_color=blue[p];[s4][p]paletteuse[s5]" -map [s5] -loop 0 ./test/output.gif -y



- 

-
[0]scale=255:144[s1]
First I scale down the image.

-
[s1]pad=256:256:0:-56:blue[s2]
Then pad the image with an uncommon background color :blue


-
[s2]split[s3][s4]
And I split to two streams. One forpalettegen
and another forpaletteuse
.

-
[s3]palettegen=reserve_transparent=on:transparency_color=blue[p]
Generate the color palette that indicatesblue
as thetransparency_color


-
[s4][p]paletteuse[s5]
Use the new color palette for output. The padded image withblue
background color should be treated as a transparent background.













But the output animated GIF still has a visible blue background color no matter if I put the
paletteuse
at first or in the end.



Related posts :


- 

- Making GIFs with ffmpeg : what does "transparency_color" do ?
- How do I resize an animated GIF and keep transparency ?
- Transparency is gone while resizing (scaling) gif using ffmpeg








-
-
Create a video with 5 images with fade in/out, zoom pan, and slide left/right
16 mars 2016, par Sushovan MukherjeeI have to create a video with 5 different images 3 sec for each with the following sequence
- Fade Out
- Fade In
- Zoom
- Slide Left
- Slide Right
I do not know about sliding filter command and also zooming is not working correctly.
I am using the following command :
ffmpeg \
-loop 1 -t 3 -i img001.png \
-loop 1 -t 1 -i img002.png \
-loop 1 -t 3 -i img003.png \
-loop 1 -t 3 -i img004.png \
-loop 1 -t 3 -i img005.png \
-c:v libx264 \
-filter_complex \
"[0:v]fade=t=out:st=2.5:d=0.5[v0]; \
[1:v]fade=t=in:st=0:d=0.5,fade=t=out:st=2.5:d=0.5[v1]; \
[2:v]zoompan=z='zoom+0.001':d=10:s=1200x478[v2]; \
[3:v]fade=t=in:st=0:d=0.5,fade=t=out:st=2.5:d=0.5[v3]; \
[4:v]fade=t=in:st=0:d=0.5,fade=t=out:st=2.5:d=0.5[v4]; \
[v0][v1][v2][v3][v4]concat=n=5:v=1:a=0,format=yuv420p[v]" -map "[v]" out.mp4