
Recherche avancée
Autres articles (74)
-
Amélioration de la version de base
13 septembre 2013Jolie sélection multiple
Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...) -
Emballe médias : à quoi cela sert ?
4 février 2011, parCe plugin vise à gérer des sites de mise en ligne de documents de tous types.
Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ; -
Gestion de la ferme
2 mars 2010, parLa ferme est gérée dans son ensemble par des "super admins".
Certains réglages peuvent être fais afin de réguler les besoins des différents canaux.
Dans un premier temps il utilise le plugin "Gestion de mutualisation"
Sur d’autres sites (9231)
-
ffmpeg one draw text to multiple outputs
31 juillet 2023, par kRichaI've created command with ffmpeg-fluent, which connects video file with music, use shortest(video) duration, and output this to result file


const newVideo = Ffmpeg(`./source/video/${category}/${dayNumber}.mp4`)
 .addInput(`./source/audio/${category}.mp3`)
 .addOption([
 '-map 0:v:0',
 '-map 1:a:0',
 '-shortest'
 ]);

 newVideo.videoFilters({
 filter: 'drawtext',
 options: { ...FONT_OPTIONS, ...{ text: '1', boxcolor: 'black@1', y: 280 } }
 }).output('out1.mp4')
 .output('out2.mp4');



generated command line :


ffmpeg \
-i ./source/video/women/1.mp4 \
-i ./source/audio/women.mp3 -y \
-filter:v drawtext=fontsize=80:fontcolor=white:x=(w-tw)/2:box=1:boxborderw=20:fontfile=./OpenSans-Light.ttf:text=1:boxcolor=black@1:y=280,drawtext=fontsize=80:fontcolor=white:x=(w-tw)/2:box=1:boxborderw=20:fontfile=./OpenSans-Light.ttf:text=a0:boxcolor=black@0.8:enable='between(t,0,6.5)':y=700,drawtext=fontsize=80:fontcolor=white:x=(w-tw)/2:box=1:boxborderw=20:fontfile=./OpenSans-Light.ttf:text=a1:boxcolor=black@0.8:enable='between(t,0,6.5)':y=800,drawtext=fontsize=80:fontcolor=white:x=(w-tw)/2:box=1:boxborderw=20:fontfile=./OpenSans-Light.ttf:text=a2:boxcolor=black@0.8:enable='between(t,0,6.5)':y=900,drawtext=fontsize=80:fontcolor=white:x=(w-tw)/2:box=1:boxborderw=20:fontfile=./OpenSans-Light.ttf:text=a3:boxcolor=black@0.8:enable='between(t,0,6.5)':y=1000,drawtext=fontsize=80:fontcolor=white:x=(w-tw)/2:box=1:boxborderw=20:fontfile=./OpenSans-Light.ttf:text=b0:boxcolor=black@0.8:enable='between(t,7,10)':y=1000,drawtext=fontsize=80:fontcolor=white:x=(w-tw)/2:box=1:boxborderw=20:fontfile=./OpenSans-Light.ttf:text=b1:boxcolor=black@0.8:enable='between(t,7,10)':y=1100,drawtext=fontsize=80:fontcolor=white:x=(w-tw)/2:box=1:boxborderw=20:fontfile=./OpenSans-Light.ttf:text=b2:boxcolor=black@0.8:enable='between(t,7,10)':y=1200,drawtext=fontsize=80:fontcolor=white:x=(w-tw)/2:box=1:boxborderw=20:fontfile=./OpenSans-Light.ttf:text=b3:boxcolor=black@0.8:enable='between(t,7,10)':y=1300,drawtext=fontsize=80:fontcolor=white:x=(w-tw)/2:box=1:boxborderw=20:fontfile=./OpenSans-Light.ttf:text=b4:boxcolor=black@0.8:enable='between(t,7,10)':y=1400,drawtext=fontsize=30:fontcolor=white:x=(w-tw)/2:box=1:boxborderw=20:fontfile=./OpenSans-Light.ttf:text=c:enable='between(t,10.2,inf)':boxcolor=black@1:y=1500,drawtext=fontsize=30:fontcolor=white:x=(w-tw)/2:box=1:boxborderw=20:fontfile=./OpenSans-Light.ttf:text=d:enable='between(t,10.2,inf)':boxcolor=black@1:y=1550 \
-map 0:v:0 \
-map 1:a:0 \
-shortest out2/_.mp4



if I add second output it works, but without audio and drawtext ? How could I fixe this and get draw text works on both outputs


-
Different filesizes for images generated using octave and python
22 février 2017, par Lakshay GargI am using python (scikit-image) and octave to generate 200 images as follows
Python3
import numpy as np
from skimage.io import imsave
images = [255*np.ones((100,100), dtype=np.uint8), # white
np.zeros((100,100), dtype=np.uint8)] # black
for i in range(200): # save alternating black and white images
imsave('%04d.png'%(i+1), images[i%2])Octave
pkg load image;
im1 = 255*ones(100,100); # white
im2 = zeros(100,100); # black
for i=1:200
name = sprintf('%04d.png', i);
if mod(i,2) == 0
imwrite(im1, name);
else
imwrite(im2, name);
end
endNext, I use ffmpeg to generate two videos (alternating white and black frames) from these two sets of images using the following command
ffmpeg -r 10 -loglevel quiet \
-i ./%04d.png -c:v libx264 \
-preset ultrafast -crf 0 ./out.mkv-
Sizes of image files generated by both these codes are different.
- Octave white : 192 bytes, black : 98 bytes
- Python white : 120 bytes, black : 90 bytes
-
Sizes of video files generated from these octave and python images are significantly different from each other.
- Octave filesize : 60 kilobytes
- Python filesize : 116 kilobytes
Why do we have this apparently very strange behavior ?
EDIT
Since it was suggested that the behavior might be dues to octave and python using different bit-depths to store the images, I changes the octave code to use 8 bit numbers
im1 = uint8(255*ones(100,100)); # white
im2 = uint8(zeros(100,100)); # blackand now the image file sizes are nearly the same
- Octave white : 118 bytes, black : 90 bytes
- Python white : 120 bytes, black : 90 bytes
but the problem is still the same for video files, octave : 60K, python : 116K
-
-
Upload a photo into an online video [on hold]
17 juillet 2015, par jennie788Id like to allow my online users to upload their photo onto my web server. Then I want their photo to be embedded into an online video.
The idea is to make it look as if their photo appears in an empty frame on a shelf for example. I want them to be the hero of the video.
I’d also like them to be able to view the final video with their uploaded photo seconds after the upload.
I know how to do this in flash but what other tools can i use to achieve this please ?
I thought about using ffmpeg to add the picture on the fly. Is it the right approach ?
All I need is somebody to point me in the right direction. What tool should I use to do this.
Thanks
Jennie