
Recherche avancée
Médias (1)
-
SPIP - plugins - embed code - Exemple
2 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
Autres articles (107)
-
Gestion des droits de création et d’édition des objets
8 février 2011, parPar défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;
-
Supporting all media types
13 avril 2011, parUnlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)
-
Keeping control of your media in your hands
13 avril 2011, parThe vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)
Sur d’autres sites (11715)
-
avcodec/dsputil/huffyuv : move diff int16 and add int16 to dsputil
20 janvier 2014, par Michael Niedermayer -
Running a 2-pass video conversion using Python's subprocess module and ffmpeg
22 novembre 2012, par ensnareI'm trying to convert a bunch of videos to play on my iPad. I'm using the subprocess module, which from what I understand launches a binary in a separate process from my script. I'm not sure how to handle 2-pass encoding which requires that the first process terminate before the second begin.
Here is my code :
def convert(filename):
extension = filename[-3:]
destination_filename_720 = filename[-4:] + '-a720p' + '.mp4'
destination_filename_1080 = filename[-4:] + '-a1080p' + '.mp4'
p = subprocess.Popen(['ffmpeg','-i', str(filename) ,
'-acodec' , 'aac' ,
'-ab' , '160k' ,
'-ac' , '2' ,
'-vcodec' , 'libx264' ,
'-strict' , '-2' ,
'-vpre' , 'ipod640' ,
'-threads' , '8' ,
'-s' , '1280x720' ,
'-b:v' , '2000k' ,
'-pass' , '1' ,
'-y' ,
destination_filename_720])
p = subprocess.Popen(['ffmpeg','-i', str(filename) ,
'-acodec' , 'aac' ,
'-ab' , '160k' ,
'-ac' , '2' ,
'-vcodec' , 'libx264' ,
'-strict' , '-2' ,
'-vpre' , 'ipod640' ,
'-threads' , '8' ,
'-s' , '1280x720' ,
'-b:v' , '2000k' ,
'-pass' , '2' ,
'-y' ,
destination_filename_720])As soon as the convert() function is called, both processes are spawned immediately.
The second process fails because the first process hasn't yet finished.
How can I fix this ? Or, is there a better way ?
-
inotifywait -m does not process more than 1 file after long running process
2 mai 2022, par Yllier123I have a script that detects files on close_write and runs an 5 minute process on them. These files are written to the directory in batches of up to 100. The issue is that inotifywait only detects the first file in the batch and does not process the subsequent files unless they are removed from the directory by hand and put back. Here is my script :


#!/bin/bash

inotifywait -r -e close_write -e moved_to --format "%f" $TARGET -m | while read file
 do
 if [[ "$file" =~ .*mp4$ ]]; then
 echo "Detected $file"
 /usr/bin/python3 LongRunningProgram.py -i $TARGET/$file -o $PROCESSED -u $UPLOADPATH -c $C
 fi
 done



it is maintained by a systemctl service written like so :


[Unit]
Description=Description
After=network.target

[Service]
Type=idle
user=pi
WorkingDirectory=/home/pi
ExecStart=/bin/bash /home/pi/notify.sh OutPath C
Restart=on-failure

[Install]
WantedBy=multi-user.target



I am confused as to why it only seems to recognize the first file but not subsequent files when run like this, however if I replace the long running program with sleep 300 it seems to work fine.