Recherche avancée

Médias (0)

Mot : - Tags -/clipboard

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

Autres articles (98)

  • Mise à jour de la version 0.1 vers 0.2

    24 juin 2013, par

    Explications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
    Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

Sur d’autres sites (9488)

  • I'm having problem encoding video using Laravel FFMPEG to save it to Minio storage

    8 juillet 2022, par Ibrahim Ahmad

    I am trying to convert video from .mp4 extension into HLS format (.m3u8) using Laravel FFMPEG.

    


    FFMpeg::fromDisk('minio')
          ->open($videoFile)
          ->exportForHLS()
          ->onProgress(function ($percentage) use ($movie) {
               Cache::put('progress-' . $movie->id, $percentage);

               if($percentage >= 100) {
                 Cache::forget('progress-' . $movie->id);
                }
             })
             ->toDisk('minio')
             ->addFormat($lowBitrate, function (HLSVideoFilters $filter) {
                 $filter->resize(480, 360);
             })
             ->addFormat($midBitrate, function (HLSVideoFilters $filter) {
                 $filter->resize(852, 480);
              })
              ->addFormat($highBitrate, function (HLSVideoFilters $filter) {
                  $filter->resize(1920, 1080);
              })
              ->save($newFile);


    


    I have a .mp4 video stored in Minio S3 storage, want to export to Minio S3 storage again. And I came up with this error

    


    RecursiveDirectoryIterator::__construct(C:\Windows\Temp/52325dd01cfde90a\): Access is deni (code: 5)


    


    What does the error message say ? But when I export the video file to local, it works totally fine. How do I solve this problem. Thanks.

    


    Update :
The export process requires windows temporary folder, and I cleared the temporary folder, the problem is solved for now. This probably the temporary folder can't hold many files.

    


  • What do I need in order to save animation videos from matplotlib in mp3 format ?

    27 juin 2022, par DarthMalloc

    I am using python3.8 on Linux Mint 19.3, and I am trying to save an animation created by a cellular automata model in matplotlib. My actual code for the model is private, but it uses the same code for saving the animation as the code shown below, which is a slight modification of one of the examples shown in the official matplotlib documentation :

    


    import numpy as np
import matplotlib.pyplot as plt
import matplotlib.animation as animation

fig, ax = plt.subplots()


def f(x, y):
    return np.sin(x) + np.cos(y)

x = np.linspace(0, 2 * np.pi, 120)
y = np.linspace(0, 2 * np.pi, 100).reshape(-1, 1)

fig, ax = plt.subplots()


    
ims = []
for i in range(60):
    x += np.pi / 15.
    y += np.pi / 20.
    im = ax.imshow(f(x, y), animated=True)
    if i == 0:
        ax.imshow(f(x, y))  # show an initial one first
    ims.append([im])

ani = animation.ArtistAnimation(fig, ims, interval=50, blit=True,
                                    repeat_delay=1000)

    # To save the animation, use e.g.
    #
    # ani.save("movie.mp4")
    #
    # or
    #
