Recherche avancée

Médias (91)

Autres articles (61)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

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

  • 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

Sur d’autres sites (12222)

  • FFmpeg - add an image (cropped by mask) to the video

    10 mars 2021, par zeromodule

    I have 3 inputs :

    


      

    1. Video file
    2. 


    3. Image file (GIF)
    4. 


    5. Mask file (transparent PNG with some black pixels) - the same resolution as the video
    6. 


    


    I want to put the image on the video, but throw out all image pixels that are transparent in the mask (replace them with transparent ones).

    


    Video
    
Mask
    
Image
    
Result

    


    My current command, without masking (it works fine) :

    


    ffmpeg -i input.mp4 -ignore_loop 0 -i image.gif -filter_complex "[1]scale=700x700[scaled_gif];[0][scaled_gif]overlay=50:30:shortest=1" -codec:a copy output.mp4


    


    I know I should probably use alphamerge, but I don't understand how to use it properly.

    


  • Anomalie #4701 : Jointures automatiques erronées ? (ex. : groupe au lieu de groupe_mots)

    23 mars 2021, par cedric -

    "avant ça fonctionnait" c’est un bien grand mot. Disons que la requête sortait un résultat, mais il était faux !

    Voici ce que j’obtiens en SPIP 3.2 : on note l’absence de clause sur L1.objet qui est une erreur :
    ```
    SELECT L1.id_objet, L1.id_objet AS id_groupe
    FROM spip_documents_liens AS `L1`
    INNER JOIN spip_documents AS L2 ON ( L2.id_document = L1.id_document )
    WHERE (L2.titre = ’toto’)
    GROUP BY L1.id_objet
    ```

    Je pense que le bug apparait plus clairement depuis https://git.spip.net/spip/spip/commit/81b3f6dd22d699986ca2d5a068959ec0011b4253 qui en effet introduit la clause where de façon plus robuste

  • MySql stops running in combination with Laravel Queue, Supervisor, and FFMPEg

    13 juin 2014, par egekhter

    After setting up queue listener to process uploaded videos with FFMPEG, I’ve come back to the server several times to find that MySql has stopped running. I checked drive space and it’s about 77% used (43G out of 60G).

    Here’s my code in case it’s useful :

    public function fire($job, $data)
    {
    $data = json_decode($data['transcoding_message'], true);
    $output_directory = '/home/ubuntu/transcodes/';
    $amazon_array = array();

    $s3 = AWS::get('s3');


       //execute main transcoding thread

       $cmd = 'sudo ffmpeg -i ' . $data['temp_file_url'] . ' -y -vcodec libx264 -tune zerolatency -movflags faststart -crf 20 -profile:v main -level:v 3.1 -acodec libfdk_aac -b:a 256k ' . $output_directory. $data['temp_file_key'] . '_HQ.mp4 -vcodec libx264 -s ' . $sq_width . 'x' . $sq_height . ' -tune zerolatency -movflags faststart -crf 25 -profile:v main -level:v 3.1 -acodec libfdk_aac -b:a 256k ' . $output_directory. $data['temp_file_key'] . '_SQ.mp4 -ss ' . $seek_half . ' -f image2 -vf scale=iw/2:-1 -vframes 1 ' . $output_directory. $data['temp_file_key'] . '_thumb.jpg';

       exec($cmd." 2>&1", $out, $ret);


       if ($ret)
       {

           Log::error($cmd);
           echo 'Processing error' . PHP_EOL;
           //there was a problem
           return;
       }

       else
       {
           //setup file urls
       echo 'about to move files';

       $hq_url = $this->bucket_root . $data['user_id'] . '/' . $data['temp_file_key'] . '_HQ.mp4';
       $sq_url = $this->bucket_root . $data['user_id'] . '/' . $data['temp_file_key'] . '_SQ.mp4';;
       $thumb_url = $this->bucket_root . $data['user_id'] . '/' . $data['temp_file_key'] . '_thumb.jpg';

       $amazon_array['video_hq_url'] = $data['temp_file_key'] . '_HQ.mp4';
       $amazon_array['video_sq_url'] = $data['temp_file_key'] . '_SQ.mp4';
       $amazon_array['video_thumb_url'] = $data['temp_file_key'] . '_thumb.jpg';

               //copy from temp to permanent

       foreach ($amazon_array as $k => $f)
       {
           $uploader = UploadBuilder::newInstance()
               ->setClient($s3)
               ->setSource($output_directory.$f)
               ->setBucket($this->bucket)
               ->setKey('users/' . $data['user_id'] . '/' . $f)
               ->setConcurrency(10)
               ->setOption('ACL', 'public-read')
               ->build();

           $uploader->getEventDispatcher()->addListener(
               'multipart_upload.after_part_upload',
               function($event) use ($f) {
                   // Do whatever you want
               }
           );

           try {
               $uploader->upload();
               echo "{$k} => Upload complete.\n" . PHP_EOL;

               DB::table('items')->where('id', $data['item_id'])->update(array($k => $this->bucket_root. $data['user_id'] . '/' .$f, 'deleted_at' => NULL));
               //delete local

               unlink($output_directory.$f);

               unset($uploader);
           } catch (MultipartUploadException $e) {
               $uploader->abort();
               echo "{$k} => Upload failed.\n" . PHP_EOL;
               continue;
           }
       }

           //write to database

               DB::table('archives_items')->where('id', $data['archive_item_id'])->update(array('deleted_at' => NULL));
               DB::connection('mysql3')->table('video_processing')->where('id', $data['id'])->update(array('finished_processing' => 1));

           //delete files

           //delete s3
           $s3->deleteObject(
               array(
                   'Bucket' => $this->temp_bucket,
                   'Key' => $data['file_name']
               )
           );
           echo $data['temp_file_url'] . '=>' . " deleted from temp bucket.\n" . PHP_EOL;
           DB::connection('mysql3')->table('video_processing')->where('id', $data['id'])->update(array('deleted_at' => \Carbon\Carbon::now()));

       }
           $job->delete();

           // end of processing uploaded video
           }


       else
       {
           return;
       }

    Any ideas as to why MySql would die like that ?

    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)

    Edit : I wanted to add that the php artisan queue:listen command is being triggered via Supervisor and that I have 4 running concurrent processes.