
Recherche avancée
Autres articles (81)
-
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" ; -
Gestion des droits de création et d’édition des objets
8 février 2011, parPar défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;
-
Supporting all media types
13 avril 2011, parUnlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)
Sur d’autres sites (3429)
-
FFMPEG Corrupt output remuxing MP4 (Using API in C) -First file OK, 2nd file onwards is not
25 janvier, par RichardPI have a simple application written in C - it takes the video from a RTSP camera and just writes to disk in 1 minute segments. The first file created works fine, plays on anlmost anything. The Second file does not play. Programatically, The trace shows they are the same code flows, but I cant seem to find where the problem is to allow the 2nd file to be play exactly the same as the first.


There are frames in the 2nd file but they are random. The second file is created EXACTLY the same way as the first.


Any help from a guru would be greatly appreciated.


EDIT : FIX - The output duration needs to be set before the trailer is written.


int actual_duration = (int)difftime(time(NULL), start_time);

for (int i = 0; i < output_ctx->nb_streams; i++) {
 output_ctx->streams[i]->duration = actual_duration * AV_TIME_BASE;
}

output_ctx->duration = actual_duration * AV_TIME_BASE;
printf("DURATION = %d\r\n",output_ctx->duration);

// Set the start_time for the output context
output_ctx->start_time = 0;

av_write_trailer(output_ctx);



Code flow


Open RTSP Stream 
A: Create File n context 
 Remux to file n 
 Wait for minute to change 
 Close File n context 
 increment n Goto A



Makefile


CC = gcc
CFLAGS = -Wall -g
LIBS = -lavformat -lavcodec -lavutil -lavdevice -lswscale -lavfilter -lavutil -lm -lz -lpthread

TARGET = rtsp_remux

all: $(TARGET)

$(TARGET): rtsp_remux.o
 $(CC) -o $(TARGET) rtsp_remux.o $(LIBS)

rtsp_remux.o: rtsp_remux.c
 $(CC) $(CFLAGS) -c rtsp_remux.c

clean:
 rm -f $(TARGET) rtsp_remux.o

.PHONY: all clean



rtsp_remux.c


#include <libavformat></libavformat>avformat.h>
#include <libavutil></libavutil>time.h>
#include 
#include 

#define OUTPUT_PREFIX "output"
#define OUTPUT_EXTENSION ".mp4"
#define MAX_FILES 4

