
Recherche avancée
Autres articles (71)
-
Keeping control of your media in your hands
13 avril 2011, parThe vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...) -
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
MediaSPIP v0.2
21 juin 2013, parMediaSPIP 0.2 est la première version de MediaSPIP stable.
Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)
Sur d’autres sites (9038)
-
ffmpeg throws error "Invalid file index 1 in filtergraph description" when used with concat and -/filter_complex [closed]
20 février, par Ernst VI want to create mp4 videos from many small .jpg files (time-lapse). Each image is shown for 2 seconds and then fades to the next. This works fine when I issue the command with a few images (see below). But when the number of images reaches hundreds or thousands, I can no longer put them into a single command, but have to put the filenames and the complex filter into .txt files.


Whatever I try, I always get the error
"Invalid file index 1 in filtergraph description"
.

This works fine :


ffmpeg -loop 1 -i "image1.jpg" -loop 1 -i "image2.jpg" -loop 1 -i "image3.jpg" -loop 1 -i "image4.jpg" -loop 1 -i "image5.jpg" -filter_complex "[0:v]trim=0:2,setpts=PTS-STARTPTS[v0]; [1:v]trim=0:2,setpts=PTS-STARTPTS[v1]; [2:v]trim=0:2,setpts=PTS-STARTPTS[v2]; [3:v]trim=0:2,setpts=PTS-STARTPTS[v3]; [4:v]trim=0:2,setpts=PTS-STARTPTS[v4]; [v0][v1] xfade=transition=fade:duration=1:offset=1 [xf1]; [xf1][v2] xfade=transition=fade:duration=1:offset=2 [xf2]; [xf2][v3] xfade=transition=fade:duration=1:offset=3 [xf3]; [xf3][v4] xfade=transition=fade:duration=1:offset=4 [xf4]" -map "[xf4]" -c:v libx264 -crf 18 -pix_fmt yuv420p output.mp4



But when I put the input files and the filter in txt files, it fails with the error above :


ffmpeg -stream_loop 1 -f concat -safe 0 -i concat_list.txt -/filter_complex filter_script.txt -map "[xf4]" -c:v libx264 -crf 18 -pix_fmt yuv420p output.mp4



This is the
concat_list.txt
:

file 'image1.jpg'
file 'image2.jpg'
file 'image3.jpg'
file 'image4.jpg'
file 'image5.jpg'



This is the
filter_script.txt
:

[0:v]trim=0:2,setpts=PTS-STARTPTS[v0];[1:v]trim=0:2,setpts=PTS-STARTPTS[v1];[2:v]trim=0:2,setpts=PTS-STARTPTS[v2];[3:v]trim=0:2,setpts=PTS-STARTPTS[v3];[4:v]trim=0:2,setpts=PTS-STARTPTS[v4];[v0][v1] xfade=transition=fade:duration=1:offset=1 [xf1];[xf1][v2] xfade=transition=fade:duration=1:offset=2 [xf2];[xf2][v3] xfade=transition=fade:duration=1:offset=3 [xf3];[xf3][v4] xfade=transition=fade:duration=1:offset=4 [xf4]



I tried adding/removing line breaks, semicolons, etc. Nothing helped.
Any idea what is going wrong here ? Thank you very much !


My ffmpeg version is the most recent one :


ffmpeg version 2025-02-17-git-b92577405b-full_build-www.gyan.dev


