
Recherche avancée
Médias (1)
-
The pirate bay depuis la Belgique
1er avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
Autres articles (12)
-
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
Supporting all media types
13 avril 2011, parUnlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)
-
Creating farms of unique websites
13 avril 2011, parMediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)
Sur d’autres sites (4618)
-
Saving RTP stream on file for later conversion to MP4 format
23 avril 2024, par Alberto PastoreI need to acquire a short RTP video stream (15 to 90 seconds) on a local on-premise small device. The device is not capable of creating natively a MP4 file by itself.


The device is simply saving RTP packets on a local dump file as received. This file is then sent to a remote server after the stream has ended.


I have no control on the local device (I cannot change its software or its behavior).
I need to convert this RTP "dump" file to MP4 format on the remote server, where I can run my own software.


I am trying to figure out a quick&dirty way to perform this conversion without having to write too much "low level" code (i.e. reading the source file, analyzing packets, creating the destination MP4 and copying the encoded stream in the proper format...).


So far I've tried several combinations of ffmpeg command line switches but I was always unsuccesful.


Is there a way to perform this conversion without re-streaming the rtp packets live to ffmpeg ?


-
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


-
How to clone last frame when using overlay in ffmpeg ? [closed]
6 mai 2024, par mikezangI use this code to slide previous and next pages up, this is no problems, can I remove png file
1970~1979-last.png
and use the last frame of video file1970~1979.mp4
to instead it ?

script-01.txt


color=white:864x504[c];
[0:v]scale=864:504:force_original_aspect_ratio=decrease,pad=864:504:-1:-1,setsar=1[s0];
[1:v]scale=864:504:force_original_aspect_ratio=decrease,pad=864:504:-1:-1,setsar=1[s1];
[c][s0]overlay=y=0-h*t[c];
[c][s1]overlay=y='if(between(t,0,18),max(H-h*t,0),max(0-h*(t-18),0-H))'[v],
[v]tpad=stop_mode=clone:stop_duration=10[s2];
[s2]drawtext=fontfile='/WINDOWS/Fonts/Arial.ttf':text='%{eif\:18-t\:d}':
box=1:boxborderw=10:boxcolor=orange@0.4:
x=w-tw-10:y=10:fontsize=24:fontcolor=red:enable='between(t,8,18)';



script-01.bat


ffmpeg -hide_banner -loglevel fatal ^
 -loop 1 -i "C:\myimages\1970~1979-last.png" ^
 -i "C:\myvideos\years\1980~1989.mp4" ^
 -filter_complex_script script-01.txt ^
 -t 18 -y v01.mp4



I got it what I only need video files and capture last frame by pipe line to next step, so that the last frame image never neede ! Though the first slide has little problem when countdown finished !


script-01.bat


ffmpeg -hide_banner -loglevel fatal ^
 -sseof -0.03 -i "C:\myvideos\years\1970~1979.mp4" ^
 -vframes 1 -c:v png -f image2pipe - | ffmpeg ^
 -hide_banner -loglevel fatal -i - ^
 -i "C:\myvideos\years\1980~1989.mp4" ^
 -filter_complex_script script-01.txt ^
 -t 18 -y v01.mp4