Recherche avancée

Médias (0)

Mot : - Tags -/optimisation

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

Autres articles (16)

  • MediaSPIP Init et Diogène : types de publications de MediaSPIP

    11 novembre 2010, par

    À l’installation d’un site MediaSPIP, le plugin MediaSPIP Init réalise certaines opérations dont la principale consiste à créer quatre rubriques principales dans le site et de créer cinq templates de formulaire pour Diogène.
    Ces quatre rubriques principales (aussi appelées secteurs) sont : Medias ; Sites ; Editos ; Actualités ;
    Pour chacune de ces rubriques est créé un template de formulaire spécifique éponyme. Pour la rubrique "Medias" un second template "catégorie" est créé permettant d’ajouter (...)

  • Librairies et logiciels spécifiques aux médias

    10 décembre 2010, par

    Pour un fonctionnement correct et optimal, plusieurs choses sont à prendre en considération.
    Il est important, après avoir installé apache2, mysql et php5, d’installer d’autres logiciels nécessaires dont les installations sont décrites dans les liens afférants. Un ensemble de librairies multimedias (x264, libtheora, libvpx) utilisées pour l’encodage et le décodage des vidéos et sons afin de supporter le plus grand nombre de fichiers possibles. Cf. : ce tutoriel ; FFMpeg avec le maximum de décodeurs et (...)

  • Utilisation et configuration du script

    19 janvier 2011, par

    Informations spécifiques à la distribution Debian
    Si vous utilisez cette distribution, vous devrez activer les dépôts "debian-multimedia" comme expliqué ici :
    Depuis la version 0.3.1 du script, le dépôt peut être automatiquement activé à la suite d’une question.
    Récupération du script
    Le script d’installation peut être récupéré de deux manières différentes.
    Via svn en utilisant la commande pour récupérer le code source à jour :
    svn co (...)

