Recherche avancée

Médias (0)

Mot : - Tags -/logo

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

Autres articles (16)

  • Ajouter notes et légendes aux images

    7 février 2011, par

    Pour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
    Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
    Modification lors de l’ajout d’un média
    Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)

  • Les formats acceptés

    28 janvier 2010, par

    Les commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
    ffmpeg -codecs ffmpeg -formats
    Les format videos acceptés en entrée
    Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
    Les formats vidéos de sortie possibles
    Dans un premier temps on (...)

  • Les vidéos

    21 avril 2011, par

    Comme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
    Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
    Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...)

Sur d’autres sites (4920)

  • lavu/hwcontext_vaapi : Add Windows/VAAPI support with vaGetDisplayWin32

    14 avril 2023, par Sil Vilerino
    lavu/hwcontext_vaapi : Add Windows/VAAPI support with vaGetDisplayWin32
    

    Libva 2.17+ adds a new libva-win32 node and Mesa 22.3 adds a VAAPI driver
    based on Direct3D 12 for Windows. Both of them are available at :
    https://www.nuget.org/packages/Microsoft.Direct3D.VideoAccelerationCompatibilityPack

    Initial review at https://github.com/intel-media-ci/ffmpeg/pull/619/

    Signed-off-by : Sil Vilerino <sivileri@microsoft.com>
    Reviewed-by : Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com>
    Reviewed-by : Wu, Tong1 <tong1.wu@intel.com>

    • [DH] Changelog
    • [DH] configure
    • [DH] libavutil/hwcontext_vaapi.c
    • [DH] libavutil/tests/hwdevice.c
  • How to make an automated video of changing webpage

    21 mars 2023, par jonas wouters

    I'm currently working on a project where I need to make a recording of a webpage without opening this browser. (headless browser)&#xA;The file I'm working on is stored locally on my machine and is generated with a Python script. It's generated because it will be different for every user and will be deleted after the recording is made.

    &#xA;

    I'm currently stuck with trying to make a recording of a webpage.&#xA;Does somebody know how I can record a webpage.

    &#xA;

    Currently I'm doing this

    &#xA;

    # Make a video&#xA;def create_video(duration, name):&#xA;    # Path of the HTML file you want to record&#xA;    html_file_path = os.path.join(py_dir_path, &#x27;templates/video/&#x27;, f&#x27;{name}.html&#x27;)&#xA;    width = 1080&#xA;    height = 1920&#xA;    framerate = 30&#xA;    &#xA;    options = Options()&#xA;    options.headless = True&#xA;    options.add_experimental_option(&#x27;mobileEmulation&#x27;, {&#x27;deviceName&#x27;: &#x27;iPhone SE&#x27;})&#xA;    driver = webdriver.Chrome(options=options)&#xA;    driver.get(f&#x27;file://{html_file_path}&#x27;)&#xA;    print(driver)&#xA;    outputName = f&#x27;{name}.mp4&#x27;&#xA;&#xA;    cmd= f&#x27;ffmpeg -y -f xcbgrab -s {width}x{height} -framerate {framerate} -i :0.0&#x2B;0,0 -f alsa -i default -vcodec libx264 -pix_fmt yuv420p -preset ultrafast {outputName}&#x27;&#xA;    p = subprocess.Popen(cmd, shell=True)&#xA;&#xA;    import time&#xA;    time.sleep(duration)&#xA;&#xA;    p.kill()&#xA;

    &#xA;

    This code makes a headless browser and plays the website, but the recording process is not working for me

    &#xA;

    I've already have had working code, but this was based on making screenshots of the webpage and then pasting these screenshots after each other, this code was difficult to read and worst of all very slow.

    &#xA;

    Working bad code

    &#xA;

    # Make a video&#xA;def create_video(duration, name, timesFaster):&#xA;    # Path of the HTML file you want to record&#xA;    html_file_path = os.path.join(py_dir_path, &#x27;templates/video/&#x27;, f&#x27;{name}.html&#x27;)&#xA;    # Use function create_driver to create a driver and use this driver&#xA;    try:&#xA;        # Make a chrome window with size --> width: 390px, height: 850px&#xA;        options = webdriver.ChromeOptions()&#xA;        options.add_argument("--headless")&#xA;        options.add_experimental_option(&#x27;mobileEmulation&#x27;, {&#x27;deviceName&#x27;: &#x27;iPhone SE&#x27;})&#xA;        driver = webdriver.Chrome(options=options)&#xA;        driver.get(f&#x27;file://{html_file_path}&#x27;)&#xA;        &#xA;        # Use function capture_screenshots to take screenshots for &#xA;        capture_screenshots(driver, int(duration), name, timesFaster)&#xA;    finally:&#xA;        driver.quit&#xA;&#xA;# Make as many screens as possible in ... amount of time (... = animation_duration)&#xA;def capture_screenshots(driver, animation_duration, name, timesFaster):&#xA;    screenshots = []&#xA;    # Calculate the ending time&#xA;    end_time = time.time() &#x2B; animation_duration&#xA;    # Keeps track of amount of screenshots&#xA;    index = 1&#xA;&#xA;    try:&#xA;        # Take as many screenshots as possible until the current time exceeds the end_time&#xA;        while time.time() &lt; end_time:&#xA;            # Each time a new filename (so it does not overwrite)&#xA;            screenshot_file_name = f&#x27;capture{index}.png&#x27;&#xA;            # Save the screenshot on device&#xA;            driver.save_screenshot(screenshot_file_name)&#xA;            # Append the screenshot in screenshots ([])&#xA;            screenshots.append(screenshot_file_name)&#xA;            index &#x2B;= 1&#xA;        &#xA;        &#xA;        # Calculate the FPS&#xA;        fps = (len(screenshots)/animation_duration) * timesFaster&#xA;        print("sec: ", animation_duration/timesFaster)&#xA;        print("fps: ", fps)&#xA;        # Make the video with the FPS calculated above&#xA;        clip = ImageSequenceClip(screenshots, fps=fps)&#xA;        # File name of the result (video)&#xA;        output_file_path = os.path.join(mp4_dir_path, f"part/{name}.mp4")&#xA;        # Write the videoFile to the system&#xA;        clip.write_videofile(output_file_path, codec=&#x27;libx264&#x27;, bitrate="2M")&#xA;    finally:&#xA;        # Delete all screenshots&#xA;        for screenshot in screenshots:&#xA;            try:&#xA;                os.remove(screenshot)&#xA;            except:&#xA;                pass&#xA;

    &#xA;

    At the moment it's not that important for me that it's a local file, if I would be able to record a webpage (for example https://jonaswouters.sinners.be/3d-animatie/) this will be equally helpfull

    &#xA;

    Thanks in advance&#xA;Jonas

    &#xA;

  • ffmpeg custom compile options with hardware/software support

    14 mars 2023, par Capitalmind

    My last compile enabled nvidia/cuda but even though I included —enable-nonfree in the configure, I had issues encoding videos, with outputs like :

    &#xA;

    ffmpeg -hwaccel cuvid -c:v h264_cuvid -resize 1920x1080 -i Input.mkv -c:a copy -c:v h264_nvenc -preset slow -rc vbr_hq -cq 18 Output.mkv

    &#xA;

    Giving errors like :

    &#xA;

    ffmpeg -hwaccel cuvid -c:v h264_cuvid -resize 1920x1080 -i /media/zuultux/Video/Movies/Lawrence.of.Arabia.1962.UHD.BluRay.2160p.TrueHD.Atmos.7.1.HEVC.mkv -c:a copy -c:v h264_nvenc -preset slow -rc vbr_hq -cq 18 /media/zuultux/Video/Lawrence.of.Arabia.1962.UHD.BluRay.1080p.TrueHD.Atmos.7.1.HEVC.mkv&#xA;

    &#xA;

    [hevc_cuvid @ 0x5624718179c0] Codec hevc_cuvid is not supported.&#xA;Stream mapping:&#xA;  Stream #0:0 -> #0:0 (hevc (hevc_cuvid) -> h264 (h264_nvenc))&#xA;  Stream #0:1 -> #0:1 (copy)&#xA;

    &#xA;

    My actual configure reads :

    &#xA;

    ./configure --enable-nonfree --enable-cuda-nvcc --enable-libnpp --extra-cflags=-I/usr/local/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64&#xA;

    &#xA;

    There a heaps of options on Githhub. Can anyone suggest how to include parameters that specifically :

    &#xA;

      &#xA;
    • Toggle enable AMD64/Nvidia or non-hardware processing
    • &#xA;

    • All free and non-free codecs, but particularly VC9, H264/265
    • &#xA;

    • Or basically enable as many features as possible !
    • &#xA;

    &#xA;

    Note I already have ubuntu-restricted-extras installed.

    &#xA;

    Configuration used compiled correctly but gave errors when using. Several media files selected to test. nvidia-smi command responds NVIDIA-SMI 470.161.03 Driver Version : 470.161.03 CUDA Version : 11.4

    &#xA;


    &#xA;

    Edit

    &#xA;

    After fixing the problem I thought to share my results on Github. https://github.com/Capitalmind/makeffmpeg

    &#xA;