Recherche avancée

Médias (91)

Autres articles (61)

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

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • Support de tous types de médias

    10 avril 2011

    Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)

Sur d’autres sites (7188)

  • FFMpegWriter() [Error 5] Access Denied

    8 juin 2016, par Guillermo

    So, I’m trying to save animations with the animation.save command. I installed ffmpeg in Windows 10 by placing a folder with its binaries in my drive C :\, I have also set the path in my system variables like C :\ffmpeg\bin, and finally, my code for the animation function saving looks like this

    if save=='True':
        mywriter = animation.FFMpegWriter()
        plt.rcParams['animation.ffmpeg_path'] = 'C:/ffmpeg/bin'
        ani.save('mymovie.avi',writer=mywriter,fps=30)

    and all other kind of variants such as :

       mpl.animation.ffmpeg_path = r'C:\ffmpeg\bin'
       mpl.animation.ffmpeg_path = 'C:\\ffmpeg\\bin'

    No matter what I do, the result is always :

    File "<stdin>", line 2, in <module>
    File "Plot.py", line 168, in animate
    ani.save('mymovie.avi',writer=mywriter,fps=30)
    File "c:\users\guillermo\appdata\local\enthought\canopy\user\lib\site-packages\matplotlib\animation.py", line 801, in save
    with writer.saving(self._fig, filename, dpi):
    File "C:\Users\Guillermo\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.6.1.3253.win-x86_64\lib\contextlib.py", line 17, in __enter__
    return self.gen.next()
    File "c:\users\guillermo\appdata\local\enthought\canopy\user\lib\site-packages\matplotlib\animation.py", line 194, in saving
    self.setup(*args)
    File "c:\users\guillermo\appdata\local\enthought\canopy\user\lib\site-packages\matplotlib\animation.py", line 184, in setup
    self._run()
    File "c:\users\guillermo\appdata\local\enthought\canopy\user\lib\site-packages\matplotlib\animation.py", line 212, in _run
    creationflags=subprocess_creation_flags)
    File "C:\Users\Guillermo\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.6.1.3253.win-x86_64\lib\subprocess.py", line 710, in __init__
    errread, errwrite)
    File "C:\Users\Guillermo\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.6.1.3253.win-x86_64\lib\subprocess.py", line 958, in _execute_child
    startupinfo)
    WindowsError: [Error 5] Access Denied
    </module></stdin>

    Any ideas ? :D

    ------------------------------------------------------------------------------

    EDIT : I will reference this answer as it is the one that helped me the best :
    http://stackoverflow.com/a/27017734/6050676

    It worked perfectly when using :

    plt.rcParams['animation.ffmpeg_path'] = 'C:\\ffmpeg\\bin\\ffmpeg.exe'  
  • lavfi/vf_*_cuda : do not access hw contexts before checking they exist

    5 août 2024, par Anton Khirnov
    lavfi/vf_*_cuda : do not access hw contexts before checking they exist
    

    The checks are performed in init_processing_chain().

    • [DH] libavfilter/vf_bilateral_cuda.c
    • [DH] libavfilter/vf_chromakey_cuda.c
    • [DH] libavfilter/vf_colorspace_cuda.c
    • [DH] libavfilter/vf_scale_cuda.c
  • Cannot access video in node buffer

    21 avril 2016, par user2792129

    Within my aws-lambda function, I’m trying take a snapshot of the first frame of an mp4 video that I uploaded. I’m using node-fluent-ffmpeg to do this. My logs say its not recognizing the source. So I logged the source (response.Body) and I got this :

    <buffer 00="00" 14="14" 66="66" 74="74" 79="79" 70="70" 71="71" 20="20" 08="08" 77="77" 69="69" 64="64" 65="65" 36="36" fc="fc" 6d="6d" 61="61" cc="cc" 40="40" 07="07" 01="01" 02="02" 99="99" 3d="3d" b7="b7" 51="51" 9a="9a" 2a="2a" 2c="2c" 8b="8b">
    </buffer>

    Can I access the buffer directly, or Is there a way i should be formatting this before I try to use it in this ffmpeg method ?

       // Download the video from S3, get thumbnail, and upload to a different S3 bucket.
        async.waterfall([
               function download(next) {
                   // Download the video from S3 into a buffer.
                   s3.getObject({
                           Bucket: srcBucket,
                           Key: srcKey
                       },
                       next);
                   },
               function snapshot(response, next) {
                   console.log('response.Body-------------------> ', response.Body);
                   // Get the first frame of the video and write it to tempDir
                   var proc = new ffmpeg(response.Body)
                     .takeScreenshots({
                         count: 1,
                         timemarks: [ '2' ] // number of seconds
                       }, tempDir, function(err) {
                       console.log('screenshots were saved')
                     });

                   },
               function transform(response, next) {
                   gm(tempDir).size(function(err, size) {
                       // Infer the scaling factor to avoid stretching the image unnaturally.
                       WIDTH = size.width;
                       HEIGHT = size.height;


                       if (WIDTH > HEIGHT) {
                           var side = HEIGHT;
                       }
                       else{
                           var side = WIDTH;
                       }

                       var scalingFactor = Math.min(
                                       MAX_WIDTH / side,
                                       MAX_HEIGHT / side
                                   );
                                   var width  = scalingFactor * side;
                                   var height = scalingFactor * side;

                       // Transform the image buffer in memory.
                       this.gravity("Center").crop(side, side).resize(width, height)
                           .toBuffer(imageType, function(err, buffer) {
                               if (err) {
                                   next(err);
                                   console.log(err);
                               } else {
                                   next(null, response.ContentType, buffer);

                               }
                           });


                   });
               },
               function upload(contentType, data, next) {
                   // Stream the transformed image to a different S3 bucket.
                   s3.putObject({
                           Bucket: dstBucket,
                           Key: dstKey,
                           Body: data,
                           ContentType: contentType
                       },
                       next);
               }
               ], function (err) {
                   if (err) {
                       console.error(
                           'Unable to resize ' + srcBucket + '/' + srcKey +
                           ' and upload to ' + dstBucket + '/' + dstKey +
                           ' due to an error: ' + err
                       );
                   } else {
                       console.log(
                           'Successfully resized ' + srcBucket + '/' + srcKey +
                           ' and uploaded to ' + dstBucket + '/' + dstKey
                       );
                   }

                   callback(null, "message");
               }


           );

    Heres my log if that helps :

    enter image description here