Recherche avancée

Médias (0)

Mot : - Tags -/flash

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

Autres articles (25)

  • Installation en mode ferme

    4 février 2011, par

    Le mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
    C’est la méthode que nous utilisons sur cette même plateforme.
    L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
    Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...)

  • 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

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

Sur d’autres sites (4907)

  • Download m3u8 segments with ffmpeg without writing the .ts files to disk

    22 avril 2021, par O R

    I am trying to download m3u8 segments from an HLS live stream with ffmpeg without writing the .ts files to disk. I intend to run opencv on the image data in real time. Here is what I have tried, but I am only able to get one segment at a time and don't know how to just keep it in memory without writing to disk. When inspecting the network requests using developer tools on the Twitch site, I see the m3u8's arriving in real time, although, these don't work in the script. I have to refresh the page and get the URL of the first request that arrives, which is a URL not ending in .m3u8 (the one i'm using in the script)

    


    import requests
import m3u8

url = 'https://usher.ttvnw.net/api/channel/hls/gernaderjake.m3u8?allow_source=true&fast_bread=true&p=4466372&play_session_id=d66db58de3bf6be70a5f5824bbb72763&player_backend=mediaplayer&playlist_include_framerate=true&reassignments_supported=true&sig=2b97079328898fdae56b041616be6fc7b01bd13c&supported_codecs=avc1&token=%7B%22adblock%22%3Afalse%2C%22authorization%22%3A%7B%22forbidden%22%3Afalse%2C%22reason%22%3A%22%22%7D%2C%22blackout_enabled%22%3Afalse%2C%22channel%22%3A%22gernaderjake%22%2C%22channel_id%22%3A1423946%2C%22chansub%22%3A%7B%22restricted_bitrates%22%3A%5B%5D%2C%22view_until%22%3A1924905600%7D%2C%22ci_gb%22%3Afalse%2C%22geoblock_reason%22%3A%22%22%2C%22device_id%22%3A%22ec6cb1f95615ed0b%22%2C%22expires%22%3A1618772589%2C%22extended_history_allowed%22%3Afalse%2C%22game%22%3A%22%22%2C%22hide_ads%22%3Afalse%2C%22https_required%22%3Atrue%2C%22mature%22%3Afalse%2C%22partner%22%3Afalse%2C%22platform%22%3A%22web%22%2C%22player_type%22%3A%22site%22%2C%22private%22%3A%7B%22allowed_to_view%22%3Atrue%7D%2C%22privileged%22%3Afalse%2C%22role%22%3A%22%22%2C%22server_ads%22%3Afalse%2C%22show_ads%22%3Atrue%2C%22subscriber%22%3Afalse%2C%22turbo%22%3Afalse%2C%22user_id%22%3Anull%2C%22user_ip%22%3A%22173.22.40.125%22%2C%22version%22%3A2%7D&cdm=wv&player_version=1.3.0'

r = requests.get(url)

m3u8_master = m3u8.loads(r.text)

playlist_url = m3u8_master.data['playlists'][0]['uri']

r = requests.get(playlist_url)

playlist = m3u8.loads(r.text)

playlist.data['segments'][0]['uri']

r = requests.get(playlist.data['segments'][0]['uri'])

with open('video.ts', 'wb') as f:
    for segment in playlist.data['segments']:
        url = segment['uri']
        r = requests.get(url)
        f.write(r.content)


    


  • How to fix ffmpeg,js length error in react-js project | fix error in react project

    19 février 2024, par X3R0

    I've tried to import the ffmpeg js library into my react-typescript project, I can't really update my project's react version or react-scripts due to the current code base.

    


    Error

    


    ./node_modules/@ffmpeg/ffmpeg/dist/umd/ffmpeg.js
TypeError: REDACTED_PROJECT_ROOT\node_modules\@ffmpeg\ffmpeg\dist\umd\ffmpeg.js: Cannot read properties of undefined (reading 'length')


    


    Code

    


    import React, { useEffect, useRef, useState } from 'react';
import { FFmpeg } from '@ffmpeg/ffmpeg';

/* MORE CODE HERE */

const ffmpeg = new FFmpeg();
const baseURL = 'https://unpkg.com/@ffmpeg/core@0.12.6/dist/umd';
const coreURL = `${baseURL}/ffmpeg-core.js`;
const wasmURL = `${baseURL}/ffmpeg-core.wasm`;
const coreData = await fromURLToBlob(coreURL);
const wasmData = await fromURLToBlob(wasmURL);
const coreBlob = new Blob([coreData], { type: "text/javascript"});
const wasmBlob = new Blob([wasmData], { type: "application/wasm"});
await ffmpeg.load({
    coreURL: fromBlobToURL(coreBlob),
    wasmURL: fromBlobToURL(wasmBlob),
});       

/* MORE CODE HERE */


    


    Versions

    


    npm v8.19.4
