Recherche avancée

Médias (91)

Autres articles (112)

  • Script d’installation automatique de MediaSPIP

    25 avril 2011, par

    Afin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
    Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
    La documentation de l’utilisation du script d’installation (...)

  • Demande de création d’un canal

    12 mars 2010, par

    En fonction de la configuration de la plateforme, l’utilisateur peu avoir à sa disposition deux méthodes différentes de demande de création de canal. La première est au moment de son inscription, la seconde, après son inscription en remplissant un formulaire de demande.
    Les deux manières demandent les mêmes choses fonctionnent à peu près de la même manière, le futur utilisateur doit remplir une série de champ de formulaire permettant tout d’abord aux administrateurs d’avoir des informations quant à (...)

  • La sauvegarde automatique de canaux SPIP

    1er avril 2010, par

    Dans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
    Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)

Sur d’autres sites (12397)

  • Does anybody know how to concat on ffmpeg and python ? [closed]

    22 décembre 2023, par Jonas Harker

    I 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 Shahzad

    I want to remove background from a person's video using ffmpeg or Python. 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 use ffmpeg 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 2021

    Testé 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>