Recherche avancée

Médias (1)

Mot : - Tags -/Rennes

Autres articles (55)

  • 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

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

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

Sur d’autres sites (10987)

  • Create a progresa bar in rails while converting a file with ffmpeg

    15 avril 2017, par Raxor

    How i can create a progress bar in my view that update with ffmpeg while is converting from a video file mkv to webm

    Im using the gem ’paperclip’ and ’paperclip-av-transcoder’

    The file is uploaded fine but i need to show to the user something that tell him how long he has to wait

    postController.rb

    def create

    @article = current_user.articles.create(params_article)

    if @article.valid?
       @article.save
       if !@article.video_file_name.nil?
           @article.change_name_video
           @article.save
           @article.destroy_video_original
           respond_to do |format|
               format.js {render :create}
           end
       end
    else
       render :new
    end
    end

     def params_article
       params.require(:article).permit(:title, :body, :cover, :video)
     end

    form

       =simple_form_for @article ,html:{ :"data-type" => "js", id: "form"}, :remote => true do |f|
           .progress-wrapper
               .progress
                   .progress-bar{role: "progressbar"}
                       0%
           = f.input :video
           = f.input :cover
           =f.input  :title
           =f.input  :body
           =f.button  :submit
  • Installed ffmpeg, added to path, still can't save animation from Jupyter Notebook

    29 avril 2017, par dredre_420

    I’m trying to simulate a two-body orbit system working on Jupyter Notebook (python). Since the animation can’t display in-line I tried installing ffmpeg and adding it to the system path using steps outlined here : http://adaptivesamples.com/how-to-install-ffmpeg-on-windows/.

    However, when I try to save my animation using anim.save('orbit.mp4', fps=15, extra_args=['-vcodec', 'libx264']), I still get the error message : ValueError: Cannot save animation: no writers are available. Please install mencoder or ffmpeg to save animations.

    Not sure what else to try at this point, very inexperienced programmer here.

  • Splitting more then once with a library

    12 mai 2017, par Fearhunter

    I am doing a research for split video’s in four files for example. I was looking at this repository on github.

    https://github.com/vdaubry/html5-video-splitter

    It’s a very nice repo how to split a video. My question is : how can I split more files then only one cut ? When I split for the second time it will overwrite the previous one. Here is the open source code of the splitting :

    var childProcess = require("child_process");
    childProcess.spawn = require('cross-spawn');

    var http = require('http');
    var path = require("path");
    var fs = require("fs");
    var exec = require('child_process').exec;

    http.createServer(function (req, res) {
     if (req.method === 'OPTIONS') {
         console.log('!OPTIONS');
         var headers = {};
         headers["Access-Control-Allow-Origin"] = "*";
         headers["Access-Control-Allow-Methods"] = "POST, GET, PUT, DELETE, OPTIONS";
         headers["Access-Control-Allow-Credentials"] = false;
         headers["Access-Control-Max-Age"] = '86400';
         headers["Access-Control-Allow-Headers"] = "X-reqed-With, X-HTTP-Method-Override, Content-Type, Accept";
         res.writeHead(200, headers);
         res.end();
     }
     else if (req.method == 'POST') {
       var body = '';
       req.on('data', function (data) {
           body += data;
       });
       req.on('end', function () {
           var data = JSON.parse(body);
           var localPath = __dirname;
           var inputFilePath = localPath+"/videos/"+data.inputFilePath;
           var outputFilePath = localPath+"/videos/output-"+data.inputFilePath
           var start = data.begin;
           var end = data.end;

           var command = "ffmpeg -y -ss "+start+" -t "+(end-start)+" -i "+inputFilePath+" -vcodec copy -acodec copy "+outputFilePath;
           exec(command, function(error, stdout, stderr) {
             var msg = ""
             if(error) {
               console.log(error);
               msg = error.toString();
               res.writeHead(500, {'Content-Type': 'text/plain'});
             }
             else {
               console.log(stdout);
               res.writeHead(200, {'Content-Type': 'text/plain'});
             }
             res.end(msg);
           });
       });
     }
     else if (req.method == 'GET') {
       var filename = "index.html";
       if(req.url != "/") {
         filename = req.url
       }

       var ext = path.extname(filename);
       var localPath = __dirname;
       var validExtensions = {
         ".html" : "text/html",      
         ".js": "application/javascript",
         ".css": "text/css",
         ".txt": "text/plain",
         ".jpg": "image/jpeg",
         ".gif": "image/gif",
         ".png": "image/png",
         ".ico": "image/x-icon"
       };
       var mimeType = validExtensions[ext];

       if (mimeType) {
         localPath += "/interface/"+filename;
         fs.exists(localPath, function(exists) {
           if(exists) {
             console.log("Serving file: " + localPath);
             getFile(localPath, res, mimeType);
           } else {
             console.log("File not found: " + localPath);
             res.writeHead(404);
             res.end();
           }
         });

       } else {
         console.log("Invalid file extension detected: " + ext)
       }
     }
    }).listen(1337, '127.0.0.1');
    console.log('Server running at http://127.0.0.1:1337/');

    function getFile(localPath, res, mimeType) {
     fs.readFile(localPath, function(err, contents) {
       if(!err) {
         res.setHeader("Content-Length", contents.length);
         res.setHeader("Content-Type", mimeType);
         res.statusCode = 200;
         res.end(contents);
       } else {
         res.writeHead(500);
         res.end();
       }
     });
    }

    I have installed FFMPEG also to do this.

    Kind regards