
Recherche avancée
Médias (1)
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (34)
-
Support audio et vidéo HTML5
10 avril 2011MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...) -
Taille des images et des logos définissables
9 février 2011, parDans beaucoup d’endroits du site, logos et images sont redimensionnées pour correspondre aux emplacements définis par les thèmes. L’ensemble des ces tailles pouvant changer d’un thème à un autre peuvent être définies directement dans le thème et éviter ainsi à l’utilisateur de devoir les configurer manuellement après avoir changé l’apparence de son site.
Ces tailles d’images sont également disponibles dans la configuration spécifique de MediaSPIP Core. La taille maximale du logo du site en pixels, on permet (...) -
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 (5717)
-
Updating SDL yuv Texture
15 juin 2015, par madprogrammer2015I am receiving an H.264 video stream and successfully decoding it with FFMPEG. It can display the first frame of data but then after that the screen never updates. It just appears to become a static image. I am using YUV pixel format, and I am receiving it in that format as well. Also I am using SDL_UpdateYUVTexture().
Here is my code :
int main()
{
WORD wVersionRequested;
WSADATA wsaData;
int wsaerr;
if (SDL_Init(SDL_INIT_EVERYTHING)) {
fprintf(stderr, "Could not initialize SDL - %s\n", SDL_GetError());
exit(1);
}
// Using MAKEWORD macro, Winsock version request 2.2
wVersionRequested = MAKEWORD(2, 2);
wsaerr = WSAStartup(wVersionRequested, &wsaData);
if (wsaerr != 0)
{
/* Tell the user that we could not find a usable */
/* WinSock DLL.*/
printf("The Winsock dll not found!\n");
return 0;
}
else
{
printf("The Winsock dll found!\n");
printf("The status: %s.\n", wsaData.szSystemStatus);
}
/* Confirm that the WinSock DLL supports 2.2.*/
/* Note that if the DLL supports versions greater */
/* than 2.2 in addition to 2.2, it will still return */
/* 2.2 in wVersion since that is the version we */
/* requested. */
if (LOBYTE(wsaData.wVersion) != 2 || HIBYTE(wsaData.wVersion) != 2)
{
/* Tell the user that we could not find a usable */
/* WinSock DLL.*/
printf("The dll do not support the Winsock version %u.%u!\n", LOBYTE(wsaData.wVersion), HIBYTE(wsaData.wVersion));
WSACleanup();
return 0;
}
else
{
printf("The dll supports the Winsock version %u.%u!\n", LOBYTE(wsaData.wVersion), HIBYTE(wsaData.wVersion));
printf("The highest version this dll can support: %u.%u\n", LOBYTE(wsaData.wHighVersion), HIBYTE(wsaData.wHighVersion));
}
ULONG localif;
/*INT Ret;
HANDLE ThreadHandle;
DWORD ThreadId;
WSAEVENT AcceptEvent;
char buf[1024];
int buflen = 1024, rc, err;*/
SOCKET s;
SOCKET ns;
SOCKADDR_IN multi, safrom;
int fromlen;
int totalSize = 0;
AVCodec *codec;
AVCodecContext *codecContext;
int frame;
int got_picture;
AVFrame *picture;
AVPacket packet;
SwsContext* convertContext;
uint16_t i = 1;
//std::queue<madproto> queue;
//std::list<madproto> list;
AVCodecParserContext *parser;
std::vector buffer;
//moodycamel::ConcurrentQueue<madproto> protoQueue;
SDL_Window *window;
SDL_Renderer *renderer;
SDL_Texture *bmp;
SDL_Rect rect;
file.open("log.txt");
s = socket(AF_INET, SOCK_STREAM, IPPROTO_RM);
multi.sin_family = AF_INET;
multi.sin_port = htons(5150);
multi.sin_addr.s_addr = inet_addr("234.5.6.7");
int bindResult = bind(s, (PSOCKADDR)&multi, sizeof(multi));
if (bindResult < 0)
{
std::cout << "bindResult: " << WSAGetLastError() << std::endl;
}
listen(s, 10);
//if ((AcceptEvent = WSACreateEvent()) == WSA_INVALID_EVENT)
//{
// printf("WSACreateEvent() failed with error %d\n", WSAGetLastError());
// return 1;
//}
//else
// printf("WSACreateEvent() is OK!\n");
//// Create a worker thread to service completed I/O requests
//if ((ThreadHandle = CreateThread(NULL, 0, WorkerThread, (LPVOID)AcceptEvent, 0, &ThreadId)) == NULL)
//{
// printf("CreateThread() failed with error %d\n", GetLastError());
// return 1;
//}
//else
// printf("CreateThread() should be fine!\n");
localif = inet_addr("192.168.1.2");
setsockopt(s, IPPROTO_RM, RM_ADD_RECEIVE_IF, (char *)&localif, sizeof(localif));
fromlen = sizeof(safrom);
ns = accept(s, (SOCKADDR *)&safrom, &fromlen);
closesocket(s); // Don't need to listen anymore
std::string received;
av_register_all();
int horizontal = 0;
int vertical = 0;
GetDesktopResolution(horizontal, vertical);
codec = avcodec_find_decoder(CODEC_ID_H264);
if (!codec) {
std::cout << "codec not found" << std::endl;
std::cin.get();
}
codecContext = avcodec_alloc_context3(codec);
/*if (codec->capabilities & CODEC_CAP_TRUNCATED)
codecContext->flags |= CODEC_FLAG_TRUNCATED;*/
//codecContext->flags |= CODEC_FLAG_LOW_DELAY;
codecContext->flags2 |= CODEC_FLAG2_CHUNKS;
codecContext->width = horizontal;
codecContext->height = vertical;
codecContext->codec_id = CODEC_ID_H264;
codecContext->codec_type = AVMEDIA_TYPE_VIDEO;
codecContext->pix_fmt = PIX_FMT_YUV420P;
codecContext->thread_type = 0;
if (avcodec_open2(codecContext, codec, NULL) < 0) {
std::cout << "could not open codec" << std::endl;
std::cin.get();
}
convertContext = sws_getContext(
codecContext->width,
codecContext->height,
PIX_FMT_RGB32,
codecContext->width,
codecContext->height,
PIX_FMT_YUV420P,
SWS_BICUBIC,
NULL,
NULL,
NULL
);
parser = av_parser_init(CODEC_ID_H264);
picture = av_frame_alloc();
if (ns == INVALID_SOCKET)
{
std::cout << "accept didn't work!" << std::endl;
std::cin.get();
}
/*if (WSASetEvent(AcceptEvent) == FALSE)
{
printf("WSASetEvent() failed with error %d\n", WSAGetLastError());
return 1;
}
else
printf("WSASetEvent() should be working!\n");*/
window = SDL_CreateWindow("YUV", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, codecContext->width, codecContext->height, SDL_WINDOW_SHOWN);
renderer = SDL_CreateRenderer(window, -1, 0);
bmp = SDL_CreateTexture(renderer, SDL_PIXELFORMAT_IYUV, SDL_TEXTUREACCESS_STREAMING, codecContext->width, codecContext->height);
//receive = SDL_CreateThread(receiveThread, "ReceiveThread", (void *)NULL);
bool quit = false;
rect.x = 0;
rect.y = 0;
rect.w = codecContext->width;
rect.h = codecContext->height;
while (!quit)
{
while (true)
{
MadProto proto;
int result = recvfrom(ns, (char *)&proto, sizeof(MadProto), 0, (struct sockaddr *)&multi, &fromlen);
if (result < 0)
{
std::cout << "receive failed! error: " << WSAGetLastError() << std::endl;
break;
}
else
{
std::cout << "receive successful, received " << result << " bytes" << std::endl;
if (ntohs(proto.frame_end) == 1)
{
uint8_t *outbuffer = NULL;
int outBufSize = 0;
int rc = av_parser_parse2(parser, codecContext, &outbuffer, &outBufSize, buffer.data(), buffer.size(), 0, 0, 0);
if (outBufSize <= 0)
{
std::cout << "parsing failed!" << std::endl;
std::cout << "outBufSize: " << outBufSize << std::endl;
break;
}
if (rc)
{
std::cout << "rc: " << rc << std::endl;
std::cout << "parsing successful!" << std::endl;
//std::cin.get();
av_init_packet(&packet);
packet.size = outBufSize;
packet.data = outbuffer;
frame = avcodec_decode_video2(codecContext, picture, &got_picture, &packet);
if (frame < 0)
{
std::cout << "decoding was unsuccessful!" << std::endl;
break;
}
if (got_picture)
{
std::cout << "decoding was successful!" << std::endl;
std::cout << "decoded length was: " << frame << std::endl;
buffer.empty();
//std::cin.get();
int code = SDL_UpdateYUVTexture(bmp, NULL, picture->data[0], picture->linesize[0],
picture->data[1], picture->linesize[1],
picture->data[2], picture->linesize[2]);
if (code < 0)
{
std::cout << "unable to update texture " << SDL_GetError() << std::endl;
std::cin.get();
}
code = SDL_RenderClear(renderer);
if (code < 0)
{
std::cout << "renderer clear failed " << SDL_GetError() << std::endl;
std::cin.get();
}
code = SDL_RenderCopy(renderer, bmp, NULL, &rect);
if (code < 0)
{
std::cout << "renderer copy failed " << SDL_GetError() << std::endl;
std::cin.get();
}
SDL_RenderPresent(renderer);
SDL_Delay(40);
}
av_free_packet(&packet);
}
}
else
{
std::copy(proto.payload, proto.payload + ntohs(proto.nal_length), std::back_inserter(buffer));
std::cout << "frame is continuing!" << std::endl;
//queue.push(proto);
//list.push_front(proto);
}
}
}
SDL_WaitEvent(&event);
switch (event.type)
{
case SDL_QUIT:
quit = true;
break;
}
}
std::cout << "closing everything!" << std::endl;
av_frame_free(&picture);
closesocket(ns);
fclose(f);
std::cin.get();
return 0;
}
</madproto></madproto></madproto> -
Piwik is now Matomo – Announcement
9 janvier 2018, par Matomo Core TeamYou may be surprised to read this announcement, but no stress, take a deep breath, nothing big is going to happen, it is just our name that is changing and here are the reasons why.
Why are we changing from Piwik to Matomo ?
“After an epic 10 year journey creating and perfecting the best open digital analytics solution, we felt it was a good time to refresh our brand to reflect how far we have come and to reaffirm our vision :
To create, as a community, the leading international open source digital analytics platform, that gives every user full control of their data.”Matthieu Aubry, creator of Piwik
As projects evolve, so do names. After 10 years of Piwik and the amazing achievement of building the top open source analytics software that gives every user full control of their data, we are now looking forward to the next chapter. Thus, Piwik, the community project, will now become Matomo. The only change is our name, everything else stays the same.
This will allow users to take a fresh look at what we’ve become today and acknowledging all of the community’s hard work over the past 10 years. In addition, we also want our name to be unique, ensuring that it is not shared with any other company to remove any possible confusion or affiliations. Piwik is already used on over 1 million websites and with Matomo, we hope to reach our maximum potential.
With the strong focus on privacy worldwide and the upcoming privacy regulations about to be legislated in Europe, it is clear that we were on the right mission from the very beginning. With the upcoming big release Matomo 4.0 planned for this year, new privacy protections will bring users the tools to be compliant with the GDPR privacy laws. And Matomo will grow in line with these regulations, with a very clear and focused vision.
Changing our name is an exciting opportunity for us, and we hope you love the name Matomo as much as we do.
Matomo FAQs
So what is going to change for me ?
Well, basically nothing, the name will change but the values stay the same : Matomo (Piwik) will continue to be free and always will be.
Also the same people stay behind the project. We are motivated more than ever to take this project to the next level.
Why not keep the name Piwik ?
For a few reasons, one of which is to ensure that Matomo does not/will not share its name with any other businesses unlike Piwik. We also want to protect the Matomo brand and for it to remain the open source community project name forever.
Where does the name Matomo come from ?
We loved the name Piwik and were looking for something that sounded just as good ! Initially we wanted to have an acronym based on key terms, such as Free, Open Source and Privacy, but none really fit us perfectly.
Until we found Matomo ! Easily pronounced in all languages. Short enough to remember. Concise. And best of all… Matomo means honesty in Japanese. Which aligns with one of our key values – transparency.
We love the name Matomo and hope you do too.
What is the vision of Matomo ?
We have come a long way in those 10 years ! However, our mission statement remains the same :
“To create, as a community, the leading international open source digital analytics platform, that gives every user full control of their data.”
Matomo provides a range of amazing and innovative features, allowing you to get a 360 view of your visitors. These insights are invaluable to help understand behavior, keep track of goals, and increase conversion rates and revenue.
Who will deliver Matomo professional services ?
Any company who wishes to. The only exception is that no companies will be allowed to have the name Matomo.
Our company providing professional services is and will remain InnoCraft.
Where can I follow the Matomo project ?
Our new website will be matomo.org (automatically redirected from Piwik.org)
Follow our new Twitter : twitter.com/matomo_org
Github : github.com/matomo-org
Facebook : facebook.com/Matomo.org
Linkedin : linkedin.com/company/matomo/
If you are already following us on social media, you will be kept up to date with Matomo automatically as all social media accounts will be redirected.
How should I pronounce Matomo ?
If you’re wondering how to say ‘Matomo’, you can find out by clicking play :
Where can I see a demo of Matomo ?
Where can I download Matomo first release ?
(Matomo 3.3.0 will be released in the next few days)
What is the new logo ?
Check it out below.
Matomo trademark Policy
Matomo is an internationally registered trademark of Matthieu Aubry, Founder of Piwik (now Matomo).
Information about how to use the name Matomo (and logo) can be found here : matomo.org/trademark/
What are the next big steps ?
We will keep it simple for our valued users. As it is just a name change, the only thing you will notice is that the Piwik brand will gradually be replaced on the websites you are used to seeing the name on. The first version of Matomo will be available in just a few days for download. The software version numbers stay the same : the next release after Piwik 3.2.1 will be Matomo 3.3.0.
All our public HTTP APIs and Tracking SDKs will continue working normally. As you can imagine, there is a lot of work and complexity behind slowly updating all the SDKs and keeping backwards compatibility, so our renaming project will take a few weeks to complete.
The Matomo trademark will later be transferred into the Matomo foundation, a non-profit that will be dedicated to promoting and ensuring access to Matomo and our related open source projects in perpetuity.
Thank you
Thank you for continuing to support our project, alongside our 20+ Matomo core team members and more than 500 contributors.
Please help to spread the word about this announcement by sharing it with friends or or colleagues who may benefit from using Matomo Analytics !
The post Piwik is now Matomo – Announcement appeared first on Analytics Platform - Matomo.
-
How can I build a custom version of opencv while enabling CUDA and opengl ? [closed]
10 février, par JoshI have a hard requirement of python3.7 for certain libraries (aeneas & afaligner). I've been using the regular opencv-python and ffmpeg libraries in my program and they've been working find.


