Recherche avancée

Médias (91)

Autres articles (87)

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

  • Organiser par catégorie

    17 mai 2013, par

    Dans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
    Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
    Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...)

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

Sur d’autres sites (3761)

  • 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

    


    from moviepy.editor import VideoFileClip
clip = VideoFileClip("testvideo.ts")


    


    but the error is

    


    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;

  • 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
  • "Error opening input" error when running ffmpeg via shell script

    15 octobre 2024, par Roni Yaniv

    I'm on a macbook running sonoma 14.7.

    &#xA;

    I have the following ffmpeg command which runs just fine by itself in the same folder of the files I need to modify :

    &#xA;

    ffmpeg -i "water-stream-90fps.mp4" -vf "drawtext=text=&#x27;Frame\: %{frame_num}&#x27;: start_number=1: x=(w-text_w): y=(h-text_h):fontsize=(h*10/100):fontcolor=yellow,drawtext=text=&#x27;%{pts\:hms}&#x27;:x=0:y=0:fontsize=(h*10/100):fontcolor=yellow" "water-stream-90fps-with-markers.mp4"

    &#xA;

    However, when I try to use it in a shell script by running ./add_markers.sh in the same folder, I get an error.

    &#xA;

    This is the add_markers.sh script :

    &#xA;

    #!/bin/bash&#xA;&#xA;# Replace &#x27;/path/to/your/folder&#x27; with the actual path to your folder&#xA;folder=$(pwd)&#xA;&#xA;# Replace &#x27;ffmpeg -i input.mp4 -vf scale=640:480 output.mp4&#x27; with your desired FFmpeg command&#xA;ffmpeg_command="ffmpeg -i input.mp4 -vf \"drawtext=text=&#x27;Frame\: %{frame_num}&#x27;: start_number=1: x=(w-text_w): y=(h-text_h):fontsize=(h*10/100):fontcolor=yellow,drawtext=text=&#x27;%{pts\:hms}&#x27;:x=0:y=0:fontsize=(h*10/100):fontcolor=yellow\" output.mp4"&#xA;&#xA;echo "$ffmpeg_command"&#xA;&#xA;# Loop through all files in the folder and execute the FFmpeg command&#xA;&#xA;for file in "$folder"/*; do&#xA;    filename=$(basename "${file%.*}") #get only the first part of the file name without path or extension&#xA;&#xA;    # Replace &#x27;input.mp4&#x27; with the current filename and &#x27;output.mp4&#x27; with the new filename. &#xA;    # Added double quotes to manage filenames with spaces.&#xA;    new_command="${ffmpeg_command//input.mp4/\"$filename.mp4\"}"&#xA;    new_command="${new_command//output.mp4/\"$filename-with-markers.mp4\"}"&#xA;&#xA;    echo "Running $new_command"&#xA;&#xA;    $new_command&#xA;&#xA;done&#xA;

    &#xA;

    This is the error I get (for one of the files, same error for all of them) :

    &#xA;

    Running ffmpeg -i "water-stream-90fps.mp4" -vf "drawtext=text=&#x27;Frame\: %{frame_num}&#x27;: start_number=1: x=(w-text_w): y=(h-text_h):fontsize=(h*10/100):fontcolor=yellow,drawtext=text=&#x27;%{pts\:hms}&#x27;:x=0:y=0:fontsize=(h*10/100):fontcolor=yellow" "water-stream-90fps-with-markers.mp4"&#xA;ffmpeg version 7.0 Copyright (c) 2000-2024 the FFmpeg developers&#xA;  built with Apple clang version 15.0.0 (clang-1500.3.9.4)&#xA;  configuration: --prefix=/opt/homebrew/Cellar/ffmpeg/7.0 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags=&#x27;-Wl,-ld_classic&#x27; --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libaribb24 --enable-libbluray --enable-libdav1d --enable-libharfbuzz --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libssh --enable-libsvtav1 --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-libopenvino --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-audiotoolbox --enable-neon&#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;[in#0 @ 0x6000015bc300] Error opening input: No such file or directory&#xA;Error opening input file "water-stream-90fps.mp4".&#xA;Error opening input files: No such file or directory&#xA;

    &#xA;

    I tried all kinds of things but my brain is starting to swell. Any guidance/help would be appreciated.

    &#xA;