Recherche avancée

Médias (1)

Mot : - Tags -/lev manovitch

Autres articles (45)

  • 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

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

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

Sur d’autres sites (6811)

  • avutil/tile : check clock_gettime at runtime for apple platforms

    9 janvier 2017, par Wang Bin
    avutil/tile : check clock_gettime at runtime for apple platforms
    

    clock_gettime is avalible since macOS 10.12 and iOS 10.0. Because of
    weak linking, clock_gettime can be build without error with new
    macOS/iOS sdk, but the symbol may not exist on the target system.
    Explicitly checking the symbol is required.
    https://developer.apple.com/library/content/documentation/MacOSX/Conceptual/BPFrameworks/Concepts/WeakLinking.html

    Signed-off-by : Wang Bin <wbsecg1@gmail.com>
    Signed-off-by : Steven Liu <lq@chinaffmpeg.org>

    • [DH] libavutil/time.c
  • Error with FFmpeg and FS in React : "ErrnoError : FS error"

    23 juillet 2024, par namwan

    I'm working on a React application where I'm using the @ffmpeg/ffmpeg library to compress images and videos. I'm facing an issue with the virtual file system (FS) when trying to read and write files using FFmpeg. I'm getting the following error :

    &#xA;

    ErrnoError: FS error&#xA;

    &#xA;

    Here's the relevant part of my code :

    &#xA;

    import React, { useState } from "react";&#xA;import { FFmpeg } from "@ffmpeg/ffmpeg";&#xA;&#xA;const ffmpeg = new FFmpeg();&#xA;&#xA;const fetchFile = async (filePath) => {&#xA;    const file = await ffmpeg.readFile(filePath);&#xA;    alert("hello");&#xA;    return new Uint8Array(file).buffer;&#xA;};&#xA;&#xA;&#xA;const Main = () => {&#xA;    const [file, setFile] = useState(null);&#xA;    const [compressedFile, setCompressedFile] = useState("");&#xA;&#xA;    const loadFFmpeg = async () => {&#xA;        if (!ffmpeg.isLoaded) {&#xA;          await ffmpeg.load();&#xA;        }&#xA;      };      &#xA;&#xA;    const getFile = (event) => {&#xA;        const selectedFile = event.target.files[0];&#xA;        &#xA;        if (selectedFile) {&#xA;            setFile(selectedFile);&#xA;        }&#xA;    };&#xA;&#xA;    const compressImage = (selectedFile) => {&#xA;        const img = new Image();&#xA;        img.src = URL.createObjectURL(selectedFile);&#xA;        img.onload = () => {&#xA;            const canvas = document.createElement(&#x27;canvas&#x27;);&#xA;            const MAX_WIDTH = 300;&#xA;            const MAX_HEIGHT = 300;&#xA;            let width = img.width;&#xA;            let height = img.height;&#xA;&#xA;            if (width > height) {&#xA;                if (width > MAX_WIDTH) {&#xA;                    height *= MAX_WIDTH / width;&#xA;                    width = MAX_WIDTH;&#xA;                }&#xA;            } else {&#xA;                if (height > MAX_HEIGHT) {&#xA;                    width *= MAX_HEIGHT / height;&#xA;                    height = MAX_HEIGHT;&#xA;                }&#xA;            }&#xA;&#xA;            canvas.width = width;&#xA;            canvas.height = height;&#xA;            const ctx = canvas.getContext(&#x27;2d&#x27;);&#xA;            ctx.drawImage(img, 0, 0, width, height);&#xA;            const dataUrl = canvas.toDataURL(&#x27;image/jpeg&#x27;, 1.0);&#xA;            setCompressedFile(dataUrl);&#xA;        };&#xA;    };&#xA;&#xA;    const compressVideo = async (selectedFile) => {&#xA;        try {&#xA;            await loadFFmpeg();&#xA;    &#xA;            const arrayBuffer = await selectedFile.arrayBuffer();&#xA;            const fileName = selectedFile.name;&#xA;    &#xA;            await ffmpeg.writeFile(fileName, new Uint8Array(arrayBuffer));&#xA;    &#xA;            await ffmpeg.exec(&#xA;                &#x27;-i&#x27;,&#xA;                fileName,&#xA;                &#x27;-vf&#x27;,&#xA;                &#x27;scale=640:-1&#x27;,&#xA;                &#x27;-c:a&#x27;,&#xA;                &#x27;aac&#x27;,&#xA;                &#x27;-strict&#x27;,&#xA;                &#x27;-2&#x27;,&#xA;                &#x27;output.mp4&#x27;&#xA;            );&#xA;    &#xA;            const data = await fetchFile(&#x27;output.mp4&#x27;);&#xA;            const compressedVideoBlob = new Blob([data], { type: &#x27;video/mp4&#x27; });&#xA;            const compressedVideoUrl = URL.createObjectURL(compressedVideoBlob);&#xA;            setCompressedFile(compressedVideoUrl);&#xA;    &#xA;            await ffmpeg.unlink(fileName);&#xA;            await ffmpeg.unlink(&#x27;output.mp4&#x27;);&#xA;    &#xA;            alert(&#x27;Compression successful&#x27;);&#xA;        } catch (error) {&#xA;            console.error(&#x27;Error:&#x27;, error);&#xA;            alert(&#x27;Compression failed. Please check the console for more details.&#x27;);&#xA;        }&#xA;    };&#xA;        &#xA;&#xA;    const handleSubmit = async (e) => {&#xA;        e.preventDefault();&#xA;&#xA;        if (file) {&#xA;            const fileType = file.name.split(&#x27;.&#x27;).pop().toLowerCase();&#xA;&#xA;            if (fileType === &#x27;png&#x27; || fileType === &#x27;jpg&#x27; || fileType === &#x27;jpeg&#x27;) {&#xA;                compressImage(file);&#xA;            } else if (fileType === &#x27;mp4&#x27; || fileType === &#x27;h264&#x27;) {&#xA;                compressVideo(file);&#xA;            } else {&#xA;                alert(&#x27;Please select a valid file type (png, jpg, jpeg for images or mp4, h264 for videos).&#x27;);&#xA;            }&#xA;        }&#xA;    };&#xA;&#xA;    const handleDownload = () => {&#xA;        if (file) {&#xA;            const downloadLink = document.createElement(&#x27;a&#x27;);&#xA;            downloadLink.href = compressedFile;&#xA;&#xA;            const fileExtension = file.name.split(&#x27;.&#x27;).pop().toLowerCase();&#xA;&#xA;            downloadLink.download = `compressed_file.${fileExtension}`;&#xA;    &#xA;            document.body.appendChild(downloadLink);&#xA;            downloadLink.click();&#xA;            document.body.removeChild(downloadLink);&#xA;        }&#xA;    };&#xA;&#xA;    return (&#xA;        &lt;>&#xA;            <h1>Main Page</h1>&#xA;            <form>&#xA;                <label>Upload</label>&#xA;                <input type="&#x27;file&#x27;" />&#xA;                <br /><br />&#xA;                <input type="submit" value="Compress" />&#xA;            </form>&#xA;            {compressedFile &amp;&amp; (&#xA;                &lt;>&#xA;                    <h2>Compressed File Preview</h2>&#xA;                    {file &amp;&amp; file.name &amp;&amp; ( &#xA;                        file.name.split(&#x27;.&#x27;).pop().toLowerCase() === &#x27;mp4&#x27; || file.name.split(&#x27;.&#x27;).pop().toLowerCase() === &#x27;h264&#x27; ? (&#xA;                            <video width="300" controls="controls">&#xA;                                <source src="{compressedFile}" type="video/mp4"></source>&#xA;                                Your browser does not support the video tag.&#xA;                            </video>&#xA;                        ) : (&#xA;                            <img src="http://stackoverflow.com/feeds/tag/{compressedFile}" alt="Compressed file preview" style='max-width: 300px; max-height: 300px' />&#xA;                        )&#xA;                    )}&#xA;                    <br /><br />&#xA;                    <button>Download Compressed File</button>&#xA;                >&#xA;            )}&#xA;        >&#xA;    );&#xA;};&#xA;&#xA;export default Main;&#xA;

    &#xA;

    I'm using ffmpeg.readFile and ffmpeg.writeFile to read and write files to FFmpeg's virtual file system. I've also tried using ffmpeg.read and ffmpeg.write but still encounter the same issue.

    &#xA;

    Could someone please help me understand what might be causing this FS error and how to resolve it ?

    &#xA;

  • What does "dash" - mean as ffmpeg output filename

    26 août 2020, par DDS

    I'm trying to use ffmpeg with gnuplot to draw some audio spectra, I'm following this ffmpeg doc link.

    &#xA;

    Now I'm asking what "dash" - means on this line right after -f data, it should be a filename : the last element of ffmpeg command should the output file but I have no files named - in the directory after running the command.

    &#xA;

    ffmpeg -y -i in.wav -ac 1 -filter:a aresample=8000 -map 0:a -c:a pcm_s16le -f data - | gnuplot -p -e "plot &#x27;code>

    &#xA;

    I looked on ffmpeg docs but I didn't find anything.

    &#xA;