
Recherche avancée
Autres articles (101)
-
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...) -
(Dés)Activation de fonctionnalités (plugins)
18 février 2011, parPour gérer l’ajout et la suppression de fonctionnalités supplémentaires (ou plugins), MediaSPIP utilise à partir de la version 0.2 SVP.
SVP permet l’activation facile de plugins depuis l’espace de configuration de MediaSPIP.
Pour y accéder, il suffit de se rendre dans l’espace de configuration puis de se rendre sur la page "Gestion des plugins".
MediaSPIP est fourni par défaut avec l’ensemble des plugins dits "compatibles", ils ont été testés et intégrés afin de fonctionner parfaitement avec chaque (...) -
Activation de l’inscription des visiteurs
12 avril 2011, parIl est également possible d’activer l’inscription des visiteurs ce qui permettra à tout un chacun d’ouvrir soit même un compte sur le canal en question dans le cadre de projets ouverts par exemple.
Pour ce faire, il suffit d’aller dans l’espace de configuration du site en choisissant le sous menus "Gestion des utilisateurs". Le premier formulaire visible correspond à cette fonctionnalité.
Par défaut, MediaSPIP a créé lors de son initialisation un élément de menu dans le menu du haut de la page menant (...)
Sur d’autres sites (12863)
-
avformat/avlanguage : Remove long disabled av_convert_lang_to
25 février 2021, par Andreas Rheinhardtavformat/avlanguage : Remove long disabled av_convert_lang_to
1582e306a47977b09fddb029b999f99eb03cd485 scheduled it for removal with
libavformat major version 58, but it was never removed.Reviewed-by : Paul B Mahol <onemda@gmail.com
Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@gmail.com> -
avcodec : remove long dead debug_mv code
24 janvier 2021, par James Almeravcodec : remove long dead debug_mv code
FF_API_DEBUG_MV has been zero since ffmpeg 4.0
Signed-off-by : James Almer <jamrial@gmail.com>
-
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