-
Enhanced Privacy Control : Matomo’s Guide for Consent Manager Platform Integrations
13 février, par Alex Carmona — Development, Latest ReleasesIn today’s digital landscape, protecting user privacy isn’t just about compliance—it’s about building trust and demonstrating respect for user choices. Even though you can use Matomo without requiring consent when properly configured in compliance with privacy regulations, we’re excited to introduce a new Consent Manager Platforms (CMP) category on our Integrations page to make it easier than ever to implement privacy-respecting analytics.
What’s a consent manager platform ?
A Consent Management Platform (CMP) is a tool that helps websites collect, manage, and store user consent for data tracking and cookies in compliance with privacy regulations like GDPR and CCPA. A CMP allows users to choose which types of data they want to share, ensuring transparency and respecting their privacy preferences. By integrating a CMP with Matomo, organisations can make sure that analytics tracking occurs only after obtaining explicit user consent.
Remember, you can configure Matomo to remain fully GDPR compliant, without requiring user consent.
Why consent management matters
With privacy regulations reshaping data collection practices daily, organisations need to ensure that analytics data is gathered only after users have explicitly given their consent. Integrating Matomo with a Consent Management Platform helps you :
- Strengthen regulatory compliance
- Enhance user trust through transparency
- Clearly document consent choices
- Simplify privacy management
By making consent management seamless, you can maintain compliance while delivering a privacy-first experience to your users.
Introducing our CMP integration options
We’ve carefully curated integrations with leading Consent Management Platforms that work seamlessly with Matomo Analytics and Matomo Tag Manager. Our supported platforms include :
Supported consent management platforms
- Osano – Comprehensive consent management with global regulation support
- Cookiebot – Advanced cookie consent and compliance automation
- CookieYes – User-friendly consent management solution
- Tarte au Citron – Open-source consent management tool
- Klaro – Privacy-focused consent management system
- OneTrust – Enterprise-grade privacy management platform
- Complianz for WordPress – Specialised WordPress consent solution
Each platform provides unique features and compliance options, allowing you to select the best fit for your privacy needs.
Getting started with simplified implementation
Ready to enhance your privacy compliance ? We’ve made the integration process straightforward, so you can set up a privacy-compliant analytics environment in just a few steps. Here’s how to begin :
- Explore our new CMP category on the Integrations page
- Select and implement the CMP that best suits your needs
- Check our implementation guides for step-by-step instructions
- Configure your consent management settings in Matomo
- Start collecting analytics data with proper consent management
Moving Forward
As privacy regulations evolve and user expectations around data protection grow, proper consent management is more important than ever. With Matomo’s new CMP integrations, you can ensure compliance while maintaining full control over your analytics data.
Visit our Integrations page and our Implementation guides today to explore these privacy-enhancing solutions and take the next step in your privacy-first analytics journey.
-
How to improve web camera streaming latency to v4l2loopback device with ffmpeg ?
11 mars, par Made by MosesI'm trying to stream my iPhone camera to my PC on LAN.


What I've done :


- 

-
HTTP server with html page and streaming script :


I use WebSockets here and maybe WebRTC is better choice but it seems like network latency is good enough






async function beginCameraStream() {
 const mediaStream = await navigator.mediaDevices.getUserMedia({
 video: { facingMode: "user" },
 });

 websocket = new WebSocket(SERVER_URL);

 websocket.onopen = () => {
 console.log("WS connected");

 const options = { mimeType: "video/mp4", videoBitsPerSecond: 1_000_000 };
 mediaRecorder = new MediaRecorder(mediaStream, options);

 mediaRecorder.ondataavailable = async (event) => {
 // to measure latency I prepend timestamp to the actual video bytes chunk
 const timestamp = Date.now();
 const timestampBuffer = new ArrayBuffer(8);
 const dataView = new DataView(timestampBuffer);
 dataView.setBigUint64(0, BigInt(timestamp), true);
 const data = await event.data.bytes();

 const result = new Uint8Array(data.byteLength + 8);
 result.set(new Uint8Array(timestampBuffer), 0);
 result.set(data, 8);

 websocket.send(result);
 };

 mediaRecorder.start(100); // Collect 100ms chunks
 };
}



- 

-
Server to process video chunks






import { serve } from "bun";
import { Readable } from "stream";

const V4L2LOOPBACK_DEVICE = "/dev/video10";

export const setupFFmpeg = (v4l2device) => {
 // prettier-ignore
 return spawn("ffmpeg", [
 '-i', 'pipe:0', // Read from stdin
 '-pix_fmt', 'yuv420p', // Pixel format
 '-r', '30', // Target 30 fps
 '-f', 'v4l2', // Output format
 v4l2device, // Output to v4l2loopback device
 ]);
};

export class FfmpegStream extends Readable {
 _read() {
 // This is called when the stream wants more data
 // We push data when we get chunks
 }
}

function main() {
 const ffmpeg = setupFFmpeg(V4L2LOOPBACK_DEVICE);
 serve({
 port: 8000,
 fetch(req, server) {
 if (server.upgrade(req)) {
 return; // Upgraded to WebSocket
 }
 },
 websocket: {
 open(ws) {
 console.log("Client connected");
 const stream = new FfmpegStream();
 stream.pipe(ffmpeg?.stdin);

 ws.data = {
 stream,
 received: 0,
 };
 },
 async message(ws, message) {
 const view = new DataView(message.buffer, 0, 8);
 const ts = Number(view.getBigUint64(0, true));
 ws.data.received += message.byteLength;
 const chunk = new Uint8Array(message.buffer, 8, message.byteLength - 8);

 ws.data.stream.push(chunk);

 console.log(
 [
 `latency: ${Date.now() - ts} ms`,
 `chunk: ${message.byteLength}`,
 `total: ${ws.data.received}`,
 ].join(" | "),
 );
 },
 },
 });
}

