
Recherche avancée
Médias (1)
-
The Great Big Beautiful Tomorrow
28 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Texte
Autres articles (85)
-
Installation en mode ferme
4 février 2011, parLe mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
C’est la méthode que nous utilisons sur cette même plateforme.
L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...) -
Organiser par catégorie
17 mai 2013, parDans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...) -
Récupération d’informations sur le site maître à l’installation d’une instance
26 novembre 2010, parUtilité
Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...)
Sur d’autres sites (5490)
-
How to create a custom theme in Piwik – Introducing the Piwik Platform
23 août 2014, par Thomas Steur — DevelopmentThis is the start of a new blog series where we introduce the capabilities of the Piwik platform. You’ll learn how to write custom plugins & themes, how to use our HTTP APIs and more.
We have been greatly simplifying our APIs over the last year focusing primarily on one design principle :
The complexity of our API should never exceed the complexity of your use case.
In other words, if you have a simple use for our API, we want it to be simple for you to accomplish it. If you have a complex, big, hairy, change-the-world idea, then maybe we can’t make it simple for you to accomplish it, but we want it to be possible.
Over the next weeks and months you will learn what exactly we mean by this and how we accomplished it.
FYI, don’t worry if you’re currently using our APIs, we keep them backwards compatible and we announce breaking changes in our platform changelog.
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
. - And if you want, generate some test data :
./console visitorgenerator:generate-visits --idsite=1 --limit-fake-visits=600
. This can take a while and requires the VisitorGenerator plugin from the Marketplace.
Let’s start creating our own theme
We start by using the Piwik Console to create a blank theme :
./console generate:theme
The command will ask you to enter a name, description and version number for your theme. I will simply use “CustomTheme” as the name of the theme. There should now be a folder
plugins/CustomTheme
which contains some files to get you started easily.Before we modify our theme, we have to activate it by visiting the Settings => Themes admin page in our Piwik installation, or alternatively by running the command
./console core:plugin activate YourCustomTheme
. If the theme is not activated, we won’t see any changes.Theme Contents
The most important files in our theme are
plugins/CustomTheme/stylesheets/theme.less
,plugins/CustomTheme/stylesheets/_colors.less
andplugins/CustomTheme/stylesheets/_variables.less
:theme.less
is the file that will be included when your theme is activated. In this file you would include other stylesheet files and overwrite CSS styles._colors.less
contains many less variables allowing you to easily change the colors Piwik uses._variables.less
contains currently only one variable to change the font family. More variables will be added in the future. Note : This is a new feature and the file will be only there in case you have installed Piwik using Git or at least Piwik 2.6.0.
Changing the font family
To change the font family simply overwrite the variable
@theme-fontFamily-base: Verdana, sans-serif;
in_variables.less
. That’s it.Changing colors
To change a color, uncomment the less variables of the colors you want to change in
_colors.less
. I will shortly explain some of them. Usually changing only these colors will be enough to adjust Piwik’s look to your corporate design or to create a look that pleases you :@theme-color-brand: #d4291f; // The Piwik red which is for instance used in the menu, it also defines the color of buttons, the little arrows and more
@theme-color-brand-contrast: #ffffff; // Contrast color to the Piwik red. Usually you need to change it only in case you define a light brand color. For instance to change the text color of buttons
@theme-color-link: #1e93d1; // The link color which is usually a light blue
@theme-color-widget-title-text: #0d0d0d; // The text and background color of the header of a widget (Dashboard)
@theme-color-widget-title-background: #f2f2f2;
@theme-color-menu-contrast-text: #666666; // The text color of a menu item in the reporting sub menu and the admin menu
@theme-color-menu-contrast-textActive: #0d0d0d; // The text color of an active menu item
@theme-color-menu-contrast-background: #f2f2f2; // The background color of a menu item
@graph-colors-data-series[1-8]: #000000; // The different colors used in graphsMaking the change visible
To make a color or font change actually visible when you reload a page in Piwik you will have to delete the compiled CSS file after each change like this :
rm tmp/assets/asset_manager_global_css.css
Publishing your Theme on the Marketplace
In case you want to share your theme with other Piwik users you can do this by pushing your theme to GitHub and creating a tag. Easy as that. Read more about how to distribute a theme.
Advanced features
Isn’t it easy to create a custom theme ? All we had to do is to change some less variables. We never even created a file ! Of course, based on our API design principle, you can accomplish more if you want. For instance, you can change icons, CSS stylesheets, templates and more.
For further customising your Piwik, you can even change the logo and favicon in the Settings => General settings page.
Would you like to know more about theming ? Go to our Theme guide in the Piwik Developer Zone.
If you have any feedback regarding our APIs or our guides in the Developer Zone feel free to send it to us.
PS : see also this related FAQ : How do I White Label Piwik ?
-
ffmpeg mjpeg -> h.265 smeared color on output video file
14 mars 2023, par BobtheMagicMooseI am converting some old mjpeg videos (stored in .avi container) to h.265 (.mp4 container) but am noticing the colors are smearing. Using the terminal command :


