
Recherche avancée
Médias (1)
-
La conservation du net art au musée. Les stratégies à l’œuvre
26 mai 2011
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (88)
-
Creating farms of unique websites
13 avril 2011, parMediaSPIP 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" (...) -
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 (...) -
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
Sur d’autres sites (6101)
-
How to sell Piwik services without any confusion ?
10 octobre 2017, par InnoCraft — PluginsAs you may know, Piwik is a Free software under the GPL license which guarantees you :
- The freedom to run the program for any purpose.
- The freedom to study how it works and change it.
- The freedom to improve the program, and release your changes.
- The freedom to redistribute it under the GPL license, and to sell it if you wish.
In this article we will focus on the Free aspect of Piwik, which is how to rebrand Piwik, how to offer your clients a better experience, and possibly how to make a profit from it ?
How to sell Piwik services as an agency ?
As a web analytics software, Piwik is often installed by web agencies when it comes to designing a brand new website for a given customer.
Most of the time agencies are using Piwik for the following reasons :- free of charge
- data ownership
- user privacy compliance
- feature rich while easy to use
- open source
Most of the agencies are charging their customers for the installation process, tracking code implementation, analysing reports to get insights about users… but do you know that you could also sell the software as your own brand ? This is where the “White Label” plugin, developed by the InnoCraft company, comes into play.
White labelling for Piwik
Creating a “white label” plugin came into the mind of InnoCraft founders when they realized that on any modern Piwik installation, the following components were visible :
- Piwik branded widgets within the dashboards
- Piwik marketplace plugin teasers on the admin page
- Piwik help and support pages
- the “Piwik” word in general
- Piwik Mobile app banners
Example of Piwik branded widgets
In order to remove all those mentions of Piwik and to start selling this web analytics under your own name, you can either hack Piwik on your own (it is going to take you some precious time and money) or have a look at the White Label plugin on the marketplace where InnoCraft has solved all the challenges already for you.
The White Label plugin is straightforward. Once downloaded and installed, you will have access to a dedicated interface where you will be able to change the Piwik name by a new custom brand of your choice :
Piwik White Label settings
Once you click Save, all “Piwik” mentions will be substituted by your company name/service :
Here the Piwik version is changed by the name of the company
How to make your installation even more customized ?
Few Piwik users know about this trick, but since 2014 the Piwik templates can be customized through Themes. You are free to design your own template, installing existing ones, or even monetize them through the marketplace :
A simple example of how Piwik can be easily customized, here fonts and colours are changed
If you want to know how you can tweak your existing template and make it match your brand and image, just follow our theme documentation. A simple theme with your colors can be built in a few minutes simply by defining different color codes. You can also browse the public themes on the Marketplace.
Tell us your story
If you are an agency or any business related in selling Piwik services, we recommend having a look at our FAQ for rebranding, selling, reusing, re-licensing, and including Piwik in my offering. Are you interested or already re-selling Piwik services ? We would love to hear your story and write a blog post about it.
Do not hesitate to contact the Piwik core team, we’re looking forward to hearing from you.
-
Using SDL2 Render Pixels to create video using ffmpeg
7 juillet 2024, par RiptideI made a small animation using SDL2 and I want to use ffmpeg to convert it to an h264 encoded video. I'm getting the texture RGBA pixels using
SDL_RenderReadPixels
and sending them to ffmpeg for rendering. The video does render, but is all messed up. The following is my code

Spawning ffmpeg


int child_pipe[2];

if (pipe(child_pipe) < 0) {
 perror("child_pipe");
}

printf("child_pipe[0]: %d, child_pipe[1]: %d\n", child_pipe[0], child_pipe[1]);

args.ffmpeg = &(FFMpeg){.std_in = child_pipe[WRITE_END]};

child_pid = fork();

printf("child: %d\n", child_pid);

if (child_pid == 0) {
 close(child_pipe[WRITE_END]);

 if (dup2(child_pipe[READ_END], STDIN_FILENO) < 0) {
 perror("dup2");
 return -1;
 }

 char *argv[] = {"ffmpeg", "-loglevel", "verbose", "-y", "-f", "rawvideo", "-pixel_format", "rgba", "-s",
 "894x702", "-i", "-", "-c:v", "libx264", "-pix_fmt", "yuv420p", "thing.mp4", NULL};

 int x = execvp("ffmpeg", argv);

 if (x != 0) {
 perror("execv");
 return x;
 }

 return -1;
}





