Recherche avancée

Médias (1)

Mot : - Tags -/Rennes

Autres articles (35)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

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

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

Sur d’autres sites (7783)

  • Compressing a Video for HLS Streaming

    12 mars 2018, par jAndy

    I’m in the situation where I have a source file (very high quality, direct output from FCPX) which is in 1080p resolution.

    I use ffmpeg to create a 240, 360, 480 and 720 version to have an adaptive stream quality via HLS, so far so good. My question is about the strategy I’m using.
    Right now, I always use the original file as input for ffmpeg. I was wondering if it wouldn’t be a better idea to convert from 1080 to 720 with full compression algorithms and after that, just re-scale from 720 to 480, 360 and 240.

    I’m not really into video compression and ffmpeg, so I’d just like to hear some expert opinions on this approach. Is there any advantage to always go "all the way" (original file -> compressed/rescaled file) ?

  • Compress video using ffmpeg.js

    25 mai 2024, par John Mark

    I attempted to upload and compress a video using ffmpeg.js. However, it appears that this process is ineffective on modern browsers. I have already implemented console logging to verify if the video compression is occurring, yet thus far, no compression has been achieved. Could anyone suggest an alternative library for video compression that might better suit the requirements ?

    


    <template>&#xA;  <div>&#xA;    <input type="file" accept="video/*" />&#xA;    <video ref="video" controls="controls"></video>&#xA;  </div>&#xA;</template>&#xA;&#xA;<code class="echappe-js">&lt;script&gt;&amp;#xA;import { FFmpeg } from &amp;#x27;@ffmpeg/ffmpeg&amp;#x27;;&amp;#xA;&amp;#xA;export default {&amp;#xA;  methods: {&amp;#xA;    async handleFileInputChange(event) {&amp;#xA;      const file = event.target.files[0];&amp;#xA;      if (!file) return;&amp;#xA;&amp;#xA;      const video = this.$refs.video;&amp;#xA;      const url = URL.createObjectURL(file);&amp;#xA;      video.src = url;&amp;#xA;&amp;#xA;      const inputVideoPath = &amp;#x27;input.mp4&amp;#x27;;&amp;#xA;      const outputVideoPath = &amp;#x27;compressed_output.mp4&amp;#x27;;&amp;#xA;&amp;#xA;      console.log(&quot;Compressing video...&quot;);&amp;#xA;      await this.compressVideo(file, inputVideoPath, outputVideoPath);&amp;#xA;      console.log(&quot;Compression completed.&quot;);&amp;#xA;&amp;#xA;      video.src = URL.createObjectURL(await this.downloadFile(outputVideoPath));&amp;#xA;    },&amp;#xA;    async compressVideo(file, inputVideoPath, outputVideoPath) {&amp;#xA;      const ffmpeg = new FFmpeg();&amp;#xA;      await ffmpeg.load();&amp;#xA;&amp;#xA;      // Writing the input file to the FFmpeg file system&amp;#xA;      await ffmpeg.writeFile(inputVideoPath, file);&amp;#xA;&amp;#xA;      // Execute FFmpeg command for compression&amp;#xA;      await ffmpeg.exec([&amp;#x27;-i&amp;#x27;, inputVideoPath, &amp;#x27;-vcodec&amp;#x27;, &amp;#x27;libx264&amp;#x27;, &amp;#x27;-crf&amp;#x27;, &amp;#x27;28&amp;#x27;, outputVideoPath]);&amp;#xA;    },&amp;#xA;    async downloadFile(filePath) {&amp;#xA;      const ffmpeg = new FFmpeg();&amp;#xA;      await ffmpeg.load();&amp;#xA;&amp;#xA;      // Read the compressed file from FFmpeg file system&amp;#xA;      const data = await ffmpeg.readFile(filePath);&amp;#xA;&amp;#xA;      return new Blob([data.buffer], { type: &amp;#x27;video/mp4&amp;#x27; });&amp;#xA;    }&amp;#xA;  }&amp;#xA;};&amp;#xA;&lt;/script&gt;&#xA;&#xA;&#xA;

    &#xA;

  • Record Webcam as single JPG files [on hold]

    2 décembre 2016, par clic

    I have to record a Windows Directshow Webcam video stream (UHD, 30fps, yuyv422) as single JPG images. Performance is important, so preferably by using NVIDIA GPU acceleration via CUDA or something..

    What is the most simple but powerful solution, without having to buy proprietary software ?

    I had a look at ffmpeg, by recording as MJPEG and then using something like jpegtran to get the JPGs. I tried :

    ffmpeg -f dshow -video_size 1920x1080 -framerate 50 -vcodec mjpeg -i video="XI100DUSB-HDMI Video" out.avi

    But it results in an I/O error saying ’Could not set video options’. Maybe because of the yuyv422 pixel format of my Magewell USB dongles..

    Or is ffmpeg able to record as single JPGs directly somehow ?

    If someone has any other idea/solution besides ffmpeg, please let me know too ! Thanks !

    EDIT :

    I was now able to save JPGs directly, using webcamimg%04d.jpg instead of out.avi. But it’s always claiming about full real-time buffer. Raising the rtbufsize parameter doesn’t really help..

    ffmpeg console output :

    ffmpeg version 3.2 Copyright (c) 2000-2016 the FFmpeg developers
     built with gcc 5.4.0 (GCC)
     configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-libebur128 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-li
    bopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
     libavutil      55. 34.100 / 55. 34.100
     libavcodec     57. 64.100 / 57. 64.100
     libavformat    57. 56.100 / 57. 56.100
     libavdevice    57.  1.100 / 57.  1.100
     libavfilter     6. 65.100 /  6. 65.100
     libswscale      4.  2.100 /  4.  2.100
     libswresample   2.  3.100 /  2.  3.100
     libpostproc    54.  1.100 / 54.  1.100
    [dshow @ 0000000001c628a0] Could not set video options
    video=XI100DUSB-HDMI Video: I/O error

    Output of : ffmpeg -list_options true -f dshow -i video="XI100DUSB-HDMI Video"

    [dshow @ 00000000004d71e0] DirectShow video device options (from video devices)
    [dshow @ 00000000004d71e0]  Pin "Capture" (alternative pin name "0")
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=1920x1080 fps=15 max s=1920x1080 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=1920x1080 fps=15 max s=1920x1080 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=640x360 fps=15 max s=640x360 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=640x360 fps=15 max s=640x360 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=640x480 fps=15 max s=640x480 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=640x480 fps=15 max s=640x480 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=720x480 fps=15 max s=720x480 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=720x480 fps=15 max s=720x480 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=720x576 fps=15 max s=720x576 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=720x576 fps=15 max s=720x576 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=768x576 fps=15 max s=768x576 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=768x576 fps=15 max s=768x576 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=800x600 fps=15 max s=800x600 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=800x600 fps=15 max s=800x600 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=856x480 fps=15 max s=856x480 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=856x480 fps=15 max s=856x480 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=960x540 fps=15 max s=960x540 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=960x540 fps=15 max s=960x540 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=1024x576 fps=15 max s=1024x576 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=1024x576 fps=15 max s=1024x576 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=1024x768 fps=15 max s=1024x768 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=1024x768 fps=15 max s=1024x768 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=1280x720 fps=15 max s=1280x720 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=1280x720 fps=15 max s=1280x720 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=1280x800 fps=15 max s=1280x800 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=1280x800 fps=15 max s=1280x800 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=1280x960 fps=15 max s=1280x960 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=1280x960 fps=15 max s=1280x960 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=1280x1024 fps=15 max s=1280x1024 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=1280x1024 fps=15 max s=1280x1024 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=1368x768 fps=15 max s=1368x768 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=1368x768 fps=15 max s=1368x768 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=1440x900 fps=15 max s=1440x900 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=1440x900 fps=15 max s=1440x900 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=1600x1200 fps=15 max s=1600x1200 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=1600x1200 fps=15 max s=1600x1200 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=1680x1050 fps=15 max s=1680x1050 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=1680x1050 fps=15 max s=1680x1050 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=1920x1200 fps=15 max s=1920x1200 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=1920x1200 fps=15 max s=1920x1200 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=1920x1080 fps=15 max s=1920x1080 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=1920x1080 fps=15 max s=1920x1080 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=640x360 fps=15 max s=640x360 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=640x360 fps=15 max s=640x360 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=640x480 fps=15 max s=640x480 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=640x480 fps=15 max s=640x480 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=720x480 fps=15 max s=720x480 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=720x480 fps=15 max s=720x480 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=720x576 fps=15 max s=720x576 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=720x576 fps=15 max s=720x576 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=768x576 fps=15 max s=768x576 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=768x576 fps=15 max s=768x576 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=800x600 fps=15 max s=800x600 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=800x600 fps=15 max s=800x600 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=856x480 fps=15 max s=856x480 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=856x480 fps=15 max s=856x480 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=960x540 fps=15 max s=960x540 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=960x540 fps=15 max s=960x540 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=1024x576 fps=15 max s=1024x576 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=1024x576 fps=15 max s=1024x576 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=1024x768 fps=15 max s=1024x768 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=1024x768 fps=15 max s=1024x768 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=1280x720 fps=15 max s=1280x720 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=1280x720 fps=15 max s=1280x720 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=1280x800 fps=15 max s=1280x800 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=1280x800 fps=15 max s=1280x800 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=1280x960 fps=15 max s=1280x960 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=1280x960 fps=15 max s=1280x960 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=1280x1024 fps=15 max s=1280x1024 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=1280x1024 fps=15 max s=1280x1024 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=1368x768 fps=15 max s=1368x768 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=1368x768 fps=15 max s=1368x768 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=1440x900 fps=15 max s=1440x900 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=1440x900 fps=15 max s=1440x900 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=1600x1200 fps=15 max s=1600x1200 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=1600x1200 fps=15 max s=1600x1200 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=1680x1050 fps=15 max s=1680x1050 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=1680x1050 fps=15 max s=1680x1050 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=1920x1200 fps=15 max s=1920x1200 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=1920x1200 fps=15 max s=1920x1200 fps=59.9999
    video=XI100DUSB-HDMI Video: Immediate exit requested