Recherche avancée

Médias (10)

Mot : - Tags -/wav

Autres articles (59)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

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

  • Sélection de projets utilisant MediaSPIP

    29 avril 2011, par

    Les exemples cités ci-dessous sont des éléments représentatifs d’usages spécifiques de MediaSPIP pour certains projets.
    Vous pensez avoir un site "remarquable" réalisé avec MediaSPIP ? Faites le nous savoir ici.
    Ferme MediaSPIP @ Infini
    L’Association Infini développe des activités d’accueil, de point d’accès internet, de formation, de conduite de projets innovants dans le domaine des Technologies de l’Information et de la Communication, et l’hébergement de sites. Elle joue en la matière un rôle unique (...)

Sur d’autres sites (4822)

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

  • av::av_encode_video produces blurred video from crisp files

    9 janvier 2023, par Abdirizak

    I am using the av::av_encode_video() function to produce a .mp4 video from png files, as in this answer. I pay special attention for the png files to be perfectly crisp, i.e. I plot matrices to png with exactly the same dimensions, so that every matrix cell maps to one cell in the png. Here is code to illustrate what I mean :

    &#xA;

    library(av)&#xA;&#xA;n.times &lt;- 24*10&#xA;n.row &lt;- 50&#xA;n.col &lt;- 26&#xA;&#xA;out.dir &lt;- "/Users/Abdirizak/Documents/some/directory/"&#xA;&#xA;for (i in 1:n.times) {&#xA;   &#xA;   current.mat &lt;- matrix(data = rnorm(n.row*n.col), nrow = n.row, ncol = n.col)&#xA;   &#xA;   setwd(out.dir)&#xA;   png(filename = paste0(i, ".png"), width = n.row, height = n.col)&#xA;   &#xA;   par(mar = rep(0,4))&#xA;   image(current.mat)&#xA;   &#xA;   dev.off()&#xA;   &#xA;}&#xA;&#xA;setwd(out.dir)&#xA;png.files &lt;- paste0(out.dir, list.files(pattern = ".png$"))&#xA;&#xA;av::av_encode_video(input = png.files, output = "000.mp4", framerate = 24)&#xA;

    &#xA;

    Now, even though my input .png files are perfectly crisp, the output .mp4 video is blurry. How can I prevent that from happening ? I.e. how can I get a perfectly crisp video ? (I am aware that this will likely inflate the file size of the .mp4 file)

    &#xA;

    I already digged a bit into the vfilter argument of av_encode_video() and the underlying ffmpeg filter graphs on here, but could not yet really get the hang on it.

    &#xA;

    I am looking at the .mp4 file through QuickTime Player on MacOS Ventura 13.0.1, and using R version 4.2.2 through RStudio 2022.12.0.353

    &#xA;

    Edit 9.1.2023 :

    &#xA;

    To further clarify, here is an example screenshot of a png image (not the original png file because that one appears too small here) :

    &#xA;

    enter image description here

    &#xA;

    As I said, a perfectly crisp image.

    &#xA;

    On the other hand, a screenshot of the .mp4 movie looks like this :

    &#xA;

    enter image description here

    &#xA;

    Somewhat unsatisfactory. Any suggestions are welcome.

    &#xA;

  • ffmpeg doesn't sometimes start reading RTSP stream from IP camera without error

    8 décembre 2022, par Petr Dub

    I've an IP camera, which provide RTSP stream. I want to read this stream, rotate it 90° and provide data for displaying video via IIS server. I have a working solution via ffmpeg, but it is not reliable. It ends after several minutes without error and it is not starting sometimes.

    &#xA;

    I use this command :&#xA;ffmpeg.exe -thread_queue_size 128 -i "rtsp://<login>:<pwd>@192.168.0.201:554/live/ch0" -vf "transpose=1" -y -c:a aac -b:a 160000 -ac 1 -s 432x768 -g 50 -hls_time 2 -hls_list_size 1 -start_number 1 -hls_flags delete_segments m:\playlist.m3u8</pwd></login>

    &#xA;

    It works, but after several minutes (40 to 100) it stops without error (I have no idea why). When I restart the same ffmeg command, it sometimes doesn’t start reading the stream, but it doesn’t produce any error, the ffmpeg process is still running. Error output from ffmeg shows :

    &#xA;

    ffmpeg version 2022-11-03-git-5ccd4d3060-full_build-www.gyan.dev Copyright (c) 2000-2022 the FFmpeg developers&#xA;  built with gcc 12.1.0 (Rev2, Built by MSYS2 project)&#xA;  configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libaribb24 --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libjxl --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libvpl --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint&#xA;  libavutil      57. 40.100 / 57. 40.100&#xA;  libavcodec     59. 51.101 / 59. 51.101&#xA;  libavformat    59. 34.101 / 59. 34.101&#xA;  libavdevice    59.  8.101 / 59.  8.101&#xA;  libavfilter     8. 49.101 /  8. 49.101&#xA;  libswscale      6.  8.112 /  6.  8.112&#xA;  libswresample   4.  9.100 /  4.  9.100&#xA;  libpostproc    56.  7.100 / 56.  7.100&#xA;

    &#xA;

    The next row should be :

    &#xA;

    Input #0, rtsp, from &#x27;rtsp://<login>:<pwd>@192.168.0.201:554/live/ch0&#x27;</pwd></login>

    &#xA;

    Any ideas, what should I do ? At least to force ffmpeg end with error and not stays “running”…

    &#xA;

    Edit : I finally wrote a windows service, which starts the ffmpeg and monitors its error output. When nothing comes to this output for several seconds, it kills the ffmpeg process and starts a new one.

    &#xA;