Here's how I render into SDL2 renderer. The rendering on SDL2 has no issues. In here I get the render pixels and send them to ffmpeg.


void render_image(SDL_Renderer *renderer, int array[], size_t array_size, Image *image, FFMpeg *ffmpeg) {
 SDL_SetRenderDrawColor(renderer, 0, 0, 0, 255);
 SDL_RenderClear(renderer);

 for (int i = 0; i < array_size; i++) {
 paint_image_strip(renderer, image, i, array[i]);
 }

 if (ANIMATION_DELAY_MS > 0) {
 SDL_Delay(ANIMATION_DELAY_MS);
 }

 if (ffmpeg != NULL) {
 int size = image->width * image->height * sizeof(Uint32);
 Uint32 *pixels = (Uint32 *)malloc(size);

 if (pixels == NULL) {
 printf("Malloc failed. Buy more ram\n");
 return;
 }

 int ret = SDL_RenderReadPixels(renderer, NULL, SDL_PIXELFORMAT_RGBA8888, pixels, image->width * sizeof(Uint32));

 if (ret != 0) {
 fprintf(stderr, "SDL_RenderReadPixels failed: %s\n", SDL_GetError());
 free(pixels);
 }

 int n = write(ffmpeg->std_in, image->img_data, size);

 if (n < 0) {
 perror("write failed");
 }

 free(pixels);
 }

 SDL_RenderPresent(renderer);
}




Here's the issue. Here is what I see in SDL2 window




and this is what ffmpeg renders



there are inklings of the original image here. I thought it was an issue with RGBA vs ARGB but on double checking that wasn't the case.


Expecting proper ffmpeg rendering.


-
Is there a way to pipe the stdio stream with the output segment ts files during m3u8 from mp4 conversion in ffmpeg with nodes spawn function ?
21 février, par Jacob LI am writing an automated pipeline in Node-JS that takes an MP4 file, compresses it, then returns the buffer of the compressed file, feeds it into another FFmpeg command, which then converts the mp4 to
.m3u8
for HLS.

The problem I’m having is that I am not able to pipe the segment file data stream to automatically upload each
.ts file
to the cloud versus having them stored to the disk (which is not an option because this is a cloud function).

I either have to opt in to them being created in memory in the directory, which then my manifest file is based off of, or I create one large buffer with the binary data and then the manifest data intertwined. I am able to perform all of this if I can write these files to the disk and store them locally, but, as I said, this is for a cloud function.


The command I’m using for conversion is


const ffmpeg = spawn(
 "ffmpeg",
 [
 "-i",
 `pipe:0`,
 "-codec",
 "copy",
 "-start_number",
 "0",
 "-hls_time",
 "10",
 "-hls_list_size",
 "0",
 "-f",
 "hls",
 "-hls_flags",
 "delete_segments",
 "pipe:1",
 ],
 { stdio: ["pipe", "pipe", "pipe", "pipe"] }
 );



I am writing to the stdin with an input buffer.
The only way around not generating physical TS files and not getting an EPIPE error (by trying to pipe the segment outputs to stdout) is by passing the delete segments flag. At least that’s what I have found. Then I am intercepting the stream on stdout, which then I get the large buffer array of all of the binary and manifest file data (the latter is in utf-8 encoding so I can parse it out).

Even if I physically parse it and then upload the buffer as a blob, and then insert that downloadURL from the cloud in the areas of the manifest file where the different
.ts
files are called sequentially, I am not able to make it work.

Please ask any clarifying questions.


Update I think I found a good solution that also aligns with one of the comments under this post. Here it is :


Instead of spawning multiple child processes in node, I spawned just one that contains all of the compression information and hls conversion flags. This solves the issue of storing the buffer in memory manually and writing it to stdin for the next ffmpeg function. Additionally, I manually set the video bitrate and the maxbuffer size for the video and encoded the audio. I played around with adaptive bitrate streaming, but found it was not necessary for my use case and I could always simply opt in to it later. Additionally, while the ffmpeg function is running, I am employing a file watcher with chokidar and fetching, uploading, and deleting each .ts file to minimize memory usage in a cloud environment. I then store all of the download urls in a map with the key set to the segment, then parse the manifest file, replacing each segment name with its respective download url. If anyone wants to see my solution or the specific ffmpeg command, please let me know.