Recherche avancée

Médias (0)

Mot : - Tags -/presse-papier

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

Autres articles (52)

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

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

Sur d’autres sites (8703)

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

  • swresample/resample : speed up build_filter by 50%

    4 novembre 2015, par Ganesh Ajjanagadde
    swresample/resample : speed up build_filter by 50%
    

    This speeds up build_filter by 50%. This gain should be pretty
    consistent across all architectures and platforms.

    Essentially, this relies on a observation that the filters have some
    even/odd symmetry that may be exploited during the construction of the
    polyphase filter bank. In particular, phases (scaled to [0, 1]) in [0.5, 1] are
    easily derived from [0, 0.5] and expensive reevaluation of function
    points are unnecessary. This requires some rather annoying even/odd
    bookkeeping as can be seen from the patch.

    I vaguely recall from signal processing theory more general symmetries allowing even greater
    optimization of the construction. At a high level, "even functions"
    correspond to 2, and one can imagine variations. Nevertheless, for the sake
    of some generality and because of existing filters, this is all that is
    being exploited.

    Currently, this patch relies on phase_count being even or (trivially) 1,
    though this is not an inherent limitation to the approach. This
    assumption is safe as phase_count is 1 << phase_bits, and is hence a
    power of two. There is no way for user API to set it to a nontrivial odd
    number. This assumption has been placed as an assert in the code.

    To repeat, this assumes even symmetry of the filters, which is the most common
    way to get generalized linear phase anyway and is true of all currently
    supported filters.

    As a side note, accuracy should be identical or perhaps slightly better
    due to this "forcing" filter symmetries leading to a better phase
    characteristic. As before, I can’t test this claim easily, though it may
    be of interest.

    Patch tested with FATE.

    Sample benchmark (x86-64, Haswell, GNU/Linux) :

    test : swr-resample-dblp-44100-2626

    new :
    527376779 decicycles in build_filter(loop 1000), 256 runs, 0 skips
    524361765 decicycles in build_filter(loop 1000), 512 runs, 0 skips
    516552574 decicycles in build_filter(loop 1000), 1024 runs, 0 skips

    old :
    974178658 decicycles in build_filter(loop 1000), 256 runs, 0 skips
    972794408 decicycles in build_filter(loop 1000), 512 runs, 0 skips
    954350046 decicycles in build_filter(loop 1000), 1024 runs, 0 skips

    Note that lower level optimizations are entirely possible, I focussed on
    getting the high level semantics correct. In any case, this should
    provide a good foundation.

    Reviewed-by : Michael Niedermayer <michael@niedermayer.cc>
    Signed-off-by : Ganesh Ajjanagadde <gajjanagadde@gmail.com>

    • [DH] libswresample/resample.c
  • Error recording an RTSP stream without transcoding

    23 août 2017, par Matt

    I’m trying to use FFmpeg to record RTSP streams from several security cameras. I have been successfully transcoding each stream for months now, but since this requires considerable CPU power, I’d like to simply copy each stream to disk in it’s original H.264 format.

    Whenever I try this, I receive and error similar to this (the "current" value varies) :

    Non-monotonous DTS in output stream 0:0 ; previous : 0, current : -62743 ;

    I’ve stripped most of the options I was using, although I really do want to keep -xerror so that FFmpeg quits when it encounters an error :

    ffmpeg.exe -xerror -i rtsp://admin:admin@192.168.1.135 -an -vcodec copy test.mp4

    And I still get this :

        ffmpeg version 3.3.3 Copyright (c) 2000-2017 the FFmpeg developers  
        built with gcc 7.1.0 (GCC)   
        configuration : —enable-gpl
        —enable-version3 —enable-cuda —enable-cuvid —enable-d3d11va —enable-dxva2 —enable-libmfx —enable-nvenc —enable-avisynth —enable-bzlib —enable-fontconfig —enable-frei0r —enable-gnutls —enable-iconv —enable-libass —enable-libbluray —enable-libbs2b —enable-libcaca —enable-libfreetype —enable-libgme —enable-libgsm —enable-libilbc —enable-libmodplug —enable-libmp3lame —enable-libopencore-amrnb —enable-libopencore-amrwb —enable-libopenh264 —enable-libopenjpeg —enable-libopus —enable-librtmp —enable-libsnappy —enable-libsoxr —enable-libspeex —enable-libtheora —enable-libtwolame —enable-libvidstab —enable-libvo-amrwbenc —enable-libvorbis —enable-libvpx —enable-libwavpack —enable-libwebp —enable-libx264 —enable-libx265 —enable-libxavs —enable-libxvid —enable-libzimg —enable-lzma —enable-zlib   
        libavutil      55. 58.100 / 55. 58.100   
        libavcodec     57. 89.100 / 57. 89.100   
        libavformat    57. 71.100 / 57. 71.100   
        libavdevice    57.  6.100 / 57.  6.100   
        libavfilter     6. 82.100 / 6. 82.100   
        libswscale      4.  6.100 / 4.  6.100  
        libswresample   2.  7.100 / 2.  7.100   
        libpostproc    54.  5.100 / 54.  5.100
        [udp @ 0000000002533b60] ’circular_buffer_size’ option was set but it is not supported on this build (pthread support is required) 
        [udp @ 0000000000ec97a0] ’circular_buffer_size’ option was set but it is not supported on this build (pthread support is required) 
        Input #0, rtsp, from ’rtsp ://admin:admin@192.168.1.135’ :   Metadata :
            title : RTSP Session/2.0   Duration : N/A, start : 0.837144, bitrate : N/A
            Stream #0:0 : Video : h264 (High), yuvj420p(pc, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 7 fps, 25 tbr, 90k tbn, 14 tbc Output
        #0, mp4, to ’test.mp4’ :   Metadata :
            title : RTSP Session/2.0
        y    encoder : Lavf57.71.100
            Stream #0:0 : Video : h264 (High) ([33][0][0][0] / 0x0021), yuvj420p(pc, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 7 fps, 25 tbr, 90k tbn, 90k tbc 
        Stream mapping :   Stream #0:0 -> #0:0 (copy) 
        Press [q] to stop, [?] for help
    

    [mp4 @ 00000000036b8340] Non-monotonous DTS in output stream 0:0 ; previous : 0, current : -62743 ; aborting.

    Conversion failed !

    Can anyone explain what the problem is and/or suggest the appropriate flags to handle this ?