Recherche avancée

Médias (33)

Mot : - Tags -/creative commons

Autres articles (12)

  • MediaSPIP Init et Diogène : types de publications de MediaSPIP

    11 novembre 2010, par

    À l’installation d’un site MediaSPIP, le plugin MediaSPIP Init réalise certaines opérations dont la principale consiste à créer quatre rubriques principales dans le site et de créer cinq templates de formulaire pour Diogène.
    Ces quatre rubriques principales (aussi appelées secteurs) sont : Medias ; Sites ; Editos ; Actualités ;
    Pour chacune de ces rubriques est créé un template de formulaire spécifique éponyme. Pour la rubrique "Medias" un second template "catégorie" est créé permettant d’ajouter (...)

  • MediaSPIP Player : les contrôles

    26 mai 2010, par

    Les contrôles à la souris du lecteur
    En plus des actions au click sur les boutons visibles de l’interface du lecteur, il est également possible d’effectuer d’autres actions grâce à la souris : Click : en cliquant sur la vidéo ou sur le logo du son, celui ci se mettra en lecture ou en pause en fonction de son état actuel ; Molette (roulement) : en plaçant la souris sur l’espace utilisé par le média (hover), la molette de la souris n’exerce plus l’effet habituel de scroll de la page, mais diminue ou (...)

  • Ajouter notes et légendes aux images

    7 février 2011, par

    Pour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
    Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
    Modification lors de l’ajout d’un média
    Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)

Sur d’autres sites (515)

  • how to use ffmpeg in python to record a specific window with system audio without command line and cleanly stop it

    17 juillet 2023, par Jaime

    I'm working in an application that is capturing specific window from my desktop and grabbing the system audio, it application is packaged with pyinstaller with —windowed parameter, when I start to capture video it work perfectly and in a debbug execution it stop cleanly, but when I run it from the packaged file, the ffmpeg process never stop. I'm using subprocess.popen to launch ffmpeg by this way :

    


    command = ['ffmpeg','-f', 'dshow', '-i', f'audio={device}', '-f', 'gdigrab', '-framerate', '30', '-i', f'title={device_model}', '-c:v', 'libx264', '-preset', 'slower', '-crf', '22', f'{file_path}']
subprocess.Popen(comando,stdin=subprocess.PIPE,stdout=subprocess.PIPE,stderr=subprocess.PIPE,shell=False)


    


  • is there a way to change dynamic the water mark text color when using ffmpeg depending on the background color when recording a vieo file ?

    11 juillet 2023, par Shelly Ron

    This command in the command prompt window is working fine and recording the entire screen :

    


    ffmpeg -f gdigrab -framerate 24 -i desktop -preset ultrafast -pix_fmt yuv420p out.mp4


    


    this command prompt add a water mark text in the middle of the screen in white color :

    


    ffmpeg -f gdigrab -framerate 24 -i desktop -vf "drawtext=fontfile=path/to/arial.ttf:text='All rights reserved to ...':fontsize=24:fontcolor=white:x=(w-text_w)/2:y=(h-text_h)/2" -preset ultrafast -pix_fmt yuv420p out.mp4


    


    the problem is that the water mark text is in white and i can see it only when the background window color is black for example when i bring to the front the ffmpeg console window :

    


    water mark

    


    but when it's recording some window with white background, because the text is white it can't be seen.

    


    I want to update the command prompt of the ffmpeg to make somehow dynamic so if the background window is black show the water mark text in white and then if I'm bringing up a window with background white change the water mark text automatic to black.

    


    this is the command i tried for the dynamic effect but it didn't work i got errors and then i tried so many versions of the command line, but nothing helped or worked.

    


    ffmpeg -f gdigrab -framerate 24 -i desktop -filter_complex "[0:v]drawtext=text='Watermark Text':x=(w-text_w)/2:y=(h-text_h)/2:fontfile=arial.ttf:fontsize=24,format=rgba [txt];[txt]split=2 [bw][wc];[bw]lut=r=val*2 [b];[wc]lut=r=val*0.5+0.5:g=val*0.5+0.5:b=val*0.5+0.5 [wc];[wc][b]alphamerge [wm];[wm][0:v]overlay=10:10[outv]" -c:v libx264 -preset ultrafast -map "[outv]" out.mp4


    


    and also tried this

    


    ffmpeg -f gdigrab -framerate 24 -i desktop -filter_complex "[0:v]drawtext=text='Watermark Text':x=(w-text_w)/2:y=(h-text_h)/2:fontfile=Arial.ttf:fontsize=24,format=rgba [txt];[txt]split=2 [bw][wm];[bw][1:v]split=3 [b][g][r];[b]geq=r=0:g=0.5:b=0 [b];[g]geq=r=0:g=0:b=0.5 [g];[r]geq=r=0.5:g=0:b=0 [r];[wm][b][g][r]merge=3,format=rgba [watermark];[0:v][watermark]overlay=x=(W-w)/2:y=(H-h)/2" -map "[watermark]" -map 0:a? -c:v libx264 -c:a copy -preset ultrafast out.mp4


    


  • Error launching ffmpeg in Windows service for screen recording using GDI capture and issue when screen is locked

    21 mai 2023, par Артем Артемыч

    I have a Go application that works as Windows service. It launches ffmpeg to record the screen using the Win32 GDI-based screen capture device. However, when the service runs under the SYSTEM account, ffmpeg fails to start, and I receive the following error :

    


    [gdigrab @ 000001ff2a1ea200] Capturing whole desktop as 1024x768x32 at (0,0)
[gdigrab @ 000001ff2a1ea200] Failed to capture image (error 5)
[gdigrab @ 000001ff2a1ea200] Could not find codec parameters for stream 0 (Video: bmp, none, 125831 kb/s): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
Input #0, gdigrab, from 'desktop':
  Duration: N/A, bitrate: 125831 kb/s
  Stream #0:0: Video: bmp, none, 125831 kb/s, 5 fps, 1000k tbr, 1000k tbn
Output #0, mpegts, to 'pipe:1':
Output file #0 does not contain any stream



    


    However, if I run ffmpeg using the token of the current user, like this :

    


    token, _ := wintoken.GetInteractiveToken(wintoken.TokenLinked) // using the "github.com/fourcorelabs/wintoken" library
a.cmd = exec.Command("ffmpeg", params...)
a.cmd.SysProcAttr = &syscall.SysProcAttr{
    Token:         syscall.Token(token.Token()),
    CreationFlags: 0x08000000,
    HideWindow:    true,
}


    


    the screen recording works. But as soon as the UAC prompt appears or the screen is locked (win+L), the recording stops with the following error :

    


    [gdigrab @ 00000258d9efa540] Failed to capture image (error 5)
Error demuxing input file 0: I/O error
desktop: I/O error


    


    I have tried running ffmpeg with psexec :

    


    timeout 10 /NOBREAK && psexec -i -h -d -s ffmpeg -f gdigrab -framerate 5 -i desktop -c:v libx264 -preset veryfast -bf 2 -g 150 out.mp4



    


    If recording starts while the screen is locked, everything works fine, i.e. ffmpeg records the locked screen. However, I haven't been able to reproduce this behavior when launching from Go. Is it possible to achieve continuous screen recording without stopped when the UAC prompt appears or the screen is locked ?
Or maybe there are other approaches in which I can solve my problem