Recherche avancée

Médias (1)

Mot : - Tags -/école

Autres articles (86)

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

  • D’autres logiciels intéressants

    12 avril 2011, par

    On ne revendique pas d’être les seuls à faire ce que l’on fait ... et on ne revendique surtout pas d’être les meilleurs non plus ... Ce que l’on fait, on essaie juste de le faire bien, et de mieux en mieux...
    La liste suivante correspond à des logiciels qui tendent peu ou prou à faire comme MediaSPIP ou que MediaSPIP tente peu ou prou à faire pareil, peu importe ...
    On ne les connais pas, on ne les a pas essayé, mais vous pouvez peut être y jeter un coup d’oeil.
    Videopress
    Site Internet : (...)

Sur d’autres sites (10844)

  • Im getting error when generating thumbnails using ffmpeg in firebase functions

    5 juillet 2020, par Sajjad

    I'm writing this code for generating thumbnail from a video uploaded to firebase storage using FFmpeg, I am saving thumbnails first in the temp directory and then uploading it to firebase storage. The thumbnails are saved in temp dir but I'm getting an error while saving it to firebase storage. (EISDIR ERROR)

    


    const targetTempFilePath = path.join(os.tmpdir(), targetTempFileName);
const targetStorageFilePath = path.join(path.dirname(filePath), targetTempFileName);
ffmpeg.ffprobe(req.body.videoUrl, (err, metaData) => {
    if (err) {
      console.log(err);
    }

    fileDuration = metaData.format.duration;
  });

  ffmpeg(req.body.videoUrl)
    .on("filenames", (filenames) => {
      console.log("Will generate " + filenames.join(", "));
      thumbsFileUrl = "" })
    .on("end", () => {
      console.log(targetTempFilePath);
      admin
        .storage()
        .bucket()
        .upload(targetTempFilePath, {
          destination: targetStorageFilePath,
        })
        .then(() => {
          console.log("Output audio uploaded to", targetStorageFilePath);
          // fs.unlinkSync(tempLocalFile);
          return res.status(200).json({
            success: true,
            thumbsFileUrl: thumbsFileUrl,
            fileDuration: fileDuration,
          });
        })
        .catch((err) => {
          console.log(err);
          return res.json({ success: false });
        });
    })

    .screenshots({
      // Will take screens at 20%, 40%, 60% and 80% of the video
      count: 2,
      folder: targetTempFilePath,
    });


    


  • exec ffmpeg not working in nginx.config file

    12 août 2020, par Dev

    I've created video streaming service using nginx-rtmp-module, Currently i'm facing issue with exec cmd not working in nginx.config file, I've tried many solution still not working.

    


    user  root;
daemon off;

error_log /dev/stdout info;

events {
    worker_connections 1024;
}

rtmp {
    server {
        listen ${RTMP_PORT};
        chunk_size 4000;

        application stream {
            live on;
            exec_push /www/files/ff.sh;
            exec_push /usr/bin/ffmpeg -re -i http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4  -c:v libx264 -preset veryfast -maxrate 3000k -bufsize 6000k -pix_fmt yuv420p -g 50 -c:a aac -b:a 160k -ac 2 -ar 44100 -f flv rtmp://127.0.0.1/hls/$name
            exec ffmpeg -i rtmp://127.0.0.1:1935/stream/$name
              -c:a libfdk_aac -b:a 128k -c:v libx264 -b:v 2500k -f flv -g 30 -r 30 -s 1280x720 -preset superfast -profile:v baseline rtmp://127.0.0.1:1935/hls/$name_720p2628kbs
              -c:a libfdk_aac -b:a 128k -c:v libx264 -b:v 1000k -f flv -g 30 -r 30 -s 854x480 -preset superfast -profile:v baseline rtmp://127.0.0.1:1935/hls/$name_480p1128kbs
              -c:a libfdk_aac -b:a 128k -c:v libx264 -b:v 750k -f flv -g 30 -r 30 -s 640x360 -preset superfast -profile:v baseline rtmp://127.0.0.1:1935/hls/$name_360p878kbs
              -c:a libfdk_aac -b:a 128k -c:v libx264 -b:v 400k -f flv -g 30 -r 30 -s 426x240 -preset superfast -profile:v baseline rtmp://127.0.0.1:1935/hls/$name_240p528kbs
              -c:a libfdk_aac -b:a 64k -c:v libx264 -b:v 200k -f flv -g 15 -r 15 -s 426x240 -preset superfast -profile:v baseline rtmp://127.0.0.1:1935/hls/$name_240p264kbs;
        }

        application hls {
            live on;
            hls on;
            hls_fragment_naming system;
            hls_fragment 5;
            hls_playlist_length 10;
            hls_path /opt/data/hls;
            hls_nested on;

            hls_variant _720p2628kbs BANDWIDTH=2628000,RESOLUTION=1280x720;
            hls_variant _480p1128kbs BANDWIDTH=1128000,RESOLUTION=854x480;
            hls_variant _360p878kbs BANDWIDTH=878000,RESOLUTION=640x360;
            hls_variant _240p528kbs BANDWIDTH=528000,RESOLUTION=426x240;
            hls_variant _240p264kbs BANDWIDTH=264000,RESOLUTION=426x240;
        }
    }
}

