Recherche avancée

Médias (0)

Mot : - Tags -/publication

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

Autres articles (88)

  • 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

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • Submit bugs and patches

    13 avril 2011

    Unfortunately a software is never perfect.
    If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
    If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
    You may also (...)

Sur d’autres sites (8991)

  • Glitchy mp4 File saved with Matplotlib Animation via ffmpeg

    9 janvier 2024, par Jacob Ivanov

    I am attempting to save an .mp4 file using matplotlib.animation to output some simulation results. The relevent section is as follows :

    


    ANI = FuncAnimation(fig, update, init_func = lambda : None, frames = range(0, 21300, 50))
ANI.save("[removed]/anim/v6 256 unforced 0.02.mp4", dpi = 600, fps = 30, writer = 'ffmpeg')


    


    However, it appears that there is some issue in the produced .mp4 file, as when I use macOS Quicktime to view the file, it pauses on certain frames, and restarts later on. It appears to consistently pause on the same frame a few seconds in. In order to check if Quicktime was the problem, I opened some random .mp4 files I found in a family group chat, and did not have this issue.

    


    I also tried viewing this .mp4 file with VLC, which had no issue, and played without any glitches. The Slack media viewer built into the app pauses similar to Quicktime.

    


    The following are all relevant versions :

    


      

    • macOS : 14.2.1 (23C71)
    • 


    • Python : 3.10.9 via Homebrew
    • 


    • Matplotlib : 3.6.2
    • 


    • ffmpeg : 6.1.1
    • 


    


    If it would help, I can also provide the .mp4 file itself, but I'm not quite sure how to upload it. I will be happy to provide any additional information as well.

    


    Unfortunately, I'm not very familiar with video rendering, but I would appreciate any help anyone could provide. Thank you in advance !

    


  • Is there a way to improve video fetching speed when using FFmpeg for trimming ?

    14 janvier 2024, par Otis

    I have a React component that uses the @ffmpeg/ffmpeg library to trim videos. The trimming process involves fetching a video file from a URL and then using FFmpeg to perform the actual trim. I've noticed that when I execute the trimVideo function on a new URL for the first time, it takes a considerable amount of time to fetch the file. However, on subsequent executions with the same URL, it executes in less than 5 seconds.

    


    import { useEffect, useRef, useState } from &#x27;react&#x27;;&#xA;import { FFmpeg } from &#x27;@ffmpeg/ffmpeg&#x27;;&#xA;import { fetchFile, toBlobURL } from &#x27;@ffmpeg/util&#x27;;&#xA;&#xA;&#xA;export default function TrimVideo() {&#xA;    const [loaded, setLoaded] = useState(false);&#xA;    const [isLoading, setIsLoading] = useState(false);&#xA;    const [trimmedBlobUrl, setTrimmedBlobUrl] = useState(&#x27;&#x27;);&#xA;    const [progress, setProgress] = useState<any>(0);&#xA;    const ffmpegRef = useRef<any>(new FFmpeg());&#xA;    const videoRef = useRef<any>(null);&#xA;    const messageRef = useRef<any>(null);&#xA;&#xA;    const [exporting, setExporting] = useState(false);&#xA;&#xA;    const onlineVideoUrl =&#xA;        &#x27;http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4&#x27;;&#xA;&#xA;    const loadFFmpeg = async () => {&#xA;        setIsLoading(true);&#xA;&#xA;        const baseURL = &#x27;https://unpkg.com/@ffmpeg/core@0.12.2/dist/umd&#x27;;&#xA;        const ffmpeg = ffmpegRef.current;&#xA;&#xA;        ffmpeg.on(&#x27;log&#x27;, ({ message }: any) => {&#xA;            if (messageRef.current) messageRef.current.innerHTML = message;&#xA;        });&#xA;&#xA;        // Load FFmpeg core and wasm files&#xA;        await ffmpeg.load({&#xA;            coreURL: await toBlobURL(&#xA;                `${baseURL}/ffmpeg-core.js`,&#xA;                &#x27;text/javascript&#x27;,&#xA;            ),&#xA;            wasmURL: await toBlobURL(&#xA;                `${baseURL}/ffmpeg-core.wasm`,&#xA;                &#x27;application/wasm&#x27;,&#xA;            ),&#xA;        });&#xA;&#xA;        setLoaded(true);&#xA;        setIsLoading(false);&#xA;    };&#xA;&#xA;    useEffect(() => {&#xA;        loadFFmpeg();&#xA;    }, []);&#xA;&#xA;    const trimVideo = async () => {&#xA;        const ffmpeg = ffmpegRef.current;&#xA;        setExporting(true);&#xA;        setProgress(0);&#xA;&#xA;        const trimStart = 1;&#xA;        const trimEnd = 40;&#xA;        const trimmedVideo = trimEnd - trimStart;&#xA;&#xA;&#xA;        try {&#xA;            console.log(&#x27;Fetching Video...&#x27;);&#xA;            await ffmpeg.writeFile(&#xA;                &#x27;myFile.mp4&#x27;,&#xA;                await fetchFile(onlineVideoUrl),&#xA;            );&#xA;            console.log(&#x27;Executing FFMPEG...&#x27;);&#xA;            await ffmpeg.exec([&#xA;                &#x27;-ss&#x27;,&#xA;                `${trimStart}`,&#xA;                &#x27;-accurate_seek&#x27;,&#xA;                &#x27;-i&#x27;,&#xA;                &#x27;myFile.mp4&#x27;,&#xA;                &#x27;-to&#x27;,&#xA;                `${trimmedVideo}`,&#xA;                &#x27;-codec&#x27;,&#xA;                &#x27;copy&#x27;,&#xA;                &#x27;output.mp4&#x27;,&#xA;            ]);&#xA;&#xA;            const data: any = await ffmpeg?.readFile(&#x27;output.mp4&#x27;);&#xA;            const url = URL.createObjectURL(&#xA;                new Blob([data.buffer], { type: &#x27;video/mp4&#x27; }),&#xA;            );&#xA;            setTrimmedBlobUrl(url);&#xA;        } catch (error) {&#xA;            console.log(error);&#xA;        } finally {&#xA;            setProgress(0);&#xA;            setExporting(false);&#xA;        }&#xA;    };&#xA;&#xA;&#xA;    return loaded ? (&#xA;      <div>&#xA;        {trimmedBlobUrl &amp;&amp; (&#xA;          <video ref="{videoRef}" controls="controls" src="{trimmedBlobUrl}"></video>&#xA;        )}&#xA;        <br />&#xA;&#xA;        <button>> trimVideo()}>Trim Video</button>&#xA;        <h3>Progress: {progress}</h3>&#xA;        <p ref="{messageRef}"></p>&#xA;      </div>&#xA;    ) : (&#xA;      <p>Loading FFmpeg...</p>&#xA;    );&#xA;}&#xA;</any></any></any></any>

    &#xA;

    Is there a way to improve the fetching of the video to be consistently fast across all executions ?

    &#xA;

  • How to use nodejs to generate m3u8 file ?

    13 février 2024, par qiaoshouzi

    How can I generate an m3u8 file ?

    &#xA;

    I want to use Node.js to generate an m3u8 file, but not by directly using the ffmpeg command (ffmpeg -i xxx -f hls index.m3u8).

    &#xA;

    Even when I add the -hls_time 10 parameter, I've noticed that the duration of each segment in the m3u8 file generated by ffmpeg is not consistently 10 seconds, so I can't simply write #EXTINF:10.

    &#xA;

    From my research, it seems this inconsistency is related to I-frames. I've attempted to use ffprobe to retrieve the I-frames of the video, but I haven't received any output data.

    &#xA;

    ffprobe -v error -skip_frame nokey -select_streams v:0 -show_entries frame=pkt_pts_time -of csv=print_section=0 xxx.mkv

    &#xA;

    I'm using a .mkv file and would appreciate some assistance.

    &#xA;