Recherche avancée

Médias (91)

Autres articles (77)

  • Use, discuss, criticize

    13 avril 2011, par

    Talk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
    The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
    A discussion list is available for all exchanges between users.

  • Organiser par catégorie

    17 mai 2013, par

    Dans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
    Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
    Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...)

  • Récupération d’informations sur le site maître à l’installation d’une instance

    26 novembre 2010, par

    Utilité
    Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
    Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...)

Sur d’autres sites (5384)

  • Revision 30177 : un plugin opensearch pour proposer d’ajouter son site aux moteurs ...

    24 juillet 2009, par brunobergot@… — Log

    un plugin opensearch pour proposer d’ajouter son site aux moteurs personnalisés des navigateurs qui supportent ce protocole

  • Using FFMPEG, how do I convert and publish video to main site in right time ?

    30 septembre 2018, par Izak

    I am building an online video platform. Using FFMPEG, I am able to upload a MP4 video to the server, convert it and play it. The problem is that while FFMPEG is still converting the video and has not chosen a thumbnail in the backend, the video is already published to the main site (frontend)...users see an ugly video placeholder and cannot play the video.

    I think I need to add a timer between conversion and publishing of the video to frontend ? Or how do you think I should solve this problem ?

    Thanks for your insight...(any shared code is also welcome)

    Isaac

  • ffmpeg download mp3 in chunks slower than whole file

    6 août 2021, par loretoparisi

    I'm programmatically downloading in Python mp3 file's as wav chunks, seeking at position with ss and t with ffmpeg resulting in a sequence of ffmpeg commands

    


    ffmpeg -i https://file-examples-com.github.io/uploads/2017/11/file_example_MP3_5MG.mp3 -acodec pcm_s16le -ac 1 -ar 44100 -ss 0:08:55.780000 -t 0:01:00.000000 -sn -vn -y -f wav pipe:1
ffmpeg -i https://file-examples-com.github.io/uploads/2017/11/file_example_MP3_5MG.mp3 -acodec pcm_s16le -ac 1 -ar 44100 -ss -ss 0:09:55.780000 -t 0:01:00.000000 -sn -vn -y -f wav pipe:1
ffmpeg -i https://file-examples-com.github.io/uploads/2017/11/file_example_MP3_5MG.mp3 -acodec pcm_s16le -ac 1 -ar 44100 -ss -ss -ss 0:10:55.780000 -t 0:01:00.000000 -sn -vn -y -f wav pipe:1
...


    


    executed via concurrent.futures.ThreadPoolExecutor in this way :

    


    with concurrent.futures.ThreadPoolExecutor(max_workers=NTHREADS) as executor:
        for i,cmd in enumerate(process_list):
            futures.append(executor.submit(downloader.chunk_download,(cmd,i)))

        for future in concurrent.futures.as_completed(futures):
            try:
                completed.append(future.result())
            except Exception as e:print(e)
    completed.sort() 
    for k,c in enumerate(completed):
        if not k:
            waveform = c[1]
        else:
            waveform = np.append(waveform,c[1])


    


    where chunk_download is concat the chunks into the whole waveform

    


    def chunk_download(self,args):
        cmd=args[0]
        i=args[1]
        print('Downloading chunk n° %i' % i)

        print( ' '.join(cmd))
        process = subprocess.run(cmd,
                            stdout=subprocess.PIPE,
                            stderr=subprocess.PIPE,
                            bufsize=10**8)
        #buffer, stderr = process.communicate()
        buffer = process.stdout
        stderr = process.stderr
        print('chunk n° %i DOWNLOADED' % i)
        # convert to signal
        chunk_waveform = np.frombuffer(buffer=buffer, dtype=np.uint16, offset=8*44)
        chunk_waveform = chunk_waveform.astype(self.dtype)  
        print(len(chunk_waveform)/44100) 

        return i,chunk_waveform


    


    this works ok, but if I download the whole mp3, executing the command in cmd like :

    


    ffmpeg -i https://file-examples-com.github.io/uploads/2017/11/file_example_MP3_5MG.mp3 -acodec pcm_s16le -ac 1 -ar 44100 -sn -vn -y -f wav pipe:1


    


    It will take less time than the concurrent chunks download for the same file length, while I would expect the opposite. Could be this related to ffmpeg threading option (param --thread ?). If not, why the concurrent chunks download operation is slower ?