
Recherche avancée
Autres articles (81)
-
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
Creating farms of unique websites
13 avril 2011, parMediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...) -
Le profil des utilisateurs
12 avril 2011, parChaque 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 (...)
Sur d’autres sites (9024)
-
avdevice/x11grab : rename the "w" Window to "root" in paint_mouse_pointer
8 septembre 2014, par Antonio Ospiteavdevice/x11grab : rename the "w" Window to "root" in paint_mouse_pointer
This specifies better the meaning of the variable, and is also in
preparation of a subsequent change which will introduce a temporary
Window variable for which "w" is an good name.Signed-off-by : Antonio Ospite <ao2@ao2.it>
Signed-off-by : Michael Niedermayer <michaelni@gmx.at> -
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.


-
Seeing Blank video when using Xvfb with ffmpeg in headless mode
4 avril 2022, par sxgSeeing blank video while running protractor tests in headless mode using Xvfb, ffmpeg, protractor video reporter



I am using protractor framework for running automation tests. I am using protractor video recorder tool to record video on headless mode. The prerequisite for that is to start Xvfb at the background.



This the setting i am using to run test in headless mode.
Steps followed to enable video in headless mode :



Installed "npm i protractor-video-reporter"
Included ffmpeg setting for docker/linux.
```
 var VideoReporter = require('protractor-video-reporter');
 jasmine.getEnv().addReporter(new VideoReporter({
 baseDirectory: 'reports/videos',
 singleVideo: false,
 saveSuccessVideos: true,
 ffmpegCmd: '/usr/bin/ffmpeg',
 ffmpegArgs: [
 '-y',
 '-r', '30',
 '-f', 'x11grab',
 '-s', '1280x1024',
 '-i', 'process.env.DISPLAY',
 '-g', '300',
 '-vcodec', 'mpeg4'
 ]
 }));




Executed "Xvfb :99 -ac -screen 5 1024x768x8 -listen tcp &" in a terminal
 Executed ```
 DISPLAY=:99 
 export $DISPLAY
``` in a separate window 
 Executed "env DEBUG=protractor-video-reporter protractor conf.js" in a separate terminal

Expected Result:

A video with the recordings that runs tests on google chrome

Actual Result:

Video is getting created but the video appears to be blank.

Chrome Version:73
Chromedriver Version: 2.46
Protractor version:5.4.2