
Recherche avancée
Médias (1)
-
SWFUpload Process
6 septembre 2011, par
Mis à jour : Septembre 2011
Langue : français
Type : Texte
Autres articles (62)
-
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 -
XMP PHP
13 mai 2011, parDixit Wikipedia, XMP signifie :
Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...) -
ANNEXE : Les plugins utilisés spécifiquement pour la ferme
5 mars 2010, parLe site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)
Sur d’autres sites (11557)
-
Python extract wav from video file
10 janvier, par xolodecRelated :



How to extract audio from a video file using python ?



Extract audio from video as wav



How to rip the audio from a video ?



My question is how could I extract wav audio track from video file, say
video.avi
? 
I read many articles and everywhere people suggest to use (from Python)ffmpeg
as a subprocess (because there are no reliable python bindings to ffmpeg - the only hope wasPyFFmpeg
but i found it is unmaintaned now). I don't know if it is right solution and i am looking for good one.

I looked to gstreamer and found it nice but unable to satisfy my needs — the only way I found to accomplish this from command line looks like


gst-launch-0.10 playbin2 uri=file://`pwd`/ex.mp4 audio-sink='identity single-segment=true ! audioconvert ! audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)16000, channels=(int)1 ! wavenc ! filesink location=foo.wav’ 




But it is not efficient because i need to wait ages while playing video and simultaneously writing to wav file.



ffmpeg
is much better :


avconv -i foo.mp4 -ab 160k -ac 1 -ar 16000 -vn ffaudio.wav




But i am unable to launch it from python (not as a command line subprocess). Could you please point me out pros and cons of launching ffmpeg from python as a command line utility ? (I mean using python
multiprocessing
module or something similar).


And second question.



What is simple way to cut long wav file into pieces so that i don't break any words ? i mean pieces of 10-20 sec length with start and end during the pause in sentences/words ?



i know how to break them on arbitrary pieces :



import wave


win= wave.open('ffaudio.wav', 'rb')
wout= wave.open('ffsegment.wav', 'wb')

t0, t1= 2418, 2421 # cut audio between 2413, 2422 seconds
s0, s1= int(t0*win.getframerate()), int(t1*win.getframerate())
win.readframes(s0) # discard
frames= win.readframes(s1-s0)

wout.setparams(win.getparams())
wout.writeframes(frames)

win.close()
wout.close()



-
Python extract wav from video file
31 octobre 2015, par xolodecRelated :
How to extract audio from a video file using python ?
Extract audio from video as wav
How to rip the audio from a video ?
My question is how could I extract wav audio track from video file, say
video.avi
?
I read many articles and everywhere people suggest to use (from Python)ffmpeg
as a subprocess (because there are no reliable python bindings to ffmpeg - the only hope wasPyFFmpeg
but i found it is unmaintaned now). I don’t know if it is right solution and i am looking for good one.
I looked to gstreamer and found it nice but unable to satisfy my needs — the only way I found to accomplish this from command line looks likegst-launch-0.10 playbin2 uri=file://`pwd`/ex.mp4 audio-sink='identity single-segment=true ! audioconvert ! audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)16000, channels=(int)1 ! wavenc ! filesink location=foo.wav’
But it is not efficient because i need to wait ages while playing video and simultaneously writing to wav file.
ffmpeg
is much better :avconv -i foo.mp4 -ab 160k -ac 1 -ar 16000 -vn ffaudio.wav
But i am unable to launch it from python (not as a command line subprocess). Could you please point me out pros and cons of launching ffmpeg from python as a command line utility ? (I mean using python
multiprocessing
module or something similar).And second question.
What is simple way to cut long wav file into pieces so that i don’t break any words ? i mean pieces of 10-20 sec length with start and end during the pause in sentences/words ?
i know how to break them on arbitrary pieces :
import wave
win= wave.open('ffaudio.wav', 'rb')
wout= wave.open('ffsegment.wav', 'wb')
t0, t1= 2418, 2421 # cut audio between 2413, 2422 seconds
s0, s1= int(t0*win.getframerate()), int(t1*win.getframerate())
win.readframes(s0) # discard
frames= win.readframes(s1-s0)
wout.setparams(win.getparams())
wout.writeframes(frames)
win.close()
wout.close() -
How to xfade an accelerated stream into a stream of unchanged speed
9 mars 2024, par Matthias SimonHow to
xfade
one stream, that was speed up withsetpts
into another stream using ffmpeg ?

The natural approach would be :


ffmpeg
 -i a.mkv
 -i b.mkv
 -filter_complex "
 [0:v]setpts=0.2*(PTS-STARTPTS)[A_OUT];
 [A_OUT][1:v]xfade=duration=2:offset=10[out]" 
 -map '[out]'
 out.mkv



but this always results in a 5x speed up of the second stream during the 2sec transition time of xfade. In other words, during xfade, the PTS definition of the first stream is used for the second stream.