
Recherche avancée
Médias (1)
-
Video d’abeille en portrait
14 mai 2011, par
Mis à jour : Février 2012
Langue : français
Type : Video
Autres articles (59)
-
Participer à sa traduction
10 avril 2011Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
Actuellement MediaSPIP n’est disponible qu’en français et (...) -
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 -
Encoding and processing into web-friendly formats
13 avril 2011, parMediaSPIP automatically converts uploaded files to internet-compatible formats.
Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
All uploaded files are stored online in their original format, so you can (...)
Sur d’autres sites (12333)
-
SciPy and NumPy FFT calculation for multiple files failure
28 mars 2016, par NoilladarThe task is to convert the bunch of audio files (of different formats) from stereo to mono then find FFT for each one and save it to the .txt file
The conversion is successfully made by calling ffmpeg as subprocess. Stereo files are deleted after mono files. The problem appears during the fft calculation : some files are done and the others are suddenly dismissed.
Can it be thу library bug or I had omitted something about objects. It seems like the process cannot allocate or distribute memory or so. I appreciate any help ! Here is the entire code :# coding: cp1251
import os
import os.path
import glob
import subprocess
import scipy
from scipy.io.wavfile import read
# from scipy.fftpack import fft (tried first with scipy then with numpy)
from numpy.fft import fft
TrackList = []
ReadyNames = []
FrameSize = 1024
CurOffset = 0
AudioLen = 0
AudioFile = None
InputData = None
SampleRate = 44100.0
SpecArray = []
Freqs = []
# ------ file processing and job organisation
def NextAudioFrame():
global CurOffset, AudioLen, AudioFile, FrameSize
if (CurOffset + FrameSize) > AudioLen:
r = None
else:
r = AudioFile[CurOffset:(CurOffset + FrameSize)]
CurOffset += FrameSize
return r
def PrepareFrame(frm):
a2 = range(FrameSize)
for i in range(FrameSize):
a2[i] = frm[i] / 32768.0
mags = abs(fft(a2))
return mags
def SaveSpectrum(n):
f = open(n + ".txt", "w")
for i in range(FrameSize / 2):
f.write(str(Freqs[i]) + " " + str(SpecArray[i]) + "\n")
f.close()
def ReadTrackList():
global TrackList, ReadyNames
q = os.listdir(".")
for i in q:
t = os.path.splitext(i)
if t[1] == ".txt":
ReadyNames.append(t[0])
elif t[1] != ".py":
TrackList.append(i)
def GenJustFileName(fn):
q = len(fn) - 1
z = ""
while (q >= 0) and (z != "\\"):
z = fn[q]
q -= 1
if (q >= 0) and (z == "\\"):
t = fn[(q + 2):]
else:
t = fn
w = t.find(".")
return t[:w]
def CheckFile(fn):
r = True
t = GenJustFileName(fn)
for i in ReadyNames:
if t == i:
r = False
return r
def MakeFreqTable():
global Freqs
Freqs = []
for i in range(FrameSize / 2):
Freqs.append(i / (FrameSize / SampleRate))
def MakeMonoMix(fn):
mf = (os.path.splitext(fn)[0] + "_mono.wav")
fm = subprocess.Popen(["ffmpeg", "-i", fn, "-ac", "1", "-ar", "44100", "-acodec", "pcm_s16le", mf])
fm.wait()
def GetSpectrumFromCurFile():
global InputData, SampleRate, AudioFile, AudioLen, SpecArray, FrameSize, TempWavFile
InputData = read(TempWavFile)
SampleRate = InputData[0] * 1.0
AudioFile = InputData[1]
AudioLen = len(AudioFile)
CurOffset = 0
Cmpl = []
SpecArray = range(FrameSize)
for i in range(FrameSize):
SpecArray[i] = 0.0
Cmpl.append(0.0)
frm_cnt = 0
CurFrame = []
while CurFrame != None:
CurFrame = NextAudioFrame()
if CurFrame != None:
q = PrepareFrame(CurFrame)
frm_cnt += 1
for i in range(FrameSize):
Cmpl[i] += q[i]
if frm_cnt > 0:
for i in range(len(Cmpl)):
SpecArray[i] = Cmpl[i] / frm_cnt
print "Finished! Total frames processed " + str(frm_cnt) + "\n"
return frm_cnt
def ProcessFile1(fn):
q = CheckFile(fn)
if q == False:
print "File not exists or already processed\n"
else:
MakeMonoMix(fn)
print "\nProcessin file: " + fn + "\n"
os.remove(fn)
def ProcessFile2(fn):
global TempWavFile
print "\nProcessing file: " + fn + "\n"
z = GenJustFileName(fn)
TempWavFile = fn
f = GetSpectrumFromCurFile()
if f > 0:
ReadyNames.append(z)
SaveSpectrum(z)
os.remove(TempWavFile)
def InitJob():
ReadTrackList()
MakeFreqTable()
InitJob()
for i in TrackList:
print GenJustFileName(i) + "\n"
ProcessFile1(i)
wlist = glob.glob("*.wav")
for i in wlist:
print GenJustFileName(i) + "\n"
ProcessFile2(i) -
Error while running ffmpeg
28 mars 2017, par user4543816I’m trying to convert a video file to images :
ffmpeg -i XXXX.mp4 -r 1/1 $XX%03d.bmpand I get the following error
video:121501kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead : unknown
Any help will be appreciated
-
avcocdec/mpegaudio_parser : add MP3 ADU headers parser
13 février 2015, par Gilles Chanteperdrix