node v16.20.2


    


    tsconfig.json

    


    {
  "compilerOptions": {
    "target": "es5",
    "lib": [
      "dom",
      "dom.iterable",
      "esnext"
    ],
    "allowJs": true,
    "skipLibCheck": true,
    "esModuleInterop": true,
    "allowSyntheticDefaultImports": true,
    "strict": false,
    "forceConsistentCasingInFileNames": true,
    "noFallthroughCasesInSwitch": true,
    "module": "esnext",
    "moduleResolution": "node",
    "resolveJsonModule": true,
    "isolatedModules": true,
    "noEmit": true,
    "jsx": "react-jsx"
  },
  "include": [
    "src"
  ]
}



    


    package.json

    


    {
  "name": "frontend",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "@emotion/react": "^11.10.4",
    "@emotion/styled": "^11.10.4",
    "@ffmpeg/ffmpeg": "^0.12.10",
    "@material-ui/core": "^4.12.3",
    "@mui/base": "^5.0.0-beta.36",
    "@mui/icons-material": "^5.10.3",
    "@mui/material": "^5.15.10",
    "@mui/x-data-grid": "^6.19.2",
    "@mui/x-data-grid-pro": "^6.19.2",
    "@reduxjs/toolkit": "^1.8.5",
    "@testing-library/jest-dom": "^5.14.1",
    "@testing-library/react": "^11.2.7",
    "@testing-library/user-event": "^12.8.3",
    "@toast-ui/editor": "^3.1.3",
    "@toast-ui/react-editor": "^3.1.3",
    "@types/jest": "^29.0.1",
    "@types/node": "^18.7.17",
    "@types/react": "^17.0.49",
    "@types/react-dom": "^18.0.6",
    "@zalando/oauth2-client-js": "^0.0.18",
    "ajv": "^8.12.0",
    "ajv-errors": "^3.0.0",
    "apexcharts": "^3.28.1",
    "arraybuffer-concat": "^0.0.1",
    "axios": "^1.4.0",
    "base64-blob": "^1.4.1",
    "bootstrap": "^5.1.1",
    "datetime-diff": "^0.2.1",
    "fuzzy-time": "^1.0.7",
    "jquery": "^3.6.0",
    "jso": "^4.1.1",
    "luxon": "^2.3.0",
    "pretty-bytes": "^5.6.0",
    "react": "^17.0.2",
    "react-apexcharts": "^1.3.9",
    "react-beautiful-dnd": "^13.1.0",
    "react-bootstrap": "^2.0.0-rc.0",
    "react-dom": "^17.0.2",
    "react-export-excel": "^0.5.3",
    "react-facebook": "^9.0.12",
    "react-helmet": "^6.1.0",
    "react-icons": "^4.3.1",
    "react-media-recorder": "^1.6.6",
    "react-notifications": "^1.7.2",
    "react-pages": "^0.4.4",
    "react-redux": "^7.2.8",
    "react-router": "^5.2.1",
    "react-router-dom": "^5.2.1",
    "react-scripts": "4.0.3",
    "react-toastify": "^8.0.2",
    "react-tooltip": "^4.2.21",
    "react-webcam": "^6.0.0",
    "recharts": "^2.1.8",
    "redux": "^4.2.0",
    "redux-thunk": "^2.4.1",
    "typescript": "^4.8.3",
    "web-vitals": "^1.1.2",
    "website-popup": "^3.0.0"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "set NODE_OPTIONS=--max-old-space-size=4096 && react-scripts build --GENERATE_SOURCEMAP=false",
    "test": "react-scripts test",
    "eject": "react-scripts eject"
  },
  "eslintConfig": {
    "extends": [
      "react-app"
    ]
  },
  "browserslist": {
    "production": [
      ">0.2%",
      "not dead",
      "not op_mini all"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  },
  "devDependencies": {
    "@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6"
  }
}



    


  • How to determine when FFmpeg process completes

    18 avril 2017, par ajbeaven
    var origFilePath = "C:/MyOriginalFile.webm";
    var processedFilePath = "C:/MyProcessedFile.webm";

    RunFfmpeg($"-i \"{origFilePath}\" -af \"silenceremove=1:0.1:0.001, areverse, silenceremove=1:0.1:0.001, areverse\" \"{processedFilePath}\" -y");

    // fails with IOException as the file presumably not been released by FFmpeg
    System.IO.File.Delete(origFilePath);

    When the file is deleted, the following exception is frequently (maybe 80% of the time) thrown :

    IOException : The process cannot access the file ’C :\MyOriginalFile.webm’ because it is being used by another process.

    The call to create and run the FFmpeg process goes like this :

    private List<string> RunFfmpeg(string arguments)
    {
       using (var process = new Process())
       {
           process.StartInfo.RedirectStandardOutput = true;
           process.StartInfo.RedirectStandardError = true;
           process.StartInfo.FileName = _hostingEnvironment.ContentRootPath + _settings.FfmpegPath;
           process.StartInfo.Arguments = arguments;
           process.StartInfo.UseShellExecute = false;
           process.StartInfo.CreateNoWindow = true;

           // ffmpeg only uses strerr for its output
           var output = new List<string>();
           process.ErrorDataReceived += new DataReceivedEventHandler((s, e) => {
               if (e.Data != null)
                   output.Add(e.Data);
           });

           process.Start();
           process.BeginErrorReadLine();
           process.WaitForExit();
           return output;
       }
    }
    </string></string>

    It appears that even though the process has completed when the file is deleted, FFmpeg is still processing or has otherwise not released it.

    Is this behaviour expected ? How do I go about ensuring that FFmpeg has finished processing the files before continuing ?