
Recherche avancée
Médias (1)
-
La conservation du net art au musée. Les stratégies à l’œuvre
26 mai 2011
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (28)
-
La file d’attente de SPIPmotion
28 novembre 2010, parUne file d’attente stockée dans la base de donnée
Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...) -
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 (...) -
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
Sur d’autres sites (3809)
-
referenced links (url#id) broke on split chapters
21 février 2016, par Grandtreferenced links (url#id) broke on split chapters
Fixed : referenced links (url#id) broke on split chapters.
Changed : Generated TOC file changed from using hardcoded spaces to
indent nested chapters, to using the CSS, defaulting to 2em per level.
The tocCss can override this by defining .level[1-n], though the default
only defines indents for levels 1-7. Reference links has their class as
class=".level1 reference" -
ffmpeg split audio file into individual segments
4 novembre 2022, par MartinI have a 00:15:24 length .mp3 file that I want to split up into three separate files, ideally using a txt file input like so :


segemnts.txt


00:00:00 00:04:55 seg1
00:04:55 00:08:41 seg2
00:08:41 00:15:24 seg3



How can I do this with a single command ?


-
Python, ffmpeg split list of audio files
24 novembre 2020, par emilI know how to split one single audio file with python and ffmpeg :


command = "ffmpeg -i a.wav -f segment -segment_time 60 -c copy out_dir/output%09d.wav"
command = shlex.split(command)
subprocess.run(command)



For my current task, I have a list of several hundred
.wav
files I want to split.

My current solution is :


def parse_and_split_dir(directory, out_dir):
 files = [x for x in os.listdir(directory) if ".wav" in x]
 print(files)
 cntr = 0
 for wav in files:
 wav = wav.replace(" ", "\ ")
 temp_dir = os.path.join(out_dir, str(cntr))
 Path(temp_dir).mkdir(parents=True, exist_ok=True)
 temp_dir = os.path.join(temp_dir, "output%05d.wav")
 command = "ffmpeg -i {} -f segment -segment_time 60 -c copy {}".format(os.path.join(directory, wav), temp_dir)
 command = shlex.split(command)
 subprocess.run(command)
 cntr += 1





I list all .wav files, and for each file I create a directory where I store the split files into. This implies that file naming start with index 1 for each new file.
E.g. folder 1 contains files
...1.wav
to...9.wav
, folder 2 contains...1.wav
to...13.wav
and so on.

In short, I ideally want to parse the whole directory with a single command, while keeping the naming continually from file to file, e.g. when the last wav saved its last split with
...10.split
, the next split for the next file should be saved as..11.split
.

I thought about first concatenating all the single files to one file, and then splitting them again (which introduces massive overhead), and unnecessarily consumes memory and disk space. An alternative I thought of was using a *.wav wildcard, but ffmpeg found no file called
*.wav
(which is expected).

Related question : 1