
Recherche avancée
Autres articles (67)
-
Gestion générale des documents
13 mai 2011, parMédiaSPIP ne modifie jamais le document original mis en ligne.
Pour chaque document mis en ligne il effectue deux opérations successives : la création d’une version supplémentaire qui peut être facilement consultée en ligne tout en laissant l’original téléchargeable dans le cas où le document original ne peut être lu dans un navigateur Internet ; la récupération des métadonnées du document original pour illustrer textuellement le fichier ;
Les tableaux ci-dessous expliquent ce que peut faire MédiaSPIP (...) -
Multilang : améliorer l’interface pour les blocs multilingues
18 février 2011, parMultilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela. -
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette 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.
Sur d’autres sites (5148)
-
Revision 3248 : On installe le sélecteur pour sparkstats Même s’il n’est pas installé, au ...
16 avril 2010, par kent1 — LogOn installe le sélecteur pour sparkstats Même s’il n’est pas installé, au moins elle sera bonne
-
Popen ffmpeg process hang if run in shell and leaves a defunct process if run in background
12 janvier 2023, par dr__noobI have a script that runs the FFmpeg command. When I run the command in the background using the
&
operator it runs fine but leaves a zombie process. And when I remove the operator the process hangs and goes into thepipe_wait
state.

The code used to execute the FFmpeg command


def run_cmd(cmd:str,
 check:bool=False, 
 capture:bool=False,
 timeout:float=None,
 ) -> tuple[int,bytearray,bytearray]:
 import subprocess

 stdout_data,stderr_data = (bytearray(),bytearray()) if capture else (None,None)
 try:
 sp = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, )
 while any(data:=(sp.stdout.readline(),sp.stderr.readline())):
 out,err = data
 if out: stdout_data += out
 if err: stderr_data += err
 sp.communicate(timeout=timeout)
 return sp.returncode,stdout_data,stderr_data
 except subprocess.CalledProcessError as e:
 print("Called process error")
 raise e
 except subprocess.TimeoutExpired as e:
 sp.kill()
 print(f"{sp.pid} killed")
 if check:
 raise e
 except PermissionError as e:
 print("Permission error")
 if check:
 raise e



The command which is causing the issue is


nice -n 10 ffmpeg -loglevel verbose -hide_banner -y -threads 0 -i "/dev/shm/480TEST-1999963.dfw.480_1673030704/SBS_Plus_Test_Feed.480TEST-1999963.480.eng.p.intermediate.mp4" -map 0:v:0? -q:v 1 -f rawvideo -pix_fmt "yuv420p" -an ./SBS_Plus_Test_Feed.480TEST-1999963.480.eng.p_fifo_video.yuv -map 0:a:0? -q:a 1 -ac 2 -af "aresample=async=1:first_pts=0" -vn ./SBS_Plus_Test_Feed.480TEST-1999963.480.eng.p_fifo_audio.wav > "./SBS_Plus_Test_Feed.480TEST-1999963.480.eng.p.ffmpeg.demux.log" 2>&1 &



However, other FFmpeg commands are running fine without the last
&
. But this command will block if I remove the&
. If I keep it as it is, the process will later become a zombie(defunct). Can it be because it is actually anice -n 10
causing the issue ?

Example of a command running fine


ffmpeg -loglevel verbose -hide_banner -y -threads 0 -i "./SBS_Plus_Test_Feed.480TEST-1999963.480.eng.p.ts" -r "59.94" -s:v "1280"x"720" -pix_fmt "yuv420p" -vcodec libx264 -x264-params qp="30" -af "aresample=async=1:first_pts=0" -crf 0 -q:a 1 -vf yadif=1 ./SBS_Plus_Test_Feed.480TEST-1999963.480.eng.p.intermediate.mp4 > "./p.intermediate.mp4.intermediate.ffmpeg.log" 2>&1



Till now I have tried other options like
-nostdin
andnull
suggested in ffmpeg hangs when run in background

Is there any other way run this without creating a zombie ?


-
use my full first name instead of short one in copyrights
1er juin 2013, par Kostya Shishkov