Recherche avancée

Médias (91)

Autres articles (66)

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

  • Possibilité de déploiement en ferme

    12 avril 2011, par

    MediaSPIP peut être installé comme une ferme, avec un seul "noyau" hébergé sur un serveur dédié et utilisé par une multitude de sites différents.
    Cela permet, par exemple : de pouvoir partager les frais de mise en œuvre entre plusieurs projets / individus ; de pouvoir déployer rapidement une multitude de sites uniques ; d’éviter d’avoir à mettre l’ensemble des créations dans un fourre-tout numérique comme c’est le cas pour les grandes plate-formes tout public disséminées sur le (...)

Sur d’autres sites (13265)

  • How can I fix video processing and 500 Error - (Laravel, FFmpeg)

    19 juillet 2019, par San Martín Figueroa Pablo

    I’m setting up a new website with Laravel for uploading videos...
    I have read all the possible solutions but none of them help me to solve the issue...

    This is my issue : When I upload a small file (<10mb) the web works fine, the video get uploaded and the video get converted, the dashboard shows the converted videos---

    When I try to upload a large file, the file get uploaded, the video get converted with a green frame on it (really uggly) and the site goes to a 500 server error...

    I’m using Laravel Jobs to do the conversion.

    My Controller code :

       &lt;?php

       namespace App\Http\Controllers;

       use Illuminate\Http\Request;
       use Illuminate\Support\Facades\DB;
       use Illuminate\Support\Facades\Storage;
       use Symfony\Component\HttpFoundation\Response;
       use Carbon;
       use Closure;
       use App\Jobs\ConvertVideoForPreview;
       use FFMpeg\FFProbe;
       use FFMpeg\Coordinate\Dimension;
       use FFMpeg\Format\Video\X264;
       use Pawlox\VideoThumbnail\Facade\VideoThumbnail;
       use Pbmedia\LaravelFFMpeg\FFMpegFacade as FFMpeg;
       use Illuminate\Contracts\Filesystem\Filesystem;


       use App\Video;

       class VideoController extends Controller
       {
       public function createVideo(){
           return view('video.createVideo');  
       }
       public function saveVideo(Request $request){


           set_time_limit(0);
           ini_set('memory_limit', '1024M');

           //Validar Formulario

           $validatedData = $this -> validate($request, [

               'title' => 'required',
               'description' => 'required',
               'palabras' => 'required',
               'video' => 'mimetypes:video/mp4,video/quicktime'


           ]);

           $video = new Video();
           $user = \Auth::user();
           $video -> user_id = $user->id;
           $video -> title = $request -> input('title');
           $video -> description = $request -> input('description');
           $video -> palabras = $request -> input('palabras');



           $video_file = $request -> file('video');

           if($video_file){

           $video_path = 'original'.'_'.$video_file ->                                
           getClientOriginalName();
           Storage::disk('videos')-> put($video_path,
           \File::get($video_file));

           $videoUrl = storage_path('app/videos/').$video_path;
           $storageUrl = storage_path('app/thumbs/');
           $fileName = 'thumb'.'_'.time().'.jpg';
           $second = 2;

           VideoThumbnail::createThumbnail($videoUrl, $storageUrl,    
           $fileName, $second, $width = 640, $height = 480);

           $video -> preview = $fileName;
           $video -> video_path = $video_path;

         }
           $video -> save();

           ConvertVideoForPreview::dispatch($video);

           return redirect() -> route('home')
                             -> with (array(
               'message' => 'El video se ha enviado con exito'));
         }

           public function getImage($filename){

               $file = Storage::disk('thumbs') -> get($filename);
               return new Response($file, 200);
         }

           public function getVideo($filename){

               $file = Storage::disk('converted_videos') ->  
           get($filename);
               return new Response($file, 200);
         }

         }

    This is my ConvertVideo Job :

       &lt;?php

        namespace App\Jobs;

        use App\Video;

        use Carbon\Carbon;
        use FFMpeg;
        use FFMpeg\Format\Video\X264;

        use Illuminate\Http\Request;
        use Illuminate\Bus\Queueable;
        use Illuminate\Queue\SerializesModels;
        use Illuminate\Queue\InteractsWithQueue;
        use Illuminate\Contracts\Queue\ShouldQueue;
        use Illuminate\Foundation\Bus\Dispatchable;

        class ConvertVideoForPreview implements ShouldQueue

           {
             use Dispatchable, InteractsWithQueue, Queueable,
             SerializesModels;

             public $video;


             public function __construct(Video $video)
            {
                $this -> video = $video;
            }
             public function handle()
            {

             $converted_name= 'preview'.'-'.$this -> video ->
             video_path.'.mp4';

             FFMpeg::open('videos/'.$this -> video -> video_path)

                           -> export()
                   -> inFormat(new \FFMpeg\Format\Video\X264)
                       -> save('converted_videos/'.$converted_name);

               $this -> video -> update([
               'video_preview' => $converted_name,
               'processed' => true
                ]);
         }
        }

    One of my goals is to upload large video files (<=4GB), show a uploading process bar and a encoding process bar during the video upload.

    I getting this error :

    [core:error] [pid 14787:tid 139975366489856] [client
     201.188.26.12:51022] Script timed out before returning headers:
     index.php,

    It’s happend when the video es proccesing and the redirect to home dashboard it’s call...

    The FFMPEG works :

    [2019-07-19 17:20:41] local.INFO: ffprobe executed command successfully  
    [2019-07-19 17:21:52] local.INFO: ffmpeg executed command successfully  
    [2019-07-19 17:21:52] local.INFO: ffmpeg running command '/usr/local/bin/ffmpeg' '-y' '-i' '/home/tribus/public_html/storage/app/videos/original_Sequence 01.mov' '-threads' '12' '-vcodec' 'libx264' '-acodec' 'libfaac' '-b:v' '1000k' '-refs' '6' '-coder' '1' '-sc_threshold' '40' '-flags' '+loop' '-me_range' '16' '-subq' '7' '-i_qfactor' '0.71' '-qcomp' '0.6' '-qdiff' '4' '-trellis' '1' '-b:a' '128k' '-pass' '2' '-passlogfile' '/tmp/ffmpeg-passes5d31fbe9010e6ldt9s/pass-5d31fbe90152d' '/home/tribus/public_html/storage/app/converted_videos/preview-original_Sequence 01.mov.mp4'

    I have tried : Change all the memory and file size in PHP.ini, Nginx, Apache... (Probably I’m missing one)...

    Changed timeouts too.

    My environment : VPS 4GB 50GB, APACHE 2.4, PHP7.3, MySql MariaDB, WebServer : Apache-Nginx, Laravel 5.8.

    Can anyone help me to reach this ?...

    This is how the large video looks after converted and show 500 error in the browser :
    Error video processed

  • Trying to use ffmpeg to create slideshow from ISO-8601 named pictures. Getting output with no playable streams

    19 juin 2019, par Robert Ellegate

    I’m trying to create a slideshow of images that are irregular in dimension/orientation but all named with the same ISO-8601 date format.

    I’ve normalized the filenames so they are all YYYYMMDD.jpg. I have tried using the globular pattern type for ffmpeg and various methods for inputting the files, including piping the concatenation of the files into ffmpeg.

    Here are the images I’m trying to use :

    $ ls *.jpg | xargs -n1 file
    20190411.jpg: JPEG image data, Exif standard: [TIFF image data, big-endian, direntries=4, height=0, orientation=upper-left, width=0], baseline, precision 8, 10128x3984, components 3
    20190417.jpg: JPEG image data, Exif standard: [TIFF image data, big-endian, direntries=4, height=0, orientation=lower-right, width=0], baseline, precision 8, 10176x3952, components 3
    20190424.jpg: JPEG image data, Exif standard: [TIFF image data, big-endian, direntries=4, height=0, orientation=upper-left, width=0], baseline, precision 8, 12128x3840, components 3
    20190429.jpg: JPEG image data, Exif standard: [TIFF image data, big-endian, direntries=4, height=0, orientation=upper-left, width=0], baseline, precision 8, 11104x3888, components 3
    20190430.jpg: JPEG image data, Exif standard: [TIFF image data, big-endian, direntries=4, height=0, orientation=lower-right, width=0], baseline, precision 8, 10992x3920, components 3
    20190501.jpg: JPEG image data, Exif standard: [TIFF image data, big-endian, direntries=4, height=0, orientation=lower-right, width=0], baseline, precision 8, 10528x3936, components 3
    20190502.jpg: JPEG image data, Exif standard: [TIFF image data, big-endian, direntries=4, height=0, orientation=lower-right, width=0], baseline, precision 8, 10992x3792, components 3
    20190508.jpg: JPEG image data, Exif standard: [TIFF image data, big-endian, direntries=4, height=0, orientation=lower-right, width=0], baseline, precision 8, 11008x3808, components 3
    20190515.jpg: JPEG image data, Exif standard: [TIFF image data, big-endian, direntries=4, height=0, orientation=lower-right, width=0], baseline, precision 8, 10416x3760, components 3
    20190516.jpg: JPEG image data, Exif standard: [TIFF image data, big-endian, direntries=4, height=0, orientation=lower-right, width=0], baseline, precision 8, 10928x3760, components 3
    20190517.jpg: JPEG image data, Exif standard: [TIFF image data, big-endian, direntries=4, height=0, orientation=lower-right, width=0], baseline, precision 8, 10720x3840, components 3
    20190522.jpg: JPEG image data, Exif standard: [TIFF image data, big-endian, direntries=4, height=0, orientation=[*0*], width=0], baseline, precision 8, 6552x1688, components 3
    20190523.jpg: JPEG image data, Exif standard: [TIFF image data, big-endian, direntries=4, height=0, orientation=[*0*], width=0], baseline, precision 8, 6572x1700, components 3
    20190524.jpg: JPEG image data, Exif standard: [TIFF image data, big-endian, direntries=4, height=0, orientation=[*0*], width=0], baseline, precision 8, 6468x1659, components 3
    20190528.jpg: JPEG image data, Exif standard: [TIFF image data, big-endian, direntries=4, height=0, orientation=[*0*], width=0], baseline, precision 8, 5424x1644, components 3
    20190529.jpg: JPEG image data, Exif standard: [TIFF image data, big-endian, direntries=7, model=Pixel 2 XL, height=0, manufacturer=Google, orientation=[*0*], datetime=2019:05:29 16:38:01, width=0]
    20190531.jpg: JPEG image data, Exif standard: [TIFF image data, big-endian, direntries=4, height=0, orientation=[*0*], width=0], baseline, precision 8, 6584x1693, components 3
    20190603.jpg: JPEG image data, Exif standard: [TIFF image data, big-endian, direntries=4, height=0, orientation=[*0*], width=0], baseline, precision 8, 6536x1690, components 3
    20190604.jpg: JPEG image data, Exif standard: [TIFF image data, big-endian, direntries=4, height=0, orientation=[*0*], width=0], baseline, precision 8, 5748x1618, components 3
    20190606.jpg: JPEG image data, Exif standard: [TIFF image data, big-endian, direntries=4, height=0, orientation=[*0*], width=0], baseline, precision 8, 6196x1690, components 3
    20190607.jpg: JPEG image data, Exif standard: [TIFF image data, big-endian, direntries=4, height=0, orientation=[*0*], width=0], baseline, precision 8, 6112x1674, components 3
    20190610.jpg: JPEG image data, Exif standard: [TIFF image data, big-endian, direntries=4, height=0, orientation=[*0*], width=0], baseline, precision 8, 6440x1670, components 3
    20190611.jpg: JPEG image data, Exif standard: [TIFF image data, big-endian, direntries=4, height=0, orientation=[*0*], width=0], baseline, precision 8, 6312x1694, components 3
    20190612.jpg: JPEG image data, Exif standard: [TIFF image data, big-endian, direntries=4, height=0, orientation=[*0*], width=0], baseline, precision 8, 6176x1689, components 3

    And these are the various ffmpeg commands I’ve tried using :

    cat *.jpg | ffmpeg -framerate 1/5 -c:v libx264 -r 30 -pix_fmt yuv420p out.mp4
    cat *.jpg | ffmpeg -f image2pipe -i - output.mkv
    ffmpeg -framerate 1/5 -pattern_type glob -i '*.jpg' out.mp4
    ffmpeg -framerate 1/5 -pattern_type glob -i '*.jpg' -c:v libx264 -vf fps=25 -pix_fmt yuv420p out.mp4

    I’m trying to create a video that shows each image for 5 seconds in order, but I’m getting a mp4 video file with no playable streams.

  • Anomalie #4373 : image_reduire() et image au format SVG

    26 août 2019, par Guillaume Fahrner

    Un bon exemple de ce que je vais essayé de ne plus faire :-] A vouloir faire trop vite...

    La version utilisée est la 3.2.4 (revision : 24285). Un titre plus correct aurait été : "image_reduire() et logo de rubrique au format SVG avec le plugin Logo SVG"

    Le premier appel à image_reduire(), spécifique au logo, fixe des dimensions maximales de 48/36 :

    https://core.spip.net/projects/spip/repository/entry/spip/ecrire/inc/presenter_enfants.php#L71

    On se retrouve ainsi avec une balise img, avec un attribut style qui fixe la dimension maximale via max-. Aucun soucis ici.

    Pour moi le problème (c’est peut être normal) c’est que ce bout de HTML, se retrouve a nouveau impacté (plus loin dans le traitement) par https://github.com/spip/SPIP/blob/master/prive/objets/contenu/rubrique-enfants.html#L1 qui va remplacer le max-width : 48px par 250px pour le logo...

    Les images SVG utilisées n’ont rien de particulier, j’ai le même problème avec toute ; un exemple disponible publiquement : https://www.root-me.org/squelettes/img/logo.svg. J’ai fait une capture d’écran pour être sur qu’on parle du même endroit.

    (En espérant que ce soit plus utile cette fois, je peux faire le test avec une 3.3 dev si besoin)