Recherche avancée

Médias (1)

Mot : - Tags -/swfupload

Autres articles (43)

  • Soumettre améliorations et plugins supplémentaires

    10 avril 2011

    Si vous avez développé une nouvelle extension permettant d’ajouter une ou plusieurs fonctionnalités utiles à MediaSPIP, faites le nous savoir et son intégration dans la distribution officielle sera envisagée.
    Vous pouvez utiliser la liste de discussion de développement afin de le faire savoir ou demander de l’aide quant à la réalisation de ce plugin. MediaSPIP étant basé sur SPIP, il est également possible d’utiliser le liste de discussion SPIP-zone de SPIP pour (...)

  • Les statuts des instances de mutualisation

    13 mars 2010, par

    Pour des raisons de compatibilité générale du plugin de gestion de mutualisations avec les fonctions originales de SPIP, les statuts des instances sont les mêmes que pour tout autre objets (articles...), seuls leurs noms dans l’interface change quelque peu.
    Les différents statuts possibles sont : prepa (demandé) qui correspond à une instance demandée par un utilisateur. Si le site a déjà été créé par le passé, il est passé en mode désactivé. publie (validé) qui correspond à une instance validée par un (...)

  • Gestion des droits de création et d’édition des objets

    8 février 2011, par

    Par défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;

