Recherche avancée

Médias (3)

Mot : - Tags -/pdf

Autres articles (34)

  • À propos des documents

    21 juin 2013, par

    Que faire quand un document ne passe pas en traitement, dont le rendu ne correspond pas aux attentes ?
    Document bloqué en file d’attente ?
    Voici une liste d’actions ordonnée et empirique possible pour tenter de débloquer la situation : Relancer le traitement du document qui ne passe pas Retenter l’insertion du document sur le site MédiaSPIP Dans le cas d’un média de type video ou audio, retravailler le média produit à l’aide d’un éditeur ou un transcodeur. Convertir le document dans un format (...)

  • Modifier la date de publication

    21 juin 2013, par

    Comment changer la date de publication d’un média ?
    Il faut au préalable rajouter un champ "Date de publication" dans le masque de formulaire adéquat :
    Administrer > Configuration des masques de formulaires > Sélectionner "Un média"
    Dans la rubrique "Champs à ajouter, cocher "Date de publication "
    Cliquer en bas de la page sur Enregistrer

  • Mise à jour de la version 0.1 vers 0.2

    24 juin 2013, par

    Explications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
    Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...)

Sur d’autres sites (5690)

  • FFMpegCore.Exceptions.FFMpegException : 'ffmpeg exited with non-zero exit-code'

    15 octobre 2024, par secretply

    I am looking to retrieve the loudnorm data in JSON format from FFmpeg (using FFMpegCore 5.1.0). This is the code I currently have :

    


    await FFMpegArguments
    .FromPipeInput(new StreamPipeSource(fileStream.OpenReadStream()))
    .OutputToPipe(new StreamPipeSink(outputStream), options => options.WithCustomArgument("-af loudnorm=print_format=json"))
    .ProcessAsynchronously();


    


    This is the exception I get, which is similar to this old GitHub issue.

    


    System.IO.IOException: 'Pipe is broken.'

This exception was originally thrown at this call stack:
    System.IO.Pipes.PipeStream.PipeValueTaskSource.GetResult(short)
    System.IO.Pipes.PipeStream.PipeValueTaskSource.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(short)
    System.IO.Stream.CopyToAsync.__Core|27_0(System.IO.Stream, System.IO.Stream, int, System.Threading.CancellationToken) in Stream.cs
    FFMpegCore.Arguments.InputPipeArgument.ProcessDataAsync(System.Threading.CancellationToken)
    FFMpegCore.Arguments.PipeArgument.During(System.Threading.CancellationToken)
    FFMpegCore.FFMpegArguments.During(System.Threading.CancellationToken)
    FFMpegCore.FFMpegArgumentProcessor.Process(Instances.ProcessArguments, System.Threading.CancellationTokenSource)
    FFMpegCore.FFMpegArgumentProcessor.ProcessAsynchronously(bool, FFMpegCore.FFOptions)


    


    I am trying to replicate the following FFmpeg command and JSON output :

    


    ffmpeg -i "file.flac" -af loudnorm=print_format=json -f null -


    


    {
        "input_i" : "-21.87",
        "input_tp" : "-7.13",
        "input_lra" : "5.00",
        "input_thresh" : "-32.04",
        "output_i" : "-24.76",
        "output_tp" : "-10.36",
        "output_lra" : "4.10",
        "output_thresh" : "-34.84",
        "normalization_type" : "dynamic",
        "target_offset" : "0.76"
}


    


    If I add .ForceFormat("null") to the OutputToPipe options, I do not get the exception but when I read the output stream, it returns an empty string. In the issue mentioned, I know they mentioned a way to get the FFMpegErrorOutput property but I do not know how that can be done. I could not find an example of outputting a stream as JSON. If anyone can point me in the right direction or can provide an alternative solution, I would greatly appreciate it.

    


    Update

    


    I made a change to the StreamPipeSource() method where I copied over the uploaded file to a MemoryStream. With this change, the following FFMpegException is thrown.

    


    FFMpegCore.Exceptions.FFMpegException: 'ffmpeg exited with non-zero exit-code (-22 - ffmpeg version 7.0.1-full_build-www.gyan.dev Copyright (c) 2000-2024 the FFmpeg developers
  built with gcc 13.2.0 (Rev5, Built by MSYS2 project)
  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-libaribcaption --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libxevd --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxeve --enable-libxvid --enable-libaom --enable-libjxl --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-dxva2 --enable-d3d11va --enable-d3d12va --enable-ffnvcodec --enable-libvpl --enable-nvdec --enable-nvenc --enable-vaapi --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-libcodec2 --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
  libavutil      59.  8.100 / 59.  8.100
  libavcodec     61.  3.100 / 61.  3.100
  libavformat    61.  1.100 / 61.  1.100
  libavdevice    61.  1.100 / 61.  1.100
  libavfilter    10.  1.100 / 10.  1.100
  libswscale      8.  1.100 /  8.  1.100
  libswresample   5.  1.100 /  5.  1.100
  libpostproc    58.  1.100 / 58.  1.100
