Recherche avancée

Médias (0)

Mot : - Tags -/xmlrpc

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

Autres articles (106)

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

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

Sur d’autres sites (14106)

  • Pims.open Throws "UnkownFormat Error" with "Invalid Argument" On One Machine But Not on Another

    12 août 2021, par KaceBellamy

    I'm trying to do some video processing for a physics experiment, and I want to do it on my much more powerful Windows desktop computer as opposed to my Mac laptop.

    


    The following code works like a dream when run as a Jupyter notebook on my Mac :

    


    import matplotlib as mpl
from mpl_toolkits import mplot3d
import pims
import trackpy as tp 

@pims.pipeline
def gray(image):
    return image[:, :, 1]  # Take just the green channel

frames = gray(pims.open('output.mp4'))


    


    but on my Windows machine I get this error :

    


    ---------------------------------------------------------------------------&#xA;UnknownFormatError                        Traceback (most recent call last)&#xA;~\AppData\Local\Temp/ipykernel_12152/704954007.py in <module>&#xA;      1 #Actually converts the video. Might be VERY processor intensive... or not?&#xA;----> 2 frames = gray(pims.open(&#x27;output.mp4&#x27;)) #Make the File Name whatever file you like!&#xA;&#xA;~\miniconda3\lib\site-packages\pims\api.py in open(sequence, **kwargs)&#xA;    207             warn(message)&#xA;    208             exceptions &#x2B;= message &#x2B; &#x27;\n&#x27;&#xA;--> 209     raise UnknownFormatError("All handlers returned exceptions:\n" &#x2B; exceptions)&#xA;    210 &#xA;    211 &#xA;&#xA;UnknownFormatError: All handlers returned exceptions:&#xA;<class> errored: [Errno 22] Invalid argument: &#x27;output.mp4&#x27;&#xA;<class> errored: [Errno 22] Invalid argument: &#x27;output.mp4&#x27;&#xA;<class> errored: Could not load meta information&#xA;=== stderr ===&#xA;&#xA;ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers&#xA;  built with gcc 9.2.1 (GCC) 20200122&#xA;  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt&#xA;  libavutil      56. 31.100 / 56. 31.100&#xA;  libavcodec     58. 54.100 / 58. 54.100&#xA;  libavformat    58. 29.100 / 58. 29.100&#xA;  libavdevice    58.  8.100 / 58.  8.100&#xA;  libavfilter     7. 57.100 /  7. 57.100&#xA;  libswscale      5.  5.100 /  5.  5.100&#xA;  libswresample   3.  5.100 /  3.  5.100&#xA;  libpostproc    55.  5.100 / 55.  5.100&#xA;C:\Users\Callum\OneDrive - The University of Chicago\output.mp4: Invalid argument&#xA;<class> errored: MoviePy error: failed to read the duration of file output.mp4.&#xA;Here are the file infos returned by ffmpeg:&#xA;&#xA;ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers&#xA;  built with gcc 9.2.1 (GCC) 20200122&#xA;  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt&#xA;  libavutil      56. 31.100 / 56. 31.100&#xA;  libavcodec     58. 54.100 / 58. 54.100&#xA;  libavformat    58. 29.100 / 58. 29.100&#xA;  libavdevice    58.  8.100 / 58.  8.100&#xA;  libavfilter     7. 57.100 /  7. 57.100&#xA;  libswscale      5.  5.100 /  5.  5.100&#xA;  libswresample   3.  5.100 /  3.  5.100&#xA;  libpostproc    55.  5.100 / 55.  5.100&#xA;output.mp4: Invalid argument&#xA;</class></class></class></class></module>

    &#xA;

    output.mp4 is just a run of the mill video file taken on a CCD camera ; I've tried converting it to a .MOV, I've tried other video files taken on different cameras, and I've tried running the file through FFmpeg to impose a 30 fps framerate ; everything I've tried works fine on my Mac and throws the above error on my Windows machine.

    &#xA;

    For reference, I installed necessary packages for this code on both machines this morning, so it should all be up to date and the same on both.

    &#xA;

    Any ideas as to what's up ? Thanks !

    &#xA;

  • How to live video stream using node API(Read file with chunk logic)

    28 septembre 2023, par Mukesh Singh Thakur

    I want to make a live video streaming API and send the video buffer chunk data to an HTML.&#xA;I am using rtsp URL.&#xA;The chunk logic does not work. The video only plays for 5 seconds then stops.

    &#xA;

    index.js file

    &#xA;

    const express = require(&#x27;express&#x27;);&#xA;const ffmpeg = require(&#x27;fluent-ffmpeg&#x27;);&#xA;const fs = require(&#x27;fs&#x27;);&#xA;const path = require(&#x27;path&#x27;);&#xA;&#xA;const app = express();&#xA;const port = 3000;&#xA;&#xA;app.get(&#x27;/&#x27;, (req, res) => {&#xA;  res.sendFile(__dirname &#x2B; "/index.html");&#xA;});&#xA;&#xA;const rtspUrl = &#x27;rtsp://zephyr.rtsp.stream/movie?streamKey=64fd08123635440e7adc17ba31de2036&#x27;;&#xA;const chunkDuration = 5; // Duration of each chunk in seconds&#xA;&#xA;&#xA;app.get(&#x27;/video&#x27;, (req, res) => {&#xA;  const outputDirectory = path.join(__dirname, &#x27;chunks&#x27;);&#xA;  if (!fs.existsSync(outputDirectory)) {&#xA;    fs.mkdirSync(outputDirectory);&#xA;  }&#xA;&#xA;  const startTime = new Date().getTime();&#xA;  const outputFileName = `chunk_${startTime}.mp4`;&#xA;  const outputFilePath = path.join(outputDirectory, outputFileName);&#xA;&#xA;  const command = ffmpeg(rtspUrl)&#xA;    .inputFormat(&#x27;rtsp&#x27;)&#xA;    // .inputOptions([&#x27;-rtsp_transport tcp&#x27;])&#xA;    .videoCodec(&#x27;copy&#x27;)&#xA;    .output(outputFilePath)&#xA;    .duration(chunkDuration)&#xA;    .on(&#x27;start&#x27;, () => {&#xA;      console.log(`start ${outputFileName}`);&#xA;    })&#xA;    .on(&#x27;end&#x27;, () => {&#xA;      console.log(`Chunk ${outputFileName} saved`);&#xA;      res.setHeader(&#x27;Content-Type&#x27;, &#x27;video/mp4&#x27;);&#xA;      res.sendFile(outputFilePath, (err) => {&#xA;        if (err) {&#xA;          console.error(&#x27;Error sending file:&#x27;, err);&#xA;        } else {&#xA;          fs.unlinkSync(outputFilePath); // Delete the chunk after it&#x27;s sent&#xA;        }&#xA;      });&#xA;    })&#xA;    .on(&#x27;error&#x27;, (error) => {&#xA;      console.error(&#x27;Error: &#x27;, error);&#xA;    });&#xA;&#xA;  command.run();&#xA;});&#xA;&#xA;app.listen(port, () => {&#xA;  console.log(`API server is running on port ${port}`);&#xA;});&#xA;

    &#xA;

    index.html

    &#xA;

    &#xA;&#xA;&#xA;&#xA;  &#xA;  &#xA;  &#xA;  &#xA;&#xA;&#xA;&#xA;  <video width="50%" controls="controls" autoplay="autoplay">&#xA;    <source src="/video" type="video/mp4"></source>&#xA;    Your browser does not support the video tag.&#xA;  </video>&#xA;&#xA;&#xA;&#xA;

    &#xA;

    package.json

    &#xA;

    {&#xA;.....&#xA;  "scripts": {&#xA;    "test": "echo \"Error: no test specified\" &amp;&amp; exit 1",&#xA;    "start": "nodemon index.js"&#xA;  },&#xA;.....&#xA;}&#xA;

    &#xA;

  • How to live video stream using node API (Read file with chunk logic)

    28 septembre 2023, par Mukesh Singh Thakur

    I want to make a live video streaming API and send the video buffer chunk data to an HTML.&#xA;I am using rtsp URL.&#xA;The chunk logic does not work. The video only plays for 5 seconds then stops.

    &#xA;

    index.js file

    &#xA;

    const express = require(&#x27;express&#x27;);&#xA;const ffmpeg = require(&#x27;fluent-ffmpeg&#x27;);&#xA;const fs = require(&#x27;fs&#x27;);&#xA;const path = require(&#x27;path&#x27;);&#xA;&#xA;const app = express();&#xA;const port = 3000;&#xA;&#xA;app.get(&#x27;/&#x27;, (req, res) => {&#xA;  res.sendFile(__dirname &#x2B; "/index.html");&#xA;});&#xA;&#xA;const rtspUrl = &#x27;rtsp://zephyr.rtsp.stream/movie?streamKey=64fd08123635440e7adc17ba31de2036&#x27;;&#xA;const chunkDuration = 5; // Duration of each chunk in seconds&#xA;&#xA;&#xA;app.get(&#x27;/video&#x27;, (req, res) => {&#xA;  const outputDirectory = path.join(__dirname, &#x27;chunks&#x27;);&#xA;  if (!fs.existsSync(outputDirectory)) {&#xA;    fs.mkdirSync(outputDirectory);&#xA;  }&#xA;&#xA;  const startTime = new Date().getTime();&#xA;  const outputFileName = `chunk_${startTime}.mp4`;&#xA;  const outputFilePath = path.join(outputDirectory, outputFileName);&#xA;&#xA;  const command = ffmpeg(rtspUrl)&#xA;    .inputFormat(&#x27;rtsp&#x27;)&#xA;    // .inputOptions([&#x27;-rtsp_transport tcp&#x27;])&#xA;    .videoCodec(&#x27;copy&#x27;)&#xA;    .output(outputFilePath)&#xA;    .duration(chunkDuration)&#xA;    .on(&#x27;start&#x27;, () => {&#xA;      console.log(`start ${outputFileName}`);&#xA;    })&#xA;    .on(&#x27;end&#x27;, () => {&#xA;      console.log(`Chunk ${outputFileName} saved`);&#xA;      res.setHeader(&#x27;Content-Type&#x27;, &#x27;video/mp4&#x27;);&#xA;      res.sendFile(outputFilePath, (err) => {&#xA;        if (err) {&#xA;          console.error(&#x27;Error sending file:&#x27;, err);&#xA;        } else {&#xA;          fs.unlinkSync(outputFilePath); // Delete the chunk after it&#x27;s sent&#xA;        }&#xA;      });&#xA;    })&#xA;    .on(&#x27;error&#x27;, (error) => {&#xA;      console.error(&#x27;Error: &#x27;, error);&#xA;    });&#xA;&#xA;  command.run();&#xA;});&#xA;&#xA;app.listen(port, () => {&#xA;  console.log(`API server is running on port ${port}`);&#xA;});&#xA;

    &#xA;

    index.html

    &#xA;

    &#xA;&#xA;&#xA;&#xA;  &#xA;  &#xA;  &#xA;  &#xA;&#xA;&#xA;&#xA;  <video width="50%" controls="controls" autoplay="autoplay">&#xA;    <source src="/video" type="video/mp4"></source>&#xA;    Your browser does not support the video tag.&#xA;  </video>&#xA;&#xA;&#xA;&#xA;

    &#xA;

    package.json

    &#xA;

    {&#xA;.....&#xA;  "scripts": {&#xA;    "test": "echo \"Error: no test specified\" &amp;&amp; exit 1",&#xA;    "start": "nodemon index.js"&#xA;  },&#xA;.....&#xA;}&#xA;

    &#xA;