
Recherche avancée
Médias (1)
-
GetID3 - Bloc informations de fichiers
9 avril 2013, par
Mis à jour : Mai 2013
Langue : français
Type : Image
Autres articles (81)
-
Multilang : améliorer l’interface pour les blocs multilingues
18 février 2011, parMultilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela. -
Le profil des utilisateurs
12 avril 2011, parChaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...) -
Configurer la prise en compte des langues
15 novembre 2010, parAccéder à la configuration et ajouter des langues prises en compte
Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)
Sur d’autres sites (8066)
-
Revision 3331 : On ajoute un accès à la configuration dans les menus
25 avril 2010, par kent1 — LogOn ajoute un accès à la configuration dans les menus
-
Reading RTMP streams using FFMPEG returns AVERROR_EOF randomly
9 octobre 2013, par user2628781I am using FFMpeg to receive RTMP streams. This logic is placed in a custom video player I am building.
I managed to successfully connect to the RTMP stream and display the video correctly. However, after a period in time, the stream terminates prematurely with an AVERROR_EOF when I perform av_read_frame().
This indicates to me that the file has ended so my demux, video and audio threads terminates thinking that the video has ended.
However, the video playback hasn't yet reached its end (in the case of a file streamed through rtmp) or from a live stream (which runs forever). The EOFs are received very randomly so it may run for say 7 min before this occurs or after 3 mins.Is this a characteristic behaviour of RTMP or am I doing something incorrectly ?
I am also having a similar problem with Http Live Streams using FFMpeg.A small snippet of the code is provided below :
AVPacket packet;
//start timeout timer and timeout
__interrupt_timer.start();
int ret = av_read_frame(format_context, &packet); //0: ok, <0: error/end
//invalidate the timer
__interrupt_timer.invalidate();
if (ret != 0) {
if (ret == AVERROR_EOF) { //end of file. FIXME: why no eof if replaying by seek(0)?
if (!eof) {
eof = true;
started_ = false;
pkt->data = QByteArray(); //flush
pkt->markEnd();
qDebug("End of file. %s %d", __FUNCTION__, __LINE__);
emit finished();
return true;
}
pkt->data = QByteArray(); //flush
//return true;
return false; //frames after eof are eof frames
} else if (ret == AVERROR_INVALIDDATA) {
qWarning("AVERROR_INVALIDDATA");
} else if (ret == AVERROR(EAGAIN)) {
return true;
}
qWarning("[AVDemuxer] error: %s", av_err2str(ret));
return false;
} -
os.walk returns file names but when trying to modify the files it says directory not found
13 avril 2021, par epWILLIm trying to walk through music folder and find all sub folders in it and convert the mp4's in all folders to wav. It prints out the correct file name but when it trys to convert it says directory not found.


I would like to us os.walk to go through all folders instead going through 1 folder and changing the name in the code for the other folders


This code works for one folder


import os
import ffmpeg
import time

path = './musicTest/'


os.chdir(path)
aud_files = os.listdir()
count = 0
count2 = 0


 ##convert mp4 to wav
for file in aud_files:
 os.system('ffmpeg -i "{}" -acodec pcm_s16le -ac 1 -ar 16000 output-{}.wav'.format(file, count))
 count = count + 1
 os.remove(file)



this is the code that gives me no directory found when using os.walk but it prints the file name


import os
from pydub import AudioSegment
import ffmpeg

path = "./musicTest/"
count = 0

for i, (root, dirs, files) in enumerate(os.walk(path)):
 if root is not path:
 for file in files:
 print(file)
 os.system('ffmpeg -i "{}" -acodec pcm_s16le -ac 1 -ar 16000 output-{}.wav'.format(file, count))
 count = count + 1