Recherche avancée

Médias (3)

Mot : - Tags -/plugin

Autres articles (46)

  • Submit enhancements and plugins

    13 avril 2011

    If you have developed a new extension to add one or more useful features to MediaSPIP, let us know and its integration into the core MedisSPIP functionality will be considered.
    You can use the development discussion list to request for help with creating a plugin. As MediaSPIP is based on SPIP - or you can use the SPIP discussion list SPIP-Zone.

  • Personnaliser les catégories

    21 juin 2013, par

    Formulaire de création d’une catégorie
    Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
    Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire.
    Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
    Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...)

  • Mise à disposition des fichiers

    14 avril 2011, par

    Par défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
    Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
    Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...)

Sur d’autres sites (4250)

  • php_ffmpeg some error and solutions

    26 mars 2018, par sonam Sharma

    I have successfully installed php_ffmpeg in my new project with the help of a guy on stackoverflow.com.
    I can do the basic jobs like extracting a frame out of a video
    but when I try to convert the video to another format I get this error :

    Fatal error : Uncaught exception ’Alchemy\BinaryDriver\Exception\ExecutionFailureException’
    with message ’ffprobe failed to execute command "C :\ffmpeg\bin\ffprobe.EXE"
    "sample3.mp4" "-show_streams" "-print_format" "json"’ in
    C :\wamp\www\raidpipe\vendor\php-ffmpeg\php-ffmpeg\src\FFMpeg\FFProbe.php on line 244

    Alchemy\BinaryDriver\Exception\ExecutionFailureException :
    ffprobe failed to execute command "C :\ffmpeg\bin\ffprobe.EXE"
    "sample3.mp4" "-show_streams" "-print_format" "json" in
    C :\wamp\www\raidpipe\vendor\alchemy\binary-
    driver\src\Alchemy\BinaryDriver\ProcessRunner.php on line 100

    FFMpeg\Exception\RuntimeException :
    Unable to probe sample3.mp4 in
    C :\wamp\www\raidpipe\vendor\php-ffmpeg\php-ffmpeg\src\FFMpeg\FFProbe.php on line 244

    I have used this code in my test page :

    <?php
    require 'vendor/autoload.php';
    $ffmpeg = FFMpeg\FFMpeg::create();
    $video = $ffmpeg->open('test/sample3.mp4');
    $video
    ->filters()
    ->resize(new FFMpeg\Coordinate\Dimension(320, 240))
    ->synchronize();
     $video
    ->frame(FFMpeg\Coordinate\TimeCode::fromSeconds(19))
    ->save('test/clip/frame123.jpg');
     $video
    ->save(new FFMpeg\Format\Video\X264(), 'export-x264.mp4')
    ->save(new FFMpeg\Format\Video\WMV(), 'export-wmv.wmv')
    ->save(new FFMpeg\Format\Video\WebM(), 'export-webm.webm');
    ?>

    When I run this code it gives me the frame without any error

    require 'vendor/autoload.php';
     $ffmpeg = FFMpeg\FFMpeg::create();
     $video = $ffmpeg->open('test/sample3.mp4');
     $video
    ->frame(FFMpeg\Coordinate\TimeCode::fromSeconds(19))
    ->save('test/clip/frame123.jpg');

    Please suggest me a way to convert the video by using the php_ffmpeg
    i need the video to be converted to some basic formats which can be supported by all the browsers and also please let me know is it a good practice to use exc (execute) in php ??

    I got the above code from this link

     https://github.com/PHP-FFMpeg/PHP-FFMpeg
  • File not found at path : on laravel 5.6

    9 mars 2018, par syehbi herbian

    i am using laravel 5.6, i will try to make function multiple upload video, and get frame and duration with laravel-ffmpeg, but when i try to upload one video for example, always show error like "File not found at path :",

    this is my function to store video and get duration & frame :

    public function doCreate($lessonsid)
     {
         if (empty(Session::get('contribID'))) {
           return redirect('contributor/login');
         }
       # code...
       // validate
       // read more on validation at http://laravel.com/docs/validation
       $rules = array(
         'judul'          => 'required',
       //   'video.*'  => 'mimes:mp4,mov,ogg,webm |required|max:100000',
       //   'image.*' => 'mimes:jpeg,jpg,png,gif|required|max:30000'
       );
       $validator = Validator::make(Input::all(), $rules);

       // process the login
       if ($validator->fails()) {
           return redirect()->back()->withErrors($validator)->withInput();
       } else {

           $now          = new DateTime();
           $cid          = Session::get('contribID');
           $title        = Input::get('judul');
           $image_video = Input::file('image');
           $lessons_video = Input::file('video');
           // dd($lessons_video);
           // $media = FFMpeg::open('https:/dev.cilsy.id/assets/source/lessons/lessons-74/video-8/1. Introduction (2).mp4');
           // $frame = $media->getFrameFromString('00:00:13.37');
           // dd($media);    
           $description  = Input::get('desc');

           $video=Video::where('lessons_id',$lessonsid)->get();
           $count_video=count($video);


           if (!is_dir("assets/source/lessons/lessons-$lessonsid")) {
                   $newforder=mkdir("assets/source/lessons/lessons-".$lessonsid);
           }

           $i=$count_video + 1;
           foreach ($title as $key => $titles) {
                   $type_video =$lessons_video[$key]->getMimeType();

                   if (!is_dir("assets/source/lessons/lessons-".$lessonsid."/video-".$i)) {
                           $newforder=mkdir("assets/source/lessons/lessons-".$lessonsid."/video-".$i);
                   }
                   $DestinationPath= 'assets/source/lessons/lessons-'.$lessonsid.'/video-'.$i;
                   //insert image
                   if(!empty($image_video[$key])){
                       $imagefilename    = $image_video[$key]->getClientOriginalName();
                       $image_video[$key]->move($DestinationPath, $imagefilename);
                   }else{
                       $imagefilename    = '';
                   }
                   if($imagefilename ==''){
                       $url_image= $imagefilename;
                   }else{
                       $urls=url('');
                       $url_image= $urls.'/assets/source/lessons/video-'.$i.'/'.$imagefilename;
                   }

                   //insert video
                   if(!empty($lessons_video[$key])){
                       $lessonsfilename    = $lessons_video[$key]->getClientOriginalName();
                       $lessons_video[$key]->storeAs($DestinationPath, $lessonsfilename);
                   }else{
                       $lessonsfilename    = '';
                   }
                   if($lessonsfilename ==''){
                       $url_video= $lessonsfilename;
                   }else{
                       $urls=url('');
                       $url_video= $urls.'/assets/source/lessons/video-'.$i.'/'.$lessonsfilename;
                   }




                   $store                  = new Video;
                   $store->lessons_id      = $lessonsid;
                   $store->title           = $titles;
                   $store->image           = $url_image;
                   $store->video           = $url_video;
                   $store->description     = $description[$key];
                   $store->type_video      = $type_video;
                   $store->durasi          = 0;
                   $store->created_at      = $now;
                   $store->enable=1;
                   $store->save();
                   if($store){
                       $media = FFMpeg::open($url_video);
                       // $frame = FFMpeg::open($link)
                       //         ->getFrameFromSeconds(10)
                       //         ->export()
                       //         ->toDisk('public')
                       //         ->save($filename.'.png');
                       dd($media);
                       $durationInSeconds = $media->getDurationInSeconds();
                       // dd($media);


                   }
           $i++;
           }

           // Session::set('lessons_title',$title);
           // Session::set('lessons_category_id',$category_id);
           // Session::set('lessons_image',$image);
           // Session::set('lessons_description',$description);

           return redirect('contributor/lessons/'.$lessonsid.'/view')->with('success','Penambahan video berhasil');

       }
     }

    this is message error, when i try to upload my video

    error display

    anyone can help me ?

  • spawn ffmpeg in nodejs and pipe to express's response

    18 décembre 2017, par ViGi

    i am spawning ffmpeg and pipe it’s output (the video stream i want) to express’s response object like this :

    app.get('/stream', (req, res) => {
       let _url = req.query.url;

       if(_url){  

           res.writeHead(200, {
               'Access-Control-Allow-Origin': '*',
               'Connection': 'Keep-Alive',
               'Content-Type': 'video/mp4'
           });

           // transcode rtsp input from ip-cam to mp4 file format (video: h.264 | audio: aac)
           let ffmpeg = child_process.spawn("ffmpeg",[
               "-probesize","2147483647",
               "-analyzeduration","2147483647",
               "-i", _url,
               "-vcodec","copy",
               "-f", "mp4",            
               "-movflags","frag_keyframe+empty_moov+faststart",
               "-frag_duration","3600",
               "pipe:1"              
           ]);        


           // redirect transcoded ip-cam stream to http response
           ffmpeg.stdout.pipe(res);

           // error logging
           ffmpeg.stderr.setEncoding('utf8');      
           ffmpeg.stderr.on('data', (data) => {
               console.log(data);
           });
       }
       else{
           res.end();
       }

    so far it’s working like a charm.
    however somewhere in there seems to be a cap. i can get only 3 streams running at the same time. when a 4th spawn occurs the 4th thread will block one of the cpu cores :

    htop of my raspberry pi 3

    and naturally the 4th stream does not reach the browser..
    has somebody any idea of what am i missing ?

    EDIT : it’s not tied to the fact that i am running the nodejs project on the raspberry pi. it also behaves the same way on my windows 10 machine