Sur d’autres sites (6639)

  • Can't obtain thumbnail with ffmpeg codeigniter

    2 avril 2015, par DMBorges

    I have used the following tutorial ( https://www.youtube.com/watch?v=qT4hN5o57hI) to try to obtain a thumbnail from a uploaded video using codeigniter as a framework. As I am new to all this I don’t understand if at the end of supposedly uploading my video the code failed to create a thumbnail, if my created thumbnail is somewhere lost in my computer of by some settings reasons ffmpeg is not working.

    Where does my $imageFile goes to ?

    Here is my code.

    MY VIEW

    <div>

               &lt;?php echo form_open_multipart('gallery/save/'); ?>
                   <table class="table">
                       <tr>
                           <td>Video</td>
                           <td>&lt;?php echo form_upload('pic'); ?></td>
                       </tr>
                       <tr>
                           <td>Descrição</td>
                           <td>&lt;?php echo form_input('description'); ?></td>
                       </tr>
                       <tr>
                           <td></td>
                           <td>&lt;?php echo form_submit('upload', 'Guardar', 'class="btn btn-primary"'); ?></td>
                       </tr>      
                   </table>

       </div>

    MY CONTROLLER

    &lt;?php
    class Gallery extends CI_Controller{
       public function index(){
           //Load View
           $data['main_content'] = 'gallery';
           $this->load->view('layouts/main', $data);
       }

       public function save()
       {
           $url = $this->do_upload();
           $ffmpeg = "C:\\xampp\\htdocs\\ffmpeg\\bin";
           $videoFile = $_FILES["pic"]["tmp_name"];
           $imageFile = "1.jpg";
           $size = "120x90";
           $getFromSecond = 5;
           $cmd = "$ffmpeg -i $videoFile -an -ss $getFromSecond -s $size $imageFile ";
           echo $cmd;
           if(!shell_exec($cmd)){
               echo 'thumbnail created!';
           }
           else {
               echo 'ERROR!';
           }

           /* $config = array(
                           'source_image' => $url,
                           'new_image' =>"./assets/images/gallery/thumbs/",
                           'maintain_ration' => true,
                           'width' => 150,
                           'height'=> 100
                           );
                   $this -> load -> library('image_lib', $config);
                   $this ->image_lib-> resize();
                   $description = $_POST["description"];
                   $user = $this->session->userdata('user_id');
                   $this->Gallery_model->save($description, $url, $user);
                   redirect('gallery'); */
       }
       private function do_upload()
       {
           $type = explode('.', $_FILES["pic"]["name"]);
           $type = strtolower($type[count($type)-1]);
           $id = uniqid(rand());
           $url = "./assets/images/gallery/".$id.'.'.$type;
           if(in_array($type, array("wmv", "mp4", "avi", "flv")))
               if(is_uploaded_file($_FILES["pic"]["tmp_name"]))
                   if(move_uploaded_file($_FILES["pic"]["tmp_name"],$url))
                       return $url;
           return "";
       }
    }
  • Able to get HLS to play on VLC viewer but not on browser

    6 mai 2022, par Tamothee

    so i have been trying to get ipcamera to connect to a react app and show live video. i found and followed this tutorial https://www.youtube.com/watch?v=-a5MAaEaizU&t=185s .

    &#xA;

    i am able to get vlc viewer to run the hls server link and display what the camera sees. however when i plug the link into my code or a browser hls viewer like https://hls-js.netlify.app/demo/ , the m3u8 link does not play. there is no error and when i inspect the network, i do receive the m3u8 and .ts links.&#xA;this is what i see on the network portion

    &#xA;

    ffmpeg -i rtsp://admin:Password1234@192.168.1.64:554/Streaming/Channels/101 -fflags flush_packets -max_delay 2 -flags -global_header -hls_time 2 -hls_list_size 3 -vcodec copy -y ./index.m3u8&#xA;

    &#xA;

    this is the ffmpeg command that i ran to convert my rtsp output to hls.

    &#xA;

    var http = require(&#x27;http&#x27;);&#xA;var fs = require(&#x27;fs&#x27;);&#xA;&#xA;const port = 1234&#xA;&#xA;http.createServer(function (request, response) {&#xA;console.log(&#x27;request starting...&#x27;);&#xA;&#xA;var filePath = &#x27;.&#x27; &#x2B; request.url;&#xA;&#xA;fs.readFile(filePath, function(error, content) {&#xA;    response.writeHead(200, { &#x27;Access-Control-Allow-Origin&#x27;: &#x27;*&#x27; });&#xA;    if (error) {&#xA;        if(error.code == &#x27;ENOENT&#x27;){&#xA;            fs.readFile(&#x27;./404.html&#x27;, function(error, content) {&#xA;                response.end(content, &#x27;utf-8&#x27;);&#xA;            });&#xA;        }&#xA;        else {&#xA;            response.writeHead(500);&#xA;            response.end(&#x27;Sorry, check with the site admin for error: &#x27;&#x2B;error.code&#x2B;&#x27; ..\n&#x27;);&#xA;            response.end(); &#xA;        }&#xA;    }&#xA;    else {&#xA;        response.end(content, &#x27;utf-8&#x27;);&#xA;    }&#xA;});&#xA;&#xA;}).listen(port);&#xA;console.log(`Server running at http://127.0.0.1:${port}/`);&#xA;

    &#xA;

    this is the code for the hls server that receives the request and sends the user the m3u8 and ts files.

    &#xA;

     &#xA;

    &#xA;

    and i'm trying to play the link like this using react-hls-player

    &#xA;

    hope this is not a stupid question as i'm a beginner and hope that someone could help me with this problem.

    &#xA;

  • ffmpeg horizonal flip makes video shorter

    26 mai 2020, par Adam Gosztolai

    I am trying to use the following command to flip my video horizontally

    &#xA;&#xA;

    ffmpeg -i video.mp4 -vf hflip -c:a copy video_flip.mp4&#xA;

    &#xA;&#xA;

    However, I discovered that it makes the video shorter, which I did not intend.

    &#xA;&#xA;

    I originally created the video using FFMpegWriter in Python, the code looks something like this

    &#xA;&#xA;

    metadata = dict(title=&#x27;video&#x27;, artist=&#x27;me&#x27;, comment=&#x27;Watch this!&#x27;)&#xA;writer = FFMpegWriter(fps=25, metadata=metadata)&#xA;with writer.saving(fig, "video.mp4", 100):&#xA;    for t in range(100):&#xA;        ax.cla()        &#xA;        ax.plot(x,y)&#xA;&#xA;        writer.grab_frame()&#xA;

    &#xA;&#xA;

    What am I doing wrong ?

    &#xA;