Recherche avancée

Médias (91)

Autres articles (64)

  • List of compatible distributions

    26 avril 2011, par

    The table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
    If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...)

  • Submit bugs and patches

    13 avril 2011

    Unfortunately a software is never perfect.
    If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
    If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
    You may also (...)

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

Sur d’autres sites (11067)

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

    


    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.

    


    import cv2
import numpy as np
import subprocess

def frame_capture():
    # Set FFmpeg command (capture desired window or area)
    ffmpeg_command = [
        'ffmpeg',
        '-f', 'gdigrab',  # Windows screen capture (using gdigrab)
        '-framerate', '30',  # Setting the Frame Speed
        '-i', 'desktop',  # What to capture (for example, full screen)
        '-pix_fmt', 'bgr0',
        '-vcodec', 'rawvideo',  # Video codec settings
        '-tune', 'zerolatency',
        '-an',  # Disable audio
        '-sn',  # Disable Caption
        '-f', 'rawvideo', '-'
    ]

    # Running the FFmpeg process
    process = subprocess.Popen(ffmpeg_command, stdout=subprocess.PIPE, bufsize=10**8)

    while True:
        # Read Frame from FFmpeg (Resolution Example: 1920x1080)
        raw_frame = process.stdout.read(1920 * 1080 * 3)  # 1920x1080 resolution, BGR format
        if not raw_frame:
            break  # Shut down the loop when you can no longer receive frames

        # Converting frame data to a numpy array
        frame = np.frombuffer(raw_frame, np.uint8).reshape((1080, 1920, 3))

        # Add frame processing code here
        # Example: Showing a frame on the screen
        cv2.imshow('Captured Frame', frame)

        # Press the 'q' key to end
        if cv2.waitKey(1) & 0xFF == ord('q'):
            break

    # End of process and release of resources
    process.stdout.close()
    process.wait()
    cv2.destroyAllWindows()
frame_capture()


    


    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.

    


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


    


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

    


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

    


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

    


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