Recently I wanted to adjust my program to use h264 instead of mpeg4 and ran down a licensing rabbit hole of how opencv-python uses a build of ffmpeg with opengl codecs off to avoid licensing issues. x264 is apparently opengl, and is disabled in the opencv-python library.


In order to solve this issue, I built a custom build of opencv using another custom build of ffmpeg both with opengl enabled. This allowed me to use the x264 encoder with the VideoWriter in my python program.


Here's the dockerfile of how I've been running it :



FROM python:3.7-slim

# Set optimization flags and number of cores globally
ENV CFLAGS="-O3 -march=native -ffast-math -flto -fno-fat-lto-objects -ffunction-sections -fdata-sections" \
 CXXFLAGS="-O3 -march=native -ffast-math -flto -fno-fat-lto-objects -ffunction-sections -fdata-sections" \
 LDFLAGS="-flto -fno-fat-lto-objects -Wl,--gc-sections" \
 MAKEFLAGS="-j\$(nproc)"

# Combine all system dependencies in a single layer
RUN apt-get update && apt-get install -y --no-install-recommends \
 build-essential \
 cmake \
 git \
 wget \
 unzip \
 yasm \
 pkg-config \
 libsm6 \
 libxext6 \
 libxrender-dev \
 libglib2.0-0 \
 libavcodec-dev \
 libavformat-dev \
 libswscale-dev \
 libavutil-dev \
 libswresample-dev \
 nasm \
 mercurial \
 libnuma-dev \
 espeak \
 libespeak-dev \
 libtiff5-dev \
 libjpeg62-turbo-dev \
 libopenjp2-7-dev \
 zlib1g-dev \
 libfreetype6-dev \
 liblcms2-dev \
 libwebp-dev \
 tcl8.6-dev \
 tk8.6-dev \
 python3-tk \
 libharfbuzz-dev \
 libfribidi-dev \
 libxcb1-dev \
 python3-dev \
 python3-setuptools \
 libsndfile1 \
 libavdevice-dev \
 libavfilter-dev \
 libpostproc-dev \
 && apt-get clean \
 && rm -rf /var/lib/apt/lists/*

# Build x264 with optimizations
RUN cd /tmp && \
 wget https://code.videolan.org/videolan/x264/-/archive/master/x264-master.tar.bz2 && \
 tar xjf x264-master.tar.bz2 && \
 cd x264-master && \
 ./configure \
 --enable-shared \
 --enable-pic \
 --enable-asm \
 --enable-lto \
 --enable-strip \
 --enable-optimizations \
 --bit-depth=8 \
 --disable-avs \
 --disable-swscale \
 --disable-lavf \
 --disable-ffms \
 --disable-gpac \
 --disable-lsmash \
 --extra-cflags="-O3 -march=native -ffast-math -fomit-frame-pointer -flto -fno-fat-lto-objects" \
 --extra-ldflags="-O3 -flto -fno-fat-lto-objects" && \
 make && \
 make install && \
 cd /tmp && \
 # Build FFmpeg with optimizations
 wget https://ffmpeg.org/releases/ffmpeg-7.1.tar.bz2 && \
 tar xjf ffmpeg-7.1.tar.bz2 && \
 cd ffmpeg-7.1 && \
 ./configure \
 --enable-gpl \
 --enable-libx264 \
 --enable-shared \
 --enable-nonfree \
 --enable-pic \
 --enable-asm \
 --enable-optimizations \
 --enable-lto \
 --enable-pthreads \
 --disable-debug \
 --disable-static \
 --disable-doc \
 --disable-ffplay \
 --disable-ffprobe \
 --disable-filters \
 --disable-programs \
 --disable-postproc \
 --extra-cflags="-O3 -march=native -ffast-math -fomit-frame-pointer -flto -fno-fat-lto-objects -ffunction-sections -fdata-sections" \
 --extra-ldflags="-O3 -flto -fno-fat-lto-objects -Wl,--gc-sections" \
 --prefix=/usr/local && \
 make && \
 make install && \
 ldconfig && \
 rm -rf /tmp/*

# Install Python dependencies first
RUN pip install --no-cache-dir --upgrade pip setuptools wheel && \
 pip install --no-cache-dir numpy py-spy

# Build OpenCV with optimized configuration
RUN cd /tmp && \
 # Download specific OpenCV version archives
 wget -O opencv.zip https://github.com/opencv/opencv/archive/4.8.0.zip && \
 wget -O opencv_contrib.zip https://github.com/opencv/opencv_contrib/archive/4.8.0.zip && \
 unzip opencv.zip && \
 unzip opencv_contrib.zip && \
 mv opencv-4.8.0 opencv && \
 mv opencv_contrib-4.8.0 opencv_contrib && \
 rm opencv.zip opencv_contrib.zip && \
 cd opencv && \
 mkdir build && cd build && \
 cmake \
 -D CMAKE_BUILD_TYPE=RELEASE \
 -D CMAKE_C_FLAGS="-O3 -march=native -ffast-math -flto -fno-fat-lto-objects -ffunction-sections -fdata-sections" \
 -D CMAKE_CXX_FLAGS="-O3 -march=native -ffast-math -flto -fno-fat-lto-objects -ffunction-sections -fdata-sections -Wno-deprecated" \
 -D CMAKE_EXE_LINKER_FLAGS="-flto -fno-fat-lto-objects -Wl,--gc-sections" \
 -D CMAKE_SHARED_LINKER_FLAGS="-flto -fno-fat-lto-objects -Wl,--gc-sections" \
 -D CMAKE_INSTALL_PREFIX=/usr/local \
 -D ENABLE_FAST_MATH=ON \
 -D CPU_BASELINE_DETECT=ON \
 -D CPU_BASELINE=SSE3 \
 -D CPU_DISPATCH=SSE4_1,SSE4_2,AVX,AVX2,AVX512_SKX,FP16 \
 -D WITH_OPENMP=ON \
 -D OPENCV_ENABLE_NONFREE=ON \
 -D WITH_FFMPEG=ON \
 -D FFMPEG_ROOT=/usr/local \
 -D OPENCV_EXTRA_MODULES_PATH=/tmp/opencv_contrib/modules \
 -D PYTHON_EXECUTABLE=/usr/local/bin/python3.7 \
 -D PYTHON3_EXECUTABLE=/usr/local/bin/python3.7 \
 -D PYTHON3_INCLUDE_DIR=/usr/local/include/python3.7m \
 -D PYTHON3_LIBRARY=/usr/local/lib/libpython3.7m.so \
 -D PYTHON3_PACKAGES_PATH=/usr/local/lib/python3.7/site-packages \
 -D PYTHON3_NUMPY_INCLUDE_DIRS=/usr/local/lib/python3.7/site-packages/numpy/core/include \
 -D BUILD_opencv_python3=ON \
 -D INSTALL_PYTHON_EXAMPLES=OFF \
 -D BUILD_TESTS=OFF \
 -D BUILD_PERF_TESTS=OFF \
 -D BUILD_EXAMPLES=OFF \
 -D BUILD_DOCS=OFF \
 -D BUILD_opencv_apps=OFF \
 -D WITH_OPENCL=OFF \
 -D WITH_CUDA=OFF \
 -D WITH_IPP=OFF \
 -D WITH_TBB=OFF \
 -D WITH_V4L=OFF \
 -D WITH_QT=OFF \
 -D WITH_GTK=OFF \
 -D BUILD_LIST=core,imgproc,imgcodecs,videoio,python3 \
 .. && \
 make && \
 make install && \
 ldconfig && \
 rm -rf /tmp/*

# Set working directory and copy application code
WORKDIR /app

COPY requirements.txt .

RUN apt-get update && apt-get install -y --no-install-recommends ffmpeg

RUN pip install --no-cache-dir aeneas afaligner && \
 pip install --no-cache-dir -r requirements.txt

COPY . .

# Make entrypoint executable
RUN chmod +x entrypoint.sh
ENTRYPOINT ["./entrypoint.sh"]



My trouble now, is I've been considering running parts of my program on my GPU, it's creating graphics for a video after all. I have no idea how to edit my Dockerfile to make the opencv build run with CUDA enabled, every combination I try leads to issues.


How can I tell which version of CUDA, opencv and ffmpeg are compatible with python 3.7 ? I've tried so so many combinations and they all lead to different issues, I've asked various AI agents and they all flounder. Where can I find a reliable source of information about this ?