
Recherche avancée
Médias (1)
-
Revolution of Open-source and film making towards open film making
6 octobre 2011, par
Mis à jour : Juillet 2013
Langue : English
Type : Texte
Autres articles (112)
-
Configuration spécifique d’Apache
4 février 2011, parModules spécifiques
Pour la configuration d’Apache, il est conseillé d’activer certains modules non spécifiques à MediaSPIP, mais permettant d’améliorer les performances : mod_deflate et mod_headers pour compresser automatiquement via Apache les pages. Cf ce tutoriel ; mode_expires pour gérer correctement l’expiration des hits. Cf ce tutoriel ;
Il est également conseillé d’ajouter la prise en charge par apache du mime-type pour les fichiers WebM comme indiqué dans ce tutoriel.
Création d’un (...) -
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page. -
Organiser par catégorie
17 mai 2013, parDans 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 (...)
Sur d’autres sites (9329)
-
How to Convert 16:9 Video to 9:16 Ratio While Ensuring Speaker Presence in Frame ?
28 avril 2024, par shreeshaI 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


-
Batch .SRT Rip Using FFMPEG
12 mai 2020, par jaacI have this command using ffmpeg



root@ubuntu-4cpu-8gb-sg-sin1:/home/jaac/torrents/rtorrent/dots# ffmpeg -i Title.NF.WEB-DL.DDP2.0.x264-Ao.mkv -map 0:7 indo16.srt




That will rip 1 sub (Indonesia region)



How to rip it in batch ? I have 17 files in dots folder



Thanks


-
Merge commit ’51ca3cb604a7585a7cff35d4b954794508955c19’
15 février 2015, par Michael NiedermayerMerge commit ’51ca3cb604a7585a7cff35d4b954794508955c19’
* commit ’51ca3cb604a7585a7cff35d4b954794508955c19’ :
xcbgrab : Use the correct geometry for the region highlightSee : 0ae37e460c345a4c76e28256af56931e00c94cb5
Merged-by : Michael Niedermayer <michaelni@gmx.at>