
Recherche avancée
Autres articles (112)
-
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 ;
-
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 (...) -
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir
Sur d’autres sites (16379)
-
lavc/libxavs2 : fix intra period meaning conflict
18 octobre 2018, par hwren -
ffmpeg can't record Webview Edge in window form
20 juin 2021, par Sôn Gô KuI have a window form application with browser control is Webview Edge as link bellow :
https://docs.microsoft.com/en-us/microsoft-edge/webview2/get-started/winforms


This command use for record tab :
ffmpeg -f gdigrab -framerate 60 -i title="xo" -y -b:v 10M a.mp4
p\s : "xo" is window form title


But after record, video doesn't have webview control
Please see attached image


Please help me this case. Thank you so much !


-
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.