
Recherche avancée
Médias (1)
-
Sintel MP4 Surround 5.1 Full
13 mai 2011, par
Mis à jour : Février 2012
Langue : English
Type : Video
Autres articles (51)
-
List of compatible distributions
26 avril 2011, parThe table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...) -
Selection of projects using MediaSPIP
2 mai 2011, parThe examples below are representative elements of MediaSPIP specific uses for specific projects.
MediaSPIP farm @ Infini
The non profit organizationInfini develops hospitality activities, internet access point, training, realizing innovative projects in the field of information and communication technologies and Communication, and hosting of websites. It plays a unique and prominent role in the Brest (France) area, at the national level, among the half-dozen such association. Its members (...) -
Submit enhancements and plugins
13 avril 2011If you have developed a new extension to add one or more useful features to MediaSPIP, let us know and its integration into the core MedisSPIP functionality will be considered.
You can use the development discussion list to request for help with creating a plugin. As MediaSPIP is based on SPIP - or you can use the SPIP discussion list SPIP-Zone.
Sur d’autres sites (6870)
-
Get blur effect inside a drawn box using ass format
18 septembre 2024, par Armen SanoyanI have
Nodejs
application which generates subtitles file for video editing. The editing is done byffmpeg
. For each word I also generate a backdrop with rounded corners using drawing command. Example of dialog for backdrop.

Dialogue: 0,00:00:38.60,00:00:42.10,Default,,0,0,0,,{\p1\1a&HD8&\c&HE27FA4&\pos(341.07421875,517.5)\an4} {\p1}m 15 0 b 1202.8515625 .... {\p0}



Now I want to make the backdrop blur.
(Text backdrop by ass formatting)


I have tried to use \blur or \be, but they are for other purpose. Below is reference from the doc


Enable or disable a subtle softening-effect for the edges of the text


Is there any other way to achieve the blurred backdrop. I am ready even to mix ffmpeg commands like
boxblur
and ass file. I mean separately paint the backdrops and then apply ass subtitles file. Here is an experiment to explain the idea.

[0:v]split=3[base][blur1_in][blur2_in];

[blur1_in]crop=w=100:h=100:x=20:y=40[region1];
[region1]boxblur=luma_radius=10:luma_power=1[blurred_region1];
[base][blurred_region1]overlay=x=20:y=40:enable='between(t,0,5)'[tmp1];

[blur2_in]crop=w=30:h=30:x=20:y=40[region2];
[region2]boxblur=luma_radius=5:luma_power=1[blurred_region2];
[tmp1][blurred_region2]overlay=x=20:y=40:enable='between(t,5,10)'[tmp2];

[tmp2]ass=../logs/ass.ass:fontsdir=../fonts/Audiowide-Regular.ttf[final_video]



The problem in this case is that the corners are not rounded. Could anyone explain to me what is the easiest way to get backdrop with rounded corners an blurred inside


-
FFmpeg conversion RGB to YUV420 to RGB wrong result
29 août 2020, par sipwizI'm attempting to sort out a video encoding issue and along the way making sure I can convert between pixel formats with FFmpeg. I'm having a problem converting a dummy RGB24 bitmap to YUV420 and back again.


Below is my test program :


#include "Windows.h"

#include <libavcodec></libavcodec>avcodec.h>
#include <libavformat></libavformat>avformat.h>
#include <libavformat></libavformat>avio.h>
#include <libavutil></libavutil>imgutils.h>
#include <libswscale></libswscale>swscale.h>
#include <libavutil></libavutil>time.h>

#define WIDTH 32
#define HEIGHT 32
#define ERROR_LEN 128
#define SWS_FLAGS SWS_BICUBIC

char _errorLog[ERROR_LEN];
void CreateBitmapFile(LPCWSTR fileName, long width, long height, WORD bitsPerPixel, BYTE* bitmapData, DWORD bitmapDataLength);

