Recherche avancée

Médias (1)

Mot : - Tags -/MediaSPIP 0.2

Autres articles (30)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette 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.

  • 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 ) (...)

Sur d’autres sites (5701)

  • Monitoring for failure and quickly restarting systemd service

    16 février 2024, par mzrt

    I am running a 24/7 youtube stream on Ubuntu. My ffmpeg command is wrapped in a systemd service. On several occasions the ffmpeg command has failed and systemd has not restarted quickly enough to keep the youtube stream alive. When this happens I need to daemon-reload and restart the systemd service.

    


    To counter this I have written a bash script that checks the log for stream ending errors, however, it does not seem to be working. I have had failures since implementing this script, and it did not seem to have been triggered.

    


    two questions :

    


      

    1. is there a more efficient way to do what I am doing ?
    2. 


    3. if not, can anyone identify what I am doing wrong ?
    4. 


    


    #!/bin/bash

RESET=0

while true; do
    # Get the current time minus 1 minute
    LAST_1_MINUTE=$(date -d '1 minute ago' '+%b %e %H:%M:%S')
    
    # Run the command to check for the error within the last minute
    if journalctl --since "$LAST_1_MINUTE" | grep -qi "Error writing trailer"; then
        if [ $RESET -lt 1 ]; then
            # Perform actions if error is detected
            sudo systemctl daemon-reload && \
            echo "Restarting master.service by monitor.sh script at $(date)" >> /var/log/monitor.log && \
            sudo systemctl restart master.service
            RESET=2
        fi
    else
        RESET=$((RESET - 1))
    fi

    # Wait for 20 seconds before the next iteration
    sleep 20
done


    


  • subprocess.Popen can't find the file when shell=False and doesn't know ffmpeg when shell=True [duplicate]

    26 novembre 2023, par Waschbrettwade

    I am trying to get an offline speech-to-text library called "vosk" running following this tutorial : https://medium.com/@johnidouglasmarangon/automatic-speech-recognition-with-vosk-828569219f2b

    


    In this, subprocess.Popen is being used like this :

    


    ffmpeg_command = [
            "ffmpeg",
            "-nostdin",
            "-loglevel",
            "quiet",
            "-i",
            filename,
            "-ar",
            str(SAMPLE_RATE),
            "-ac",
            "1",
            "-f",
            "s16le",
            "-",
        ]

    with subprocess.Popen(ffmpeg_command, stdout=subprocess.PIPE) as process:


    


    When running this in Jupyter Notebook, no problem at all. But whenever I run this in VSCode, it produces the error :

    


    FileNotFoundError: [WinError 2] The system couldn't find the specified file (translated to English by me)


    


    When using shell=True as in

    


    with subprocess.Popen(ffmpeg_command, stdout=subprocess.PIPE, shell=True) as process:


    


    it tells me in the terminal (translated) :

    


    The command "ffmpeg" ist either written wrong or couldn't be found. 


    


    Do you have any idea what's causing these issues and how to fix them ?

    


  • FFMpeg Copy Live Stream (Limit to 60s file)

    17 février 2021, par Garret Harp

    I currently have a working way to get a live stream and start downloading it locally while it is still live.

    



    ffmpeg -i source_hls.m3u8 -c copy output.mkv -y

    



    The problem is I do not actually want to save the entire thing, I just periodically run another command on the output.mkv command to create a clip of part of the live stream.

    



    I was wondering if it was possible to limit the output.mkv file to be only 60s long so once the stream goes over 1 minute it will just cut off the old video and be replaced by the new rolling video.

    



    Is this possible or no ?