
Recherche avancée
Médias (91)
-
Les Miserables
9 décembre 2019, par
Mis à jour : Décembre 2019
Langue : français
Type : Textuel
-
VideoHandle
8 novembre 2019, par
Mis à jour : Novembre 2019
Langue : français
Type : Video
-
Somos millones 1
21 juillet 2014, par
Mis à jour : Juin 2015
Langue : français
Type : Video
-
Un test - mauritanie
3 avril 2014, par
Mis à jour : Avril 2014
Langue : français
Type : Textuel
-
Pourquoi Obama lit il mes mails ?
4 février 2014, par
Mis à jour : Février 2014
Langue : français
-
IMG 0222
6 octobre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Image
Autres articles (96)
-
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 (...) -
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 (...)
Sur d’autres sites (6153)
-
how to solve '[mov,mp4,m4a,3gp,3g2,mj2 @ 0000021c356d9e00] moov atom not found' in opencv
9 juillet 2022, par Daniel dos SantosI'm trying to create a video uploader in a kivy app using OpenCV. However, when I try to upload a video, I get the following error



[mov,mp4,m4a,3gp,3g2,mj2 @ 0000021c356d9e00] moov atom not found
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000021c356d9e00] moov atom not found
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000021c356d9e00] moov atom not found
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000021c356d9e00] moov atom not found
...




The screen becomes unresponsive during this. I edited the save() function recently and added an uploadClass() because I was getting another error.



main.py



...

class SaveDialog(Screen):
 save = ObjectProperty(None)
 text_input = ObjectProperty(None)
 cancel = ObjectProperty(None)

 def save(self, path, filename):

 for letter in os.path.join(path, filename):
 print(letter)

 def find(s, ch):
 return [i for i, letter in enumerate(s) if letter == ch]

 os_path_simpl = list(os.path.join(path, filename))

 for t in range(len(find(os.path.join(path, filename), '\\'))):
 os_path_simpl[find(os.path.join(path, filename), '\\')[t]] = '\\'

 class uploadClass(object):
 video = ''.join(os_path_simpl)

 def __init__(self, src=video):
 self.video_selected = cv2.VideoCapture(src)

 self.vid_cod = cv2.VideoWriter_fourcc(*'mp4v')
 self.out = cv2.VideoWriter('media/testOne.mp4', self.vid_cod, 20.0, (640,480))

 self.thread = Thread(target=self.update, args=())
 self.thread.daemon = True
 self.thread.start()

 def update(self):
 while True:
 if self.video_selected.isOpened():
 (self.status, self.frame) = self.video_selected.read()

 def show_frame(self):
 if self.status:
 cv2.imshow('uploading', self.frame)

 if cv2.waitKey(10) & 0xFF == ord('q'):
 self.video_selected.release()
 self.out.release()
 cv2.destroyAllWindows()
 exit(1)

 def save_frame(self):
 self.out.write(self.frame)

 rtsp_stream_link = 'media/testOne.mp4'
 upload_Class = uploadClass(rtsp_stream_link)
 while True:
 try:
 upload_Class.__init__()
 upload_Class.show_frame()
 upload_Class.save_frame()
 except AttributeError:
 pass

 sm.current = "home"

...




-
Speech recognition with python-telegram-bot without downloading an audio file
25 juin 2022, par linzI'm developing a telegram bot in which the user sends a voice message, the bot transcribes it and sends back what was said in text.
For that I am using the python-telegram-bot library and the speech_recognition library with the google engine.
My problem is, the voice messages sent by the users are .mp3, however in order to transcribe them i need to convert them to .wav. In order to do that I have to download the file sent to the bot.
Is there a way to avoid that ? I understand this is not an efficient and a safe way to do this since many active users at once will result in race conditions and takes a lot of space.



def voice_handler(update, context):
 bot = context.bot
 file = bot.getFile(update.message.voice.file_id)
 file.download('voice.mp3')
 filename = "voice.wav"
 
 # convert mp3 to wav file
 subprocess.call(['ffmpeg', '-i', 'voice.mp3',
 'voice.wav', '-y'])

 # initialize the recognizer
 r = sr.Recognizer()
 
 # open the file
 with sr.AudioFile(filename) as source:
 
 # listen for the data (load audio to memory)
 audio_data = r.record(source)
 # recognize (convert from speech to text)
 text = r.recognize_google(audio_data, language='ar-AR')
 
 
def main() -> None:
 updater.dispatcher.add_handler(MessageHandler(Filters.voice, voice_handler)) 




-
avcodec/ffv1dec : Remove redundant writes, fix races
21 avril 2021, par Andreas Rheinhardtavcodec/ffv1dec : Remove redundant writes, fix races
Every modification of the data that is copied in update_thread_context()
is a data race if it happens after ff_thread_finish_setup. ffv1dec's
update_thread_context() simply uses memcpy for updating the new context,
so that every modification of the src's context is a race.
Some of these modifications are unnecessary : picture_number is write-only
for the decoder and cur will be reset when decoding the next frame anyway.
So remove them. And while just at it, also don't set cur for the slice
contexts as this variable is write-only.Reviewed-by : Anton Khirnov <anton@khirnov.net>
Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@outlook.com>