Recherche avancée

Médias (0)

Mot : - Tags -/tags

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

Autres articles (44)

  • Les formats acceptés

    28 janvier 2010, par

    Les commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
    ffmpeg -codecs ffmpeg -formats
    Les format videos acceptés en entrée
    Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
    Les formats vidéos de sortie possibles
    Dans un premier temps on (...)

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

  • 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

Sur d’autres sites (6567)

  • Merge file without data loss using FFmpeg inside of WASM

    9 septembre 2023, par Deji

    Edit : I'm rewriting this entire question

    


    Goal : To reconstruct a video from its pieces/chunks from a network stream inside of an @ffmpeg/ffmpeg worker

    


    Problems :

    


      

    1. Video chunks/pieces which come after the first piece/chunk are reported by @ffmpeg/ffmpeg to have invalid data, as seen in the log below :
    2. 


    


    {
  "type": "stderr",
  "message": "video-0_chunk-1.part: Invalid data found when processing input"
}


    


      

    1. How would I merge these chunks/pieces to reconstruct the full video using @ffmpeg/ffmpeg (after solving the first issue above)
    2. 


    


    My current code situation :

    


      

    1. For merging the video pieces
    2. 


    


    const constructFile = async (chunks: Uint8Array[], queueId: number) => {
  await Promise.all(
    chunks.map(async (chunk, index) => {
      const chunkFile = `video-${queueId}_chunk-${index}`;
      await ffmpeg.writeFile(chunkFile, chunk);

      // Return information about newly created file
      ffmpeg.exec(["-i", chunkFile]);
    })
  );
};


    


    I'm reading the logs/output for

    


    ffmpeg.exec(['-i', chunkFile])


    


    using

    


    ffmpeg.on('log', (log) => console.log(log))


    


      

    1. For fetching the videos using streams
    2. 


    


    await useFetch(Capacitor.convertFileSrc(file.path), {
  responseType: "stream",

  onResponse: async ({ response }) => {
    if (response.body) {
      const reader = response.body.getReader();

      while (true) {
        const { done, value } = await reader.read();

        if (done) break;
        file.chunks.push(value);
      }
      reader.releaseLock();
    }
  },
});


    


    Note : file.chunks is linked to a reactive value which is passed to constructFile() when initialized

    


    These are the logs I get from the code currently above :

    


    chunk-4OF65L5M.js:2710 <suspense> is an experimental feature and its API will likely change.&#xA;(index):298 native App.addListener (#25407936)&#xA;(index):298 native FilePicker.pickVideos (#25407937)&#xA;(index):272 result FilePicker.pickVideos (#25407937)&#xA;(index):298 native VideoEditor.thumbnail (#25407938)&#xA;(index):272 result VideoEditor.thumbnail (#25407938)&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;ffmpeg version 5.1.3 Copyright (c) 2000-2022 the FFmpeg developers&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  built with emcc (Emscripten gcc/clang-like repla…3.1.40 (5c27e79dd0a9c4e27ef2326841698cdd4f6b5784)&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  configuration: --target-os=none --arch=x86_32 --…e-libfreetype --enable-libfribidi --enable-libass&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libavutil      57. 28.100 / 57. 28.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libavcodec     59. 37.100 / 59. 37.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libavformat    59. 27.100 / 59. 27.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libavdevice    59.  7.100 / 59.  7.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libavfilter     8. 44.100 /  8. 44.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libswscale      6.  7.100 /  6.  7.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libswresample   4.  7.100 /  4.  7.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libpostproc    56.  6.100 / 56.  6.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: "Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;video-0_chunk-0&#x27;:"}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  Metadata:&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;    major_brand     : mp42&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;    minor_version   : 0&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;    compatible_brands: isommp42&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;    creation_time   : 2022-11-29T14:46:32.000000Z&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  Duration: 00:00:51.50, start: 0.000000, bitrate: 81 kb/s&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  Stream #0:0[0x1](und): Video: h264 (High) (avc1 …6], 259 kb/s, 30 fps, 30 tbr, 15360 tbn (default)&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;    Metadata:&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;      creation_time   : 2022-11-29T14:46:32.000000Z&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;      handler_name    : ISO Media file produced by Google Inc. Created on: 11/29/2022.&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;      vendor_id       : [0][0][0][0]&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0…706D), 44100 Hz, stereo, fltp, 127 kb/s (default)&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;    Metadata:&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;      creation_time   : 2022-11-29T14:46:32.000000Z&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;      handler_name    : ISO Media file produced by Google Inc. Created on: 11/29/2022.&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;      vendor_id       : [0][0][0][0]&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;At least one output file must be specified&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;Aborted()&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;ffmpeg version 5.1.3 Copyright (c) 2000-2022 the FFmpeg developers&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  built with emcc (Emscripten gcc/clang-like repla…3.1.40 (5c27e79dd0a9c4e27ef2326841698cdd4f6b5784)&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  configuration: --target-os=none --arch=x86_32 --…e-libfreetype --enable-libfribidi --enable-libass&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libavutil      57. 28.100 / 57. 28.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libavcodec     59. 37.100 / 59. 37.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libavformat    59. 27.100 / 59. 27.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libavdevice    59.  7.100 / 59.  7.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libavfilter     8. 44.100 /  8. 44.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libswscale      6.  7.100 /  6.  7.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libswresample   4.  7.100 /  4.  7.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libpostproc    56.  6.100 / 56.  6.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;video-0_chunk-1: Invalid data found when processing input&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;Aborted()&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;ffmpeg version 5.1.3 Copyright (c) 2000-2022 the FFmpeg developers&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  built with emcc (Emscripten gcc/clang-like repla…3.1.40 (5c27e79dd0a9c4e27ef2326841698cdd4f6b5784)&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  configuration: --target-os=none --arch=x86_32 --…e-libfreetype --enable-libfribidi --enable-libass&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libavutil      57. 28.100 / 57. 28.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libavcodec     59. 37.100 / 59. 37.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libavformat    59. 27.100 / 59. 27.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libavdevice    59.  7.100 / 59.  7.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libavfilter     8. 44.100 /  8. 44.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libswscale      6.  7.100 /  6.  7.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libswresample   4.  7.100 /  4.  7.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libpostproc    56.  6.100 / 56.  6.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;video-0_chunk-2: Invalid data found when processing input&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;Aborted()&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;ffmpeg version 5.1.3 Copyright (c) 2000-2022 the FFmpeg developers&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  built with emcc (Emscripten gcc/clang-like repla…3.1.40 (5c27e79dd0a9c4e27ef2326841698cdd4f6b5784)&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  configuration: --target-os=none --arch=x86_32 --…e-libfreetype --enable-libfribidi --enable-libass&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libavutil      57. 28.100 / 57. 28.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libavcodec     59. 37.100 / 59. 37.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libavformat    59. 27.100 / 59. 27.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libavdevice    59.  7.100 / 59.  7.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libavfilter     8. 44.100 /  8. 44.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libswscale      6.  7.100 /  6.  7.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libswresample   4.  7.100 /  4.  7.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libpostproc    56.  6.100 / 56.  6.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;video-0_chunk-3: Invalid data found when processing input&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;Aborted()&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;ffmpeg version 5.1.3 Copyright (c) 2000-2022 the FFmpeg developers&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  built with emcc (Emscripten gcc/clang-like repla…3.1.40 (5c27e79dd0a9c4e27ef2326841698cdd4f6b5784)&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  configuration: --target-os=none --arch=x86_32 --…e-libfreetype --enable-libfribidi --enable-libass&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libavutil      57. 28.100 / 57. 28.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libavcodec     59. 37.100 / 59. 37.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libavformat    59. 27.100 / 59. 27.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libavdevice    59.  7.100 / 59.  7.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libavfilter     8. 44.100 /  8. 44.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libswscale      6.  7.100 /  6.  7.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libswresample   4.  7.100 /  4.  7.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libpostproc    56.  6.100 / 56.  6.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;video-0_chunk-4: Invalid data found when processing input&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;Aborted()&#x27;}&#xA;</suspense>

    &#xA;

    Notes :

    &#xA;

      &#xA;
    1. The sections which start with Processing.vue come from the logging system I've setup.
    2. &#xA;

    3. The pieces/chunks gotten from the network where stored in exactly the same order in which they came
    4. &#xA;

    5. If you've seen the old question, the ReferenceError happens as a result of HMR by Vite&#xA;
        &#xA;
      1. Similar to this, some logs were repeated twice because I was actively changing some things and the component had to rerun from the start
      2. &#xA;

      &#xA;

    6. &#xA;

    &#xA;

    Summary : If my problem is still not clear, you could provide another way of fetching a large file (video) from a network, loading the file into memory and passing the file data to @ffmpeg/ffmpeg for further processing

    &#xA;

  • ffmpeg - allow to create empty aac file

    27 juillet 2023, par user11149927

    I have two commands :

    &#xA;

    ffmpeg -y -i file.mp4 -vn -acodec copy file.aac&#xA;

    &#xA;

    and then :

    &#xA;

    ffmpeg -y -i file.mp4 -i file.aac -c:v copy -c:a aac new-file.mp4&#xA;

    &#xA;

    The first command throw error when the video has no audio :

    &#xA;

    Output file does not contain any stream&#xA;

    &#xA;

    I would like to change first command to allow create empty aac file (maybe silent audio) when video has no audio. Or maybe exists better solution ?

    &#xA;

  • Are there any alternatives to SharedArrayBuffer, or methods for video editing in a web browser ?

    26 juillet 2023, par Govinda Regmi

    I'm working on a web-based video editing application using ffmeg that heavily relies on SharedArrayBuffer. Unfortunately, I've encountered a roadblock with the "Cross-Origin-Embedder-Policy : require-corp | credentialless" and "Cross-Origin-Opener-Policy : same-origin" headers. While these headers allow the usage of SharedArrayBuffer, they restrict other essential features, such as rendering images from an s3 bucket and script of TinyMce text editor.

    &#xA;

    I am trying to achieve&#xA;video editor like this

    &#xA;

    I am using "next" : "12.1.6" and&#xA;I tried to implement ffmeg like this :

    &#xA;

    import { useEffect, useState } from "react";&#xA;&#xA;import { useDebounce } from "use-debounce";&#xA;import { createFFmpeg, fetchFile } from "@ffmpeg/ffmpeg";&#xA;&#xA;import styles from "../videoEditor.module.scss";&#xA;import RangeInput from "../range-input/RangeInput";&#xA;import * as helpers from "../../../../utils/videoHelpers";&#xA;&#xA;const FF = createFFmpeg({&#xA;    log: true,&#xA;    corePath: "https://unpkg.com/@ffmpeg/core@0.10.0/dist/ffmpeg-core.js",&#xA;});&#xA;&#xA;(async function () {&#xA;    await FF.load();&#xA;})();&#xA;&#xA;export const VideoTrimmer = ({&#xA;    videoFile,&#xA;    trimmedVideoFile,&#xA;    isConfirmClicked,&#xA;    setTrimmedVideoFile,&#xA;    onConfirmClickHandler,&#xA;}) => {&#xA;    const [URL, setURL] = useState([]);&#xA;    const [thumbNails, setThumbNails] = useState([]);&#xA;    const [videoMeta, setVideoMeta] = useState(null);&#xA;    const [inputVideoFile, setInputVideoFile] = useState(null);&#xA;    const [thumbnailIsProcessing, setThumbnailIsProcessing] = useState(false);&#xA;&#xA;    const [rStart, setRstart] = useState(0);&#xA;    const [debouncedRstart] = useDebounce(rStart, 500);&#xA;&#xA;    const [rEnd, setRend] = useState(10);&#xA;    const [debouncedRend] = useDebounce(rEnd, 500);&#xA;&#xA;    const handleLoadedData = async (e) => {&#xA;        const el = e.target;&#xA;        const meta = {&#xA;            name: inputVideoFile.name,&#xA;            duration: el.duration,&#xA;            videoWidth: 50,&#xA;            videoHeight: 50,&#xA;        };&#xA;        setVideoMeta(meta);&#xA;        const thumbNails = await getThumbnails(meta);&#xA;        setThumbNails(thumbNails);&#xA;    };&#xA;&#xA;    const getThumbnails = async ({ duration }) => {&#xA;        if (!FF.isLoaded()) await FF.load();&#xA;        setThumbnailIsProcessing(true);&#xA;        let MAX_NUMBER_OF_IMAGES = 15;&#xA;        let NUMBER_OF_IMAGES = duration &lt; MAX_NUMBER_OF_IMAGES ? duration : 15;&#xA;        let offset =&#xA;            duration === MAX_NUMBER_OF_IMAGES ? 1 : duration / NUMBER_OF_IMAGES;&#xA;&#xA;        const arrayOfImageURIs = [];&#xA;        FF.FS("writeFile", inputVideoFile.name, await fetchFile(inputVideoFile));&#xA;&#xA;        for (let i = 0; i &lt; NUMBER_OF_IMAGES; i&#x2B;&#x2B;) {&#xA;            let startTimeInSecs = helpers.toTimeString(Math.round(i * offset));&#xA;&#xA;            try {&#xA;                await FF.run(&#xA;                    "-ss",&#xA;                    startTimeInSecs,&#xA;                    "-i",&#xA;                    inputVideoFile.name,&#xA;                    "-t",&#xA;                    "00:00:1.000",&#xA;                    "-vf",&#xA;                    `scale=150:-1`,&#xA;                    `img${i}.png`,&#xA;                );&#xA;                const data = FF.FS("readFile", `img${i}.png`);&#xA;&#xA;                let blob = new Blob([data.buffer], { type: "image/png" });&#xA;                let dataURI = await helpers.readFileAsBase64(blob);&#xA;                FF.FS("unlink", `img${i}.png`);&#xA;                arrayOfImageURIs.push(dataURI);&#xA;            } catch (error) {&#xA;                // console.log({ message: error });&#xA;            }&#xA;        }&#xA;        setThumbnailIsProcessing(false);&#xA;&#xA;        return arrayOfImageURIs;&#xA;    };&#xA;    const handleTrim = async () => {&#xA;        // setTrimIsProcessing(true);&#xA;        let startTime = ((rStart / 100) * videoMeta.duration).toFixed(2);&#xA;        let offset = ((rEnd / 100) * videoMeta.duration - startTime).toFixed(2);&#xA;        try {&#xA;            FF.FS("writeFile", inputVideoFile.name, await fetchFile(inputVideoFile));&#xA;            await FF.run(&#xA;                "-ss",&#xA;                helpers.toTimeString(startTime),&#xA;                "-i",&#xA;                inputVideoFile.name,&#xA;                "-t",&#xA;                helpers.toTimeString(offset),&#xA;                "-c",&#xA;                "copy",&#xA;                "ping.mp4",&#xA;            );&#xA;            const data = FF.FS("readFile", "ping.mp4");&#xA;            const dataURL = await helpers.readFileAsBase64(&#xA;                new Blob([data.buffer], { type: "video/mp4" }),&#xA;            );&#xA;&#xA;            setTrimmedVideoFile(dataURL);&#xA;        } catch (error) {&#xA;            // console.log(error);&#xA;        } finally {&#xA;            // setTrimIsProcessing(false);&#xA;        }&#xA;    };&#xA;&#xA;    const handleRangeChange = (type, event) => {&#xA;        const limit = parseInt((120 / videoMeta.duration) * 100);&#xA;        if (type === "start") {&#xA;            if (rEnd - rStart > limit) {&#xA;                setRend(parseInt(event.target.value) &#x2B; limit);&#xA;                setRstart(parseInt(event.target.value));&#xA;            } else {&#xA;                setRstart(parseInt(event.target.value));&#xA;            }&#xA;        } else if (type === "end") {&#xA;            if (rEnd - rStart > limit) {&#xA;                setRstart(parseInt(event.target.value) - limit);&#xA;                setRend(parseInt(event.target.value));&#xA;            } else {&#xA;                setRend(parseInt(event.target.value));&#xA;            }&#xA;        }&#xA;    };&#xA;&#xA;    useEffect(() => {&#xA;        if (videoMeta?.duration > 120) {&#xA;            const limit = parseInt((120 / videoMeta.duration) * 100);&#xA;            setRend(limit);&#xA;        }&#xA;    }, [videoMeta?.duration]);&#xA;&#xA;    useEffect(() => {&#xA;        const videoFormData = new FormData();&#xA;        if (videoFile) {&#xA;            videoFormData.append("file", videoFile);&#xA;            const handleChange = async () => {&#xA;                setInputVideoFile(videoFile);&#xA;                setURL(await helpers.readFileAsBase64(videoFile));&#xA;            };&#xA;            handleChange();&#xA;        }&#xA;    }, []);&#xA;&#xA;    useEffect(() => {&#xA;        if (videoMeta) {&#xA;            onConfirmClickHandler(handleTrim);&#xA;        }&#xA;    }, [isConfirmClicked]);&#xA;&#xA;    useEffect(() => {&#xA;        if (debouncedRend == rEnd &amp;&amp; debouncedRstart == rStart &amp;&amp; videoMeta) {&#xA;            handleTrim();&#xA;        }&#xA;    }, [debouncedRend, debouncedRstart, videoMeta]);&#xA;&#xA;    return (&#xA;        &lt;>&#xA;            <article classname="grid_txt_2">&#xA;                &#xA;                    {trimmedVideoFile ? (&#xA;                        &#xA;                    ) : (&#xA;                        &#xA;                    )}&#xA;                &#xA;            </article>&#xA;            &#xA;        >&#xA;    );&#xA;};&#xA;

    &#xA;

    next.config.js

    &#xA;

    const nextConfig = {&#xA;    async headers() {&#xA;        return [&#xA;            {&#xA;                source: "/(.*)",&#xA;                headers: [&#xA;                    { key: "Cross-Origin-Opener-Policy", value: "same-origin" },&#xA;                    { key: "Cross-Origin-Embedder-Policy", value: "credentialless" },&#xA;                ],&#xA;            },&#xA;        ];&#xA;    },&#xA;    &#xA;};&#xA;

    &#xA;

    This works seamlessly in Chrome and Edge, but it encounter issues (SharedArrayBuffer is not defined) in Firefox and Safari. How can we ensure it functions impeccably across all major browsers ?

    &#xA;

    When utilizing key : "Cross-Origin-Embedder-Policy", value : "require-corp" , I encounter an error while fetching images/scripts from cross-origin sources, resulting in "net::ERR_BLOCKED_BY_RESPONSE.NotSameOriginAfterDefaultedToSameOriginByCoep 200 (OK)". Cany you suggest me how can I resolve this issue ?

    &#xA;