http {
    access_log /dev/stdout combined;

    ssl_ciphers         HIGH:!aNULL:!MD5;
    ssl_protocols       TLSv1 TLSv1.1 TLSv1.2;
    ssl_session_cache   shared:SSL:10m;
    ssl_session_timeout 10m;

    server {
        listen ${HTTP_PORT};

        # Uncomment these lines to enable SSL.
        # Update the ssl paths with your own certificate and private key.
        # listen 443 ssl;
        # ssl_certificate     /opt/certs/example.com.crt;
        # ssl_certificate_key /opt/certs/example.com.key;

        location /hls {
            types {
                application/vnd.apple.mpegurl m3u8;
                video/mp2t ts;
            }
            root /opt/data;
            add_header Cache-Control no-cache;
            add_header Access-Control-Allow-Origin *;
        }

        location /live {
          alias /opt/data/hls;
          types {
              application/vnd.apple.mpegurl m3u8;
              video/mp2t ts;
          }
          add_header Cache-Control no-cache;
          add_header Access-Control-Allow-Origin *;
        }

        location /stat {
            rtmp_stat all;
            rtmp_stat_stylesheet static/stat.xsl;
        }

        location /static {
            alias /www/static;
        }

        location = /crossdomain.xml {
            root /www/static;
            default_type text/xml;
            expires 24h;
        }
    }
}


    


    I've tried added user root at the top of file, exec_push, exec_static, exec ffmpeg, exec /usr/bin/ffmpeg and also write script file still not
working

    


    ff.sh files

    


    echo "running script";
ffmpeg -re -i http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4 -c:v libx264 -preset veryfast -maxrate 3000k -bufsize 6000k -pix_fmt yuv420p -g 50 -c:a aac -b:a 160k -ac 2 -ar 44100 -f flv rtmp://127.0.0.1/hls/my_video;


    


    when run above cmd from terminal it's working perfectly.

    


  • How to access uploaded file from multer ?

    13 avril 2017, par Somename

    Im able to upload an image to S3. Now, if the file selected is .gif, I want to be able to convert the .gif file to .mp4 and upload the converted file to S3. I am able to convert a .gif to .mp4 with ffmpeg only if I give the path of the file. How do I access the uploaded file from Multer ? Below is my code :

    var express = require('express');
    var bodyParser = require('body-parser');
    var app = express();
    var aws = require('aws-sdk');
    var multer = require('multer');
    var multerS3 = require('multer-s3');
    var s3 = new aws.S3();
    var ffmpeg = require('fluent-ffmpeg');


    var upload = multer({
       storage: multerS3({
           s3: s3,
           bucket: 'myBucket',
           key: function (req, file, cb) {
               console.log(file);
               var extension = file.originalname.substring(file.originalname.lastIndexOf('.')+1).toLowerCase();

                   if(extension=="gif"){
                   console.log("Uploaded a .gif file");

                   ffmpeg(file) //THIS IS NOT WORKING
                       .setFfmpegPath("C:\\ffmpeg\\bin\\ffmpeg.exe")
                         .output('./outputs/2.mp4')    //TRYING TO UPLOAD LOCALLY, WHICH FAILS
                         .on('end', function() {
                           console.log('Finished processing');
                         })
                         .run();
               }

               cb(null, filename);
           }
       })
    });

    I’m trying to access the uploaded file like this : ffmpeg(file) since file is an argument passed in the multer function.

    My form :

    <form action="/upload" method="post" enctype="multipart/form-data">
       <input type="file" /> <br />
       <input type="submit" value="Upload" />
    </form>

    In which part of the process do I convert the file ?

    Please help. Many thanks.