ffmpeg -y -i "input-file.avi" -c:v libx265 -vtag hvc1 "output-file.mp4"


I get the following image (notice how the red and blue are stretched donward). There is a lot of motion in the scene, but the motion is mostly horizontal :




Any idea what might cause this ? The detail and resolution seem fine, just the colors are being interpreted weirdly.


Full output :


ffmpeg version N-105859-g37480b1b85-20220305 Copyright (c) 2000-2022 the FFmpeg developers
 built with gcc 11.2.0 (crosstool-NG 1.24.0.533_681aaef)
 configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --disable-libpulse --enable-libvmaf --disable-libxcb --disable-xlib --enable-amf --enable-libaom --enable-avisynth --enable-libdav1d --enable-libdavs2 --disable-libfdk-aac --enable-ffnvcodec --enable-cuda-llvm --enable-frei0r --enable-libgme --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librist --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --disable-libdrm --disable-vaapi --enable-libvidstab --enable-vulkan --enable-libshaderc --enable-libplacebo --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --enable-libzvbi --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags= --extra-libs=-lgomp --extra-version=20220305
 libavutil 57. 22.100 / 57. 22.100
 libavcodec 59. 21.103 / 59. 21.103
 libavformat 59. 17.102 / 59. 17.102
 libavdevice 59. 5.100 / 59. 5.100
 libavfilter 8. 27.100 / 8. 27.100
 libswscale 6. 5.100 / 6. 5.100
 libswresample 4. 4.100 / 4. 4.100
 libpostproc 56. 4.100 / 56. 4.100
Guessed Channel Layout for Input Stream #0.1 : mono
Input #0, avi, from 'E:\PATH\MVI_0168.AVI':
 Metadata:
 creation_time : 2006-06-14 21:42:10
 software : CanonMVI02
 Duration: 00:00:53.47, start: 0.000000, bitrate: 5203 kb/s
 Stream #0:0: Video: mjpeg (Baseline) (MJPG / 0x47504A4D), yuvj422p(pc, bt470bg/unknown/unknown), 320x240, 5111 kb/s, 30 fps, 30 tbr, 30 tbn
 Stream #0:1: Audio: pcm_u8 ([1][0][0][0] / 0x0001), 11024 Hz, mono, u8, 88 kb/s
Stream mapping:
 Stream #0:0 -> #0:0 (mjpeg (native) -> hevc (libx265))
 Stream #0:1 -> #0:1 (pcm_u8 (native) -> aac (native))
Press [q] to stop, [?] for help
[aac @ 000001a7ad1aab00] Too many bits 6408.707483 > 6144 per frame requested, clamping to max
x265 [info]: HEVC encoder version 3.5+34-7a5709048
x265 [info]: build info [Windows][GCC 11.2.0][64 bit] 8bit+10bit+12bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
x265 [info]: Main profile, Level-2 (Main tier)
x265 [info]: Thread pool created using 12 threads
x265 [info]: Slices : 1
x265 [info]: frame threads / pool features : 3 / wpp(4 rows)
x265 [warning]: Source height < 720p; disabling lookahead-slices
x265 [info]: Coding QT: max CU size, min CU size : 64 / 8
x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra
x265 [info]: ME / range / subpel / merge : hex / 57 / 2 / 3
x265 [info]: Keyframe min / max / scenecut / bias : 25 / 250 / 40 / 5.00
x265 [info]: Lookahead / bframes / badapt : 20 / 4 / 2
x265 [info]: b-pyramid / weightp / weightb : 1 / 1 / 0
x265 [info]: References / ref-limit cu / depth : 3 / off / on
x265 [info]: AQ: mode / str / qg-size / cu-tree : 2 / 1.0 / 32 / 1
x265 [info]: Rate Control / qCompress : CRF-28.0 / 0.60
x265 [info]: tools: rd=3 psy-rd=2.00 early-skip rskip mode=1 signhide tmvp
x265 [info]: tools: b-intra strong-intra-smoothing deblock sao
Output #0, mp4, to 'C:\PATH\test.mp4':
 Metadata:
 software : CanonMVI02
 encoder : Lavf59.17.102
 Stream #0:0: Video: hevc (hev1 / 0x31766568), yuvj422p(pc, bt470bg/unknown/unknown, progressive), 320x240, q=2-31, 30 fps, 1000k tbn
 Metadata:
 encoder : Lavc59.21.103 libx265
 Side data:
 cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
 Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 11025 Hz, mono, fltp, 66 kb/s
 Metadata:
 encoder : Lavc59.21.103 aac