int main()
{
 printf("FFmpeg Pixel Conversion Test\n");

 av_log_set_level(AV_LOG_DEBUG);

 int w = WIDTH;
 int h = HEIGHT;

 struct SwsContext* rgbToI420Context;
 struct SwsContext* i420ToRgbContext;

 rgbToI420Context = sws_getContext(w, h, AV_PIX_FMT_RGB24, w, h, AV_PIX_FMT_YUV420P, SWS_FLAGS, NULL, NULL, NULL);
 if (rgbToI420Context == NULL) {
 fprintf(stderr, "Failed to allocate RGB to I420 conversion context.\n");
 }

 i420ToRgbContext = sws_getContext(w, h, AV_PIX_FMT_YUV420P, w, h, AV_PIX_FMT_RGB24, SWS_FLAGS, NULL, NULL, NULL);
 if (i420ToRgbContext == NULL) {
 fprintf(stderr, "Failed to allocate I420 to RGB conversion context.\n");
 }

 // Create dummy bitmap.
 uint8_t rgbRaw[WIDTH * HEIGHT * 3];
 for (int row = 0; row < 32; row++)
 {
 for (int col = 0; col < 32; col++)
 {
 int index = row * WIDTH * 3 + col * 3;

 int red = (row < 16 && col < 16) ? 255 : 0;
 int green = (row < 16 && col > 16) ? 255 : 0;
 int blue = (row > 16 && col < 16) ? 255 : 0;

 rgbRaw[index] = (byte)red;
 rgbRaw[index + 1] = (byte)green;
 rgbRaw[index + 2] = (byte)blue;
 }
 }

 CreateBitmapFile(L"test-reference.bmp", WIDTH, HEIGHT, 24, rgbRaw, WIDTH * HEIGHT * 3);

 printf("Converting RGB to I420.\n");

 uint8_t* rgb[3];
 uint8_t* i420[3];
 int rgbStride[3], i420Stride[3];

 rgbStride[0] = w * 3;
 i420Stride[0] = w * h;
 i420Stride[1] = w * h / 4;
 i420Stride[2] = w * h / 4;

 rgb[0] = rgbRaw;
 i420[0] = (uint8_t*)malloc((size_t)i420Stride[0] * h);
 i420[1] = (uint8_t*)malloc((size_t)i420Stride[1] * h);
 i420[2] = (uint8_t*)malloc((size_t)i420Stride[2] * h);

 int toI420Res = sws_scale(rgbToI420Context, rgb, rgbStride, 0, h, i420, i420Stride);
 if (toI420Res < 0) {
 fprintf(stderr, "Conversion from RGB to I420 failed, %s.\n", av_make_error_string(_errorLog, ERROR_LEN, toI420Res));
 }

 printf("Converting I420 to RGB.\n");

 uint8_t* rgbOut[3];
 int rgbOutStride[3];

 rgbOutStride[0] = w * 3;
 rgbOut[0] = (uint8_t*)malloc((size_t)rgbOutStride[0] * h);

 int toRgbRes = sws_scale(i420ToRgbContext, i420, i420Stride, 0, h, rgbOut, rgbOutStride);
 if (toRgbRes < 0) {
 fprintf(stderr, "Conversion from RGB to I420 failed, %s.\n", av_make_error_string(_errorLog, ERROR_LEN, toRgbRes));
 }

 CreateBitmapFile(L"test-output.bmp", WIDTH, HEIGHT, 24, rgbOut, WIDTH * HEIGHT * 3);

 free(rgbOut[0]);

 for (int i = 0; i < 3; i++) {
 free(i420[i]);
 }

 sws_freeContext(rgbToI420Context);
 sws_freeContext(i420ToRgbContext);

 return 0;
}

