Recherche avancée

Médias (0)

Mot : - Tags -/xmlrpc

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

Autres articles (63)

  • MediaSPIP Core : La Configuration

    9 novembre 2010, par

    MediaSPIP Core fournit par défaut trois pages différentes de configuration (ces pages utilisent le plugin de configuration CFG pour fonctionner) : une page spécifique à la configuration générale du squelettes ; une page spécifique à la configuration de la page d’accueil du site ; une page spécifique à la configuration des secteurs ;
    Il fournit également une page supplémentaire qui n’apparait que lorsque certains plugins sont activés permettant de contrôler l’affichage et les fonctionnalités spécifiques (...)

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

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

  • lavfi/opencl : Avoid deprecation warnings when built with post-1.2 headers

    19 mars 2018, par Mark Thompson
    lavfi/opencl : Avoid deprecation warnings when built with post-1.2 headers
    

    The intended target is OpenCL 1.2, so disable warnings for APIs deprecated
    after that. This primarily applies to clCreateCommandQueue(), we can't use
    the replacement clCreateCommandQueueWithProperties() because it was
    introduced in OpenCL 2.0.

    Also remove some unnecessary includes from overlay and program filters so
    that the define is available at the right moment.

    • [DH] libavfilter/opencl.h
    • [DH] libavfilter/vf_overlay_opencl.c
    • [DH] libavfilter/vf_program_opencl.c
  • video upload is having issue post variable is not getting there

    30 juillet 2015, par sonam Sharma

    please look the the code below

      <?php
    session_start();
    include "conn.php";
    $sid = $_SESSION['id'];
     $ipIP=$_SERVER['REMOTE_ADDR'];
    $uploaddir = "mem/$sid/video/";

    //Check the file is of correct format.  
     function checkfile($input){
     $ext = array('mpg', 'wma', 'mov', 'flv', 'mp4', 'avi', 'qt', 'wmv', 'rm',    'mkv', 'MP4');
    $extfile = substr($input['name'],-4);
    $extfile = explode('.',$extfile);
      $good = array();
      @$extfile = $extfile[1];
         if(in_array($extfile, $ext)){
        $good['safe'] = true;
        $good['ext'] = $extfile;
        }else{
         $good['safe'] = false;
     }
     return $good;
    }
    if(!isset($_POST['profileimage99']) || $_FILES["profileimage99"]["size"] ==''){
    echo 'No file added';die;
    }
     // if the form was submitted process request if there is a file for uploading
     if(@$_FILES["profileimage99"]["size"] < 102400000000){
      //$live_dir is for videos after converted to flv
       $live_dir = "mem/$sid/video/";
     //$live_img is for the first frame thumbs.
       $live_img = "mem/$sid/img/";        
       $seed = rand(11111111111193,9999999999999929) * rand(3,9);
       $getEXT=substr(@$_FILES['profileimage99']['name'],-5);
       $upload = $seed.$getEXT;
       $uploadfile = $uploaddir .$upload;        

       $safe_file = checkfile(@$_FILES['profileimage99']);
       if($safe_file['safe'] == 1){
                   if (move_uploaded_file(@$_FILES['profileimage99']['tmp_name'], $uploadfile)) {
                   echo "Video uploaded.";

                   $base = basename($uploadfile, $safe_file['ext']);
                   $new_file = $base.'flv';
                   $new_image = $base.'jpg';
                   $new_image_path = $live_img.$new_image;
                   $new_flv = $live_dir.$new_file;

           require 'vendor/autoload.php';
           //ececute ffmpeg generate flv
           exec('ffmpeg -i '.$uploadfile.' -f flv -s 640x360 '.$new_flv.'');
           //execute ffmpeg and create thumb
           exec('ffmpeg  -i '.$uploadfile.' -f mjpeg -vframes 17 -s 426x240 -an '.$new_image_path.'');
           echo 'Thank You For Your Video!<br />';

       //create query to store video
       if(isset($_POST['title'])){$titlename=$_POST['title'];}else{$titlename='';}
       if(isset($_POST['desc'])){$desc=$_POST['desc'];}else{$desc='';}
       if(isset($_POST['catag'])){$catag=$_POST['catag'];}else{$catag='';}
       if(isset($_POST['channel'])){$channel=$_POST['channel'];}else{$channel='';}
       $dbentry_o=mysqli_query($conn,"insert into vids (uid,chid,ctid,vname,vdisc,duration,time,ip,src) values ('$sid','$channel','$catag','$titlename','$desc','00','00','$ipIP','$new_file')");
       echo "donr90909090";die;
            } else {
                   echo "Possible file upload attack!\n";
                   print_r($_FILES);
            }

           }else{

            echo 'Invalid File Type Please Try Again. You file must be of type
            .mpg, .wma, .mov, .flv, .mp4, .avi, .qt, .wmv, .rm'.$_FILES['profileimage99']['name'];

       }
    }else{
    echo 'Please choose a video';die;
     }
     ?>

    i am submiting this form

    <form style="margin:0px;display:none;" action="videoupload.php" method="post">
               <input type="file" style="display:none;" />
               </form>

    to the page above
    when ever i submit the form i get the error no file added like as if the post variable is not getting there on the page and when i remove the validation

     if(!isset($_POST['profileimage99']) || $_FILES["profileimage99"]["size"] ==''){
    echo 'No file added';die;
    }

    i can upload some files usually less then 2 mb file but for larger files i get undefined index error for profileimage99.

    i have increased the upload_max_size from php.ini file

    Please not that the form is submitted by ajax call

  • POST http://localhost:3000/api/video/thumbnail 500 (Internal Server Error) MongoDB and FFmpeg

    5 juillet 2022, par VoicedCreator

    I am trying to insert a thumbnail on my page using POST and im getting this error&#xA;I want to screenshot a video using FFmpeg

    &#xA;

    const express = require(&#x27;express&#x27;);&#xA;const router = express.Router();&#xA;const multer = require(&#x27;multer&#x27;);&#xA;var ffmpeg = require(&#x27;fluent-ffmpeg&#x27;);&#xA;const { User } = require("../models/User");&#xA;&#xA;const { auth } = require("../middleware/auth");&#xA;const storage = multer.diskStorage({&#xA;    destination: function (req, file, cb) {&#xA;      cb(null, &#x27;uploads/&#x27;)&#xA;    },&#xA;    filename: function (req, file, cb) {&#xA;      cb(null, `${Date.now()}_${file.originalname}`)&#xA;    },&#xA;    fileFilter: (req, file, cb) => {&#xA;        const ext = path.extname(file.originalname);&#xA;        if(ext !== &#x27;.mp4&#x27; || ext !== &#x27;.mov&#x27; || ext !== &#x27;.wmv&#x27;){&#xA;            return cb(res.status(400).end(&#x27;Solo archivos mp4-mov-wmv son aceptados&#x27;), false);&#xA;        }&#xA;        cb(null, true)&#xA;    }&#xA;  })&#xA;  &#xA;  const upload = multer({ storage: storage }).single("file")&#xA;&#xA;&#xA;//=================================&#xA;//             User&#xA;//=================================&#xA;&#xA;router.post("/uploadfiles", (req, res) => {&#xA;&#xA;    upload(req, res, err => {&#xA;        if(err) {&#xA;            return res.json({ success: false, err })&#xA;        }&#xA;        return res.json({ success: true, filePath: res.req.file.path, fileName: res.req.file.filename })&#xA;    })&#xA;&#xA;});&#xA;&#xA;router.post("/thumbnail", (req, res) => {&#xA;&#xA;&#xA;    let filePath = ""&#xA;    let fileDuration = ""&#xA;&#xA;&#xA;    ffmpeg.ffprobe(req.body.url, function (err, metadata) {&#xA;        console.dir(metadata); // all metadata&#xA;        console.log(metadata.format.duration);&#xA;        console.log(metadata) &#xA;        fileDuration = metadata.format.duration&#xA;    });&#xA;&#xA;&#xA;    ffmpeg(req.body.url)&#xA;        .on(&#x27;filenames&#x27;, function (filenames) {&#xA;            console.log(&#x27;Will generate &#x27; &#x2B; filenames.join(&#x27;, &#x27;))&#xA;            console.log(filenames)&#xA;&#xA;&#xA;            filePath = "uploads/thumbnails/" &#x2B; filenames[0]&#xA;        })&#xA;        .on(&#x27;end&#x27;, function () {&#xA;            console.log(&#x27;Screenshots taken&#x27;);&#xA;            return res.json({ success: true, url: filePath, fileName: filenames, fileDuration: fileDuration });&#xA;        })&#xA;        .on(&#x27;error&#x27;, function (err) {&#xA;            console.error(err);&#xA;            return res.json({ success: false, err });&#xA;        })&#xA;        .screenshots({&#xA;            // Will take screenshots at 20%, 40%, 60% and 80% of the video&#xA;            count: 3,&#xA;            folder: &#x27;uploads/thumbnails&#x27;,&#xA;            size: &#x27;320x240&#x27;,&#xA;            //&#x27;%b&#x27;: input basename (filename w/o extension)&#xA;            filename: &#x27;thumbnail-%b.png&#x27;&#xA;        })&#xA;});&#xA;&#xA;&#xA;&#xA;&#xA;router.post("/thumbnail", (req, res) => {&#xA;&#xA;&#xA;    let filePath = ""&#xA;    let fileDuration = ""&#xA;&#xA;&#xA;    ffmpeg(req.body.url)&#xA;        .on(&#x27;filenames&#x27;, function (filenames) {&#xA;            console.log(&#x27;Will generate &#x27; &#x2B; filenames.join(&#x27;, &#x27;))&#xA;            console.log(filenames)&#xA;&#xA;&#xA;            filePath = "uploads/thumbnails/" &#x2B; filenames[0]&#xA;        })&#xA;        .on(&#x27;end&#x27;, function () {&#xA;            console.log(&#x27;Screenshots taken&#x27;);&#xA;            return res.json({ success: true, url: filePath, fileName: filenames, fileDuration: fileDuration });&#xA;        })&#xA;        .on(&#x27;error&#x27;, function (err) {&#xA;            console.error(err);&#xA;            return res.json({ success: false, err });&#xA;        })&#xA;        .screenshots({&#xA;            // Will take screenshots at 20%, 40%, 60% and 80% of the video&#xA;            count: 3,&#xA;            folder: &#x27;uploads/thumbnails&#x27;,&#xA;            size: &#x27;320x240&#x27;,&#xA;            //&#x27;%b&#x27;: input basename (filename w/o extension)&#xA;            filename: &#x27;thumbnail-%b.png&#x27;&#xA;        })&#xA;});&#xA;&#xA;&#xA;&#xA;module.exports = router;&#xA;

    &#xA;

    Error : POST http://localhost:3000/api/video/thumbnail 500 (Internal Server Error)&#xA;TypeError : Cannot read properties of undefined (reading 'format')

    &#xA;

    I think is because ffmpeg is not connecting to mongodb

    &#xA;