Recherche avancée

Médias (0)

Mot : - Tags -/albums

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

Autres articles (112)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

  • ANNEXE : Les plugins utilisés spécifiquement pour la ferme

    5 mars 2010, par

    Le site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)

Sur d’autres sites (12356)

  • Laravel FFmpeg error ffprobe running command -show_streams -print_format json is not running How i can resolve it ?

    12 octobre 2019, par Shahzad Waris

    I’m using laravel FFmpeg Package v4 to change the Dimension of the video.
    This is my queue log.

    [2019-10-12 15:14:17] local.INFO : ffprobe running command
    "C :/FFmpeg/bin/ffprobe.exe"
    C :\wamp64\www\creamer\creamer\storage\app\public\videos1570870350.mp4
    -show_streams -print_format json [2019-10-12 15:14:17] local.ERROR : ffprobe failed to execute command "C :/FFmpeg/bin/ffprobe.exe"
    C :\wamp64\www\creamer\creamer\storage\app\public\videos1570870350.mp4
    -show_streams -print_format json [2019-10-12 15:14:17] local.ERROR : Unable to probe
    C :\wamp64\www\creamer\creamer\storage\app\public\videos1570870350.mp4
    "exception" :"[object] (FFMpeg\Exception\RuntimeException(code : 0) :
    Unable to probe
    C :\wamp64\www\creamer\creamer\storage\app\public\videos1570870350.mp4
    at
    C :\wamp64\www\creamer\creamer\vendor\php-ffmpeg\php-ffmpeg\src\FFMpeg\FFProbe.php:263,
    Alchemy\BinaryDriver\Exception\ExecutionFailureException(code : 0) :
    ffprobe failed to execute command \"C :/FFmpeg/bin/ffprobe.exe\"
    C :\wamp64\www\creamer\creamer\storage\app\public\videos1570870350.mp4
    -show_streams -print_format json at C :\wamp64\www\creamer\creamer\vendor\alchemy\binary-driver\src\Alchemy\BinaryDriver\ProcessRunner.php:100)
    [stacktrace]

    0 C :\wamp64\www\creamer\creamer\vendor\php-ffmpeg\php-ffmpeg\src\FFMpeg\FFProbe.php(206) :

    FFMpeg\FFProbe->probe(’C :\wamp64\www\c...’, ’-show_streams’,
    ’streams’)

    1 C :\wamp64\www\creamer\creamer\vendor\php-ffmpeg\php-ffmpeg\src\FFMpeg\FFMpeg.php(92) :

    FFMpeg\FFProbe->streams(’C :\wamp64\www\c...’) [internal
    function] : Illuminate\Queue\Console\WorkCommand->handle() 1 :
    https://github.com/pascalbaljetmedia/laravel-ffmpeg?ref=madewithlaravel.com

    This is Queue code :

    namespace App\Jobs;

    use App\Video;
    use FFMpeg;
    use FFMpeg\Coordinate\Dimension;
    use FFMpeg\Format\Video\X264;
    use Illuminate\Bus\Queueable;
    use Illuminate\Contracts\Queue\ShouldQueue;
    use Illuminate\Foundation\Bus\Dispatchable;
    use Illuminate\Queue\InteractsWithQueue;
    use Illuminate\Queue\SerializesModels;

    class ConvertVideoForDownloading implements ShouldQueue
    {
       use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
       public $video;
       /**
        * Create a new job instance.
        *
        * @return void
        */
       public function __construct(Video $v)
       {
           $this->video = $v;
       }

       /**
        * Execute the job.
        *
        * @return void
        */
       public function handle()
       {
           // create a video format...
           $lowBitrateFormat = (new X264)->setKiloBitrate(500);

           // open the uploaded video from the right disk...
           FFMpeg::fromDisk('local')
               ->open('public\videos' . $this->video->videoLink)

           // add the 'resize' filter...
               ->addFilter(function ($filters) {
                   $filters->resize(new Dimension(960, 540));
               })

           // call the 'export' method...
               ->export()

           // tell the MediaExporter to which disk and in which format we want to export...
               ->toDisk('local')
               ->inFormat($lowBitrateFormat)

           // call the 'save' method with a filename...
               ->save($this->video->id . '.mp4');

           // update the database so we know the convertion is done!
           // $this->video->update([
           //     'converted_for_downloading_at' => Carbon::now(),
           // ]);

       }
    }
  • 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

  • how to kill a thread which hang up and release resources [duplicate]

    15 octobre 2019, par DJI_lover

    This question already has an answer here :

    I am doing some jobs in ubuntu with c++.I want to know how to kill a thread when function blocking in a thread and there is no timeout mechanism for this function. I want to force to kill the thread when function is blocking and release all the resources in the thread and then restart the thread.I can’t set a quit flag in thread because it nerver get there when function hang up.Could someone tell me the better way to do this ? Thanks !

    Code :

    static int encode_and_write_frame(AVCodecContext *codec_ctx, AVFormatContext *fmt_ctx, AVFrame *frame)
    {
       AVPacket pkt = {0};
       av_init_packet(&amp;pkt);
       int ret = avcodec_send_frame(codec_ctx, frame);
       if (ret &lt; 0)
       {
           fprintf(stderr, "Error sending frame to codec context!\n");
           return ret;
       }
       ret = avcodec_receive_packet(codec_ctx, &amp;pkt);
       if (ret &lt; 0)
       {
           fprintf(stderr, "Error receiving packet from codec context!\n" );
           return ret;
       }
       int ret1 = av_interleaved_write_frame(fmt_ctx, &amp;pkt);
       av_packet_unref(&amp;pkt);
       return ret1;
    }

    void thread_worker(){
       while(ros::ok()){
           encode_and_write_frame(param1,param2,param3);
           usleep(500000);
       }
    }

    thread t(&amp;thread_worker);

    when the network situation is good, av_interleaved_write_frame() can return quickly,but when network was broken down, av_interleaved_write_frame() will hang forever, and I can’t set timeout for av_interleaved_write_frame so that I want to kill the blocking thread and restart it.