Recherche avancée

Médias (1)

Mot : - Tags -/copyleft

Autres articles (80)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

Sur d’autres sites (10516)

  • Read a text file line-by-line (each line as an array), run bash command with array elements, then loop to the next line in the text file

    10 janvier, par xiaohouzi

    I'm using immich to manage my media library with photos and videos but appropriate video thumbnails are black or do not have an appropriate thumbnails for my family to view. As a test, I decided to manually recreate the thumbnails and then update appropriate thumbs files in the exact directory ; replacing the auto-generated ones by Immich using ffmpeg. The following script works fine but one by one will take forever.

    


    #!/bin/bash
file=(formula1 "aust_gp_00'23'41_2022_1858658849.mp4" f2dfse3-34gd-23ff-6hdd-p3h4kk/a3/10/a399-dj88-ah29 00:00:30.000)

# create jpeg + webp and replace existing
sudo ffmpeg -i /mnt/f1/"${file[0]}"/"${file[1]}" -ss "${file[3]}" -frames:v 1 /immich/app/thumbs/"${file[2]}"-preview.jpeg -y \
&& \
sudo ffmpeg -i /mnt/f1/"${file[0]}"/"${file[1]}" -ss "${file[3]}" -frames:v 1 /immich/app/thumbs/"${file[2]}"-thumbnail.webp -y


    


    My goal is to put all the needed files in a text file use "readarry" to read each line as an array, use the appropriate index and then repeat for the next line. This is where I am stuck. How could I loop through each line where each line is a new file, keep the same indexes, and repeat ? Anyone familiar with how to accomplish this or if there is a better way using bash ? I was hoping to only use bash instead of python.

    


    For example...

    


    #files.txt
file=(formula1 "aust_gp_00'23'41_2022.mp4" f2dfse3-34gd-23ff-6hdd-p3h4kk/a3/10/a399-dj88-ah29 00:00:30.000)
file=(formula1 "belg_gp_00'13'31_2022.mp4" f2dfse3-34gd-23ff-6hdd-p3h4kk/q4/6/mhf-846d-zpyf 00:00:30.000)
file=(formula1 "melb_gp_00'05'11_2022.mp4" f2dfse3-34gd-23ff-6hdd-p3h4kk/b9/2/q3dd-0988-vr2t 00:00:30.000)



    


    # genthumb.sh
#!/bin/bash
readarray -t lines < files.txt &&
  for line in "${!lines[@]}"; do
    sudo ffmpeg -i /mnt/f1/"${lines[0]}"/"${lines[1]}" -ss "${lines[3]}" -frames:v 1 /immich/app/thumbs/"${lines[2]}"-preview.jpeg -y \
    && \
    sudo ffmpeg -i /mnt/f1/"${file[0]}"/"${file[1]}" -ss "${file[3]}" -frames:v 1 /immich/app/thumbs/"${file[2]}"-thumbnail.webp -y
  done


    


  • Revision 86955 : Le plug est dit pour spip 3.0 et 3.1, donc la version mini de saisies doit ...

    2 janvier 2015, par spip.franck@… — Log

    Le plug est dit pour spip 3.0 et 3.1, donc la version mini de saisies doit être une version qui supporte 3.1 et moins.
    Ajout également d’une borne mini absente à l’utilise de crayons (1.13.0) première version pour spip 3.0.0

  • Revision 86955 : Le plug est dit pour spip 3.0 et 3.1, donc la version mini de saisies doit ...

    2 janvier 2015, par spip.franck@… — Log

    Le plug est dit pour spip 3.0 et 3.1, donc la version mini de saisies doit être une version qui supporte 3.1 et moins.
    Ajout également d’une borne mini absente à l’utilise de crayons (1.13.0) première version pour spip 3.0.0