Recherche avancée

Médias (2)

Mot : - Tags -/media

Autres articles (64)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

Sur d’autres sites (9472)

  • Node.js - Buffer Data to Ffmpeg

    24 septembre 2017, par user8568709

    I used Node.js and Ffmpeg to create animations. Because I was trying to avoid third-party avi/mp4 parsers, I decided to output the animation as raw rgb24 data file and then use some program to convert it to mp4 file.

    I found that Ffmpeg is free and open source which can do exactly it. So, I made a Node.js application which allocates a Buffer of size 1920 x 1080 x 3 (width times height times number of bytes per pixel), then I created a rendering context library, and finally I animated frame by frame and saved each frame consecutivelly in a binary file (using fs module).

    Then I invoked Ffmpeg to convert it to mp4 file and it works very good. Animations are pretty easy to make and Ffmpeg does its job correctly.

    However, the only problem is because it is very slow and eats space on hard disk. I want to create very long animations (more than a hour). The final mp4 file is relativelly small, but raw video file is extremelly big. About ninety percents of each frame are black pixels, so Ffmpeg comress it very good, but raw file cannot be compressed and it takes sometimes mor ethan 100 Gigabytes. Also, there is very unnecessary double processing same data. Firstly I process it in Node.js to save data to file, and then Ffmpeg reads it to convert it to mp4. There is a lot of unnecessary work.

    So, I’m looking for a way (and I’m pretty sure it is possible, but I didn’t find a way to do it yet) to output raw video data (one frame at a time) to Ffmpeg process (without saving anything to the hard disk).

    My goal is to do the following :

    1. Open Ffmpeg process
    2. Render a frame in Node.js
    3. Output raw byte stream to Ffmpeg
    4. Wait for Ffmpeg to encode it and append to mp4 file
    5. Let Ffmpeg wait for my Node.js process to render next frame

    Is there a way to achieve it ? I really don’t see a reason to post code, because my current code has nothing to do with the question I’m asking here. I don’t struggle with syntax errors or implementation problems. No, instead I just don’t know which parameters to pass to Ffmpeg process in order to achieve what I’ve already explained.

    I’ve searched in documentation to find out which parameters I need to pass to Ffmpeg process in order to let it read raw data from stdin instead from file, and also to wait until my Node.js process render next frame (so to disable time limit) because rendering a frame may take more than 24 hours. Therefore, Ffmpeg process should wait without time limit. However, I didn’t find anything about it in documentation.

    I know how to write to stdin from Node.js and similar technical stuff, so no need to explain it. The only question(s) here :

    1. Which parameters to pass to Ffmpeg ?
    2. Do I need to create Ffmpeg process (using child_process) with some special options ?

    Thank you in advance. Please, take it easy, this is my first question ! :)

  • Anomalie #3227 : Bug date de publication

    17 septembre 2014, par 毎日 erational -

    quelqu’un sur le forum http://forum.spip.net/fr_258722.html signale une erreur de type avec le mktime

  • ffmpeg video duration is not equal to duration after hls process

    9 décembre 2022, par Timur Khazhiev

    Problem

    


    For videofile input I preprocess/encode it to libx264. Then I'm trying to cut video into 2 second chunks except last one (last one being < 2 seconds) using hls processing

    &#xA;

    ffmpeg -v error -i video.mp4 -x264-params "keyint=60:min-keyint=60:scenecut=0" &#xA;-hls_time 2 -hls_list_size 0 -hls_segment_filename chunk%03d.ts index.m3u8&#xA;

    &#xA;

    which follows this problem

    &#xA;

    then looking into index.m3u8 file reveals that sum of all chunks' durations does not add up to original video duration :

    &#xA;

    % ffprobe -loglevel quiet -print_format flat -show_entries format=duration index.m3u8     &#xA;&#xA;format.duration="204.880000"&#xA;&#xA;% ffprobe -loglevel quiet -print_format flat -show_entries format=duration video.mp4 &#xA;&#xA;format.duration="204.892813"&#xA;

    &#xA;

    Moreover duration of a chunk in index.m3u8 is not the same as in chunk file.

    &#xA;

    % ffprobe -loglevel quiet -print_format flat -show_entries format=duration chunk000.ts&#xA;&#xA;format.duration="2.023222"&#xA;&#xA;% cat index.m3u8&#xA;#EXTM3U&#xA;#EXT-X-VERSION:3&#xA;#EXT-X-TARGETDURATION:2&#xA;#EXT-X-MEDIA-SEQUENCE:0&#xA;#EXTINF:2.000000,&#xA;chunk000.ts&#xA;#EXTINF:2.000000,&#xA;chunk001.ts&#xA;#EXTINF:2.000000,&#xA;chunk002.ts&#xA;...&#xA;

    &#xA;

    Misc

    &#xA;

    Used these videos : Me at the zoo and I finally found a useful monorail.

    &#xA;

    OS : macos Monterey 12.3.1 (21E258)

    &#xA;

    ffmpeg version 5.1.2 Copyright (c) 2000-2022 the FFmpeg developers&#xA;built with Apple clang version 14.0.0 (clang-1400.0.29.102)&#xA;configuration: --prefix=/usr/local/Cellar/ffmpeg/5.1.2 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox&#xA;libavutil      57. 28.100 / 57. 28.100&#xA;libavcodec     59. 37.100 / 59. 37.100&#xA;libavformat    59. 27.100 / 59. 27.100&#xA;libavdevice    59.  7.100 / 59.  7.100&#xA;libavfilter     8. 44.100 /  8. 44.100&#xA;libswscale      6.  7.100 /  6.  7.100&#xA;libswresample   4.  7.100 /  4.  7.100&#xA;libpostproc    56.  6.100 / 56.  6.100&#xA;

    &#xA;

    What I tried

    &#xA;

      &#xA;
    • Preprocess/transcode video before proceeding with hls
    • &#xA;

    • Force keyframes before proceeding with hls
    • &#xA;

    • Use 1, 3, 4 seconds chunks
    • &#xA;

    • Use different GOP sizes
    • &#xA;

    • -hls_flags split_by_time
    • &#xA;

    &#xA;

    but it leads to same result or very unequal chunks

    &#xA;

    Questions

    &#xA;

      &#xA;
    1. Is it ok or I'm missing something ?
    2. &#xA;

    3. If not, what parameters/options should I use to force chunks to be precisely 2 seconds ?
    4. &#xA;

    &#xA;