
Recherche avancée
Médias (3)
-
Elephants Dream - Cover of the soundtrack
17 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Image
-
Valkaama DVD Label
4 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Image
-
Publier une image simplement
13 avril 2011, par ,
Mis à jour : Février 2012
Langue : français
Type : Video
Autres articles (73)
-
Emballe médias : à quoi cela sert ?
4 février 2011, parCe 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, parLe 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, parLa 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 Anand92Is it possible to encode 4K asset in 1x writing speed ?



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



Encoding command



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




Source Asset Details



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




CPU details



Intel(R) Xeon(R) CPU E7-8870 v3 @ 2.10GHz (144 core)




FFMPEG command output



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




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.



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


-
Evolution #4727 (Nouveau) : Des pictos / icônes symboliques pour tout le monde
12 avril 2021Je 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%B4nesProposition 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 aussispip-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 — DevelopmentThis 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 folderplugins/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 :- class Syncusers extends ConsoleCommand
- {
- protected function configure()
- {
- $this->setName('mycommandplugin:syncusers');
- $this->setDescription('MyCommandPlugin');
- $this->addOption('name', null, InputOption::VALUE_REQUIRED, 'Your name:');
- }
- /**
- * Execute command like: ./console mycommandplugin:syncusers --name="The Piwik Team"
- */
- protected function execute(InputInterface $input, OutputInterface $output)
- {
- $name = $input->getOption('name');
- $output->writeln($message);
- }
- }
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
- protected function configure()
- {
- $this->setName('mycommandplugin:checkdatabase');
- $this->setDescription('MyCommandPlugin');
- $this->addOption('name', null, InputOption::VALUE_REQUIRED, 'Your name:');
- }
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.- protected function execute(InputInterface $input, OutputInterface $output)
- {
- $name = $input->getOption('name');
- $output->writeln($message);
- }
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.