Recherche avancée

Médias (3)

Mot : - Tags -/spip

Autres articles (66)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • Les vidéos

    21 avril 2011, par

    Comme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
    Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
    Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...)

  • Utilisation et configuration du script

    19 janvier 2011, par

    Informations spécifiques à la distribution Debian
    Si vous utilisez cette distribution, vous devrez activer les dépôts "debian-multimedia" comme expliqué ici :
    Depuis la version 0.3.1 du script, le dépôt peut être automatiquement activé à la suite d’une question.
    Récupération du script
    Le script d’installation peut être récupéré de deux manières différentes.
    Via svn en utilisant la commande pour récupérer le code source à jour :
    svn co (...)

Sur d’autres sites (6574)

  • How can I get my saved mp4 to exactly match the output of plot.show() ?

    10 mai 2019, par Jimmy

    When I try to save the results of an animation to mp4 using ffmpeg, I am getting a jumbled mess.

    plt.show() shows exactly what I want it to show in the animation. However, when I save it using ffmpeg, the result is very different from what plt.show() returns. I have tried various arguments for fps etc. but nothing has helped.

    %matplotlib
    import pandas as pd
    import matplotlib as mpl ## uncomment this if you are running this on a Mac
    #mpl.use('TkAgg')         ## and want to use blit=True
    import matplotlib.pyplot as plt
    import matplotlib.animation as animation
    import numpy as np
    import csv

    people = ('','Jim', 'Dan')
    plt.rcdefaults()
    fig, ax = plt.subplots()
    y_pos = np.arange(len(people))

    ax.set_xlim(0,10)
    ax.set_yticks(y_pos)
    ax.set_yticklabels(people)
    ax.invert_yaxis()
    ax.set_xlabel('Skill')
    titleList=['Basketball','Hockey','Baseball']
    df=[[0,5,7],[0,4,9],[0,2,6]]
    def animate(i):
      # Example data
       while i<3:
           ax.set_yticks(y_pos)
           ax.set_yticklabels(people)
           ax.set_xlabel(titleList[i])
           performance=df[i]

           title = ax.text(0.5,0.95,str(titleList[i]), bbox={'facecolor':'w', 'alpha':0.5, 'pad':5},transform=ax.transAxes, ha="center")

           rects = ax.barh(y_pos, performance, align='center',
                   color='blue', ecolor='None')
           return [rect for rect in rects] + [title]


    ani = animation.FuncAnimation(fig,animate, frames=3, blit=True
                               ,interval=2000,repeat=False)

    plt.rcParams['animation.ffmpeg_path'] = 'C:\\ffmpeg\\bin\\ffmpeg.exe'
    Writer = animation.writers['ffmpeg']
    ani.save('test.mp4')
    plt.show()

    The result is a very fast video where all the data gets written over (similar to the plt.show() results when blit=False).

  • Revision 36945 : au final pas grand chose passe dans les fichiers de presets ... On ...

    5 avril 2010, par kent1@… — Log

    au final pas grand chose passe dans les fichiers de presets ...
    On repasse les codec et les bitrates dans la ligne de commande
    On commence à améliorer grandement la conf

  • Pydub dir error . dynamic file path dosent play sound but with specific file path the code works fine

    20 avril 2021, par anshul raj

    hello developers idk whats wrong with this code it works fine when i give exact file path to the music file but if i pass it in dynamic way it doesnt work . actually my code is that user give a music file name it get downloaded then with the meta id it find the file in downloads dir then play it

    


     def songplayer(self,meta):
        def playmmusic(name):
            from pydub.playback import play
            from pydub import AudioSegment
            AudioSegment.converter = "C:\\ffmpeg\\bin\\ffmpeg.exe"
            AudioSegment.ffmpeg = "C:\\ffmpeg\\bin\\ffmpeg.exe"
            AudioSegment.ffprobe = "C:\\ffmpeg\\bin\\ffprobe.exe"
            sound = AudioSegment.from_file(name)
            play(sound)

        print(colored("Currently Playing : " + meta['title'],'yellow'))
        r=meta['id']
        tt='./downloads/'+r
        playmmusic(tt)