frame= 1604 fps=187 q=35.9 Lsize= 1818kB time=00:00:53.49 bitrate= 278.4kbits/s speed=6.23x
video:1438kB audio:348kB subtitle:0kB other streams:0kB global headers:2kB muxing overhead: 1.811161%
x265 [info]: frame I: 9, Avg QP:28.81 kb/s: 1309.05
x265 [info]: frame P: 361, Avg QP:30.64 kb/s: 599.75
x265 [info]: frame B: 1234, Avg QP:35.12 kb/s: 100.04
x265 [info]: Weighted P-Frames: Y:2.2% UV:1.9%
x265 [info]: consecutive B-frames: 2.7% 1.6% 5.1% 40.5% 50.0%

encoded 1604 frames in 8.57s (187.25 fps), 219.29 kb/s, Avg QP:34.08
[aac @ 000001a7ad1aab00] Qavg: 64427.340



-
ffmpeg status & quality / cuda (CPU/GPU)
18 juin 2024, par coccoffmpeg am I doing it right ?


So much time has passed since I use ffmpeg to convert clips on my home web server, now that mp4 (h264 & aac) is the current overall standard (works on every console, smartphone, smartTV, pc) I decided to convert my old clips from various digital cameras to to this new container/codecs.


- 

- less space & the same quality.
- compatibility
- support for tags (subler for mac)








after some research I opted for ffmpeg because of various reasons


- 

- commandline (I made my simple web interface with default settings which I execute with php's exec)
- the quality/size amount






I read that many expensive video conversion software programs are not able to handle low bitrate videos properly. I also tested some of them and personally I could not find the proper export settings or I was not impressed by the results... some had fixed default export settings, most had a lower video quality at the same filesize. ffmpeg allows me to set the -crf (18-24 usually) and -preset (veryslow, fast..) which allows me to reduce the filesize drastically maintaining the same visible quality.


Said that I'm using the preset at very slow (there is also placebo but the final video file is only 1% smaller in size).


And here is the command I use


ffmpeg
-y //overwrite the file if it exists

-i INPUTFILE // replace with the input file

-metadata title=THETITLE // set a nice title, visible on modern devices
-metadata date=THEDATE // set a nice title, visible on modern devices

-c:v libx264 // use the h264 codec
 -crf 21 // try different numbers between 18-26
 -preset veryslow // placebo,slow,fast,ultrafast==big file 
 -tune film // tune it a little
 -pix_fmt yuv420p // preferred on most modern devices
 -profile:v main // preferred on most modern devices
 -level 3.1 // preferred on most modern devices 
 -refs 4 // preferred on most modern devices

-c:a libfdk_aac // use aac
 -metadata:s:a language=eng // set a language, visible on modern devices 
 -b:a 128k // audio bitrate 128k is like mp3 192k
 -ar 48000 // 44100 ... whatever
 -ac 2 // audiochannels
 -movflags +faststart //move the metadata in the front of the video so it loads faster

OUTPUTFILE



Some camcorder clips with m2ts already have the avc/h264 compatible codec so I just copy the stream.

some have the ac3/Dolby surround audio. I convert the audio but keep the ac3 as second audio track mapping the ffmpeg streams. this allows me to watch the mp4 on browsers and mobile devices but I'm able to keep the surround sound to playback on some tv's, advanced media players or devices like apple tv.

Not that I'm not happy with the speed (using quad core's) but I recently read again about cuda opencl and there is also the simple fact that I'm not using other converters than ffmpeg since a lot of time.


Is ffmpeg (with the setting I use) a good converter to keep the same video quality than the source reducing the space occupied by and average of 30-40% ?


Is GPU conversion really that bad (cuda .. testing a gtx970) ?
it would be nice to add some more speed to the conversions by using both the gpu and the cpu..but for my understanding they cannot work together ??? and using only GPU is a drastically quality loss...cpu is more precise, GPU is faster in calculation are too imprecise from what I read.. so expensive software programs use cuda only for preview purpose... right ?


Is ffmpeg or another software compatible with CPU+GPU encoding ?
I really don't remember where, but I read that the ffmpeg is not a good videoconverter.


I'm really happy with the size/quality, I gained an average of 30% in space with no visible quality loss. With some extra parameters i can adjust some really old analog videos that are deinterlaced in a really bad way.




maybe I could gain more size/quality with another software ???




note : I like ffmpeg.it's free and it has commandline so I can create my own interface with php html & js and use it on various machines without the need to install it in every device I use. I upload the idevice clips directly to the ffmpeg server.


EDIT :


@talonmies ...cuda tag removed :


http://www.nvidia.com/object/cuda_home_new.html




CUDA® is a parallel computing platform and programming model invented
by NVIDIA. It enables dramatic increases in computing performance by
harnessing the power of the graphics processing unit (GPU). With
millions of CUDA-enabled GPUs sold to date, software developers,
scientists and researchers are finding broad-ranging uses for GPU
computing with CUDA. Here are a few examples : - See more at :
http://www.nvidia.com/object/cuda_home_new.html#sthash.dEYaqae7.dpuf




isn't cuda the programming model that a theoretical ffmpeg library should support to handle GPU encoding on nvidia cards like the gtx 970 ?? like the badaboom software http://www.geforce.com/games-applications/pc-applications/badaboom-media-converter.