Recherche avancée

Médias (1)

Mot : - Tags -/illustrator

Autres articles (47)

  • Personnaliser les catégories

    21 juin 2013, par

    Formulaire 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 2013

    Puis-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, par

    The 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 Maricq

    Saving 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 themujahidkhan

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

    


      

    1. Upload the png file,
    2. 


    3. Select SVG as output file
    4. 


    5. Click convert.
    6. 


    


    It is throwing error.

    


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

    


    // imports&#xA;&#xA;import { createCanvas, loadImage } from "canvas";&#xA;&#xA;import { Action } from "@/types";&#xA;import { FFmpeg } from "@ffmpeg/ffmpeg";&#xA;import { fetchFile } from "@ffmpeg/util";&#xA;&#xA;function getFileExtension(file_name: string) {&#xA;  const regex = /(?:\.([^.]&#x2B;))?$/; // Matches the last dot and everything after it&#xA;  const match = regex.exec(file_name);&#xA;  if (match &amp;&amp; match[1]) {&#xA;    return match[1];&#xA;  }&#xA;  return ""; // No file extension found&#xA;}&#xA;&#xA;function removeFileExtension(file_name: string) {&#xA;  const lastDotIndex = file_name.lastIndexOf(".");&#xA;  if (lastDotIndex !== -1) {&#xA;    return file_name.slice(0, lastDotIndex);&#xA;  }&#xA;  return file_name; // No file extension found&#xA;}&#xA;&#xA;export default async function convert(&#xA;  ffmpeg: FFmpeg,&#xA;  action: Action&#xA;): Promise<any> {&#xA;  const { file, to, file_name, file_type } = action;&#xA;  const input = getFileExtension(file_name);&#xA;  const output = removeFileExtension(file_name) &#x2B; "." &#x2B; to;&#xA;  ffmpeg.writeFile(input, await fetchFile(file));&#xA;&#xA;  // FFMPEG COMMANDS&#xA;  let ffmpeg_cmd: any = [];&#xA;&#xA;  if (to === "svg") {&#xA;    ffmpeg_cmd = [&#xA;      "-i",&#xA;      input,&#xA;      "-vf",&#xA;      "scale=trunc(iw/2)*2:trunc(ih/2)*2",&#xA;      "-c:v",&#xA;      "libvpx-vp9",&#xA;      "-crf",&#xA;      "30",&#xA;      "-b:v",&#xA;      "1M",&#xA;      "-c:a",&#xA;      "libopus",&#xA;      "-b:a",&#xA;      "128k",&#xA;      output,&#xA;    ];&#xA;  } else if (to === "3gp") {&#xA;    ffmpeg_cmd = [&#xA;      "-i",&#xA;      input,&#xA;      "-r",&#xA;      "20",&#xA;      "-s",&#xA;      "352x288",&#xA;      "-vb",&#xA;      "400k",&#xA;      "-acodec",&#xA;      "aac",&#xA;      "-strict",&#xA;      "experimental",&#xA;      "-ac",&#xA;      "1",&#xA;      "-ar",&#xA;      "8000",&#xA;      "-ab",&#xA;      "24k",&#xA;      output,&#xA;    ];&#xA;  } else {&#xA;    ffmpeg_cmd = ["-i", input, output];&#xA;  }&#xA;&#xA;  // execute cmd&#xA;  await ffmpeg.exec(ffmpeg_cmd);&#xA;&#xA;  const data = (await ffmpeg.readFile(output)) as any;&#xA;  const blob = new Blob([data], { type: file_type.split("/")[0] });&#xA;  const url = URL.createObjectURL(blob);&#xA;  return { url, output };&#xA;}&#xA;&#xA;</any>

    &#xA;

    Help appreciated, Thank You

    &#xA;

  • 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 (...)