Recherche avancée

Médias (3)

Mot : - Tags -/image

Autres articles (73)

  • 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 (8419)

  • How to achieve 1x writing speed for 4K encoding in ffmpeg ?

    27 avril 2023, par Anand92

    Is it possible to encode 4K asset in 1x writing speed ?

    &#xA;&#xA;

    Below are our encoding commands and details of CPU, source assets, and encoding command output :

    &#xA;&#xA;

    Encoding command

    &#xA;&#xA;

    ffmpeg -i 4K_Source.mp4 -c:v libx265 -preset ultrafast&#xA;    -x265-params fps=60:profile=main:min-keyint=60:crf=19 -vf "scale=3840:2160"&#xA;    -sc_threshold 0 4K_UF_3840x2160_CRF19.mp4&#xA;

    &#xA;&#xA;

    Source Asset Details

    &#xA;&#xA;

    Overall bit rate mode      : Constant&#xA;Overall bit rate           : 51.6 Mb/s&#xA;Format                     : HEVC&#xA;Format/Info                : High Efficiency Video Coding&#xA;Format profile             : Main 10@L5.1@High&#xA;Duration                   : 1 min 33 s&#xA;Width                      : 3 840 pixels&#xA;Height                     : 2 160 pixels&#xA;Display aspect ratio       : 16:9&#xA;Frame rate                 : 59.940 (60000/1001) FPS&#xA;

    &#xA;&#xA;

    CPU details

    &#xA;&#xA;

    Intel(R) Xeon(R) CPU E7-8870 v3 @ 2.10GHz (144 core)&#xA;

    &#xA;&#xA;

    FFMPEG command output

    &#xA;&#xA;

    ffmpeg version 3.2.4-static http://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2017 the FFmpeg developers&#xA;  built with gcc 5.4.1 (Debian 5.4.1-5) 20170205&#xA;  configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc-5 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gray --enable-libass --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzimg&#xA;  libavutil      55. 34.101 / 55. 34.101&#xA;  libavcodec     57. 64.101 / 57. 64.101&#xA;  libavformat    57. 56.101 / 57. 56.101&#xA;  libavdevice    57.  1.100 / 57.  1.100&#xA;  libavfilter     6. 65.100 /  6. 65.100&#xA;  libswscale      4.  2.100 /  4.  2.100&#xA;  libswresample   2.  3.100 /  2.  3.100&#xA;  libpostproc    54.  1.100 / 54.  1.100&#xA;[mpegts @ 0x3a2b600] start time for stream 1 is not set in estimate_timings_from_pts&#xA;[mpegts @ 0x3a2b600] Could not find codec parameters for stream 1 (Audio:  &#xA;aac ([15][0][0][0] / 0x000F), 0 channels, fltp): unspecified sample rate&#xA;Consider increasing the value for the &#x27;analyzeduration&#x27; and &#x27;probesize&#x27;   &#xA;options&#xA;Input #0, mpegts, from &#x27;Samsung_SUHD_Colorful_Food.mp4&#x27;:&#xA;  Duration: 00:01:33.11, start: 1.050044, bitrate: 52076 kb/s&#xA;  Program 1&#xA;    Stream #0:0[0x101]: Video: hevc (Main 10) ([36][0][0][0] / 0x0024), yuv420p10le(tv), 3840x2160 [SAR 1:1 DAR 16:9], 59.94 fps, 59.94 tbr, 90k  &#xA; tbn, 59.94 tbc&#xA;    Stream #0:1[0x102](und): Audio: aac ([15][0][0][0] / 0x000F), 0 channels, fltp&#xA;[libx265 @ 0x3a53d40] Unknown option: profile.&#xA;x265 [info]: HEVC encoder version 2.2&#x2B;35-fe2f2dd96f8c&#xA;x265 [info]: build info [Linux][GCC 5.4.1][64 bit] 10bit&#xA;x265 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX AVX2 FMA3 LZCNT BMI2&#xA;x265 [info]: Main 10 profile, Level-5.1 (Main tier)&#xA;x265 [info]: Thread pool 0 using 64 threads on numa nodes 0,1,2,3&#xA;x265 [info]: Thread pool 1 using 64 threads on numa nodes 0,1,2,3&#xA;x265 [info]: Slices                              : 1&#xA;x265 [info]: frame threads / pool features       : 8 / wpp(68 rows)&#xA;x265 [info]: Coding QT: max CU size, min CU size : 32 / 16&#xA;x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra&#xA;x265 [info]: ME / range / subpel / merge         : dia / 57 / 0 / 2&#xA;x265 [info]: Keyframe min / max / scenecut / bias: 60 / 250 / 0 / 5.00&#xA;x265 [info]: Lookahead / bframes / badapt        : 5 / 3 / 0&#xA;x265 [info]: b-pyramid / weightp / weightb       : 1 / 0 / 0&#xA;x265 [info]: References / ref-limit  cu / depth  : 1 / off / off&#xA;x265 [info]: AQ: mode / str / qg-size / cu-tree  : 1 / 0.0 / 32 / 1&#xA;x265 [info]: Rate Control / qCompress            : CRF-19.0 / 0.60&#xA;x265 [info]: tools: rd=2 psy-rd=2.00 early-skip rskip tmvp fast-intra&#xA;x265 [info]: tools: strong-intra-smoothing lslices=8 deblock&#xA;Output #0, mp4, to &#x27;Samsung_UF_3840x2160_CRF19.mp4&#x27;:&#xA;  Metadata:&#xA;    encoder         : Lavf57.56.101&#xA;    Stream #0:0: Video: hevc (libx265) ([35][0][0][0] / 0x0023), yuv420p10le, 3840x2160 [SAR 1:1 DAR 16:9], q=2-31, 59.94 fps, 60k tbn, 59.94 tbc&#xA;    Metadata:&#xA;      encoder         : Lavc57.64.101 libx265&#xA;Stream mapping:&#xA;  Stream #0:0 -> #0:0 (hevc (native) -> hevc (libx265))&#xA;Press [q] to stop, [?] for help&#xA;frame= 5581 fps= 20 q=-0.0 Lsize=  212585kB time=00:01:33.05&#xA;bitrate=18713.8kbits/s speed=0.336x&#xA;video:212514kB audio:0kB subtitle:0kB other streams:0kB global headers:2kB muxing overhead: 0.033184%&#xA;x265 [info]: frame I:     23, Avg QP:24.29  kb/s: 133747.47&#xA;x265 [info]: frame P:   1401, Avg QP:26.43  kb/s: 31994.19&#xA;x265 [info]: frame B:   4157, Avg QP:29.67  kb/s: 13602.20&#xA;x265 [info]: consecutive B-frames: 1.3% 1.4% 1.5% 95.9%&#xA;encoded 5581 frames in 276.59s (20.18 fps), 18714.28 kb/s, Avg QP:28.83 &#xA;

    &#xA;&#xA;

    The encoding speed we get is 0.3x only. we are trying encode HEVC codec asset to HEVC codec itself with 4K resolution in 1x writing speed.

    &#xA;&#xA;

    Are we missing any parameters in ffmpeg command which can tweak encoding speed ?

    &#xA;

  • Evolution #4727 (Nouveau) : Des pictos / icônes symboliques pour tout le monde

    12 avril 2021

    Je fais un ticket pour la future PR et poser le plan d’action.
    C’est la suite de https://core.spip.net/issues/4562#Des-ic%C3%B4nes

    Proposition pour intégrer un jeu complet d’icônes symboliques.

    Les besoins sont multiples pour pleins d’éléments d’interface, dans le core et les plugins : des barres d’outils, des boutons d’actions, etc.
    Et chacun doit réimplémenter ça un peu à sa sauce, notamment dans le privé.

    C’est un besoin bien distinct des icônes svg de couleur dont on dispose actuellement dans le privé : on veut des pictos symboliques qui héritent de taille et de la couleur du texte, et issus d’un même set afin d’avoir un style unifié.
    Cela vient donc en complément.

    Il s’agit donc de reprendre un jeu d’icônes existant, qu’on n’aura pas à maintenir, optimisé, et qui fournit des icônes cohérentes visuellement, utilisables dans tous les contextes. Cf. plus bas pour une comparaison initiale des candidats possibles.

    Utilisation

    Ces icônes seraient utilisables de 2 façons :

    1) Des classes .spicon

    Des classes à ajouter à n’importe quel élément inline quand il s’agit d’icônes purement décoratives.
    Ces classes pouvant finir dans squelettes utilisés dans le public, pour éviter les conflits, on propose la contraption de spip + icon = spicon. Il y a aussi spip-icon mais c’est un peu plus verbeux.

    Exemples :

    <span class="CodeRay"><span class="tag">span> <span class="attribute-name">class</span>=<span class="string"><span class="delimiter">"</span><span class="content">spicon_menu</span><span class="delimiter">"</span></span><span class="tag">></span>Ouvrir le menu<span class="tag"></span>
    <span class="tag">span> <span class="attribute-name">class</span>=<span class="string"><span class="delimiter">"</span><span class="content">spicon_truc</span><span class="delimiter">"</span></span><span class="tag">></span><span class="tag"></span> Du texte
    <span class="tag">span> <span class="attribute-name">class</span>=<span class="string"><span class="delimiter">"</span><span class="content">titrem spicon_machin</span><span class="delimiter">"</span></span><span class="tag">></span>Mon titre<span class="tag"></span>
    </span></span></span></span>

    2) Une balise #ICON

    En complément, on peut vouloir embarquer une icône svg dans le HTML.

    On propose de reprendre et d’adapter la balise #ICON du plugin Zcore, qui fait ça très bien.
    Cette balise permet d’embarquer une icône du set par défaut, mais également n’importe quelle autre (je rentre pas dans les détails).

    Un modèle correspondant permettra aussi d’inclure des icônes svg dans les textes :

    <span class="CodeRay">
    #ICONE{identifiant}
    #ICONE{chemin/vers/mon_icone.svg}
    #ICONE{#identifiant_autre_set}
    </span>

    Identifiants sémantiques

    Les identifiants des icônes seront directement ceux du jeu d’icônes choisi.
    Mais ils peuvent avoir des noms un peu barbares : chevron-double-right, eye-slash, grip-vertical, etc.

    Dans tous les cas on pourra les utiliser tels quels, mais en plus de ça, on propose de faire une correspondance sémantique pour les icônes correspondants aux actions les plus courantes. Par exemple au lieu de faire #ICONE{chevron-double-down} on pourra faire #ICONE{deplier}.
    Cela passerait par un pipeline, donc liste qui peut être complétée selon ses besoins.

    La liste initiale est visible ici : https://demo.hedgedoc.org/3zIXkcFLTVSwV0nKC1_qcA?both

    Ressources privé / public

    Cela veut dire 2 ressources à charger :

    • Une font-face pour les classes
    • Un sprite svg pour la balise

    Dans le privé, il faut charger les 2.
    Dans le public, cela pourrait se faire optionnellement, à la demande.

    Candidats

    Pour finir un tableau comparatif des jeux d’icônes possibles (à licences libres), avec mes commentaires initiaux.
    Petite préférence pour Feather actuellement.

    Lib Nb sprite fontface Commentaire
    Bootstrap 1300+ 693ko 85ko Clés en main, beaucoup d’icônes (trop ?)
    Feather 286 ( 100ko) - Styles rounded. Bonne balance nb icônes / poids.
    Octicon (Github) 433 ( 240ko) - Styles rounded. Bonne balance nb icônes / poids. Beaucoup de manips à faire pour créer sprite et cie.
    Material (Google)  ? (?ko) 44ko Style rounded / épaisseur variable. Beaucoup de manips à faire pour créer sprite et cie. Google !
    Core-ui 554 418ko 63ko Clés en main. Sets inutiles non pris en compte dans ce tableau (brands, flags, …)
    Bytesize 101 11ko - Style rounded / épaisseur variable. Léger : le minimum syndical.

    Sprite entre parenthèses = non fourni dans le dépôt ou la dist → poids théorique.

  • How to create a command – Introducing the Piwik Platform

    2 octobre 2014, par Thomas Steur — Development

    This is the next post of our blog series where we introduce the capabilities of the Piwik platform (our previous post was How to publish your plugin or theme on the Piwik Marketplace). This time you’ll learn how to create a new command. For this tutorial you will need to have basic knowledge of PHP.

    What is a command ?

    A command can execute any task on the command line. Piwik provides currently about 50 commands via the Piwik Console. These commands let you start the archiver, change the number of available custom variables, enable the developer mode, clear caches, run tests and more. You could write your own command to sync users or websites with another system for instance.

    Getting started

    In this series of posts, we assume that you have already set up your development environment. If not, visit the Piwik Developer Zone where you’ll find the tutorial Setting up Piwik.

    To summarize the things you have to do to get setup :

    • Install Piwik (for instance via git).
    • Activate the developer mode : ./console development:enable --full.
    • Generate a plugin : ./console generate:plugin --name="MyCommandPlugin". There should now be a folder plugins/MyCommandPlugin.
    • And activate the created plugin under Settings => Plugins.

    Let’s start creating a command

    We start by using the Piwik Console to create a new command. As you can see there is even a command that lets you easily create a new command :

    ./console generate:command

    The command will ask you to enter the name of the plugin the created command should belong to. I will simply use the above chosen plugin name “MyCommandPlugin”. It will ask you for a command name as well. I will use “SyncUsers” in this example. There should now be a file plugins/MyCommandPlugin/Commands/Syncusers.php which contains already an example to get you started easily :

    1. class Syncusers extends ConsoleCommand
    2. {
    3.     protected function configure()
    4.     {
    5.         $this-&gt;setName('mycommandplugin:syncusers');
    6.         $this-&gt;setDescription('MyCommandPlugin');
    7.         $this-&gt;addOption('name', null, InputOption::VALUE_REQUIRED, 'Your name:');
    8.     }
    9.  
    10.     /**
    11.      * Execute command like: ./console mycommandplugin:syncusers --name="The Piwik Team"
    12.      */
    13.     protected function execute(InputInterface $input, OutputInterface $output)
    14.     {
    15.         $name    = $input-&gt;getOption('name');
    16.  
    17.         $message = sprintf('Syncusers: %s', $name);
    18.  
    19.         $output-&gt;writeln($message);
    20.     }
    21. }

    Télécharger

    Any command that is placed in the “Commands” folder of your plugin will be available on the command line automatically. Therefore, the newly created command can now be executed via ./console mycommandplugin:syncusers --name="The Piwik Team".

    The code template explained

    1. protected function configure()
    2. {
    3.     $this-&gt;setName('mycommandplugin:checkdatabase');
    4.     $this-&gt;setDescription('MyCommandPlugin');
    5.     $this-&gt;addOption('name', null, InputOption::VALUE_REQUIRED, 'Your name:');
    6. }

    Télécharger

    As the name says the method configure lets you configure your command. You can define the name and description of your command as well as all the options and arguments you expect when executing it.

    1. protected function execute(InputInterface $input, OutputInterface $output)
    2. {
    3.     $name    = $input-&gt;getOption('name');
    4.     $message = sprintf('Syncusers: %s', $name);
    5.     $output-&gt;writeln($message);
    6. }

    Télécharger

    The actual task is defined in the execute method. There you can access any option or argument that was defined on the command line via $input and write anything to the console via $output argument.

    In case anything went wrong during the execution you should throw an exception to make sure the user will get a useful error message. Throwing an exception when an error occurs will make sure the command does exit with a status code different than 0 which can sometimes be important.

    Advanced features

    The Piwik Console is based on the powerful Symfony Console component. For instance you can ask a user for any interactive input, you can use different output color schemes and much more. If you are interested in learning more all those features have a look at the Symfony console website.

    How to test a command

    After you have created a command you are surely wondering how to test it. Ideally, the actual command is quite short as it acts like a controller. It should only receive the input values, execute the task by calling a method of another class and output any useful information. This allows you to easily create a unit or integration test for the classes behind the command. We will cover this topic in one of our future blog posts. Just one hint : You can use another command ./console generate:test to create a test. If you want to know how to test a command have a look at the Testing Commands documentation.

    Publishing your Plugin on the Marketplace

    In case you want to share your commands with other Piwik users you can do this by pushing your plugin to a public GitHub repository and creating a tag. Easy as that. Read more about how to distribute a plugin and best practices when publishing a plugin.

    Isn’t it easy to create a command ? We never even created a file ! If you have any feedback regarding our APIs or our guides in the Developer Zone feel free to send it to us.