
Recherche avancée
Médias (1)
-
Carte de Schillerkiez
13 mai 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
Autres articles (47)
-
Personnaliser les catégories
21 juin 2013, parFormulaire de création d’une catégorie
Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
On peut modifier ce formulaire dans la partie :
Administration > Configuration des masques de formulaire.
Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...) -
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 -
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 (...)
Sur d’autres sites (7877)
-
Different ffmpeg result after saving to png
28 juillet 2023, par Kalev MaricqSaving images to PNG first seems to produce different ffmpeg encodes. Running this test code


from PIL import Image
import cv2
import ffmpeg
import hashlib

ffmpeg.input('test.jpg').output('testff.png').run()
cv2.imwrite('testcv.png',cv2.imread('test.jpg'))
Image.open('test.jpg').save('testpil.png')

hashes=[]
for suf in ['.jpg','ff.png','cv.png','pil.png']:
 dest='test'+suf.replace('.','')+'.mp4'
 ffmpeg.input('test'+suf).output(dest).run()
 hashes.append(hashlib.file_digest(open(dest,'rb'),'md5').hexdigest())
 
print(hashes)



I get

['a5b744a8ac0f6de9ec4de43ff737c46e'

,'ab62474f2160899e064ba24890047372'

,'baa788d5e4ef212ab610b8b5cf7772cb'

,'baa788d5e4ef212ab610b8b5cf7772cb']

As you can see, the only two that match are the cv2 and pillow conversions, and none of them match the original. In terms of file size, the results that passed to png first seem to be about 10% smaller than the direct-from-jpg result.


Why is this happening and how can I avoid changing image data until I'm ready to encode ?


-
FFMPEG Command to convert images to svg [closed]
5 mai 2024, par themujahidkhanUsers are trying to convert images to SVG image on my website, Below I've given a link to the site, more detail on error and code that handles the conversion of media files.


You can check out the live site Here.


Steps to reproduce the error.


- 

- Upload the png file,
- Select SVG as output file
- Click convert.








It is throwing error.


Below is the code for that converts users input and gives input based on user preference.


// imports

import { createCanvas, loadImage } from "canvas";

import { Action } from "@/types";
import { FFmpeg } from "@ffmpeg/ffmpeg";
import { fetchFile } from "@ffmpeg/util";

function getFileExtension(file_name: string) {
 const regex = /(?:\.([^.]+))?$/; // Matches the last dot and everything after it
 const match = regex.exec(file_name);
 if (match && match[1]) {
 return match[1];
 }
 return ""; // No file extension found
}

function removeFileExtension(file_name: string) {
 const lastDotIndex = file_name.lastIndexOf(".");
 if (lastDotIndex !== -1) {
 return file_name.slice(0, lastDotIndex);
 }
 return file_name; // No file extension found
}

export default async function convert(
 ffmpeg: FFmpeg,
 action: Action
): Promise<any> {
 const { file, to, file_name, file_type } = action;
 const input = getFileExtension(file_name);
 const output = removeFileExtension(file_name) + "." + to;
 ffmpeg.writeFile(input, await fetchFile(file));

 // FFMPEG COMMANDS
 let ffmpeg_cmd: any = [];

 if (to === "svg") {
 ffmpeg_cmd = [
 "-i",
 input,
 "-vf",
 "scale=trunc(iw/2)*2:trunc(ih/2)*2",
 "-c:v",
 "libvpx-vp9",
 "-crf",
 "30",
 "-b:v",
 "1M",
 "-c:a",
 "libopus",
 "-b:a",
 "128k",
 output,
 ];
 } else if (to === "3gp") {
 ffmpeg_cmd = [
 "-i",
 input,
 "-r",
 "20",
 "-s",
 "352x288",
 "-vb",
 "400k",
 "-acodec",
 "aac",
 "-strict",
 "experimental",
 "-ac",
 "1",
 "-ar",
 "8000",
 "-ab",
 "24k",
 output,
 ];
 } else {
 ffmpeg_cmd = ["-i", input, output];
 }

 // execute cmd
 await ffmpeg.exec(ffmpeg_cmd);

 const data = (await ffmpeg.readFile(output)) as any;
 const blob = new Blob([data], { type: file_type.split("/")[0] });
 const url = URL.createObjectURL(blob);
 return { url, output };
}

</any>


Help appreciated, Thank You


-
Anomalie #2139 : recherche et caractères accenctués
27 juin 2011, par jluc -C’est Firefox que j’utilise. Je ne sais pas de quel feature de Opera tu parles. 1) Si je saisis à la main ou dans un lien http://www.google.fr/search?q=année , google me satisfait. 2) Si je fais pareil avec spip-contrib.net/spip.php ?page=recherche&recherche=année , spip-contrib.net me (...)