int main(int argc, char *argv[]) {
 if (argc < 2) {
 fprintf(stderr, "Usage: %s <rtsp url="url">\n", argv[0]);
 return -1;
 }

 const char *rtsp_url = argv[1];
 AVFormatContext *input_ctx = NULL, *output_ctx = NULL;
 AVOutputFormat *output_fmt = NULL;
 AVPacket pkt;
 int ret, file_count = 0;
 char output_filename[1024];
 time_t current_time;
 struct tm *timeinfo;
 int rename_lock = 0;

 avformat_network_init();

 if ((ret = avformat_open_input(&input_ctx, rtsp_url, NULL, NULL)) < 0) {
 fprintf(stderr, "Could not open input file '%s'\n", rtsp_url);
 return -1;
 }

 if ((ret = avformat_find_stream_info(input_ctx, NULL)) < 0) {
 fprintf(stderr, "Failed to retrieve input stream information\n");
 return -1;
 }

 av_dump_format(input_ctx, 0, rtsp_url, 0);

 while (file_count < MAX_FILES) {
 snprintf(output_filename, sizeof(output_filename), "%s_%03d%s", OUTPUT_PREFIX, file_count, OUTPUT_EXTENSION);

 if ((ret = avformat_alloc_output_context2(&output_ctx, NULL, NULL, output_filename)) < 0) {
 fprintf(stderr, "Could not create output context\n");
 return -1;
 }

 output_fmt = output_ctx->oformat;

 for (int i = 0; i < input_ctx->nb_streams; i++) {
 AVStream *in_stream = input_ctx->streams[i];
 AVStream *out_stream = avformat_new_stream(output_ctx, NULL);
 if (!out_stream) {
 fprintf(stderr, "Failed allocating output stream\n");
 return -1;
 }

 if ((ret = avcodec_parameters_copy(out_stream->codecpar, in_stream->codecpar)) < 0) {
 fprintf(stderr, "Failed to copy codec parameters\n");
 return -1;
 }
 out_stream->codecpar->codec_tag = 0;
 }

 if (!(output_fmt->flags & AVFMT_NOFILE)) {
 if ((ret = avio_open(&output_ctx->pb, output_filename, AVIO_FLAG_WRITE)) < 0) {
 fprintf(stderr, "Could not open output file '%s'\n", output_filename);
 return -1;
 }
 }

 if ((ret = avformat_write_header(output_ctx, NULL)) < 0) {
 fprintf(stderr, "Error occurred when opening output file\n");
 return -1;
 }

 while (1) {
 current_time = time(NULL);
 timeinfo = localtime(&current_time);

 if (timeinfo->tm_sec == 0 && !rename_lock) {
 rename_lock = 1;
 break;
 } else if (timeinfo->tm_sec != 0) {
 rename_lock = 0;
 }

 if ((ret = av_read_frame(input_ctx, &pkt)) < 0)
 break;

 AVStream *in_stream = input_ctx->streams[pkt.stream_index];
 AVStream *out_stream = output_ctx->streams[pkt.stream_index];

 pkt.pts = av_rescale_q_rnd(pkt.pts, in_stream->time_base, out_stream->time_base, AV_ROUND_NEAR_INF | AV_ROUND_PASS_MINMAX);
 pkt.dts = av_rescale_q_rnd(pkt.dts, in_stream->time_base, out_stream->time_base, AV_ROUND_NEAR_INF | AV_ROUND_PASS_MINMAX);
 pkt.duration = av_rescale_q(pkt.duration, in_stream->time_base, out_stream->time_base);
 pkt.pos = -1;

 if ((ret = av_interleaved_write_frame(output_ctx, &pkt)) < 0) {
 fprintf(stderr, "Error muxing packet\n");
 break;
 }

 av_packet_unref(&pkt);
 }

 av_write_trailer(output_ctx);

 if (!(output_fmt->flags & AVFMT_NOFILE))
 avio_closep(&output_ctx->pb);

 avformat_free_context(output_ctx);

 file_count++;
 }

 avformat_close_input(&input_ctx);
 avformat_network_deinit();

 return 0;
}
</rtsp>


I have tried changing to pointers, freeing and different things. I was expecting the 2nd file created to behave identically to the first.


-
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.
-
Libav linking error : undefined references
25 février, par FedechHere's my problem :



- 

- I built ffmpeg from source (version 1.2), the libav* libraries are in /usr/local/lib and they're static
- I'm compiling a ns3 (www.nsnam.org) module, so my only control over the linker is through the env variable LINKFLAGS
- In the source the headers are in a "extern C" block, so it's not the usual g++ name mangling
- I set LINKFLAGS="-I/usr/local/include/libavformat -I/usr/local/include/libavcodec -I/usr/local/include/libavutil -L/usr/local/lib -lavformat -lavcodec -lavutil", and the linker can't seem to find any of the libav* functions I call (I get a lot of "undefined reference" and then "collect2 : error : ld returned status 1"











Can anyone help me ? Thanks...



edit : here are a few of the undefined reference messages :



./libns3.14.1-qoe-monitor-debug.so: undefined reference to `av_guess_format'
 ./libns3.14.1-qoe-monitor-debug.so: undefined reference to `av_read_frame'
 ./libns3.14.1-qoe-monitor-debug.so: undefined reference to `avformat_write_header'
 ./libns3.14.1-qoe-monitor-debug.so: undefined reference to `av_interleaved_write_frame'
 ./libns3.14.1-qoe-monitor-debug.so: undefined reference to `av_find_stream_info'
 ./libns3.14.1-qoe-monitor-debug.so: undefined reference to `av_register_all'
 ./libns3.14.1-qoe-monitor-debug.so: undefined reference to `av_init_packet'
 ./libns3.14.1-qoe-monitor-debug.so: undefined reference to `avformat_alloc_context'
 ./libns3.14.1-qoe-monitor-debug.so: undefined reference to `av_dump_format'
 ./libns3.14.1-qoe-monitor-debug.so: undefined reference to `avio_close'




