Recherche avancée

Médias (0)

Mot : - Tags -/protocoles

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

Autres articles (97)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • Déploiements possibles

    31 janvier 2010, par

    Deux types de déploiements sont envisageable dépendant de deux aspects : La méthode d’installation envisagée (en standalone ou en ferme) ; Le nombre d’encodages journaliers et la fréquentation envisagés ;
    L’encodage de vidéos est un processus lourd consommant énormément de ressources système (CPU et RAM), il est nécessaire de prendre tout cela en considération. Ce système n’est donc possible que sur un ou plusieurs serveurs dédiés.
    Version mono serveur
    La version mono serveur consiste à n’utiliser qu’une (...)

  • Configuration spécifique pour PHP5

    4 février 2011, par

    PHP5 est obligatoire, vous pouvez l’installer en suivant ce tutoriel spécifique.
    Il est recommandé dans un premier temps de désactiver le safe_mode, cependant, s’il est correctement configuré et que les binaires nécessaires sont accessibles, MediaSPIP devrait fonctionner correctement avec le safe_mode activé.
    Modules spécifiques
    Il est nécessaire d’installer certains modules PHP spécifiques, via le gestionnaire de paquet de votre distribution ou manuellement : php5-mysql pour la connectivité avec la (...)

Sur d’autres sites (6499)

  • using find in subprocess.call() gives error while the command executes properly from command prompt

    28 février 2018, par Devaraj GH
    C:\Windows\System32> ffmpeg -i D:\devaraj\KPIX_test.ts -vf "blackframe" -an -f n
    ull - 2>&1|find "Parsed" > D:\devaraj\info.txt

    this works fine , writes the file info.txt

    subprocess.call('ffmpeg' ,'-i', 'D:\devaraj\KPIX_test.ts' ,'-vf', '"blackframe"', 'D:\devaraj\KPIX_textfinal.mp3', '- 2>&1>','|','find', '"Parsed"', '>' ,'D:\devaraj\info.txt', 'shell=True')

    gives an error buffer size must be integer

    were as

    subprocess.call('ffmpeg -i D:\devaraj\KPIX_test.ts -vf "blackframe" -an -f n
    ull - 2>&1|find "Parsed" > D:\devaraj\info.txt', shell=True)

    gives an error

    ’find’ is not recognized as an internal or external command,
    operable program or batch file.

    any help would be appreciated from d bottom of heart

  • Restart environment and script during batch script

    7 décembre 2024, par ninbura

    I've built a few FFmpeg powershell scripts for me and a few others to use and I'm attempting to make the setup and update process as easy as possible. The end goal is to be able to run 1 batch file that installs Chocolatey, FFmpeg, git, clones the github repo (for updates), and edits the Windows registry to add the actual FFmpeg powershell scripts / console programs to the Windows Explorer contextual menu. This way I just pass them the folder containing everything once and any time I change or add something to the project I can just tell them to run the batch file again, and presto everything is up to date.

    



    However I'm struggling to find a way to install Chocolatey, then git with Chocolatey, and then run a git command with the execution of a single .bat file. From what I can tell after installing Chocolatey I need to restart the shell entirely before I can install git, and then I have to restart the shell again before I can use a git command. As of right now most of the actual processing is happening via Powershell scripts that are launched from the .bat file, and as each step is taken I update a txt file, attempt to restart the batch script, and read the txt file to pick up where I left off :

    



    @echo off
echo Administrative permissions required. Detecting permissions...
echo.

net session >nul 2>&1
if %errorLevel% == 0 (
    echo Success: Administrative permissions confirmed.
    echo.
) else (
    echo Failure: Current permissions inadequate.

    PAUSE

    exit
)

set relativePath=%~dp0
set relativePath=%relativePath:~0,-1%

PowerShell -NoProfile -ExecutionPolicy Bypass -File "%relativePath%\Setup\CheckRequiredPackages.ps1" -relativePath "%relativePath%"

set /p step=<"%relativePath%\Setup\Step.txt"

if %step% == 1 (
    (echo 2) > "%relativePath%\Setup\Step.txt"

    PowerShell -NoProfile -ExecutionPolicy Bypass -File "%relativePath%\Setup\GetChocolatey.ps1"

    start "" "%relativePath%\RunMe.bat"

    exit
) 

if %step% == 2 (
    (echo 3) > "%relativePath%\Setup\Step.txt"

    PowerShell -NoProfile -ExecutionPolicy Bypass -File "%relativePath%\Setup\GetRequiredPackages.ps1"

    start "" "%relativePath%\RunMe.bat"

    exit
) 

if %step% == 3 (
    (echo 0) > "%relativePath%\Setup\Step.txt"

    PowerShell -NoProfile -ExecutionPolicy Bypass -File "%relativePath%\Setup\Update.ps1" -relativePath "%relativePath%"
) 

PAUSE
Exit


    



    The problem is using the start command in the batch script doesn't seem to work, I'm guessing since that new process is spawned from the same process that handles the Chocolatey install it doesn't count as actually restarting the shell. Is there any way to actually restart the shell and somehow have the batch file start back up without user intervention ?

    


  • When running python script background, the job always stops

    21 janvier 2021, par Jong Kyu Kim

    I wrote a python script, "download_vod.py" that runs a child process using subprocess module.

    


    download_vod.py

    


    #!/usr/bin/python

import subprocess
url = xxx
filename = xxx.mp4

cmd = "ffmpeg -i " + url + " -c:v copy -c:a copy " + "\"" + filename + "\""
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
proc.wait()


    


    When I run foreground on a bash shell as below, it works fine and terminates properly

    


    


    ./download_vod.py

    


    


    But a problem occurs when I run the script background as below.

    


    


    ./download_vod.py&

    


    


    The script always stops as below.

    


    


    [1]+ Stopped download_vod.py

    


    


    If I resume the job as below, it resumes and terminates properly.

    


    


    bg

    


    


    I assume it is caused by running subprocess because it never happens without subprocess.

    


    Would you let me know what happens to the subprocess (child process) when I run the python script as background ? And how would it be fixed ?