
Recherche avancée
Médias (91)
-
#3 The Safest Place
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#4 Emo Creates
15 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#2 Typewriter Dance
15 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#1 The Wires
11 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
ED-ME-5 1-DVD
11 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Audio
-
Revolution of Open-source and film making towards open film making
6 octobre 2011, par
Mis à jour : Juillet 2013
Langue : English
Type : Texte
Autres articles (98)
-
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 -
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...) -
Formulaire personnalisable
21 juin 2013, parCette page présente les champs disponibles dans le formulaire de publication d’un média et il indique les différents champs qu’on peut ajouter. Formulaire de création d’un Media
Dans le cas d’un document de type média, les champs proposés par défaut sont : Texte Activer/Désactiver le forum ( on peut désactiver l’invite au commentaire pour chaque article ) Licence Ajout/suppression d’auteurs Tags
On peut modifier ce formulaire dans la partie :
Administration > Configuration des masques de formulaire. (...)
Sur d’autres sites (7509)
-
Handle long delay between video frames in multi-thread decoder(issue 312)
15 avril 2011, par Yunqing WangHandle long delay between video frames in multi-thread decoder(issue 312)
-
dxva2_h264 : set the correct ref frame index in the long slice struct
22 avril 2014, par Hendrik Leppkesdxva2_h264 : set the correct ref frame index in the long slice struct
The latest H.264 DXVA specification states that the index in this
structure should refer to a valid entry in the RefFrameList of the picture
parameter structure, and not to the actual surface index.Fixes H.264 DXVA2 decoding on recent Intel GPUs (tested on Sandy and Ivy)
Signed-off-by : Anton Khirnov <anton@khirnov.net>
-
Using ffmpeg to chunk a long audio file
3 novembre 2020, par Boris AdaevI have the following code here to split a long audio file (15 hours long) into shorter chunks (each a little over an hour long, except the last 16th one, which is whatever remains).


import subprocess
import os, math

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

def chunk(fname, title, split_by=3600):
 head_dir = title + ' (split)'
 if head_dir not in os.listdir():
 os.mkdir(head_dir)

 dur_seconds = get_length(fname)
 iters = math.ceil(dur_seconds / split_by)

 left_off = 0

 print(dur_seconds)

 for i in range(1, iters+1):
 last_iter = i == iters
 if not last_iter:
 go_till = left_off + 3630
 else:
 go_till = int(dur_seconds)

 print(f'from {left_off} to {go_till} for {i:02d}.mp3')
 subprocess.call(['ffmpeg', '-i', fname, '-ss', str(left_off), '-to', str(go_till),
 '-c', 'copy', f'{head_dir}/{i:02d}.mp3'])
 left_off += 3600

fname = 'Brian C. Muraresku - The Immortality Key The Secret History of the Religion with No Name.mp3'
title = 'The Immortality Key'

chunk(fname, title)



The code makes perfect sense, and when I run it with the
subprocess.call
line commented out, what it prints also makes sense.

54681.353625
from 0 to 3630 for 01.mp3
from 3600 to 7230 for 02.mp3
from 7200 to 10830 for 03.mp3
from 10800 to 14430 for 04.mp3
from 14400 to 18030 for 05.mp3
from 18000 to 21630 for 06.mp3
from 21600 to 25230 for 07.mp3
from 25200 to 28830 for 08.mp3
from 28800 to 32430 for 09.mp3
from 32400 to 36030 for 10.mp3
from 36000 to 39630 for 11.mp3
from 39600 to 43230 for 12.mp3
from 43200 to 46830 for 13.mp3
from 46800 to 50430 for 14.mp3
from 50400 to 54030 for 15.mp3
from 54000 to 54681 for 16.mp3



But with the
subprocess.call
line, it creates these audios (01.mp3, 02.mp3, 03.mp3, etc.), but the timestamps are wrong. When the code is done running, they all start from the same place for some odd reason.

UPDATE : I also tried placing the
-i
part after the-ss
part, as well as the following

subprocess.call(['ffmpeg', '-ss', str(left_off), '-i', fname, '-t', '3630',
 '-c', 'copy', f'{head_dir}/{i:02d}.mp3'])



But still the same problem. 15 identical audios, of which only the 15th is the way it's supposed to be, and then the last 16th ten minute remainder. When I run them separately, it goes as follows :


01.mp3 is right,


02.mp3 is right but 01.mp3 is now wrong, because it's identical to 02.mp3


03.mp3 is right, but the previous two are identical to it


04.mp3 is right, but the previous three are identical to it


... and so on