Recherche avancée

Médias (0)

Mot : - Tags -/optimisation

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (72)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque 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 (...)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

  • XMP PHP

    13 mai 2011, par

    Dixit Wikipedia, XMP signifie :
    Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
    Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
    XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...)

Sur d’autres sites (5528)

  • Very basic Moviepy script failing to run

    1er juillet 2018, par cem akbulut

    So, I have this very basic script that concatenates two videos, and adds a background sound.

    def intro():

       voiceoverIntro = AudioFileClip(audio[3]) #get path for intro.mp3


       introVideo = []
       temp = p1vid + p2vid + p3vid

       for x in temp: # add product videos to introVideo if they are longer than intro.mp3
           x = VideoFileClip(x)

           if x.duration >= voiceoverIntro.duration:
               introVideo.append(x)


       if len(introVideo) >= 1:

           #Get the video and turn off its volume
           introBg = introVideo[0].volumex(0).resize((1280,720))
           introBg = introBg.set_audio(voiceoverIntro).set_duration(voiceoverIntro.duration)


           introBg.reader.close()
           introBg.audio.reader.close_proc()

           return introBg

    And this function creates the second clip

    def productThreeOpener(productName):
       opener3 = VideoFileClip("media/number3.mp4").volumex(0).resize((1280,720))



       text = TextClip(productName,fontsize=60,color='white', font="Dekar")\
           .set_pos(("right", "center"))\
           .set_duration(3)\
           .set_start(2)\
           .crossfadein(1)\
           .crossfadeout(1)\
           .margin(right=200,opacity=0)

       opener3 = CompositeVideoClip([opener3, text])

       return opener3

    Now we just concatenate the two outputs

    final_clip = concatenate_videoclips([intro, productThreeOpener], method="compose")

    final_clip.resize((1280, 720)).write_videofile("output/intro.mp4", threads=8, fps=24, progress_bar=False)

    Running the code above returns this error ;

    Traceback (most recent call last):
    [MoviePy] >>>> Building video output/intro.mp4
     File "C:/Users/Akbulut/PycharmProjects/youtubeVideoEditor/vidEditor/sandbox.py", line 145, in <module>
    [MoviePy] Writing audio in introTEMP_MPY_wvf_snd.mp3
       final_clip.write_videofile("output/intro.mp4", threads=8, fps=24, progress_bar=False)
     File "", line 2, in write_videofile
     File "C:\Program Files\Python36\lib\site-packages\moviepy\decorators.py", line 54, in requires_duration
       return f(clip, *a, **k)
     File "", line 2, in write_videofile
     File "C:\Program Files\Python36\lib\site-packages\moviepy\decorators.py", line 137, in use_clip_fps_by_default
       return f(clip, *new_a, **new_kw)
     File "", line 2, in write_videofile
     File "C:\Program Files\Python36\lib\site-packages\moviepy\decorators.py", line 22, in convert_masks_to_RGB
       return f(clip, *a, **k)
     File "C:\Program Files\Python36\lib\site-packages\moviepy\video\VideoClip.py", line 318, in write_videofile
       progress_bar=progress_bar)
     File "", line 2, in write_audiofile
     File "C:\Program Files\Python36\lib\site-packages\moviepy\decorators.py", line 54, in requires_duration
       return f(clip, *a, **k)
     File "C:\Program Files\Python36\lib\site-packages\moviepy\audio\AudioClip.py", line 213, in write_audiofile
       progress_bar=progress_bar)
     File "", line 2, in ffmpeg_audiowrite
     File "C:\Program Files\Python36\lib\site-packages\moviepy\decorators.py", line 54, in requires_duration
       return f(clip, *a, **k)
     File "C:\Program Files\Python36\lib\site-packages\moviepy\audio\io\ffmpeg_audiowriter.py", line 165, in ffmpeg_audiowrite
       ffmpeg_params=ffmpeg_params)
     File "C:\Program Files\Python36\lib\site-packages\moviepy\audio\io\ffmpeg_audiowriter.py", line 71, in __init__
       self.proc = sp.Popen(cmd, **popen_params)
     File "C:\Program Files\Python36\lib\subprocess.py", line 594, in __init__
       _cleanup()
     File "C:\Program Files\Python36\lib\subprocess.py", line 205, in _cleanup
       res = inst._internal_poll(_deadstate=sys.maxsize)
     File "C:\Program Files\Python36\lib\subprocess.py", line 1025, in _internal_poll
       if _WaitForSingleObject(self._handle, 0) == _WAIT_OBJECT_0:
    OSError: [WinError 6] İşleyici geçersiz
    Exception ignored in: <bound method="method" of="of" object="object" at="at" 0x0000000a885019b0="0x0000000a885019b0">>
    Traceback (most recent call last):
     File "C:\Program Files\Python36\lib\site-packages\moviepy\audio\io\ffmpeg_audiowriter.py", line 134, in __del__
       self.close()
     File "C:\Program Files\Python36\lib\site-packages\moviepy\audio\io\ffmpeg_audiowriter.py", line 122, in close
       if self.proc:
    AttributeError: 'FFMPEG_AudioWriter' object has no attribute 'proc'

    Process finished with exit code 1
    </bound></module>

    I strictly followed MoviePY installation guide, installed it and all of its dependencies about 2 days ago. I work on a 64b Windows machine. Python version 3.6.1

    I’ve been stuck with this error for over a day now, and I don’t know what to try.. Any help/advice is highly appreciated.

    Thanks.

  • How do I save `RTSP` streams as `*.mp4` files in Golang ? [closed]

    14 septembre 2021, par Clancy Zeng

    I need to use Golang to save the data from the RTSP stream to a *.mp4 video file for a specified length of time.

    &#xA;

    I wanted to install an FFmpeg application and then call a command like this from Golang to solve my needs.

    &#xA;

    &#xA;

    ffmpeg -i rtsp ://192.168.108.132:8554/profile0 -r 16 -tt 60 /tmp/test.mp4

    &#xA;

    &#xA;

    But installing FFMPEG takes up hundreds of megabytes of space.So this idea was rejected by the leadership.

    &#xA;

    Is there a pure Golang implementation library that can address my needs ?Or is there a golang-only library that parses RTSP streams and saves them as *.MP4 video files ?

    &#xA;

  • I cant save the animation in ffmpeg

    22 mai 2021, par Gokul

    i tried various examples though i cant find proper solution. This is the example code of my project i want to save this in a mp4 format and i used ffmpeg. the animation was saved if I use df = pd.DataFrame(np.random.rand(250,3)) but it is not working for my sample code, it showed key error = 0. Note : df1 = pd.DataFrame(np.random.randint(5,15,[250,3])).&#xA;Any suggestion for this would be appreciated. Thank you in advance

    &#xA;

    import pandas as pd&#xA;import numpy as np&#xA;import ma``tplotlib.pyplot as plt&#xA;import matplotlib.animation as animation&#xA;&#xA;df = data.iloc[0:250, 4:12]&#xA;df1 = df2.iloc[:,0:3]&#xA;&#xA;a1 = df.iloc[:,0]/2&#xA;a2 = df.iloc[:,1]/2&#xA;b1 = df.iloc[:,2]/2&#xA;b2 = df.iloc[:,3]/2&#xA;c1 = df.iloc[:,4]/2&#xA;c2 = df.iloc[:,5]/2&#xA;m1 = df1.iloc[:,0]&#xA;m2 = df1.iloc[:,1]&#xA;m3 = df1.iloc[:,2]&#xA;&#xA;fig ,ax = plt.subplots()&#xA;&#xA;l1, = ax.plot (vert1, vert2, &#x27;ro&#x27;, markersize = m1[0])&#xA;l2, = ax.plot (long1, long2, &#x27;ro&#x27;, markersize = m2[0])&#xA;l3, = ax.plot (tras1, tras2, &#x27;ro&#x27;, markersize = m3[0])&#xA;&#xA;def init():    &#xA;    l1.set_data([],[])&#xA;    l2.set_data([],[])&#xA;    l3.set_data([],[])&#xA;    &#xA;    return (l1,l2,l3)&#xA;&#xA;def animate(i,l1,l2,l3):&#xA;    &#xA;    l1.set_data(vert1[i], vert2[i])&#xA;    l1.set_markersize(m1[i])&#xA;    l2.set_data(long1[i], long2[i])&#xA;    l2.set_markersize(m2[i])&#xA;    l3.set_data(tras1[i], tras2[i])&#xA;    l3.set_markersize(m3[i])&#xA;&#xA;    return (l1,l2,l3)&#xA;&#xA;Writer = animation.writers[&#x27;ffmpeg&#x27;]&#xA;writer = Writer(fps= 100, metadata = dict(artist = &#x27;me&#x27;), bitrate = 1800)&#xA;&#xA;ani = animation.FuncAnimation(fig, animate, fargs=(l1,l2,l3), init_func=init, interval=10, blit=False)&#xA;ani.save(&#x27;/Users/gokulthangavel/Downloads/basic_animation.mp4&#x27;, writer = writer)&#xA;&#xA;plt.show()&#xA;

    &#xA;