Vous n'êtes pas identifié(e).
Dernière modification par Anonyme (12-06-2015 08:05:32)
Que l'on peut bien sûr donner comme script à son explorateur de fichiers préféré.
captnfab,
Association Debian-Facile, bépo.
TheDoctor: Your wish is my command… But be careful what you wish for.
Hors ligne
captnfab,
Association Debian-Facile, bépo.
TheDoctor: Your wish is my command… But be careful what you wish for.
Hors ligne
ou
captnfab,
Association Debian-Facile, bépo.
TheDoctor: Your wish is my command… But be careful what you wish for.
Hors ligne
ou
Je n'ai pas testé les derniers scripts, mais ça devrait le faire, quitte à modifier quelques trucs
captnfab,
Association Debian-Facile, bépo.
TheDoctor: Your wish is my command… But be careful what you wish for.
Hors ligne
Hors ligne
Et si tu veux que le script fasse la conversion en vidéo à la volée :
#!/bin/sh
image=$1
nbcopies=25
extension=$(echo "$image"|sed 's/^.*(\.[^\.]*)$/\1/')
base=$(basename "$image" $extension)
for i in $(seq 25)
do
cp "$image" "$base-"$(printf "%04d" "$i")"$extension"
done
avconv -f image2 -i "$base-%04d$extension" -r 24 -c:v mpeg4 -b 15000k "$base.mp4"
./nomduscript nom-de-limage.jpg
Je viens de tester celui cité.
J'ai bien 25 images qui se génèrent
Info : image01.png-0004 etc (là par contre l'extention est bizarre)
Je sors une vidéo de 0 octet peut-être à cause de ces fameuses extensions
EDIT: D'ou ton script extension louche peut-être. Je teste
Dernière modification par Anonyme (12-06-2015 11:20:53)
captnfab,
Association Debian-Facile, bépo.
TheDoctor: Your wish is my command… But be careful what you wish for.
Hors ligne
captnfab,
Association Debian-Facile, bépo.
TheDoctor: Your wish is my command… But be careful what you wish for.
Hors ligne
Je me retrouve avec :
l'image d'origine image.png et 24 images nommées image.png-0001 à image.png-0024
A noter que j'ai changé la valeur 25 pour 24
J'aimerai bien image-0001.png
Dernière modification par Anonyme (12-06-2015 11:38:13)
Par contre pour :
image2 ça représente quoi ?
C'est déjà magnifique
EDIT: Pour image2, je viens de m'en rendre compte en le supprimant. C'est l'image.mp4
Dernière modification par Anonyme (12-06-2015 11:55:18)
image2
Image file demuxer.
This demuxer reads from a list of image files specified by a pattern.
The pattern may contain the string "%d" or "%0Nd", which specifies the position of the characters representing a sequential
number in each filename matched by the pattern. If the form "%d0Nd" is used, the string representing the number in each
filename is 0-padded and N is the total number of 0-padded digits representing the number. The literal character '%' can be
specified in the pattern with the string "%%".
If the pattern contains "%d" or "%0Nd", the first filename of the file list specified by the pattern must contain a number
inclusively contained between 0 and 4, all the following numbers must be sequential. This limitation may be hopefully
fixed.
The pattern may contain a suffix which is used to automatically determine the format of the images contained in the files.
For example the pattern "img-%03d.bmp" will match a sequence of filenames of the form img-001.bmp, img-002.bmp, ...,
img-010.bmp, etc.; the pattern "i%%m%%g-%d.jpg" will match a sequence of filenames of the form i%m%g-1.jpg, i%m%g-2.jpg,
..., i%m%g-10.jpg, etc.
The size, the pixel format, and the format of each image must be the same for all the files in the sequence.
The following example shows how to use avconv for creating a video from the images in the file sequence img-001.jpeg,
img-002.jpeg, ..., assuming an input framerate of 10 frames per second:
avconv -i 'img-%03d.jpeg' -r 10 out.mkv
Note that the pattern must not necessarily contain "%d" or "%0Nd", for example to convert a single image file img.jpeg you
can employ the command:
avconv -i img.jpeg img.png
captnfab,
Association Debian-Facile, bépo.
TheDoctor: Your wish is my command… But be careful what you wish for.
Hors ligne
captnfab,
Association Debian-Facile, bépo.
TheDoctor: Your wish is my command… But be careful what you wish for.
Hors ligne
Je propose :
Pas pour les caractères qu’on économise, sans importance dans un script de cette taille, mais pour éviter ce petit sed particulièrement cryptique
Hors ligne
post 17 ne fonctionne pas
Dernière modification par Anonyme (12-06-2015 13:12:01)
rm -f "$base-*$extension"
post 17 ne fonctionne pas
Essaye en le remplaçant par :
Encore que personnellement je n’incluerais pas cette ligne de cette façon, pour éviter des suppressions inattendues en cas de noms proches (image.png et image-différente.png par exemple).
-----
Ah non, je viens de comprendre, ce sont les guillemets qui empêchent l’interprétation du caractère spécial '*'.
Cette ligne devrait avoir l’effet voulu :
(le dirname est peut-être inutile, je le garderai par précaution pour m’assurer que la suppression ne va pas s’effectuer sous $HOME plutôt quand dans le répertoire contenant $image)
Dernière modification par vv222 (12-06-2015 14:11:56)
Hors ligne
Dernière modification par Anonyme (12-06-2015 14:21:14)
Dernière modification par vv222 (12-06-2015 14:48:16)
Hors ligne
captnfab,
Association Debian-Facile, bépo.
TheDoctor: Your wish is my command… But be careful what you wish for.
Hors ligne
Dernière modification par Anonyme (12-06-2015 16:40:10)