
Recherche avancée
Autres articles (64)
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains 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 2013Puis-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 -
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.
Sur d’autres sites (5594)
-
avcodec/htmlsubtitles : Fixes denial of service due to use of sscanf in inner loop...
6 février 2019, par Kevin Backhouse via RT -
avcodec/htmlsubtitles : Fixes denial of service due to use of sscanf in inner loop...
6 février 2019, par Kevin Backhouse via RT -
Extract number of frames without using shell-True
26 mars 2022, par petrushI have the following code that extract number of frames from video :


filename = "test.mp4"
video_path = os.path.join(os.getcwd(), filename)
with open(video_path, "rb") as file:
 cmd = f'ffmpeg -i {video_path} -r 10 -q:v 3 -s 1x1 -f image2 -update 1 - >/dev/null'
 proc = sp.Popen(cmd, stdout=sp.PIPE, stderr=sp.PIPE, shell=True)
 (stdout, stderr) = proc.communicate()

 # i.e: 'frame= 2062 fps=966 q=3.0 Lsize=N/A time=00:10:34.46 bitrate=N/A dup=1049 drop=3563 speed= 297x'
 decoded = stderr.decode('utf-8')
 frame_count_line = decoded.splitlines()[-2]
 m = FRAME_COUNT_REGEX.search(frame_count_line)
 if m:
 print(int(m.groups()[0]))



but because of security reasons I want to remove
shell=True
parameter.
Unfortunately after that the code above throws :

FileNotFoundError: [Errno 2] No such file or directory



Please help to fix it