Recherche avancée

Médias (91)

Autres articles (72)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

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

Sur d’autres sites (14984)

  • ffmpeg video is bugged when burning PGS subtitles from .mkv to .webm

    27 août 2022, par ahab1851

    I am trying to burn PGS subtitles into a WebM clip (I am converting .mkv file with PGS subtitles into a .webm file), but when I do that, the clip becomes bugged : the length of the clip is 1193 hours and I can't seek the clip.

    


    Here's my ffmpeg command :

    


    ffmpeg -hide_banner -i out.mkv -sws_flags lanczos+accurate_rnd+full_chroma_int \
-filter_complex "[0:v][0:s]overlay[v1]; [v1]crop=1920:804:0:138, \
colorspace=bt709:iall=bt601-6-625:fast=1,scale=1280:-2[v2]" \
-map "[v2]" -map 0:1 -minrate 320k -maxrate 1300k -b:v 640k \
-pix_fmt yuv420p10le -colorspace 1 -color_range 1 -color_primaries 1 \
-color_trc 1 -tile-columns 0 -g 240 -aq-mode 0 -threads 2 \
-deadline good -crf 32 -c:v libvpx-vp9 -pass 1 -cpu-used 2 -row-mt 1 -an -sn -f webm -

ffmpeg -hide_banner -i out.mkv -sws_flags lanczos+accurate_rnd+full_chroma_int \
-filter_complex "[0:v][0:s]overlay[v1]; [v1]crop=1920:804:0:138, \
colorspace=bt709:iall=bt601-6-625:fast=1,scale=1280:-2[v2]" \
-map "[v2]" -map 0:1 -minrate 320k -maxrate 1300k -b:v 640k \
-pix_fmt yuv420p10le -color_range 1 -colorspace 1 -color_primaries 1 \
-color_trc 1 -tile-columns 0 -auto-alt-ref 1 -lag-in-frames 25 -g 240 \
-aq-mode 0 -threads 1 -deadline good -crf 32 -c:v libvpx-vp9 -pass 2 \
-cpu-used 0 -row-mt 1 -an -sn -map_metadata -1 -f webm output.webm


    


    Thanks.

    


  • How to Convert 16:9 Video to 9:16 Ratio While Ensuring Speaker Presence in Frame ?

    28 avril 2024, par shreesha

    I am tried so many time to figure out the problem in detecting the face and also it's not so smooth enough to like other tools out there.

    


    So basically I am using python and Yolo in this project but I want the person who is talking and who the ROI (region of interest) is.

    


    Here is the code :

    


    from ultralytics import YOLO
from ultralytics.engine.results import Results
from moviepy.editor import VideoFileClip, concatenate_videoclips
from moviepy.video.fx.crop import crop

# Load the YOLOv8 model
model = YOLO("yolov8n.pt")

# Load the input video
clip = VideoFileClip("short_test.mp4")

tacked_clips = []

for frame_no, frame in enumerate(clip.iter_frames()):
    # Process the frame
    results: list[Results] = model(frame)

    # Get the bounding box of the main object
    if results[0].boxes:
        objects = results[0].boxes
        main_obj = max(
            objects, key=lambda x: x.conf
        )  # Assuming the first detected object is the main one

        x1, y1, x2, y2 = [int(val) for val in main_obj.xyxy[0].tolist()]

        # Calculate the crop region based on the object's position and the target aspect ratio
        w, h = clip.size
        new_w = int(h * 9 / 16)
        new_h = h

        x_center = x2 - x1
        y_center = y2 - y1

        # Adjust x_center and y_center if they would cause the crop region to exceed the bounds
        if x_center + (new_w / 2) > w:
            x_center -= x_center + (new_w / 2) - w
        elif x_center - (new_w / 2) < 0:
            x_center += abs(x_center - (new_w / 2))

        if y_center + (new_h / 2) > h:
            y_center -= y_center + (new_h / 2) - h
        elif y_center - (new_h / 2) < 0:
            y_center += abs(y_center - (new_h / 2))

        # Create a subclip for the current frame
        start_time = frame_no / clip.fps
        end_time = (frame_no + 1) / clip.fps
        subclip = clip.subclip(start_time, end_time)

        # Apply cropping using MoviePy
        cropped_clip = crop(
            subclip, x_center=x_center, y_center=y_center, width=new_w, height=new_h
        )

        tacked_clips.append(cropped_clip)

reframed_clip = concatenate_videoclips(tacked_clips, method="compose")
reframed_clip.write_videofile("output_video.mp4")


    


    So basically I want to fix the face detection with ROI detection where it can detect the face and make that face and the body on to the frame and making sure that the speaker who is speaking is brought to the frame

    


  • Moviepy subclip captures extra 4 seconds at the end

    18 juillet 2021, par Fazal

    Iam trying to clip a video and save the clipped video. In this case the first 5 seconds of the video. While the video is getting clipped correctly. However the length of the clipped video is still 9 seconds instead of 5 seconds. For some reason an addition 4 seconds keep getting added with no content. Can someone help me with this. I tried to read through various topics on the issue but couldnt figure out.

    


    # Import everything needed to edit video clips
from moviepy.editor import *
from moviepy.video.io.ffmpeg_tools import ffmpeg_extract_subclip
# loading video dsa gfg intro video
clip = VideoFileClip("file.mp4")

filename = "fileclipped.mp4"
ffmpeg_extract_subclip("file.mp4", 0, 5, targetname=filename)