/**
* Creates a bitmap file and writes to disk.
* @param[in] fileName: the path to save the file at.
* @param[in] width: the width of the bitmap.
* @param[in] height: the height of the bitmap.
* @param[in] bitsPerPixel: colour depth of the bitmap pixels (typically 24 or 32).
* @param[in] bitmapData: a pointer to the bytes containing the bitmap data.
* @param[in] bitmapDataLength: the number of pixels in the bitmap.
*/
void CreateBitmapFile(LPCWSTR fileName, long width, long height, WORD bitsPerPixel, BYTE* bitmapData, DWORD bitmapDataLength)
{
 HANDLE file;
 BITMAPFILEHEADER fileHeader;
 BITMAPINFOHEADER fileInfo;
 DWORD writePosn = 0;

 file = CreateFile(fileName, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); //Sets up the new bmp to be written to

 fileHeader.bfType = 19778; //Sets our type to BM or bmp
 fileHeader.bfSize = sizeof(fileHeader.bfOffBits) + sizeof(RGBTRIPLE); //Sets the size equal to the size of the header struct
 fileHeader.bfReserved1 = 0; //sets the reserves to 0
 fileHeader.bfReserved2 = 0;
 fileHeader.bfOffBits = sizeof(BITMAPFILEHEADER) + sizeof(BITMAPINFOHEADER); //Sets offbits equal to the size of file and info header
 fileInfo.biSize = sizeof(BITMAPINFOHEADER);
 fileInfo.biWidth = width;
 fileInfo.biHeight = height;
 fileInfo.biPlanes = 1;
 fileInfo.biBitCount = bitsPerPixel;
 fileInfo.biCompression = BI_RGB;
 fileInfo.biSizeImage = width * height * (bitsPerPixel / 8);
 fileInfo.biXPelsPerMeter = 2400;
 fileInfo.biYPelsPerMeter = 2400;
 fileInfo.biClrImportant = 0;
 fileInfo.biClrUsed = 0;

 WriteFile(file, &fileHeader, sizeof(fileHeader), &writePosn, NULL);

 WriteFile(file, &fileInfo, sizeof(fileInfo), &writePosn, NULL);

 WriteFile(file, bitmapData, bitmapDataLength, &writePosn, NULL);

 CloseHandle(file);
}



The source bitmap is :




The output bmp after the two conversions is :




-
unresolved external symbol of ffmpeg avutil.lib
2 mai 2016, par RichardFor some reason I can not get rid of this Linker error when using methods from ffmpeg libs !
I built the ffmpeg libs myself with msys64 and linked the resulting libs to my current project. As soon as I want to use them I get about 10 LNK errors.
I think I set all required linking right and also use the key word extern "C" without any success.
When running dumpbin.exe it lists all used symbols, so those libs should be ok...
Does anyone have a clue what´s going wrong ?#pragma once
extern "C"
{
#include
#include
#include
#include
#include
#include
#include
}
int main(int argc, char **argv[])
{
const char *output_type;
/* register all the codecs */
avcodec_register_all();
return 0;
}The error log looks like this :
error LNK2019 : unresolved external symbol av_frame_free referenced in function "void __cdecl video_encoding(char const *,int)" (?video_encoding@@YAXPEBDH@Z)
error LNK2019 : unresolved external symbol avcodec_register_all referenced in function main
error LNK2019 : unresolved external symbol avcodec_alloc_context3 referenced in function "void __cdecl video_encoding(char const *,int)" (?video_encoding@@YAXPEBDH@Z)
error LNK2019 : unresolved external symbol avcodec_open2 referenced in function "void __cdecl video_encoding(char const *,int)" (?video_encoding@@YAXPEBDH@Z)
error LNK2019 : unresolved external symbol avcodec_close referenced in function "void __cdecl video_encoding(char const *,int)" (?video_encoding@@YAXPEBDH@Z)
error LNK2019 : unresolved external symbol av_init_packet referenced in function "void __cdecl video_encoding(char const *,int)" (?video_encoding@@YAXPEBDH@Z)
error LNK2019 : unresolved external symbol av_packet_unref referenced in function "void __cdecl video_encoding(char const *,int)" (?video_encoding@@YAXPEBDH@Z)
error LNK2019 : unresolved external symbol avcodec_find_encoder referenced in function "void __cdecl video_encoding(char const *,int)" (?video_encoding@@YAXPEBDH@Z)
error LNK2019 : unresolved external symbol avcodec_encode_video2 referenced in function "void __cdecl video_encoding(char const *,int)" (?video_encoding@@YAXPEBDH@Z)
error LNK2019 : unresolved external symbol av_image_alloc referenced in function "void __cdecl video_encoding(char const *,int)" (?video_encoding@@YAXPEBDH@Z)
oVideoRendererApp\x64\Debug_64\ImagesToVideoRendererApp.exe : fatal error LNK1120 : 14 unresolved externals