Recherche avancée

Médias (91)

Autres articles (100)

  • Gestion des droits de création et d’édition des objets

    8 février 2011, par

    Par défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;

  • Dépôt de média et thèmes par FTP

    31 mai 2013, par

    L’outil MédiaSPIP traite aussi les média transférés par la voie FTP. Si vous préférez déposer par cette voie, récupérez les identifiants d’accès vers votre site MédiaSPIP et utilisez votre client FTP favori.
    Vous trouverez dès le départ les dossiers suivants dans votre espace FTP : config/ : dossier de configuration du site IMG/ : dossier des média déjà traités et en ligne sur le site local/ : répertoire cache du site web themes/ : les thèmes ou les feuilles de style personnalisées tmp/ : dossier de travail (...)

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

Sur d’autres sites (8464)

  • 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