Recherche avancée

Médias (91)

Autres articles (56)

  • 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 ;

  • 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

  • Submit bugs and patches

    13 avril 2011

    Unfortunately a software is never perfect.
    If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
    If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
    You may also (...)

Sur d’autres sites (6132)

  • I am getting error "FileNotFoundError : [WinError 2] The system cannot find the file specified" in subprocess python

    6 mai 2020, par FAHAD SIDDIQUI

    I am getting error FileNotFoundError: [WinError 2] The system cannot find the file specified in subprocess python. I searched it on stack overflow but don't find any answer relating to my situation. Basically, I am trying to calculate duration of a video through python code. I searched it on stack overflow and found a piece of code. When I tried to execute this code, I am getting FileNotFoundError: [WinError 2] The system cannot find the file specified. I check a file and its path it is correct and the file is correct. Here is a code I am trying to run and I got it from here.

    



    import subprocess

def get_length(filename):
    result = subprocess.run(["ffprobe", "-v", "error", "-show_entries",
                             "format=duration", "-of",
                             "default=noprint_wrappers=1:nokey=1", filename],
        stdout=subprocess.PIPE,
        stderr=subprocess.STDOUT)
    return float(result.stdout)

get_length("video.avi")


    



    Any suggestion will be appreciated. Here is full error :

    



    ---------------------------------------------------------------------------&#xA;FileNotFoundError                         Traceback (most recent call last)&#xA; in <module>&#xA;      9     return float(result.stdout)&#xA;     10 &#xA;---> 11 get_length("video.avi")&#xA;&#xA; in get_length(filename)&#xA;      6                              "default=noprint_wrappers=1:nokey=1", filename],&#xA;      7         stdout=subprocess.PIPE,&#xA;----> 8         stderr=subprocess.STDOUT)&#xA;      9     return float(result.stdout)&#xA;     10 &#xA;&#xA;~\Anaconda3\envs\FYP\lib\subprocess.py in run(input, timeout, check, *popenargs, **kwargs)&#xA;    421         kwargs[&#x27;stdin&#x27;] = PIPE&#xA;    422 &#xA;--> 423     with Popen(*popenargs, **kwargs) as process:&#xA;    424         try:&#xA;    425             stdout, stderr = process.communicate(input, timeout=timeout)&#xA;&#xA;~\Anaconda3\envs\FYP\lib\subprocess.py in __init__(self, args, bufsize, executable, stdin, stdout, stderr, preexec_fn, close_fds, shell, cwd, env, universal_newlines, startupinfo, creationflags, restore_signals, start_new_session, pass_fds, encoding, errors)&#xA;    727                                 c2pread, c2pwrite,&#xA;    728                                 errread, errwrite,&#xA;--> 729                                 restore_signals, start_new_session)&#xA;    730         except:&#xA;    731             # Cleanup if the child failed starting.&#xA;&#xA;~\Anaconda3\envs\FYP\lib\subprocess.py in _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, unused_restore_signals, unused_start_new_session)&#xA;   1015                                          env,&#xA;   1016                                          os.fspath(cwd) if cwd is not None else None,&#xA;-> 1017                                          startupinfo)&#xA;   1018             finally:&#xA;   1019                 # Child is launched. Close the parent&#x27;s copy of those pipe&#xA;&#xA;FileNotFoundError: [WinError 2] The system cannot find the file specified&#xA;</module>

    &#xA;&#xA;

    I am confused that why I am getting this error although my this code is working perfectly.

    &#xA;&#xA;

    import subprocess&#xA;process = subprocess.Popen([&#x27;vlc&#x27;, &#x27;video.avi&#x27;], &#xA;                       stdout=subprocess.PIPE,&#xA;                       universal_newlines=True)&#xA;

    &#xA;

  • Start ffmpeg sound recording at system start doesn't work

    3 octobre 2022, par CheatingBoy

    I made a python script to record sound at System boot, but it doesn't work. I've tried using crontab and systemd but it doesn't work. If I start the program manually it works out fine.

    &#xA;

    #!/bin/python3&#xA;import RPi.GPIO as GPIO&#xA;import time&#xA;import datetime&#xA;import subprocess&#xA;import os&#xA;import signal&#xA;GPIO.setmode(GPIO.BCM)&#xA;GPIO.setup(24, GPIO.IN)&#xA;GPIO.setup(23, GPIO.OUT)&#xA;print("Started Sound_Recorder_ULtimate_Control")&#xA;p = None&#xA;while True:&#xA;        time.sleep(0.5)&#xA;        if GPIO.input(24) == 1:&#xA;            if p is None:&#xA;                print("Preparing to recorde")&#xA;                today = datetime.datetime.now()&#xA;                time1 = "{}.{}.{}_{}:{}:{}".format(today.day , today.month, today.year, today.hour, today.minute, today.second)&#xA;                # Aufname starten&#xA;                command = "sh -c &#x27;ffmpeg -f pulse -nostdin -i alsa_input.usb-FuZhou_Kingwayinfo_CO._LTD_TONOR_TC30_Audio_Device_20200707-00.mono-fallback /home/pi/sound_recorder/Recordes/&#x27;" &#x2B; time1 &#x2B; ".mp3"&#xA;                print(command)&#xA;                #subprocess.Popen(command)&#xA;                p = subprocess.Popen(command, stdout=subprocess.PIPE, &#xA;                       shell=True, preexec_fn=os.setsid)&#xA;                print("Recording...")&#xA;                GPIO.output(23, GPIO.HIGH)&#xA;                time.sleep(2)    &#xA;&#xA;            else:&#xA;                print("Terminate")&#xA;                os.killpg(os.getpgid(p.pid), signal.SIGTERM)&#xA;                GPIO.output(23, GPIO.LOW)&#xA;                p = None&#xA;                time.sleep(2)&#xA;&#xA;

    &#xA;

  • Anomalie #4174 (Résolu) : Affichage du logo des auteurs dans le formulaire de connection

    8 septembre 2018, par nico d_