
Recherche avancée
Autres articles (25)
-
La file d’attente de SPIPmotion
28 novembre 2010, parUne file d’attente stockée dans la base de donnée
Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...) -
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 -
Contribute to documentation
13 avril 2011Documentation is vital to the development of improved technical capabilities.
MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
To contribute, register to the project users’ mailing (...)
Sur d’autres sites (4038)
-
Does anybody know how to concat on ffmpeg and python ? [closed]
22 décembre 2023, par Jonas HarkerI created a code on Python that supposedly concatenates two videos using Python to run an ffmpeg command through
subprocess
.
I get this error message :

2c0] Could not open encoder before EOF
[vost#0:0/libx264 @ 0000024013bfa480] Task finished with error code: -22 (Invalid argument)
[aost#0:1/aac @ 0000024013bfb2c0] Task finished with error code: -22 (Invalid argument)
[aost#0:1/aac @ 0000024013bfb2c0] Terminating thread with return code -22 (Invalid argument)
[vost#0:0/libx264 @ 0000024013bfa480] Terminating thread with return code -22 (Invalid argument)
[out#0/mp4 @ 0000024013b91d80] Nothing was written into output file, because at least one of its streams received no packets.
frame= 0 fps=0.0 q=0.0 Lsize= 0kB time=N/A bitrate=N/A speed=N/A 
Conversion failed!
El archivo Batman - Mask of The Phantasm, Open Matte Version (1993 - 1080p BluRay)_segment_11_segment_2.mp4 ha sido procesado.
El archivo temporal output_temp.mp4 ha reemplazado a Batman - Mask of The Phantasm, Open Matte Version (1993 - 1080p BluRay)_segment_11_segment_2.mp4.
Ejecutando: ffmpeg -i "D:\BTO\MemeLaughnClap\Shorted\Batman - Mask of The Phantasm, Open Matte Version (1993 - 1080p BluRay)_segment_11_segment_3.mp4" -i "D:\BTO\MemeLaughnClap\Media\FV.mp4" -filter_complex concat=n=2:v=1:a=1 -c:v libx264 -preset medium -crf 23 -c:a aac -b:a 192k -y "D:\BTO\MemeLaughnClap\Shorted\output_temp.mp4"
ffmpeg version 2023-12-18-git-be8a4f80b9-full_build-www.gyan.dev Copyright (c) 2000-2023 the FFmpeg developers
 built with gcc 12.2.0 (Rev10, Built by MSYS2 project)



I hoped they would concat, but they did not.


-
Remove random background from video using ffmpeg or Python
20 avril 2024, par Raheel ShahzadI want to remove background from a person's video using
ffmpeg
orPython
. If I record a video at any place, detect the person in the video and then remove anything except that person. Not asking for green or single color background as that can be done through chromakey and I am not looking for that.


I've tried this (https://tryolabs.com/blog/2018/04/17/announcing-luminoth-0-1/) approach but it is giving me output of rectangular box. It is informative enough as area to explore is narrow down enough but still need to remove total background.
I've also tried
grabcut
(https://docs.opencv.org/4.1.0/d8/d83/tutorial_py_grabcut.html) but that need user interaction otherwise result isn't too good.
I've also tried to useffmpeg
and found this example (http://oioiiooixiii.blogspot.com/2016/09/ffmpeg-extract-foreground-moving.html) but it needs still image so I tried to take background picture before recording video with a person but there are many things required to take difference between background image and video frame.


For
opencv
approach, I've tried this.


img = cv.imread('pic.png')
mask = np.zeros(img.shape[:2], np.uint8)
bgdModel = np.zeros((1, 65), np.float64)
fgdModel = np.zeros((1, 65), np.float64)
rect = (39, 355, 1977, 2638)
cv.grabCut(img, mask, rect, bgdModel, fgdModel, 5, cv.GC_INIT_WITH_RECT)
mask2 = np.where((mask==2)|(mask==0), 0, 1).astype('uint8')
img = img*mask2[:, :, np.newaxis]
plt.imshow(img), plt.colorbar(), plt.show()




But it is removing some of person's part too.
Also tried
ffmpeg
way but not a good result.


ffmpeg -report -y -i "img.jpg" -i "vid.mov" -filter_complex "[1:v]format=yuva444p,lut=c3=128[video2withAlpha],[0:v][video2withAlpha]blend=all_mode=difference[out]" -map "[out]" "output.mp4"




All I need is just a person's image/video take under any normal background without user interaction like area selection or any other thing like that.
Luminoth
has trained data but that is giving box of person not exact person so that I can remove. Any help or guidance to remove background will be appreciated.

-
Evolution #4727 : Des pictos / icônes symboliques pour tout le monde
14 avril 2021Testé brièvement : les
mask-image
fonctionnent très bien en substitut de la font-face, et ça hérite bien de la taille du texte.
Donc partir des seuls svg il serait possible de générer à la fois le sprite et la CSS des classes sémantiques, super pratique.
Je crois que je vais partir là-dessus.Un truc bizarre cependant : quand sur la même page on a à la fois un svg et une classe qui utilisent tous deux le même sprite svg, et bien le navigateur le charge 2 fois.
Peut-être qu’à ce compte là, la classe devrait utiliser les svg indépendants plutôt que le sprite. Enfin bon, ce seront des questions techniques secondaires à résoudre au fil de l’eau dans le plugin, je note juste ça au passage.<span class="CodeRay"><span class="tag">span> <span class="attribute-name">width</span>=<span class="string"><span class="delimiter">"</span><span class="content">1em</span><span class="delimiter">"</span></span> <span class="attribute-name">height</span>=<span class="string"><span class="delimiter">"</span><span class="content">1em</span><span class="delimiter">"</span></span> <span class="attribute-name">fill</span>=<span class="string"><span class="delimiter">"</span><span class="content">currentColor</span><span class="delimiter">"</span></span><span class="tag">></span>
<span class="tag">span> <span class="attribute-name">xlink:href</span>=<span class="string"><span class="delimiter">"</span><span class="content">sprite.svg#briefcase</span><span class="delimiter">"</span></span><span class="tag">/></span>
<span class="tag"></span>
<span class="tag">span> <span class="attribute-name">class</span>=<span class="string"><span class="delimiter">"</span><span class="content">sp-icone_briefcase</span><span class="delimiter">"</span></span><span class="tag">></span>Texte avec icône CSS<span class="tag"></span></span>
<span class="tag"></span>
</span></span></span>