[in#0 @ 000001bda86c67c0] Error opening input: Invalid argument
Error opening input file \\.\pipe\FFMpegCore_c6e5c.
Error opening input files: Invalid argument)'


    


  • avformat : remove deprecated FF_API_GET_DUR_ESTIMATE_METHOD

    19 février, par James Almer
    avformat : remove deprecated FF_API_GET_DUR_ESTIMATE_METHOD
    

    Deprecated since 2024-03-06.

    Signed-off-by : James Almer <jamrial@gmail.com>

    • [DH] libavformat/avformat.h
    • [DH] libavformat/options.c
    • [DH] libavformat/version_major.h
  • Moviepy is unable to load video

    20 octobre 2024, par Alex

    Using python 3.11.10 and moviepy 1.0.3 on ubuntu 24.04.1 (in a VirtualBox 7.1.3 on windows 10) I have problems to load a video clip. The test code is just

    &#xA;

    from moviepy.editor import VideoFileClip&#xA;clip = VideoFileClip("testvideo.ts")&#xA;

    &#xA;

    but the error is

    &#xA;

    Traceback (most recent call last):&#xA;  File "/home/alex/.cache/pypoetry/virtualenvs/pypdzug-WqasAXAr-py3.11/lib/python3.11/site-packages/moviepy/video/io/ffmpeg_reader.py", line 285, in ffmpeg_parse_infos&#xA;    line = [l for l in lines if keyword in l][index]&#xA;           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^&#xA;IndexError: list index out of range&#xA;&#xA;During handling of the above exception, another exception occurred:&#xA;&#xA;Traceback (most recent call last):&#xA;  File "/home/alex/Repos/pypdzug/tester.py", line 5, in <module>&#xA;    clip = VideoFileClip("testvideo.ts")&#xA;           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xA;  File "/home/alex/.cache/pypoetry/virtualenvs/pypdzug-WqasAXAr-py3.11/lib/python3.11/site-packages/moviepy/video/io/VideoFileClip.py", line 88, in __init__&#xA;    self.reader = FFMPEG_VideoReader(filename, pix_fmt=pix_fmt,&#xA;                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xA;  File "/home/alex/.cache/pypoetry/virtualenvs/pypdzug-WqasAXAr-py3.11/lib/python3.11/site-packages/moviepy/video/io/ffmpeg_reader.py", line 35, in __init__&#xA;    infos = ffmpeg_parse_infos(filename, print_infos, check_duration,&#xA;            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xA;  File "/home/alex/.cache/pypoetry/virtualenvs/pypdzug-WqasAXAr-py3.11/lib/python3.11/site-packages/moviepy/video/io/ffmpeg_reader.py", line 289, in ffmpeg_parse_infos&#xA;    raise IOError(("MoviePy error: failed to read the duration of file %s.\n"&#xA;OSError: MoviePy error: failed to read the duration of file testvideo.ts.&#xA;Here are the file infos returned by ffmpeg:&#xA;&#xA;ffmpeg version 4.2.2-static https://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2019 the FFmpeg developers&#xA;  built with gcc 8 (Debian 8.3.0-6)&#xA;  configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg&#xA;  libavutil      56. 31.100 / 56. 31.100&#xA;  libavcodec     58. 54.100 / 58. 54.100&#xA;  libavformat    58. 29.100 / 58. 29.100&#xA;  libavdevice    58.  8.100 / 58.  8.100&#xA;  libavfilter     7. 57.100 /  7. 57.100&#xA;  libswscale      5.  5.100 /  5.  5.100&#xA;  libswresample   3.  5.100 /  3.  5.100&#xA;  libpostproc    55.  5.100 / 55.  5.100&#xA;</module>

    &#xA;

    It says it failed to read the duration of the file, but the file plays properly (with mplayer) and ffmpeg -i testvideo.ts returns

    &#xA;

    ffmpeg version 6.1.1-3ubuntu5 Copyright (c) 2000-2023 the FFmpeg developers&#xA;  built with gcc 13 (Ubuntu 13.2.0-23ubuntu3)&#xA;  configuration: --prefix=/usr --extra-version=3ubuntu5 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --disable-omx --enable-gnutls --enable-libaom --enable-libass --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libglslang --enable-libgme --enable-libgsm --enable-libharfbuzz --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-openal --enable-opencl --enable-opengl --disable-sndio --enable-libvpl --disable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-ladspa --enable-libbluray --enable-libjack --enable-libpulse --enable-librabbitmq --enable-librist --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libx264 --enable-libzmq --enable-libzvbi --enable-lv2 --enable-sdl2 --enable-libplacebo --enable-librav1e --enable-pocketsphinx --enable-librsvg --enable-libjxl --enable-shared&#xA;  libavutil      58. 29.100 / 58. 29.100&#xA;  libavcodec     60. 31.102 / 60. 31.102&#xA;  libavformat    60. 16.100 / 60. 16.100&#xA;  libavdevice    60.  3.100 / 60.  3.100&#xA;  libavfilter     9. 12.100 /  9. 12.100&#xA;  libswscale      7.  5.100 /  7.  5.100&#xA;  libswresample   4. 12.100 /  4. 12.100&#xA;  libpostproc    57.  3.100 / 57.  3.100&#xA;Input #0, mpegts, from &#x27;testvideo.ts&#x27;:&#xA;  Duration: 00:10:10.13, start: 0.133333, bitrate: 3256 kb/s&#xA;  Program 1 &#xA;    Metadata:&#xA;      service_name    : 2024-10-04 11:49:49.917&#xA;      service_provider: gvos-6.0&#xA;  Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(progressive), 1920x1080, 15 fps, 15 tbr, 90k tbn&#xA;

    &#xA;

    Here the duration is clearly given to be 10 minutes and 10.13 seconds. So what could be the cause of this error/issue ?

    &#xA;