Recherche avancée

Médias (1)

Mot : - Tags -/publicité

Autres articles (37)

  • Installation en mode ferme

    4 février 2011, par

    Le mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
    C’est la méthode que nous utilisons sur cette même plateforme.
    L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
    Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...)

  • Pas question de marché, de cloud etc...

    10 avril 2011

    Le vocabulaire utilisé sur ce site essaie d’éviter toute référence à la mode qui fleurit allègrement
    sur le web 2.0 et dans les entreprises qui en vivent.
    Vous êtes donc invité à bannir l’utilisation des termes "Brand", "Cloud", "Marché" etc...
    Notre motivation est avant tout de créer un outil simple, accessible à pour tout le monde, favorisant
    le partage de créations sur Internet et permettant aux auteurs de garder une autonomie optimale.
    Aucun "contrat Gold ou Premium" n’est donc prévu, aucun (...)

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

Sur d’autres sites (3008)

  • Speech recognition with python-telegram-bot without downloading an audio file

    25 juin 2022, par linz

    I'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)) 



    


  • how to solve '[mov,mp4,m4a,3gp,3g2,mj2 @ 0000021c356d9e00] moov atom not found' in opencv

    9 juillet 2022, par Daniel dos Santos

    I'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"

...



    


  • avcodec/h264dec : Skip late SEI

    27 avril 2022, par Michael Niedermayer
    avcodec/h264dec : Skip late SEI
    

    Fixes : Race condition
    Fixes : clusterfuzz-testcase-minimized-mediasource_MP2T_AVC_pipeline_integration_fuzzer-6282675434094592

    Found-by : google ClusterFuzz
    Tested-by : Dan Sanders <sandersd@google.com>
    Signed-off-by : Michael Niedermayer <michael@niedermayer.cc>

    • [DH] libavcodec/h264dec.c