Sur d’autres sites (3352)

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

  • I created a Python code to capture live video using FFmpeg, but the output screen only shows noise

    16 octobre 2024, par chun3 hyun

    The code below is Python code that made my computer screen video capture in real time via ffmpeg.

    &#xA;

    When I run the code below, it goes well until a new window named 'Captured Frame' is created. But this 'Captured Frame' window doesn't show the full screen of my computer, and the gray screen is generating a lot of noise.

    &#xA;

    import cv2&#xA;import numpy as np&#xA;import subprocess&#xA;&#xA;def frame_capture():&#xA;    # Set FFmpeg command (capture desired window or area)&#xA;    ffmpeg_command = [&#xA;        &#x27;ffmpeg&#x27;,&#xA;        &#x27;-f&#x27;, &#x27;gdigrab&#x27;,  # Windows screen capture (using gdigrab)&#xA;        &#x27;-framerate&#x27;, &#x27;30&#x27;,  # Setting the Frame Speed&#xA;        &#x27;-i&#x27;, &#x27;desktop&#x27;,  # What to capture (for example, full screen)&#xA;        &#x27;-pix_fmt&#x27;, &#x27;bgr0&#x27;,&#xA;        &#x27;-vcodec&#x27;, &#x27;rawvideo&#x27;,  # Video codec settings&#xA;        &#x27;-tune&#x27;, &#x27;zerolatency&#x27;,&#xA;        &#x27;-an&#x27;,  # Disable audio&#xA;        &#x27;-sn&#x27;,  # Disable Caption&#xA;        &#x27;-f&#x27;, &#x27;rawvideo&#x27;, &#x27;-&#x27;&#xA;    ]&#xA;&#xA;    # Running the FFmpeg process&#xA;    process = subprocess.Popen(ffmpeg_command, stdout=subprocess.PIPE, bufsize=10**8)&#xA;&#xA;    while True:&#xA;        # Read Frame from FFmpeg (Resolution Example: 1920x1080)&#xA;        raw_frame = process.stdout.read(1920 * 1080 * 3)  # 1920x1080 resolution, BGR format&#xA;        if not raw_frame:&#xA;            break  # Shut down the loop when you can no longer receive frames&#xA;&#xA;        # Converting frame data to a numpy array&#xA;        frame = np.frombuffer(raw_frame, np.uint8).reshape((1080, 1920, 3))&#xA;&#xA;        # Add frame processing code here&#xA;        # Example: Showing a frame on the screen&#xA;        cv2.imshow(&#x27;Captured Frame&#x27;, frame)&#xA;&#xA;        # Press the &#x27;q&#x27; key to end&#xA;        if cv2.waitKey(1) &amp; 0xFF == ord(&#x27;q&#x27;):&#xA;            break&#xA;&#xA;    # End of process and release of resources&#xA;    process.stdout.close()&#xA;    process.wait()&#xA;    cv2.destroyAllWindows()&#xA;frame_capture()&#xA;

    &#xA;

    What could I have done wrong ? When I directly input the FFmpeg command in the Windows command prompt(knows as 'cmd') as shown below to save the video (in .mp4 format), I can see that the screen is output normally in the saved file. It seems that FFmpeg itself is installed correctly, but I don't know what the cause is.

    &#xA;

    hwnd=132554 -pix_fmt yuv420p -vf "scale=iw-mod(iw\,2):ih-mod(ih\,2)" -draw_mouse 1 -t 10 output.mp4&#xA;

    &#xA;

    The handle number written above was the handle of the active Chrome window on my computer.

    &#xA;

    My ffmpeg version is 2024-10-10-git-0f5592cfc7-full_build-www.gyan.dev My Python version is 3.12.4&#xA;My Windows version and build are as specified below.&#xA;:Windows 11 Home, 10.0.22631

    &#xA;

    Capturing the computer screen with FFmpeg. I tried it, but the output screen shows only noise.

    &#xA;

  • ffmpeg fialing with "could not find coded parameters"

    21 octobre 2024, par Angelo

    running ffmpeg -i in a C# console app using Process, for certain files, the process gets stuck and runs forever

    &#xA;

            var oInfo = new ProcessStartInfo("ffmpeg.exe", "-i 176d2819-f1da-44eb-b33b-94eb1448194b.mov");&#xA;        oInfo.UseShellExecute = false;&#xA;        oInfo.CreateNoWindow = true;&#xA;        oInfo.RedirectStandardOutput = true;&#xA;        oInfo.RedirectStandardError = true;&#xA;&#xA;        string output = string.Empty;&#xA;        StreamReader srOutput = null;&#xA;&#xA;            //run the process&#xA;            Process proc = Process.Start(oInfo);&#xA;            proc.WaitForExit();&#xA;            srOutput = proc.StandardError;&#xA;            output = srOutput.ReadToEnd();&#xA;            proc.Close();&#xA;

    &#xA;

    running from command line

    &#xA;

    ffmpeg.exe -i 176d2819-f1da-44eb-b33b-94eb1448194b.mov, getting an error as included in the below output

    &#xA;

    could not find codec parameters for stream 1 (Audio : none (apac / 0x63617061), 48000 Hz, 4 channels, 382 kb/s) : unknown codec&#xA;Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options&#xA;[aist#0:1/none @ 0000029b0e1b0040] Guessed Channel Layout : 4.0&#xA;Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '176d2819-f1da-44eb-b33b-94eb1448194b.mov'

    &#xA;

    ffmpeg version N-117538-g9ce63e65d6-20241015 Copyright (c) 2000-2024 the FFmpeg developers&#xA;  built with gcc 14.2.0 (crosstool-NG 1.26.0.120_4d36f27)&#xA;  configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --disable-w32threads --enable-pthreads --enable-iconv --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-libxml2 --enable-lzma --enable-fontconfig --enable-libharfbuzz --enable-libvorbis --enable-opencl --disable-libpulse --enable-libvmaf --disable-libxcb --disable-xlib --enable-amf --enable-libaom --enable-libaribb24 --enable-avisynth --enable-chromaprint --enable-libdav1d --enable-libdavs2 --enable-libdvdread --enable-libdvdnav --disable-libfdk-aac --enable-ffnvcodec --enable-cuda-llvm --enable-frei0r --enable-libgme --enable-libkvazaar --enable-libaribcaption --enable-libass --enable-libbluray --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librist --enable-libssh --enable-libtheora --enable-libvpx --enable-libwebp --enable-libzmq --enable-lv2 --enable-libvpl --enable-openal --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --disable-libdrm --enable-vaapi --enable-libvidstab --enable-vulkan --enable-libshaderc --enable-libplacebo --enable-libvvenc --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --enable-libzvbi --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-libs=-lgomp --extra-ldflags=-pthread --extra-ldexeflags= --cc=x86_64-w64-mingw32-gcc --cxx=x86_64-w64-mingw32-g&#x2B;&#x2B; --ar=x86_64-w64-mingw32-gcc-ar --ranlib=x86_64-w64-mingw32-gcc-ranlib --nm=x86_64-w64-mingw32-gcc-nm --extra-version=20241015&#xA;  libavutil      59. 43.100 / 59. 43.100&#xA;  libavcodec     61. 22.100 / 61. 22.100&#xA;  libavformat    61.  9.100 / 61.  9.100&#xA;  libavdevice    61.  4.100 / 61.  4.100&#xA;  libavfilter    10.  6.100 / 10.  6.100&#xA;  libswscale      8.  6.100 /  8.  6.100&#xA;  libswresample   5.  4.100 /  5.  4.100&#xA;  libpostproc    58.  4.100 / 58.  4.100&#xA;[mov,mp4,m4a,3gp,3g2,mj2 @ 000001b447c84e40] Could not find codec parameters for stream 1 (Audio: none (apac / 0x63617061), 48000 Hz, 4 channels, 382 kb/s): unknown codec&#xA;Consider increasing the value for the &#x27;analyzeduration&#x27; (0) and &#x27;probesize&#x27; (5000000) options&#xA;[aist#0:1/none @ 000001b44a6bf880] Guessed Channel Layout: 4.0&#xA;Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;176d2819-f1da-44eb-b33b-94eb1448194b.mov&#x27;:&#xA;  Metadata:&#xA;    major_brand     : qt&#xA;    minor_version   : 0&#xA;    compatible_brands: qt&#xA;    creation_time   : 2024-10-14T07:34:17.000000Z&#xA;    com.apple.quicktime.full-frame-rate-playback-intent: 0&#xA;    com.apple.quicktime.make: Apple&#xA;    com.apple.quicktime.model: iPhone 16 Pro Max&#xA;    com.apple.quicktime.software: 18.0.1&#xA;    com.apple.quicktime.creationdate: 2024-10-14T16:18:36&#x2B;1100&#xA;    com.apple.photos.originating.signature: AQMNJRMQrKK7im&#x2B;Kjhixx6TqQyYm&#xA;  Duration: 00:00:32.60, start: 0.000000, bitrate: 15064 kb/s&#xA;  Stream #0:0[0x1](und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 130 kb/s (default)&#xA;    Metadata:&#xA;      creation_time   : 2024-10-14T07:34:17.000000Z&#xA;      handler_name    : Core Media Audio&#xA;      vendor_id       : [0][0][0][0]&#xA;  Stream #0:1[0x2](und): Audio: none (apac / 0x63617061), 48000 Hz, 4.0, 382 kb/s&#xA;    Metadata:&#xA;      creation_time   : 2024-10-14T07:34:17.000000Z&#xA;      handler_name    : Core Media Audio&#xA;      vendor_id       : [0][0][0][0]&#xA;  Stream #0:2[0x3](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 1920x1080, 14464 kb/s, 30 fps, 30 tbr, 600 tbn (default)&#xA;    Metadata:&#xA;      creation_time   : 2024-10-14T07:34:17.000000Z&#xA;      handler_name    : Core Media Video&#xA;      vendor_id       : [0][0][0][0]&#xA;      encoder         : H.264&#xA;  Stream #0:3[0x4](und): Data: none (mebx / 0x7862656D), 0 kb/s (default)&#xA;    Metadata:&#xA;      creation_time   : 2024-10-14T07:34:17.000000Z&#xA;      handler_name    : Core Media Metadata&#xA;  Stream #0:4[0x5](und): Data: none (mebx / 0x7862656D), 0 kb/s (default)&#xA;    Metadata:&#xA;      creation_time   : 2024-10-14T07:34:17.000000Z&#xA;      handler_name    : Core Media Metadata&#xA;  Stream #0:5[0x6](und): Data: none (mebx / 0x7862656D), 21 kb/s (default)&#xA;    Metadata:&#xA;      creation_time   : 2024-10-14T07:34:17.000000Z&#xA;      handler_name    : Core Media Metadata&#xA;  Stream #0:6[0x7](und): Data: none (mebx / 0x7862656D), 48 kb/s (default)&#xA;    Metadata:&#xA;      creation_time   : 2024-10-14T07:34:17.000000Z&#xA;      handler_name    : Core Media Metadata&#xA;  Stream #0:7[0x8](und): Data: none (mebx / 0x7862656D), 2 kb/s (default)&#xA;    Metadata:&#xA;      creation_time   : 2024-10-14T07:34:17.000000Z&#xA;      handler_name    : Core Media Metadata&#xA;  Stream #0:8[0x9](und): Data: none (mebx / 0x7862656D), 0 kb/s (default)&#xA;    Metadata:&#xA;      creation_time   : 2024-10-14T07:34:17.000000Z&#xA;      handler_name    : Core Media Metadata&#xA;

    &#xA;

    This error does not happen on all files but only on a handful of files.

    &#xA;