Recherche avancée

Médias (0)

Mot : - Tags -/upload

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (55)

  • La sauvegarde automatique de canaux SPIP

    1er avril 2010, par

    Dans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
    Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)

  • Script d’installation automatique de MediaSPIP

    25 avril 2011, par

    Afin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
    Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
    La documentation de l’utilisation du script d’installation (...)

  • Automated installation script of MediaSPIP

    25 avril 2011, par

    To overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
    You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
    The documentation of the use of this installation script is available here.
    The code of this (...)

Sur d’autres sites (6127)

  • How run 2 script python in same time ?

    28 février 2021, par FoxFr

    I explain my need : i wish to run ffmpeg with a python script (that's ok) but i need to know of the script is launched with a blink led connected on the GPIO of my RPI, But i dont know why i can launch my script and start le blink (or just a led on)

    


    Can u help me ? show me the light, please ;)

    


    import RPi.GPIO as GPIO
import time
import os

GPIO.setwarnings(False)
GPIO.setmode(GPIO.BCM)
GPIO.setup(4, GPIO.OUT)
GPIO.setup(22,GPIO.IN)

# fonction qui fait clignoter la led 
def blink(led):
        GPIO.output(led,True)
        time.sleep(0.5)
        GPIO.output(led,False)
        time.sleep(1)

# input of the switch will change the state of the LED
while 1:
        if ( GPIO.input(22) == True ):
                print "start broadcast"
                os.system("sudo /home/pi/videopi/webcam.sh")
                blink(4) << not ok like this !
                time.sleep(1)


    


  • Need help combining commands in to a script to run in Ubuntu

    17 juin 2020, par user298294

    I have a bunch of video files with DTS audio that I need to convert to AC3. I have found commands that can do different parts of the task but I'm not sure how to put it all together to make a script that works. I have found the following script that will convert the audio from all my files to AC3 however I would prefer for it to only convert the DTS audio files to AC3. The script is as follows.

    



    shopt -s globstar
for f in **/*.mkv; 
do 
    fname="${f##*/}"
    ffmpeg -i "$f" -c:v copy -c:s copy -c:a ac3 "/some/directory/$fname" &&
    mv "/some/directory/$fname" "$f"
done


    



    I have also found this command that will return what sort of audio codec the mkv file is using.

    



    `ffprobe -v error -select_streams a:0 -show_entries stream=codec_name -of default=nokey=1:noprint_wrappers=1 input.mkv`


    



    So I'm wondering how I can combine the two to create a script that will do what I want it to do. I'm guessing I can add an if function using ffprobe at the beginning of the script ? Something like this...

    



    shopt -s globstar
for f in **/*.mkv; 
do 
    fname="${f##*/}"
    if ffprobe -v error -select_streams a:0 -show_entries stream=codec_name -of 
       default=nokey=1:noprint_wrappers=1 "$f" | egrep "DTS"; then
       ffmpeg -i "$f" -c:v copy -c:s copy -c:a ac3 "/some/directory/$fname" &&
       mv "/some/directory/$fname" "$f"
    fi
done


    



    Are there any problems with that ? I haven't written scripts since I was in high school playing around with my graphics calculator because I was bored so any help would be greatly appreciated.

    


  • Revision 69908 : inserer avant ou car peut etre un script inline et ...

    14 février 2013, par cedric@… — Log

    inserer avant &lt ;link&gt ; ou &lt ;/head&gt ; car &lt ;script&gt ; peut etre un script inline et il devient bloquant derriere ne css