writer = animation.FFMpegWriter(fps=15, metadata=dict(artist='Me'), bitrate=1800)
ani.save("movie.mp3", writer=writer)


    


    When executed, the code produces this error :

    


        MovieWriter stderr:&#xA;    Output file #0 does not contain any stream&#xA;&#xA;    Traceback (most recent call last):&#xA;      File "/usr/local/lib/python3.8/dist-packages/matplotlib/animation.py", line 234, in saving&#xA;        yield self&#xA;      File "/usr/local/lib/python3.8/dist-packages/matplotlib/animation.py", line 1093, in save&#xA;        writer.grab_frame(**savefig_kwargs)&#xA;      File "/usr/local/lib/python3.8/dist-packages/matplotlib/animation.py", line 351, in grab_frame&#xA;        self.fig.savefig(self._proc.stdin, format=self.frame_format,&#xA;      File "/usr/local/lib/python3.8/dist-packages/matplotlib/figure.py", line 3046, in savefig&#xA;        self.canvas.print_figure(fname, **kwargs)&#xA;      File "/usr/local/lib/python3.8/dist-packages/matplotlib/backend_bases.py", line 2319, in print_figure&#xA;        result = print_method(&#xA;      File "/usr/local/lib/python3.8/dist-packages/matplotlib/backend_bases.py", line 1648, in wrapper&#xA;        return func(*args, **kwargs)&#xA;      File "/usr/local/lib/python3.8/dist-packages/matplotlib/_api/deprecation.py", line 415, in wrapper&#xA;        return func(*inner_args, **inner_kwargs)&#xA;      File "/usr/local/lib/python3.8/dist-packages/matplotlib/backends/backend_agg.py", line 486, in print_raw&#xA;        fh.write(renderer.buffer_rgba())&#xA;    BrokenPipeError: [Errno 32] Broken pipe&#xA;&#xA;    During handling of the above exception, another exception occurred:&#xA;&#xA;    Traceback (most recent call last):&#xA;      File "/home/justin/animation_test.py", line 36, in <module>&#xA;        ani.save("movie.mp3", writer=writer)&#xA;      File "/usr/local/lib/python3.8/dist-packages/matplotlib/animation.py", line 1093, in save&#xA;        writer.grab_frame(**savefig_kwargs)&#xA;      File "/usr/lib/python3.8/contextlib.py", line 131, in __exit__&#xA;        self.gen.throw(type, value, traceback)&#xA;      File "/usr/local/lib/python3.8/dist-packages/matplotlib/animation.py", line 236, in saving&#xA;        self.finish()&#xA;      File "/usr/local/lib/python3.8/dist-packages/matplotlib/animation.py", line 342, in finish&#xA;        self._cleanup()  # Inline _cleanup() once cleanup() is removed.&#xA;      File "/usr/local/lib/python3.8/dist-packages/matplotlib/animation.py", line 373, in _cleanup&#xA;        raise subprocess.CalledProcessError(&#xA;    subprocess.CalledProcessError: Command &#x27;[&#x27;ffmpeg&#x27;, &#x27;-f&#x27;, &#x27;rawvideo&#x27;, &#x27;-vcodec&#x27;, &#x27;rawvideo&#x27;, &#x27;-s&#x27;, &#x27;640x480&#x27;, &#x27;-pix_fmt&#x27;, &#x27;rgba&#x27;, &#x27;-r&#x27;, &#x27;15&#x27;, &#x27;-loglevel&#x27;, &#x27;error&#x27;, &#x27;-i&#x27;, &#x27;pipe:&#x27;, &#x27;-vcodec&#x27;, &#x27;h264&#x27;, &#x27;-pix_fmt&#x27;, &#x27;yuv420p&#x27;, &#x27;-b&#x27;, &#x27;1800k&#x27;, &#x27;-metadata&#x27;, &#x27;artist=Me&#x27;, &#x27;-y&#x27;, &#x27;movie.mp3&#x27;]&#x27; returned non-zero exit status 1.&#xA;</module>

    &#xA;

    I have looked at posts on similar queries concerning matplotlib animations, but none have specifically included the error Output file #0 does not contain any stream. I have little experience with ffmpeg, so I am wondering what might be missing.

    &#xA;

  • Cannot remove the video file created through ffmpeg save

    29 juin 2022, par light

    It gives this error :&#xA;os.remove("output.mp4")&#xA;PermissionError : [WinError 32] The process cannot access the file because it is being used by another process : 'output.mp4

    &#xA;

    I am first downloading a reddit video (with separate audio and video file) by joining audio and video files together using ffmpeg

    &#xA;

        with open("video.mp4", "wb") as f:&#xA;        g = requests.get(video_url, stream=True)&#xA;        f.write(g.content)&#xA;&#xA;    with open("audio.mp3", "wb") as f:&#xA;        g = requests.get(audio_url, stream=True)&#xA;        f.write(g.content)&#xA;&#xA;    os.system("ffmpeg -i video.mp4 -i audio.mp3 -c copy output.mp4")&#xA;    os.remove("audio.mp3")&#xA;    os.remove("video.mp4")&#xA;

    &#xA;

    After this I am uploading it to YouTube Using YouTube Api and then finally deleting it from the system. I tried everything I thought would solve this error.

    &#xA;

            os.system("exit")&#xA;        os.system("echo &#x27;q&#x27; >stop") &#xA;        os.system("exit()")&#xA;        os.remove("output.mp4")&#xA;

    &#xA;

    But it gives me Permission Error. Please help me with this problem I have no idea what could be wrong.

    &#xA;

    This is the method I am using to upload the file to YouTube.

    &#xA;

          request_body = {&#xA;            &#x27;snippet&#x27;: {&#xA;                &#x27;categoryI&#x27;: 19,&#xA;                &#x27;title&#x27;: f&#x27;{item.title}&#x27;,&#xA;                &#x27;description&#x27;: description,&#xA;                &#x27;tags&#x27;: Tags&#xA;                },&#xA;            &#x27;status&#x27;: {&#xA;                &#x27;privacyStatus&#x27;: &#x27;public&#x27;,&#xA;                &#x27;publishAt&#x27;: upload_date_time,&#xA;                &#x27;selfDeclaredMadeForKids&#x27;: False, &#xA;                },&#xA;            &#x27;notifySubscribers&#x27;: False&#xA;            }&#xA;&#xA;&#xA;      mediaFile = MediaFileUpload(r"output.mp4")&#xA;&#xA;      response_upload = service.videos().insert(&#xA;            part=&#x27;snippet,status&#x27;,&#xA;            body=request_body,&#xA;            media_body=mediaFile&#xA;        ).execute&#xA;

    &#xA;