
Recherche avancée
Autres articles (111)
-
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 (...) -
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 (...)
Sur d’autres sites (14903)
-
avcodec/h264dec : Skip late SEI
27 avril 2022, par Michael Niedermayeravcodec/h264dec : Skip late SEI
Fixes : Race condition
Fixes : clusterfuzz-testcase-minimized-mediasource_MP2T_AVC_pipeline_integration_fuzzer-6282675434094592Found-by : google ClusterFuzz
Tested-by : Dan Sanders <sandersd@google.com>
Signed-off-by : Michael Niedermayer <michael@niedermayer.cc> -
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))