
Recherche avancée
Autres articles (43)
-
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 (...) -
Sélection de projets utilisant MediaSPIP
29 avril 2011, parLes exemples cités ci-dessous sont des éléments représentatifs d’usages spécifiques de MediaSPIP pour certains projets.
Vous pensez avoir un site "remarquable" réalisé avec MediaSPIP ? Faites le nous savoir ici.
Ferme MediaSPIP @ Infini
L’Association Infini développe des activités d’accueil, de point d’accès internet, de formation, de conduite de projets innovants dans le domaine des Technologies de l’Information et de la Communication, et l’hébergement de sites. Elle joue en la matière un rôle unique (...) -
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 (5395)
-
avcodec/sanm : ignore codec45
14 mars, par Manuel Laussavcodec/sanm : ignore codec45
Codec45 is used in some RA2 videos on top of codec37.
It consists of 2 tables (768 and 32768 bytes), and datapackets
like codec2 (delta-x, delta-y) with a pixel counter instead of a color value.
It then reads the 4 surrounding pixels, looks up 3 separate values
for each in table1, adds them together to form an index into
table2 for a new pixel value, in a row.The data coming in gets the x/y coordinates out of the visible
area very quickly (2-3 iterations) ; I don't see any visual
difference between the ffmpeg-produced frames and ones captured
with dosbox from rebel assault 2, which leads me to believe this
codec never worked as intended.Signed-off-by : Manuel Lauss <manuel.lauss@gmail.com>
-
FFMPEG spoils the extreme pixels when converting and cropping images [closed]
20 décembre 2024, par JacobI have a side image processing task in my work.
I am using the following command to translate a spherical panorama into a cubemap :


Path/ffmpeg.exe -i "Path/PanoImageInput.png" -vf v360=equirect:c6x1:fin_pad=64:out_frot=002200,scale=-1:2048:flags=neighbor "Path/CubemapOutput.png"


And then I slice it into separate images, 1 face for example :


Path/ffmpeg.exe -i "Path/CubemapOutput.png" -vf crop=2048:2048:0:0 -sws_flags neighbor "Path/face_1.png"


I get artifacts on both cubemap and images of this kind that really bother me :


Cubemap image junction
The junction and part of the edge of the cubemap image


The pixels at the junctions of the 6 images in cubemap and the outermost pixels of any images change their color slightly. This eventually leads to the appearance of visible seams in the scene assembled from the images.


Is there any way I can get rid of them ?


I have tried different interpolation methods in both functions :
fast
,bicubric
,gauss
, etc. It doesn't seem to have any effect.

I also tried to crop a couple of pixels less, something like :
crop=2040:2040:4:4


I thought it was all because of cubemap and its distortions. Anyway, at the edges of the image, the extreme pixels change their hue.


I also hoped that with the help of pad, during the conversion, I could somehow control the area where the pixels deteriorate, but it absolutely does not matter what I put there -
fin_pad
,fout_pad
and any numbers for them, removescale
, setscale
- neither the final image size changes, nor any extra fields appear. Most likely, I just don't understand what this function is really supposed to mean.

-
Output video like Instagram stories with ffmpeg
1er novembre 2024, par arman naeimiI'm trying to build a small component like Instagram stories with React & Vite & Typescript. The user can zoom in, zoom out and rotate their videos easily on the screen with a touch.


Using ffmpeg I want to get an output like what user sees in his browser. definitely what the user sees on the screen of his phone and the area he is working on is smaller and our output is a video with larger dimensions in the size of 1080 x 1920. So I adjusted the values before sending them to server.


Front-end Code :


const handleUpload = async () => {
 if (isVideo && video && canvasRef.current && mediaDimensions) {
 const TARGET_WIDTH = 1080; // Target output width
 const TARGET_HEIGHT = 1920; // Target output height

 const scaleX = TARGET_WIDTH / mediaDimensions.width;
 const scaleY = TARGET_HEIGHT / mediaDimensions.height;

 const adjustedScale = Math.min(scaleX, scaleY) * scale;

 const adjustedRotate = rotation * (180 / Math.PI);

 const adjustedOffsetX =
 ((offset.x * mediaDimensions.width) / canvasRef.current.width) *
 adjustedScale;
 const adjustedOffsetY =
 ((offset.y * mediaDimensions.height) / canvasRef.current.height) *
 adjustedScale;

 const formData = new FormData();
 formData.append('video', video);
 formData.append(
 'transform',
 JSON.stringify({
 scale: adjustedScale,
 rotate: adjustedRotate,
 offsetX: adjustedOffsetX,
 offsetY: adjustedOffsetY,
 })
 );

 const response = await axios.post('/api/watermark', formData, {
 responseType: 'blob',
 });

 const url = URL.createObjectURL(new Blob([response.data]));
 setVideoUrl(url);
 }
 };



The ffmpeg command that I wrote :


const command = `
 ffmpeg -i ${file.path} -vf "
 scale='min(1080/${transform.scale}, iw*${transform.scale}):min(1920/${transform.scale}, ih*${transform.scale})',
 fps=30,
 format=yuv420p,
 rotate=${transform.rotate}*PI/180:ow=rotw(${transform.rotate}*PI/180):oh=roth(${transform.rotate}*PI/180),
 pad=1080:1920:(1080-iw*${transform.scale})/2+${transform.offsetX}:(1920-ih*${transform.scale})/2+${transform.offsetY},
 crop=1080:1920:(max((iw-1080)/2\\,0) + ${transform.offsetX}):(max((ih-1920)/2\\,0) + ${transform.offsetY})
 " -c:v libx264 -preset fast -crf 28 -y ${outputPath}
`;;



I wrote different commands but did not get the desired output and kept getting errors. I want a command that behaves exactly like Instagram. If the user zooms the video out of the canvas, the output is still 1080x1920 and only outputs as much as is visible. If it was smaller, its place is only adjusted.