Recherche avancée

Médias (0)

Mot : - Tags -/page unique

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

Autres articles (34)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

  • Contribute to documentation

    13 avril 2011

    Documentation is vital to the development of improved technical capabilities.
    MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
    To contribute, register to the project users’ mailing (...)

Sur d’autres sites (4903)

  • 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;

  • How can I detect which audio channels in a video file are silent using FFMPEG ? [migrated]

    15 mars 2024, par kfank

    I need to be able to scan video files and report which audio tracks/channels are silent without knowing anything about the file's audio mapping ahead of time. I have tried this ffmpeg (v4.1) command on a file that contains 16 audio channels :

    &#xA;

    $ ffmpeg -i foo5.mxf -map 0:a -af astats -f null -&#xA;...&#xA;Stream mapping:&#xA;  Stream #0:1 -> #0:0 (pcm_s24be (native) -> pcm_s16le (native))&#xA;  Stream #0:2 -> #0:1 (pcm_s24be (native) -> pcm_s16le (native))&#xA;  Stream #0:3 -> #0:2 (pcm_s24be (native) -> pcm_s16le (native))&#xA;  Stream #0:4 -> #0:3 (pcm_s24be (native) -> pcm_s16le (native))&#xA;  Stream #0:5 -> #0:4 (pcm_s24be (native) -> pcm_s16le (native))&#xA;  Stream #0:6 -> #0:5 (pcm_s24be (native) -> pcm_s16le (native))&#xA;  Stream #0:7 -> #0:6 (pcm_s24be (native) -> pcm_s16le (native))&#xA;  Stream #0:8 -> #0:7 (pcm_s24be (native) -> pcm_s16le (native))&#xA;  Stream #0:9 -> #0:8 (pcm_s24be (native) -> pcm_s16le (native))&#xA;  Stream #0:10 -> #0:9 (pcm_s24be (native) -> pcm_s16le (native))&#xA;  Stream #0:11 -> #0:10 (pcm_s24be (native) -> pcm_s16le (native))&#xA;  Stream #0:12 -> #0:11 (pcm_s24be (native) -> pcm_s16le (native))&#xA;  Stream #0:13 -> #0:12 (pcm_s24be (native) -> pcm_s16le (native))&#xA;  Stream #0:14 -> #0:13 (pcm_s24be (native) -> pcm_s16le (native))&#xA;  Stream #0:15 -> #0:14 (pcm_s24be (native) -> pcm_s16le (native))&#xA;  Stream #0:16 -> #0:15 (pcm_s24be (native) -> pcm_s16le (native))&#xA;...&#xA;[Parsed_astats_0 @ 0x9123c0] Channel: 1&#xA;[Parsed_astats_0 @ 0x9123c0] DC offset: 0.000070&#xA;[Parsed_astats_0 @ 0x9123c0] Min level: -170426368.000000&#xA;[Parsed_astats_0 @ 0x9123c0] Max level: 172195840.000000&#xA;[Parsed_astats_0 @ 0x9123c0] Min difference: 0.000000&#xA;[Parsed_astats_0 @ 0x9123c0] Max difference: 58281984.000000&#xA;[Parsed_astats_0 @ 0x9123c0] Mean difference: 3089081.855667&#xA;[Parsed_astats_0 @ 0x9123c0] RMS difference: 4825348.720329&#xA;[Parsed_astats_0 @ 0x9123c0] Peak level dB: -21.918144&#xA;[Parsed_astats_0 @ 0x9123c0] RMS level dB: -34.035425&#xA;[Parsed_astats_0 @ 0x9123c0] RMS peak dB: -27.320939&#xA;[Parsed_astats_0 @ 0x9123c0] RMS trough dB: -48.414915&#xA;[Parsed_astats_0 @ 0x9123c0] Crest factor: 4.035190&#xA;[Parsed_astats_0 @ 0x9123c0] Flat factor: 0.000000&#xA;[Parsed_astats_0 @ 0x9123c0] Peak count: 2&#xA;[Parsed_astats_0 @ 0x9123c0] Bit depth: 20/20&#xA;[Parsed_astats_0 @ 0x9123c0] Dynamic range: 98.493854&#xA;[Parsed_astats_0 @ 0x9123c0] Zero crossings: 10216&#xA;[Parsed_astats_0 @ 0x9123c0] Zero crossings rate: 0.042383&#xA;[Parsed_astats_0 @ 0x9123c0] Overall&#xA;[Parsed_astats_0 @ 0x9123c0] DC offset: 0.000070&#xA;[Parsed_astats_0 @ 0x9123c0] Min level: -170426368.000000&#xA;[Parsed_astats_0 @ 0x9123c0] Max level: 172195840.000000&#xA;[Parsed_astats_0 @ 0x9123c0] Min difference: 0.000000&#xA;[Parsed_astats_0 @ 0x9123c0] Max difference: 58281984.000000&#xA;[Parsed_astats_0 @ 0x9123c0] Mean difference: 3089081.855667&#xA;[Parsed_astats_0 @ 0x9123c0] RMS difference: 4825348.720329&#xA;[Parsed_astats_0 @ 0x9123c0] Peak level dB: -21.918144&#xA;[Parsed_astats_0 @ 0x9123c0] RMS level dB: -34.035425&#xA;[Parsed_astats_0 @ 0x9123c0] RMS peak dB: -27.320939&#xA;[Parsed_astats_0 @ 0x9123c0] RMS trough dB: -48.414915&#xA;[Parsed_astats_0 @ 0x9123c0] Flat factor: 0.000000&#xA;[Parsed_astats_0 @ 0x9123c0] Peak count: 2.000000&#xA;[Parsed_astats_0 @ 0x9123c0] Bit depth: 20/20&#xA;[Parsed_astats_0 @ 0x9123c0] Number of samples: 241040&#xA;[Parsed_astats_0 @ 0x4def40] Channel: 1&#xA;[Parsed_astats_0 @ 0x4def40] DC offset: 0.000070&#xA;[Parsed_astats_0 @ 0x4def40] Min level: -170426368.000000&#xA;[Parsed_astats_0 @ 0x4def40] Max level: 172199936.000000&#xA;[Parsed_astats_0 @ 0x4def40] Min difference: 0.000000&#xA;[Parsed_astats_0 @ 0x4def40] Max difference: 58277888.000000&#xA;[Parsed_astats_0 @ 0x4def40] Mean difference: 3089075.891088&#xA;[Parsed_astats_0 @ 0x4def40] RMS difference: 4825346.346176&#xA;[Parsed_astats_0 @ 0x4def40] Peak level dB: -21.917938&#xA;[Parsed_astats_0 @ 0x4def40] RMS level dB: -34.035425&#xA;[Parsed_astats_0 @ 0x4def40] RMS peak dB: -27.320942&#xA;[Parsed_astats_0 @ 0x4def40] RMS trough dB: -48.414908&#xA;[Parsed_astats_0 @ 0x4def40] Crest factor: 4.035287&#xA;[Parsed_astats_0 @ 0x4def40] Flat factor: 0.000000&#xA;[Parsed_astats_0 @ 0x4def40] Peak count: 2&#xA;[Parsed_astats_0 @ 0x4def40] Bit depth: 20/20&#xA;[Parsed_astats_0 @ 0x4def40] Dynamic range: 98.494061&#xA;[Parsed_astats_0 @ 0x4def40] Zero crossings: 10220&#xA;[Parsed_astats_0 @ 0x4def40] Zero crossings rate: 0.042400&#xA;[Parsed_astats_0 @ 0x4def40] Overall&#xA;[Parsed_astats_0 @ 0x4def40] DC offset: 0.000070&#xA;[Parsed_astats_0 @ 0x4def40] Min level: -170426368.000000&#xA;[Parsed_astats_0 @ 0x4def40] Max level: 172199936.000000&#xA;[Parsed_astats_0 @ 0x4def40] Min difference: 0.000000&#xA;[Parsed_astats_0 @ 0x4def40] Max difference: 58277888.000000&#xA;[Parsed_astats_0 @ 0x4def40] Mean difference: 3089075.891088&#xA;[Parsed_astats_0 @ 0x4def40] RMS difference: 4825346.346176&#xA;[Parsed_astats_0 @ 0x4def40] Peak level dB: -21.917938&#xA;[Parsed_astats_0 @ 0x4def40] RMS level dB: -34.035425&#xA;[Parsed_astats_0 @ 0x4def40] RMS peak dB: -27.320942&#xA;[Parsed_astats_0 @ 0x4def40] RMS trough dB: -48.414908&#xA;[Parsed_astats_0 @ 0x4def40] Flat factor: 0.000000&#xA;[Parsed_astats_0 @ 0x4def40] Peak count: 2.000000&#xA;[Parsed_astats_0 @ 0x4def40] Bit depth: 20/20&#xA;[Parsed_astats_0 @ 0x4def40] Number of samples: 241040&#xA;...&#xA;

    &#xA;

    By piping to grep (and a little more filtering) I can consolidate this and examine the peak levels on the audio channels :

    &#xA;

    $ ffmpeg -i foo5.mxf -map 0:a -af astats -f null - 2>&amp;1 | grep -E "(Channel:|Peak level|Overall)"&#xA;[Parsed_astats_0 @ 0x9123c0] Channel: 1&#xA;[Parsed_astats_0 @ 0x9123c0] Peak level dB: -21.918144&#xA;[Parsed_astats_0 @ 0x9123c0] Overall&#xA;[Parsed_astats_0 @ 0x9123c0] Peak level dB: -21.918144&#xA;[Parsed_astats_0 @ 0x4def40] Channel: 1&#xA;[Parsed_astats_0 @ 0x4def40] Peak level dB: -21.917938&#xA;[Parsed_astats_0 @ 0x4def40] Overall&#xA;[Parsed_astats_0 @ 0x4def40] Peak level dB: -21.917938&#xA;[Parsed_astats_0 @ 0xb92180] Channel: 1&#xA;[Parsed_astats_0 @ 0xb92180] Peak level dB: -6153.053111&#xA;[Parsed_astats_0 @ 0xb92180] Overall&#xA;[Parsed_astats_0 @ 0xb92180] Peak level dB: -6153.053111&#xA;...&#xA;

    &#xA;

    It gets me mostly what I need if I filter out peak levels < -120db. The problem is it identifies all channels as "Channel 1". Maybe this is because each audio stream only has a single channel in it. But I find nothing in the original output to tie each "audio status section" (the part containing "Channel :" through "Sero crossings rate") to the associated stream (e.g., 0:0, 0:1, etc.). Can I reliably deduce this just based on the order of the output ?

    &#xA;

    Should I be using a different filter (instead of astats) or parameter set to get this info ?

    &#xA;

  • How to return width and height of a video/image using ffprobe & batch

    3 février 2017, par user780756

    I need to get the width and height of an image file using ffprobe and need to store it in variables using batch (Windows) so I can later use those values.

    I tried to do this,

    @echo off
    for /f "tokens=1-2" %%i in ('ffprobe -v error -of flat=s=_ -select_streams v:0 -show_entries stream=width,height %1') do set W=%%i &amp; set H=%%j
    echo %W%
    echo %H%

    But fails to execute with

    Argument '_' provided as input filename, but 's' was already specified.

    p.s. I also tried imagemagick identify in a similar way, but it seems that identify has a bug when returning height for GIF files