Recherche avancée

Médias (3)

Mot : - Tags -/image

Autres articles (68)

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

  • Le plugin : Gestion de la mutualisation

    2 mars 2010, par

    Le plugin de Gestion de mutualisation permet de gérer les différents canaux de mediaspip depuis un site maître. Il a pour but de fournir une solution pure SPIP afin de remplacer cette ancienne solution.
    Installation basique
    On installe les fichiers de SPIP sur le serveur.
    On ajoute ensuite le plugin "mutualisation" à la racine du site comme décrit ici.
    On customise le fichier mes_options.php central comme on le souhaite. Voilà pour l’exemple celui de la plateforme mediaspip.net :
    < ?php (...)

  • Gestion de la ferme

    2 mars 2010, par

    La ferme est gérée dans son ensemble par des "super admins".
    Certains réglages peuvent être fais afin de réguler les besoins des différents canaux.
    Dans un premier temps il utilise le plugin "Gestion de mutualisation"

Sur d’autres sites (8945)

  • Showfreqs and showwaves over background image ?

    11 octobre 2017, par Jeremy

    I’m wanting to get FFMPEG to export my podcast audio to a file I can upload to youtube that is visually interesting.

    currently I am using the following piece of code, which I don’t fully grasp :

    ffmpeg -i E04_ProphetsPrey.wav -filter_complex \
    "    [0:a]showfreqs=mode=line:ascale=log:fscale=rlog:s=1280x518,pad=1280:720[vs]; \
    [0:a]showfreqs=mode=line:ascale=log:fscale=rlog:s=1x1[ss]; \
    [0:a]showwaves=s=1280x202:mode=p2p[sw]; \
    [vs][ss]overlay=w[bg]; \
    [bg][sw]overlay=0:H-h,drawtext=fontfile=/usr/share/fonts/TTF/Vera.ttf:fontcolor=white:x=10:y=10:text='\"Rated80s Prophets Prey\" by Comics On Film'[out]" \
    -map "[out]" -map 0:a -c:v libx264 -preset fast -crf 18 -c:a copy -threads 0 output.mkv

    what I would like to do is set a (branded) background image, and have showfreqs render over it on the top half and showwaves render over it on the bottom half.

    Is that possible, and if so could you provide me a detailed example ?

    (I’m on arch linux)

  • Unable to probe

    8 mai 2017, par Etson

    I’m using php-ffmpeg on windows with cakephp3, and encountered an issue that says :

    Unable to probe /var/www/blogchild.dev/webroot/uploads/records//Танец довольного теннисиста.mp4

    MultimediaController

    &lt;?php
    namespace App\Controller;

    use App\Controller\AppController;

    class MultimediaController extends AppController
    {

       public function initialize()
       {
           parent::initialize(); // TODO: Change the autogenerated stub
           $this->Auth->allow(['index', 'addvideo']);
           $this->loadModel('Posts');
           $this->loadComponent('File');
           $this->loadComponent('Flash');
           $this->loadComponent('Upload');
       }

       public function addvideo()
       {
           $this->viewBuilder()->template('addvideo');
           $posts = $this->Posts->newEntity();
    //        $posts = $this->MsPosts->find()->toArray();
    //        dump($posts);
    //        die();
           if ($this->request->is('post')) {
               $data = $this->request->data;
               $data['mentor_id'] = '1';
               $data['nbr_of_views'] = '0';
               $data['nbr_of_loves'] = '0';
               $data['nbr_of_smiles'] = '0';
               $data['mentor_id'] = '1';
               $data['child_id'] = '1';

               $post = $this->Posts->patchEntity($posts, $data);
    //            var_dump($data);
    //            die();
    //            debug($this->MsPosts->save($post));die();

    //                $upload = $this->File->uploadFile($this->request->data['file'], $post['id']);
    //                $post->file = $upload['url'];
               if (!empty($this->request->data['file']['name'])) {
                   $path = '/uploads' . DS . 'records' . DS . $post->id;
                   $this->uploadFile($_FILES['file'], $path, $post->id);
                   $post->file = $path . DS . $_FILES['file']['name'];
                   $this->Posts->save($post);
               } else {
                   $this->Posts->save($post);
               }
               $this->Flash->success(__('The post saved'));
               return $this->redirect(['action' => 'addvideo']);

    AppController

    &lt;?php
    /**
    * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
    * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
    *
    * Licensed under The MIT License
    * For full copyright and license information, please see the LICENSE.txt
    * Redistributions of files must retain the above copyright notice.
    *
    * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
    * @link      http://cakephp.org CakePHP(tm) Project
    * @since     0.2.9
    * @license   http://www.opensource.org/licenses/mit-license.php MIT License
    */
    namespace App\Controller;

    use Cake\Controller\Controller;
    use Cake\Event\Event;
    use Cake\Filesystem\Folder;
    use FFMpeg\Coordinate\TimeCode;
    use FFMpeg\FFMpeg;
    use Cake\Controller\Component;
    use Cake\I18n\I18n;

    /**
    * Application Controller
    *
    * Add your application-wide methods in the class below, your controllers
    * will inherit them.
    *
    * @link http://book.cakephp.org/3.0/en/controllers.html#the-app-controller
    */
    class AppController extends Controller
    {


       /**
        * Initialization hook method.
        *
        * Use this method to add common initialization code like loading components.
        *
        * e.g. `$this->loadComponent('Security');`
        *
        * @return void
        */
       public function initialize()
       {

           parent::initialize();

           $this->loadComponent('Cookie');
           $this->loadComponent('RequestHandler');
           $this->loadComponent('Flash');
           $provider = $this->request->query('provider');
           //if ($provider === null) {
           $this->loadComponent('Auth', [
               'authenticate' => [
                   'Form' => [
                       'finder' => 'auth',
                       'fields' => [
                           'username' => 'email',
                           'password' => 'password'
                       ],
                       'loginAction' => [
                           'controller' => 'Auth',
                           'action' => 'login'
                       ],

                       'loginRedirect' => [
                           'controller' => 'Auth',
                           'action' => 'login'
                       ],

                       'logoutRedirect' => [
                           'controller' => 'Auth',
                           'action' => 'login'
                       ]
                   ],
                   'ADmad/HybridAuth.HybridAuth' => [
                       // All keys shown below are defaults
                       'fields' => [
                           'provider' => 'provider',
                           'openid_identifier' => 'openid_identifier',
                           'email' => 'email'

                       ],
                       'profileModel' => 'ADmad/HybridAuth.SocialProfiles',
                       'profileModelFkField' => 'user_id',

                       // The URL Hybridauth lib should redirect to after authentication.
                       // If no value is specified you are redirect to this plugin's
                       // HybridAuthController::authenticated() which handles persisting
                       // user info to AuthComponent and redirection.
                       'hauth_return_to' => null,

                       'loginRedirect' => [
                           'controller' => 'Auth',
                           'action' => 'login'
                       ],

                       'logoutRedirect' => [
                           'controller' => 'Auth',
                           'action' => 'login'
                       ]
                   ],
               ],



           ]);
    //        } else {
    //            $this->loadComponent('Auth', [
    //                'authenticate' => [
    //                    'Form',
    //
    //
    //                ]
    //
    //            ]);
    //        }

       }

       /**
        * Before render callback.
        *
        * @param \Cake\Event\Event $event The beforeRender event.
        * @return void
        */
       public function beforeRender(Event $event)
       {
           if (!array_key_exists('_serialize', $this->viewVars) &amp;&amp;
               in_array($this->response->type(), ['application/json', 'application/xml'])
           ) {
               $this->set('_serialize', true);
           }

           if ($this->request->session()->read('Auth.User')) {
               $this->set('loggedIn', true);
           } else {
               $this->set('loggedIn', false);
           }
       }

       protected function uploadFile(array $file, $path, $postId)
       {
           $objFile = $file;
           $path = $_SERVER['DOCUMENT_ROOT'] . $path;
           //@TODO check file size|Return error
           $folder = new Folder();
           $folder->create($path, 0755);

           move_uploaded_file($objFile['tmp_name'], $path . DS . $objFile['name']);

           $ffmpeg = FFMpeg::create(
               array(
                   'ffmpeg.binaries' => '/usr/bin/ffmpeg',
                   'ffprobe.binaries' => '/usr/bin/ffprobe',
                   'timeout' => 3600, // The timeout for the underlying process
                   'ffmpeg.threads' => 12,   // The number of threads that FFMpeg should use
               )
           );
           $temp = explode('.', $objFile['name']);
           $video = $ffmpeg->open(WWW_ROOT . 'uploads/records' . DS . $postId . DS . $objFile['name']);
           $frame = $video->frame(TimeCode::fromSeconds(1));
           $userPath = 'uploads/records' . DS . $postId . DS . $temp[0] . '.jpg';
           $frame->save(WWW_ROOT . $userPath);
       }

    WARNING !!!!! Help me......
    enter image description here

  • FFmpeg output seeking result to Android LruCache

    26 mai 2016, par vxh.viet

    Dear fellow StackOverflower,

    In my Android application, I’m trying to quickly retrieve a frame from a video using ffmpeg-android-java to display in an ImageView. The problem is using a typical ffmpeg’s -ss seeking command will require to write the output into the memory which I suppose is the big hit on performance :

    ffmpeg -ss 00:23:00 -i Mononoke.Hime.mkv -frames:v 1 out1.jpg

    A typical command execution like above takes around 700 - 1200 milliseconds. So instead of writing into the memory, I would like to write it into LruCache hoping to achieve a better performance.

    The problem is ffmpeg-android-java is a wrapper to execute ffmpeg command and as such I don’t know how to correctly supply the LruCache’s address for the command.

    Below is my code snippet :

    private void seekToPosition(long currentVideoPosition){

       String position = DiskUtils.formatMillisForFFmpeg(currentVideoPosition);

       String[] cmd = {"-ss", String.valueOf(position), "-i", mVideoPath,
                       "-y", "-an", "-frames:v", "1",
                       "/storage/emulated/0/Videos/out.jpg"}; //this the problem, I would like to change this to the address of LruCache

       try {
           // to execute "ffmpeg -version" command you just need to pass "-version"
           mFFmpeg.execute(cmd, new ExecuteBinaryResponseHandler() {

               long start;
               long end;

               @Override
               public void onStart() {
                   canSeek = false;
                   start = System.currentTimeMillis();
               }

               @Override
               public void onProgress(String message) {}

               @Override
               public void onFailure(String message) {
                   Log.d(TAG, "FFmpeg cmd failure");
               }

               @Override
               public void onSuccess(String message) {
                   Log.d(TAG, "FFmpeg cmd success");

                   /*mFFmpeg.killRunningProcesses();
                   Log.d(TAG, "FFmpeg kill running process: " + mFFmpeg.killRunningProcesses());*/
               }

               @Override
               public void onFinish() {
                   canSeek = true;
                   Log.d(TAG, "FFmpeg cmd finished: is FFmpeg process running: " + mFFmpeg.isFFmpegCommandRunning());
                   end = System.currentTimeMillis();
                   Log.d(TAG, "FFmpeg excuted in: " + (end - start) + " milliseconds");
               }
           });
       } catch (FFmpegCommandAlreadyRunningException e) {
           // Handle if FFmpeg is already running
           Log.d(TAG, "FFmpeg exception: " + e);
       }
    }