
Recherche avancée
Médias (2)
-
Granite de l’Aber Ildut
9 septembre 2011, par
Mis à jour : Septembre 2011
Langue : français
Type : Texte
-
Géodiversité
9 septembre 2011, par ,
Mis à jour : Août 2018
Langue : français
Type : Texte
Autres articles (43)
-
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 (...) -
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)
Sur d’autres sites (7103)
-
ffmpeg does not record video and audio simultaneously
28 mars 2016, par dilip yadavFor video recording I am using :
ffmpeg -f v4l2 -i /dev/video0 -vcodec h264 -r 20 /home/test.avi
For audio recording I am using :
ffmpeg -f alsa -acodec pcm_alaw -ar 8k -ac 1 /home/w2.wav
Both commands work fine.
When I combine both of them like :
ffmpeg -f v4l2 -i /dev/video0 -f alsa -i hw:0,0 -acodec pcm_alaw -ar 8k -ac 1 -vcodec h264 -r 23 /home/test.avi
It throws :
[alsa @ 0x2650500] ALSA buffer xrun.
[alsa @ 0x2650500] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8)Audio is not recorded, but video is recorded. I don’t know what I am doing wrong.Please help.
-
"How can we use Ffmpeg to apply blur, overlay a logo and waveform, and add a border around a video, step by step ? [closed]
1er février 2024, par itsfaisalkhalidWe're looking to enhance a video using Ffmpeg by implementing several effects sequentially. First, we aim to apply a blur effect to the entire video. Then, we want to overlay a logo and a waveform onto the blurred video. Finally, we need to add a border around the entire composition. This step-by-step process requires precise commands and careful consideration of parameters to achieve the desired result effectively.


I utilized Ffmpeg commands to sequentially apply blur, overlay the logo and waveform, and add a border to the video. I expected each effect to be applied in the specified order, resulting in a visually enhanced video with all desired elements. However, I encountered challenges in properly configuring the parameters for each effect, leading to unexpected results such as misaligned overlays or improper blur intensity.


@echo off
setlocal enabledelayedexpansion

rem Set paths and directories
set "ffmpeg_path=C:\ffmpeg\bin\ffmpeg.exe"
set "input_dir=_input"
set "output_dir=_output"

rem Ensure input and output directories exist
if not exist "%input_dir%" (
 echo Error: Input directory "%input_dir%" not found.
 exit /b 1
)

if not exist "%output_dir%" (
 mkdir "%output_dir%"
)

rem Loop through input directory
for %%t in ("%input_dir%\*.*") DO (

 rem Process each file with ffmpeg
"%ffmpeg_path%" -y -i "%%t" -i logo.png -filter_complex "\
 [0:v]eq=brightness=0.2:saturation=2.0:contrast=1.2, crop=iw/1.2:ih/1.2, \
 boxblur=1:2 [blurred_bg]; \
 [blurred_bg][1:v]overlay=(main_w-overlay_w)/2:(main_h-overlay_h-10)[bg_with_logo]; \
 [0:a]showwaves=s=1080x100:mode=line:colors=white [waveform]; \
 [bg_with_logo][waveform]overlay=10:H-h-10, \
 format=yuv420p[v]; \
 [v]pad=iw+20:ih+20:x=10:y=10:color=white[final_output]" \
 -map "[final_output]" -map 0:a -c:v h264 -c:a aac -b:a 128k -ar 44100 "%output_dir%\temp.mp4"

 rem Check if output file exists
 if exist "%output_dir%\temp.mp4" (
 rem Calculate new MD5 hash
 certutil -hashfile "%output_dir%\temp.mp4" MD5 > "%output_dir%\temp_md5.txt"

 rem Remove ID3 tag metadata
 "%ffmpeg_path%" -i "%output_dir%\temp.mp4" -map_metadata -1 -c:v copy -c:a copy "%output_dir%\%%~nt.mp4"

 rem Clean up temporary files
 del "%output_dir%\temp.mp4"
 del "%output_dir%\temp_md5.txt"
 ) else (
 echo Error: Failed to create output file for "%%~nt"
 )
)

pause




-
Record video with Xvfb + FFmpeg using Selenium in headless mode
12 mars 2024, par ifdef14I am trying to record video using Selenium in headless mode. I am using Xvfb and FFmpeg bindings for Python. I've already tried :


import subprocess
import threading
import time

from chromedriver_py import binary_path
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from xvfbwrapper import Xvfb


def record_video(xvfb_width, xvfb_height, xvfb_screen_num):
 subprocess.call(
 [
 'ffmpeg',
 '-f',
 'x11grab',
 '-video_size',
 f'{xvfb_width}x{xvfb_height}',
 '-i',
 xvfb_screen_num,
 '-codec:v',
 'libx264',
 '-r',
 '12',
 'videos/video.mp4',
 ]
 )


with Xvfb() as xvfb:
 '''
 xvfb.xvfb_cmd[1]) returns scren num
 :217295622
 :319294854
 :
 '''
 xvfb_width, xvfb_height, xvfb_screen_num = xvfb.width, xvfb.height, xvfb.xvfb_cmd[1]
 thread = threading.Thread(target=record_video, args=(xvfb_width, xvfb_height, xvfb_screen_num))
 thread.start()
 opts = webdriver.ChromeOptions()
 opts.add_argument('--headless')
 try:
 driver = webdriver.Chrome(service=Service(executable_path=binary_path), options=opts)
 finally:
 driver.close()
 driver.quit()




As much as I understand
xvfb.xvfb_cmd[1]
returns an information about virtual display isn't it ? When I executed this script, I got the error message :

[x11grab @ 0x5e039cfe2280] Failed to query xcb pointer0.00 bitrate=N/A speed=N/A 
:1379911620: Generic error in an external library



I also tried to use the following commands :


xvfb-run --listen-tcp --server-num 1 --auth-file /tmp/xvfb.auth -s "-ac -screen 0 1920x1080x24" python main.py &


ffmpeg -f x11grab -video_size 1920x1080 -i :1 -codec:v libx264 -r 12 videos/video.mp4


In the commands above, there are used
xvfb-run --server-num 1
andffmpeg -i :1
, why ?

Overall, when Selenium is running in the headless mode what's going on behind the scenes ? Is it using virtual display ? If yes, how can I detect display id of this, etc. Am I on the right path ?


I am not using Docker or any kind of virtualization. All kind of tests are running on my local Ubuntu machine.