Recherche avancée

Médias (0)

Mot : - Tags -/tags

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

Autres articles (77)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • Déploiements possibles

    31 janvier 2010, par

    Deux types de déploiements sont envisageable dépendant de deux aspects : La méthode d’installation envisagée (en standalone ou en ferme) ; Le nombre d’encodages journaliers et la fréquentation envisagés ;
    L’encodage de vidéos est un processus lourd consommant énormément de ressources système (CPU et RAM), il est nécessaire de prendre tout cela en considération. Ce système n’est donc possible que sur un ou plusieurs serveurs dédiés.
    Version mono serveur
    La version mono serveur consiste à n’utiliser qu’une (...)

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

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

    


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


    


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

    


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


    


    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;

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

    9 décembre 2022, par Timur Khazhiev

    Problem

    &#xA;

    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;

  • Converting video with ffmpeg from a script not in the root folder

    30 octobre 2017, par Daniel Ormerod

    I am using ffmpeg to convert videos, create thumbnails etc.

    I made the below function to convert a video and when I run it in a script in the root folder it converts ok.

    However, I am using ajax to upload the video and the script is located /ajax/upload-video.php and when I run it in that folder it fails to convert.

    I have tried sending the $src and $dest up with ../ before the filenames to go back a folder but it isn’t working.

    Can anybody help ?

    Do I need to add something to the $command line to tell it to go back a folder ?

    These are the variables being used in the function :

    $ffmpegpath = 'ffmpeg.exe';
    $src = 'videos/video1.wmv';
    $dest = 'videos/video1.mp4';

    I have tried :

    $ffmpegpath = 'ffmpeg.exe';
    $src = '../videos/video1.wmv';
    $dest = '../videos/video1.mp4';

    And the function :

    function convert_video($src, $dest) {

       global $ffmpegpath;

       if (!file_exists($src)) {

           echo '<p>The file does not exist</p>';

       } else {

           $command = "$ffmpegpath -i $src $dest";

           @exec($command, $ret);

           if (!file_exists($dest)) {

               echo '<p>The file failed to create</p>';

           } else {

               if (filesize($dest)==0) {

                   echo '<p>The file created but has not filesize</p>';

               } else {

                   echo '<p>File Created Successfully</p>';

               }

           }

       }

    }