Recherche avancée

Médias (3)

Mot : - Tags -/Valkaama

Autres articles (80)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

  • Le plugin : Gestion de la mutualisation

    2 mars 2010, par

    Le plugin de Gestion de mutualisation permet de gérer les différents canaux de mediaspip depuis un site maître. Il a pour but de fournir une solution pure SPIP afin de remplacer cette ancienne solution.
    Installation basique
    On installe les fichiers de SPIP sur le serveur.
    On ajoute ensuite le plugin "mutualisation" à la racine du site comme décrit ici.
    On customise le fichier mes_options.php central comme on le souhaite. Voilà pour l’exemple celui de la plateforme mediaspip.net :
    < ?php (...)

Sur d’autres sites (4273)

  • Index error with moviepy when running on aws

    29 avril 2024, par Hardik Patel

    I am getting this error :&#xA;"MoviePy error : failed to read the duration of file %s.\n"&#xA;OSError : MoviePy error : failed to read the duration of file https://delivery.gettyimages.com/downloads/1490392845?k=20&e=AnE-X_nyTRBG5QvUm1OnnCZEOURkdWAdDeQJTmDW8Eo41FL7u_ROCopEha5N-Kwh-fxBr44QIe5s2vzAUchlcVs91TwSlJTMOKWYSTraamKCPRcJv19CqNZRB_FgLaW_.

    &#xA;

    The funny thing is that for the same line of code :

    &#xA;

    video_duration = VideoFileClip(getty_url).duration&#xA;

    &#xA;

    when running on my mac, it is running fine. However when running from an aws server I am getting this error :

    &#xA;

    [2024-04-29 05:55:42,126: ERROR/ForkPoolWorker-1] Task scripttovideoapp.create_video[18288b91-d304-400a-97a9-285fac776f85] raised unexpected: OSError(&#x27;MoviePy error: failed to read the duration of file https://delivery.gettyimages.com/downloads/1490392845?k=20&amp;e=AnE-X_nyTRBG5QvUm1OnnCZEOURkdWAdDeQJTmDW8Eo41FL7u_ROCopEha5N-Kwh-fxBr44QIe5s2vzAUchlcVs91TwSlJTMOKWYSTraamKCPRcJv19CqNZRB_FgLaW_.\nHere are the file infos returned by ffmpeg:\n\nffmpeg version 4.2.2-static https://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2019 the FFmpeg developers\n  built with gcc 8 (Debian 8.3.0-6)\n  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\n  libavutil      56. 31.100 / 56. 31.100\n  libavcodec     58. 54.100 / 58. 54.100\n  libavformat    58. 29.100 / 58. 29.100\n  libavdevice    58.  8.100 / 58.  8.100\n  libavfilter     7. 57.100 /  7. 57.100\n  libswscale      5.  5.100 /  5.  5.100\n  libswresample   3.  5.100 /  3.  5.100\n  libpostproc    55.  5.100 / 55.  5.100\n&#x27;)&#xA;Traceback (most recent call last):&#xA;  File "/home/ec2-user/.local/lib/python3.9/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;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/ec2-user/.local/lib/python3.9/site-packages/celery/app/trace.py", line 477, in trace_task&#xA;    R = retval = fun(*args, **kwargs)&#xA;  File "/home/ec2-user/.local/lib/python3.9/site-packages/celery/app/trace.py", line 760, in __protected_call__&#xA;    return self.run(*args, **kwargs)&#xA;  File "/home/ec2-user/videoproj/scripttovideoapp.py", line 454, in create_video&#xA;    all_urls, video_details = process_script(script, paths, company_a, company_b, api_key)&#xA;  File "/home/ec2-user/videoproj/scripttovideoapp.py", line 232, in process_script&#xA;    video_duration = VideoFileClip(file).duration  # This needs to be replaced with a proper duration if available&#xA;  File "/home/ec2-user/.local/lib/python3.9/site-packages/moviepy/video/io/VideoFileClip.py", line 88, in __init__&#xA;    self.reader = FFMPEG_VideoReader(filename, pix_fmt=pix_fmt,&#xA;  File "/home/ec2-user/.local/lib/python3.9/site-packages/moviepy/video/io/ffmpeg_reader.py", line 35, in __init__&#xA;    infos = ffmpeg_parse_infos(filename, print_infos, check_duration,&#xA;  File "/home/ec2-user/.local/lib/python3.9/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 https://delivery.gettyimages.com/downloads/1490392845?k=20&amp;e=AnE-X_nyTRBG5QvUm1OnnCZEOURkdWAdDeQJTmDW8Eo41FL7u_ROCopEha5N-Kwh-fxBr44QIe5s2vzAUchlcVs91TwSlJTMOKWYSTraamKCPRcJv19CqNZRB_FgLaW_.&#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;&#xA;

    &#xA;

    I checked the version of my package on both mac and aws, the packages are the same. Went through different stackover flow solutions but non of them totally aligns with my issue.

    &#xA;

  • Inappropriate ioctl for device in zoneminder - zmc_dvideo0

    9 juin 2024, par Adam

    I recently needed to rebuild my zoneminder local camera system, running on an RPi. I switched OS from Debian to Ubuntu and now I'm struggling to get video4linux to decode the video input. The result is either a black or green screen depending on the compression palette I select.

    &#xA;

    I'm using /dev/video0 as my input.

    &#xA;

    v4l2-ctl --list-devices&#xA;&#xA;unicam (platform:fe801000.csi):&#xA;        /dev/video0&#xA;        /dev/media3&#xA;

    &#xA;

    In the logs I'm getting :

    &#xA;

    zmc_dvideo0 10907   ERR Unable to query control: Inappropriate ioctl for device &#xA;

    &#xA;

    I don't understand the function of the /dev/media3 device, presumably created by the bcm2835-v4l2 module. This site suggests that /dev/video0 needs to extract the ioctl from or link in some way to /dev/media3. Perhaps a red herring.

    &#xA;

    If I select /dev/media3 as the source, I get :

    &#xA;

    : FAT [zmc_dmedia3] [Failed to query video device: Inappropriate ioctl for device]&#xA;: ERR [&#x27;zmc -d /dev/media3&#x27; exited abnormally, exit status 255]&#xA;

    &#xA;

    I'm using

    &#xA;

      &#xA;
    • PAL60 encoding
    • &#xA;

    • YUV422p compression
    • &#xA;

    • 1280 x 720 Capture Resolution
    • &#xA;

    &#xA;

    # lsb_release -a&#xA;No LSB modules are available.&#xA;Distributor ID: Ubuntu&#xA;Description:    Ubuntu 24.04 LTS&#xA;Release:        24.04&#xA;Codename:       noble&#xA;&#xA;# uname -a&#xA;Linux ubuntu 6.8.0-1005-raspi #5-Ubuntu SMP PREEMPT_DYNAMIC Wed May 22 15:01:35 UTC 2024 aarch64 aarch64 aarch64 GNU/Linux&#xA;

    &#xA;

    Using ffmpeg from the cli, I get a similar output, resulting in a green display. This happens both with and without the hardware acceleration flag.

    &#xA;

    sudo -u www-data ffmpeg -f v4l2 -pix_fmt yuyv422 -framerate 30 -video_size 1280x720 -i /dev/video0 -codec:v h264_v4l2m2m video0_out.mp4&#xA;

    &#xA;

    I've set debug to 6 in the ZM options - Any clues on troublshooting steps I can take to further understand why the camera stream is not being shown and how to fix it ?

    &#xA;

  • Python pydub issue : Can't repoen a wav file after it as been reencoded by ffpeg [Silved]

    28 avril 2024, par Trent Tompkins

    Solved by Michael Butscher. Updated code is now in the repo in the fixed branch. Thanks !

    &#xA;

    I have a python script that reads in all the *.wav files in a directory and saves them in a folder called output after it adjusts their volume.

    &#xA;

    lower.py :

    &#xA;

    import os&#xA;from pydub import AudioSegment as ass&#xA;&#xA;# get the current working directory&#xA;current_working_directory = os.getcwd()&#xA;all_files = os.listdir();&#xA;&#xA; &#xA;&#xA;&#xA;while len(all_files) > 0:&#xA;    file = all_files.pop()&#xA;    song = ass.from_wav(file)&#xA;    song = song - 16&#xA;    song.export(&#x27;out\\&#x27;&#x2B;file)&#xA;&#xA;

    &#xA;

    https://github.com/tibberous/ChangeWavVolume/tree/fixed

    &#xA;

    The problem is (and this took me a LONG time to figure out), after the files are output once, if you try to read them again with AudioSegment ::from_wav(file), ffmpeg throws an error saying it can't decode the file. The output wav files play in Windows Media Player, and even have their audio adjusted, but I am guessing there somehow an error either in the file data itself or the file headers.

    &#xA;

    I put the code on github. Checkout the branch 'fixed'.

    &#xA;

    Btw, I just installed everything, so I should have the current versions of everything. I am using the Chocolatey package manager for Windows 10. Read README.txt (in progress) to see how I setup my dev environment.

    &#xA;

    &#xD;&#xA;
    &#xD;&#xA;
    Python 3.12.2&#xA;Chocolatey v2.2.2&#xA;C:\Users\moren>C:\ProgramData\chocolatey\bin\ffmpeg&#xA;ffmpeg version 7.0-essentials_build-www.gyan.dev Copyright (c) 2000-2024 the FFmpeg developers&#xA;  built with gcc 13.2.0 (Rev5, 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-zlib --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-sdl2 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --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-libgme --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libtheora --enable-libvo-amrwbenc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-librubberband&#xA;  libavutil      59.  8.100 / 59.  8.100&#xA;  libavcodec     61.  3.100 / 61.  3.100&#xA;  libavformat    61.  1.100 / 61.  1.100&#xA;  libavdevice    61.  1.100 / 61.  1.100&#xA;  libavfilter    10.  1.100 / 10.  1.100&#xA;  libswscale      8.  1.100 /  8.  1.100&#xA;  libswresample   5.  1.100 /  5.  1.100&#xA;  libpostproc    58.  1.100 / 58.  1.100&#xA;Universal media converter

    &#xD;&#xA;

    &#xD;&#xA;

    &#xD;&#xA;&#xA;

    I opened the wav files the program generated with Media Player, VLC Media Player and Audacity, thinking they might throw an error, but the only thing that can't seem to read the exported wav files is the script that created them !

    &#xA;