main();



After I try to open the v4l2loopback device


cvlc v4l2:///dev/video10



picture is delayed for at least 1.5 sec which is unacceptable for my project.


Thoughts :


- 

- Problem doesn't seems to be with network latency




latency: 140 ms | chunk: 661 Bytes | total: 661 Bytes
latency: 206 ms | chunk: 16.76 KB | total: 17.41 KB
latency: 141 ms | chunk: 11.28 KB | total: 28.68 KB
latency: 141 ms | chunk: 13.05 KB | total: 41.74 KB
latency: 199 ms | chunk: 11.39 KB | total: 53.13 KB
latency: 141 ms | chunk: 16.94 KB | total: 70.07 KB
latency: 139 ms | chunk: 12.67 KB | total: 82.74 KB
latency: 142 ms | chunk: 13.14 KB | total: 95.88 KB



150ms is actually too much for 15KB on LAN but there can some issue with my router


- 

- As far as I can tell it neither ties to ffmpeg throughput :




Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'pipe:0':
 Metadata:
 major_brand : iso5
 minor_version : 1
 compatible_brands: isomiso5hlsf
 creation_time : 2025-03-09T17:16:49.000000Z
 Duration: 00:00:01.38, start:
0.000000, bitrate: N/A
 Stream #0:0(und): Video: h264 (Baseline) (avc1 / 0x31637661), yuvj420p(pc), 1280x720, 4012 kb/s, 57.14 fps, 29.83 tbr, 600 tbn, 1200 tbc (default)
 Metadata:
 rotate : 90
 creation_time : 2025-03-09T17:16:49.000000Z
 handler_name : Core Media Video
 Side data:
 displaymatrix: rotation of -90.00 degrees

Stream mapping:
 Stream #0:0 -> #0:0 (h264 (native) -> rawvideo (native))

[swscaler @ 0x55d8d0b83100] deprecated pixel format used, make sure you did set range correctly

Output #0, video4linux2,v4l2, to '/dev/video10':
 Metadata:
 major_brand : iso5
 minor_version : 1
 compatible_brands: isomiso5hlsf
 encoder : Lavf58.45.100

Stream #0:0(und): Video: rawvideo (I420 / 0x30323449), yuv420p, 720x1280, q=2-31, 663552 kb/s, 60 fps, 60 tbn, 60 tbc (default)
 Metadata:
 encoder : Lavc58.91.100 rawvideo
 creation_time : 2025-03-09T17:16:49.000000Z
 handler_name : Core Media Video
 Side data:
 displaymatrix: rotation of -0.00 degrees

frame= 99 fps=0.0 q=-0.0 size=N/A time=00:00:01.65 bitrate=N/A dup=50 drop=0 speed=2.77x
frame= 137 fps=114 q=-0.0 size=N/A time=00:00:02.28 bitrate=N/A dup=69 drop=0 speed=1.89x
frame= 173 fps= 98 q=-0.0 size=N/A time=00:00:02.88 bitrate=N/A dup=87 drop=0 speed=1.63x
frame= 210 fps= 86 q=-0.0 size=N/A time=00:00:03.50 bitrate=N/A dup=105 drop=0 speed=1.44x
frame= 249 fps= 81 q=-0.0 size=N/A time=00:00:04.15 bitrate=N/A dup=125 drop=0 speed=1.36
frame= 279 fps= 78 q=-0.0 size=N/A time=00:00:04.65 bitrate=N/A dup=139 drop=0 speed=1.31x



- 

-
I also tried to write the video stream directly to
video.mp4
file and immediately open it withvlc
but it only can be successfully opened after 1.5 sec.

-
I've tried to use OBS v4l2 input source instead of vlc but the latency is the same








Update №1


When i try to stream actual
.mp4
file toffmpeg
it works almost immediately with 0.2sec delay to spin up the ffmpeg itself :

cat video.mp4 | ffmpeg -re -i pipe:0 -pix_fmt yuv420p -f v4l2 /dev/video10 & ; sleep 0.2 && cvlc v4l2:///dev/video10



So the problem is apparently with streaming process


-