edit2 : here is the message I get after "build failed" :



-> task in 'scratch-simulator' failed (exit status 1): 
{task 53952272: cxxprogram scratch-simulator.cc.1.o -> scratch-simulator}
['/usr/bin/g++', '-I/usr/local/include/libavcodec', '-I/usr/local/include/libavformat/',
 '-I/usr/local/include/libavutil/', '-L/usr/local/lib', '-I/usr/local
/include/libavcodec', '-I/usr/local/include/libavformat/', '-I/usr/local/include
/libavutil/', '-L/usr/local/lib', '-pthread', '-pthread', '-Wl,-z,relro', 
'scratch/scratch-simulator.cc.1.o', '-o', '/home/fede/Thesis/ns-allinone-3.14.1
/ns-3.14.1/build/scratch/scratch-simulator', '-Wl,-Bstatic', '-Wl,-Bdynamic', 
'-Wl,--no-as-needed', '-L.', '-L.', '-L.', '-L.', '-L.', '-L.', '-L.', '-L.', '-L.',
 '-L.', '-L.', '-L.', '-L.', '-L.', '-L.', '-L.', '-L.', '-L.', '-L.', '-L.', '-L.',
 '-L.', '-L.', '-L.', '-L.', '-L.', '-L.', '-L.', '-L.', '-L.', '-L.', '-L.', '-L.', 
'-L.', '-L.', '-L.', '-L.', '-L.', '-L/usr/lib', '-lns3.14.1-test-debug', '-lns3.14.1-
csma-layout-debug', '-lns3.14.1-point-to-point-layout-debug', '-lns3.14.1-netanim-
debug', '-lns3.14.1-lte-debug', '-lns3.14.1-spectrum-debug', '-lns3.14.1-antenna-
debug', '-lns3.14.1-aodv-debug', '-lns3.14.1-dsdv-debug', '-lns3.14.1-dsr-debug', 
'-lns3.14.1-mesh-debug', '-lns3.14.1-olsr-debug', '-lns3.14.1-csma-debug', '-lns3.14.1-
wimax-debug', '-lns3.14.1-applications-debug', '-lns3.14.1-virtual-net-device-debug', 
'-lns3.14.1-uan-debug', '-lns3.14.1-energy-debug', '-lns3.14.1-flow-monitor-debug', 
'-lns3.14.1-nix-vector-routing-debug', '-lns3.14.1-tap-bridge-debug', '-lns3.14.1-
visualizer-debug', '-lns3.14.1-internet-debug', '-lns3.14.1-bridge-debug', '-lns3.14.1-
point-to-point-debug', '-lns3.14.1-mpi-debug', '-lns3.14.1-wifi-debug', '-lns3.14.1-
buildings-debug', '-lns3.14.1-propagation-debug', '-lns3.14.1-mobility-debug', 
'-lns3.14.1-config-store-debug', '-lns3.14.1-tools-debug', '-lns3.14.1-stats-debug',
 '-lns3.14.1-emu-debug', '-lns3.14.1-topology-read-debug', '-lns3.14.1-network-debug', 
'-lns3.14.1-qoe-monitor-debug', '-lns3.14.1-core-debug', '-lrt', '-lgsl', 
'-lgslcblas', '-lm', '-ldl', '-lgtk-x11-2.0', '-lgdk-x11-2.0', '-latk-1.0', 
'-lgio-2.0', '-lpangoft2-1.0', '-lpangocairo-1.0', '-lgdk_pixbuf-2.0', '-lcairo', 
'-lpango-1.0', '-lfreetype', '-lfontconfig', '-lgobject-2.0', '-lglib-2.0', '-lxml2', 
'-lpython2.7']