
Recherche avancée
Médias (1)
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (48)
-
Contribute to a better visual interface
13 avril 2011MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community. -
Submit bugs and patches
13 avril 2011Unfortunately 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 (...) -
ANNEXE : Les plugins utilisés spécifiquement pour la ferme
5 mars 2010, parLe site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)
Sur d’autres sites (7652)
-
Windows python can't pass system variables [duplicate]
14 mai 2016, par Soner BThis question already has an answer here :
I can cut video ffmpeg command prompt like this :
ffmpeg -ss 00:41:12.200 -i "the_video.mp4" -t 00:00:03.100 -c:v
libx264 -preset slow -profile:v high -crf 21 "the_video_cut.mp4" -yffmpeg.exe is in C :\Windows\System32
But I try with python.
import subprocess as sp
CRF_VALUE = '21'
PROFILE = 'high'
PRESET = 'slow'
cmd = ['ffmpeg', '-ss', '%s'%start_time, '-i', '"%s"'%inputFile, '-t', '%s'%diffTime, '-c:v', 'libx264', '-preset', PRESET, '-profile:v', PROFILE, '-crf', CRF_VALUE, '"%s_cut.%s"'%('_'.join(file_strip[:-1]),file_strip[-1]), '-y']
sp.call(' '.join(cmd))Error message :
Traceback (most recent call last):
File "test.py", line 81, in <module>
main(sys.argv[1:])
File "test.py", line 76, in main
isle(inputFile, start_time, diffTime)
File "test.py", line 48, in isle
sp.call(' '.join(cmd))
File "C:\Program Files (x86)\Python35-32\lib\subprocess.py", line 560, in call
with Popen(*popenargs, **kwargs) as p:
File "C:\Program Files (x86)\Python35-32\lib\subprocess.py", line 950, in __init__
restore_signals, start_new_session)
File "C:\Program Files (x86)\Python35-32\lib\subprocess.py", line 1220, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] Sistem belirtilen dosyayı bulamıyor
</module>with try
sp.call(' '.join(cmd), shell=True)
This error message :
’ffmpeg’ is not recognized as an internal or external command,
operable program or batch file.If i copy ffmpeg.exe in the same folder test.py, it’s okey, working.
-
I am getting error "FileNotFoundError : [WinError 2] The system cannot find the file specified" in subprocess python
6 mai 2020, par FAHAD SIDDIQUII 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 gettingFileNotFoundError: [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 :



---------------------------------------------------------------------------
FileNotFoundError Traceback (most recent call last)
 in <module>
 9 return float(result.stdout)
 10 
---> 11 get_length("video.avi")

 in get_length(filename)
 6 "default=noprint_wrappers=1:nokey=1", filename],
 7 stdout=subprocess.PIPE,
----> 8 stderr=subprocess.STDOUT)
 9 return float(result.stdout)
 10 

~\Anaconda3\envs\FYP\lib\subprocess.py in run(input, timeout, check, *popenargs, **kwargs)
 421 kwargs['stdin'] = PIPE
 422 
--> 423 with Popen(*popenargs, **kwargs) as process:
 424 try:
 425 stdout, stderr = process.communicate(input, timeout=timeout)

~\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)
 727 c2pread, c2pwrite,
 728 errread, errwrite,
--> 729 restore_signals, start_new_session)
 730 except:
 731 # Cleanup if the child failed starting.

~\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)
 1015 env,
 1016 os.fspath(cwd) if cwd is not None else None,
-> 1017 startupinfo)
 1018 finally:
 1019 # Child is launched. Close the parent's copy of those pipe

FileNotFoundError: [WinError 2] The system cannot find the file specified
</module>



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



import subprocess
process = subprocess.Popen(['vlc', 'video.avi'], 
 stdout=subprocess.PIPE,
 universal_newlines=True)



-
Start ffmpeg sound recording at system start doesn't work
3 octobre 2022, par CheatingBoyI 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.


#!/bin/python3
import RPi.GPIO as GPIO
import time
import datetime
import subprocess
import os
import signal
GPIO.setmode(GPIO.BCM)
GPIO.setup(24, GPIO.IN)
GPIO.setup(23, GPIO.OUT)
print("Started Sound_Recorder_ULtimate_Control")
p = None
while True:
 time.sleep(0.5)
 if GPIO.input(24) == 1:
 if p is None:
 print("Preparing to recorde")
 today = datetime.datetime.now()
 time1 = "{}.{}.{}_{}:{}:{}".format(today.day , today.month, today.year, today.hour, today.minute, today.second)
 # Aufname starten
 command = "sh -c '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/'" + time1 + ".mp3"
 print(command)
 #subprocess.Popen(command)
 p = subprocess.Popen(command, stdout=subprocess.PIPE, 
 shell=True, preexec_fn=os.setsid)
 print("Recording...")
 GPIO.output(23, GPIO.HIGH)
 time.sleep(2) 

 else:
 print("Terminate")
 os.killpg(os.getpgid(p.pid), signal.SIGTERM)
 GPIO.output(23, GPIO.LOW)
 p = None
 time.sleep(2)