Recherche avancée

Médias (1)

Mot : - Tags -/censure

Autres articles (79)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • Pas question de marché, de cloud etc...

    10 avril 2011

    Le vocabulaire utilisé sur ce site essaie d’éviter toute référence à la mode qui fleurit allègrement
    sur le web 2.0 et dans les entreprises qui en vivent.
    Vous êtes donc invité à bannir l’utilisation des termes "Brand", "Cloud", "Marché" etc...
    Notre motivation est avant tout de créer un outil simple, accessible à pour tout le monde, favorisant
    le partage de créations sur Internet et permettant aux auteurs de garder une autonomie optimale.
    Aucun "contrat Gold ou Premium" n’est donc prévu, aucun (...)

  • Liste des distributions compatibles

    26 avril 2011, par

    Le tableau ci-dessous correspond à la liste des distributions Linux compatible avec le script d’installation automatique de MediaSPIP. Nom de la distributionNom de la versionNuméro de version Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
    Si vous souhaitez nous aider à améliorer cette liste, vous pouvez nous fournir un accès à une machine dont la distribution n’est pas citée ci-dessus ou nous envoyer le (...)

Sur d’autres sites (8787)

  • 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>
  • Ffmpeg won't copy excerpt of video correctly

    5 mai 2022, par JR Jr.

    I am using a DOS batch to automate and copy excerpts of various high definition videos (mkv's with more than 1GB each).&#xA;The script is very convenient and runs fast and fine, but Ffmpeg is not doing its job correctly (it seems Murphy's law is inexorably enthralled into technology, things never come easy, which is why I love and hate it).

    &#xA;

    Anyway, to cut a long story short, each time the batch job runs, a code like below is executed (pardon me the indiscrete folder name, it's about the 90's TV show, it's not porn !).

    &#xA;

    call "C:\ffmpeg\bin\ffmpeg.exe" -y -i "D:\100\Sexo\S01\SATC - S01E03 - Bay of Married Pigs.mkv" -ss 00:18:05 -to 00:19:15 -codec copy "002-SATC - S01E03 - Bay of Married Pigs-00_18_05-00_19_15.mp4"&#xA;

    &#xA;

    The problem is that the first 6 seconds or so of the resulting video has no video, only audio with a frozen image that only starts to move after about 6 seconds, which is a huge defect, not to mention very annoying (a big let down, after all my meticulous scripting work :(). And this happens for most of the files, except a few ones.

    &#xA;

    Even though this is copying and changing the format from mkv to mp4, per another thread on this site (https://askubuntu.com/questions/396883/how-to-simply-convert-video-files-i-e-mkv-to-mp4), this is not re-encoding, so this is not the issue. Actually, the same problem occurs even if I don't change the format from mkv to mp4.

    &#xA;

    Even though I foresee a "there's no way to fix this", let me ask : is there a way to fix this ? Hopefully there is a way.

    &#xA;