
Recherche avancée
Autres articles (45)
-
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 -
De l’upload à la vidéo finale [version standalone]
31 janvier 2010, parLe chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
Upload et récupération d’informations de la vidéo source
Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...) -
Automated installation script of MediaSPIP
25 avril 2011, parTo overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
The documentation of the use of this installation script is available here.
The code of this (...)
Sur d’autres sites (8501)
-
how to generate rtsp stream using laptop cam [closed]
13 décembre 2023, par MubahsirI am using the following command to capture video from the laptop camera and stream it as an RTSP using ffmpeg :


ffmpeg -f v4l2 -i /dev/video0 -c:v libx264 -profile:v baseline -pix_fmt yuv420p -b:v 500k -r 30 -f rtsp rtsp://127.0.0.1:1234



Upon executing this command, the laptop camera's indicator light turns on, indicating that it is in use. However, when attempting to view the RTSP stream on VLC using the URL
rtsp://127.0.0.1:1234
, no video is displayed.

-
doxy : Fix link in badge color
16 décembre 2013, par Luca Barbato -
Center crop image overlay using FFmpeg
27 mai 2020, par HB.I currently have an image that is being overlayed on top of a video, as demonstrated in this image :






The blue square is representing the video and the purple lines are representing the image on top of the video.





Currently, I have the following command :



"-i", InputVideoPath, "-i", InputImagePath, "-filter_complex", "[0:v]scale=iw*sar:ih,setsar=1,pad='max(iw\\,2*trunc(ih*9/16/2))':'max(ih\\,2*trunc(ow*16/9/2))':(ow-iw)/2:(oh-ih)/2[v0];[1:v][v0]scale2ref[v1][v0];[v0][v1]overlay=x=(W-w)/2:y=(H-h)/2[v]", "-map", "[v]", "-map", "0:a", "-c:v", "libx264", "-preset", "ultrafast", "-r", "30", OutputPath




This adds black padding to the sides of the video and outputs the following :






But I would like the center crop the image that is being overlayed instead, giving me this output :






I've seen answers that demonstrate how to crop an image or crop 2 videos, but I couldn't find a way to center crop an image that is being overlayed on top of a video.



The video I'm testing with is
1920x1080
and the size of the image is not constant.


Any help in achieving this will be appreciated.





EDIT (This edit is to add more clarification).



Please have a look at the image below :






The image above demonstrates :



- 

- Purple Lines : The entire screen of the device/player, this will be used as the input image. The user draws on the screen/player.
- Blue : The input video, scaled to fill the screen
- Green : The actual size of the input video









With this example, the player/image is
1920x1080
and the actual video size is640x640
. So the video is scaled440x440
to fill the player.




I tried to use a simple overlay, with the hopes that it will crop the video/image and output a video with the image at the same position as what was displayed on the device, by doing the following :



ffmpeg -i InputVideo -i InputImage -filter_complex "overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2" -c:v libx264 -preset ultrafast OutputPath




But, the image is not at the same position as what it was on the device.



I suspect that I will have to take into account the size difference between the scaling of the video to fit into the video player.



I'm not sure how I can do this ?