Recherche avancée

Médias (0)

Mot : - Tags -/configuration

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (39)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

  • Supporting all media types

    13 avril 2011, par

    Unlike 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 (3191)

  • React Native Expo File System : open failed : ENOENT (No such file or directory)

    9 février 2023, par coloraday

    I'm getting this error in a bare React Native project :

    


    Possible Unhandled Promise Rejection (id: 123):
Error: /data/user/0/com.filsufius.VisionishAItest/files/image-new-♥d.jpg: open failed: ENOENT (No such file or directory)


    


    The same code was saving to File System with no problem yesterday, but today as you can see I am getting an ENOENT error, plus I am getting these funny heart shapes ♥d in the path. Any pointers as to what might be causing this, please ? I use npx expo run:android to builld app locally and expo start —dev-client to run on a physical Android device connected through USB.

    


    import { Image, View, Text, StyleSheet } from "react-native";&#xA;import * as FileSystem from "expo-file-system";&#xA;import RNFFmpeg from "react-native-ffmpeg";&#xA;import * as tf from "@tensorflow/tfjs";&#xA;import * as cocossd from "@tensorflow-models/coco-ssd";&#xA;import { decodeJpeg, bundleResourceIO } from "@tensorflow/tfjs-react-native";&#xA;&#xA;const Record = () => {&#xA;  const [frames, setFrames] = useState([]);&#xA;  const [currentFrame, setCurrentFrame] = useState(0);&#xA;  const [model, setModel] = useState(null);&#xA;  const [detections, setDetections] = useState([]);&#xA;&#xA;  useEffect(() => {&#xA;    const fileName = "image-new-%03d.jpg";&#xA;    const outputPath = FileSystem.documentDirectory &#x2B; fileName;&#xA;    RNFFmpeg.execute(&#xA;      "-y -i https://res.cloudinary.com/dannykeane/video/upload/sp_full_hd/q_80:qmax_90,ac_none/v1/dk-memoji-dark.m3u8 -vf fps=25 -f mjpeg " &#x2B;&#xA;        outputPath&#xA;    )&#xA;      .then((result) => {&#xA;        console.log("Extraction succeeded:", result);&#xA;        FileSystem.readDirectoryAsync(FileSystem.documentDirectory).then(&#xA;          (files) => {&#xA;            setFrames(&#xA;              files&#xA;                .filter((file) => file.endsWith(".jpg"))&#xA;                .sort((a, b) => {&#xA;                  const aNum = parseInt(a.split("-")[2].split(".")[0]);&#xA;                  const bNum = parseInt(b.split("-")[2].split(".")[0]);&#xA;                  return aNum - bNum;&#xA;                })&#xA;            );&#xA;          }&#xA;        );&#xA;      })&#xA;      .catch((error) => {&#xA;        console.error("Extraction failed:", error);&#xA;      });&#xA;  }, []);&#xA;&#xA;  useEffect(() => {&#xA;    tf.ready().then(() => cocossd.load().then((model) => setModel(model)));&#xA;  }, []);&#xA;  useEffect(() => {&#xA;    if (frames.length &amp;&amp; model) {&#xA;      const intervalId = setInterval(async () => {&#xA;        setCurrentFrame((currentFrame) =>&#xA;          currentFrame === frames.length - 1 ? 0 : currentFrame &#x2B; 1&#xA;        );&#xA;        const path = FileSystem.documentDirectory &#x2B; frames[currentFrame];&#xA;        const imageAssetPath = await FileSystem.readAsStringAsync(path, {&#xA;          encoding: FileSystem.EncodingType.Base64,&#xA;        });&#xA;        const imgBuffer = tf.util.encodeString(imageAssetPath, "base64").buffer;&#xA;        const imageData = new Uint8Array(imgBuffer);&#xA;        const imageTensor = decodeJpeg(imageData, 3);&#xA;        console.log("after decodeJpeg.");&#xA;        const detections = await model.detect(imageTensor);&#xA;        console.log(detections);&#xA;        setDetections(detections);&#xA;      }, 100);&#xA;      return () => clearInterval(intervalId);&#xA;    }&#xA;  }, [frames, model]);&#xA;&#xA;  &#xA;  return (&#xA;    <view style="{styles.container}">&#xA;      &#xA;      <view style="{styles.predictions}">&#xA;        {detections.map((p, i) => (&#xA;          <text key="{i}" style="{styles.text}">&#xA;            {p.class}: {(p.score * 100).toFixed(2)}%&#xA;          </text>&#xA;        ))}&#xA;      </view>&#xA;    </view>&#xA;  );&#xA;};&#xA;&#xA;const styles = StyleSheet.create({&#xA;  container: {&#xA;    flex: 1,&#xA;    alignItems: "center",&#xA;    justifyContent: "center",&#xA;  },&#xA;  image: {&#xA;    width: 300,&#xA;    height: 300,&#xA;    resizeMode: "contain",&#xA;  },&#xA;  predictions: {&#xA;    width: 300,&#xA;    height: 100,&#xA;    marginTop: 20,&#xA;  },&#xA;  text: {&#xA;    fontSize: 14,&#xA;    textAlign: "center",&#xA;  },&#xA;});&#xA;&#xA;export default Record;```&#xA;

    &#xA;

  • Add lensfun filter

    13 juillet 2018, par Stephen Seo
    Add lensfun filter
    

    Lensfun is a library that applies lens correction to an image using a
    database of cameras/lenses (you provide the camera and lens models, and
    it uses the corresponding database entry's parameters to apply lens
    correction). It is licensed under LGPL3.

    The lensfun filter utilizes the lensfun library to apply lens
    correction to videos as well as images.

    This filter was created out of necessity since I wanted to apply lens
    correction to a video and the lenscorrection filter did not work for me.

    While this filter requires little info from the user to apply lens
    correction, the flaw is that lensfun is intended to be used on indvidual
    images. When used on a video, the parameters such as focal length is
    constant, so lens correction may fail on videos where the camera's focal
    length changes (zooming in or out via zoom lens). To use this filter
    correctly on videos where such parameters change, timeline editing may
    be used since this filter supports it.

    Note that valgrind shows a small memory leak which is not from this
    filter but from the lensfun library (memory is allocated when loading
    the lensfun database but it somehow isn't deallocated even during
    cleanup ; it is briefly created in the init function of the filter, and
    destroyed before the init function returns). This may have been fixed by
    the latest commit in the lensfun repository ; the current latest release
    of lensfun is almost 3 years ago.

    Bi-Linear interpolation is used by default as lanczos interpolation
    shows more artifacts in the corrected image in my tests.

    The lanczos interpolation is derived from lenstool's implementation of
    lanczos interpolation. Lenstool is an app within the lensfun repository
    which is licensed under GPL3.

    v2 of this patch fixes license notice in libavfilter/vf_lensfun.c

    v3 of this patch fixes code style and dependency to gplv3 (thanks to
    Paul B Mahol for pointing out the mentioned issues).

    v4 of this patch fixes more code style issues that were missed in
    v3.

    v5 of this patch adds line breaks to some of the documentation in
    doc/filters.texi (thanks to Gyan Doshi for pointing out the issue).

    v6 of this patch fixes more problems (thanks to Moritz Barsnick for
    pointing them out).

    v7 of this patch fixes use of sqrt() (changed to sqrtf() ; thanks to
    Moritz Barsnick for pointing this out). Also should be rebased off of
    latest master branch commits at this point.

    Signed-off-by : Stephen Seo <seo.disparate@gmail.com>

    • [DH] configure
    • [DH] doc/filters.texi
    • [DH] libavfilter/Makefile
    • [DH] libavfilter/allfilters.c
    • [DH] libavfilter/vf_lensfun.c
  • Revision 36454 : uniformiser les inputs du formulaire de login

    19 mars 2010, par brunobergot@… — Log

    uniformiser les inputs du formulaire de login