
Recherche avancée
Médias (1)
-
The Slip - Artworks
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
Autres articles (100)
-
Emballe médias : à quoi cela sert ?
4 février 2011, parCe plugin vise à gérer des sites de mise en ligne de documents de tous types.
Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ; -
Librairies et logiciels spécifiques aux médias
10 décembre 2010, parPour un fonctionnement correct et optimal, plusieurs choses sont à prendre en considération.
Il est important, après avoir installé apache2, mysql et php5, d’installer d’autres logiciels nécessaires dont les installations sont décrites dans les liens afférants. Un ensemble de librairies multimedias (x264, libtheora, libvpx) utilisées pour l’encodage et le décodage des vidéos et sons afin de supporter le plus grand nombre de fichiers possibles. Cf. : ce tutoriel ; FFMpeg avec le maximum de décodeurs et (...) -
Taille des images et des logos définissables
9 février 2011, parDans beaucoup d’endroits du site, logos et images sont redimensionnées pour correspondre aux emplacements définis par les thèmes. L’ensemble des ces tailles pouvant changer d’un thème à un autre peuvent être définies directement dans le thème et éviter ainsi à l’utilisateur de devoir les configurer manuellement après avoir changé l’apparence de son site.
Ces tailles d’images sont également disponibles dans la configuration spécifique de MediaSPIP Core. La taille maximale du logo du site en pixels, on permet (...)
Sur d’autres sites (5293)
-
Converting Video files in a Azure Webjob with ffMpeg
13 décembre 2016, par Kevin PhiferI’m having trouble using ffMpeg in an Azure webjob.
I found the following article (How to call ffmpeg.exe to convert audio files on Windows Azure ?) and it is exactly what I want to do, however, I cannot get ffMpeg to execute and it gives no error message.
To diagnose the problem, I have boiled it down to its essentials by uploading ffMpeg, a video file to convert, and batch file to run it :
The script in
run.cmd
is simply :del output.mp4
ffmpeg -i screencast.wmv -c:v libx264 -r 15 output.mp4This works on my personal machine, but ran as a webjob I get results below.
[12/08/2015 15:42:39 > bf9dd6: SYS INFO] Status changed to Initializing
[12/08/2015 15:42:39 > bf9dd6: SYS INFO] Job directory change detected: Job file 'ffmpegtest\output.mp4' exists in source directory but not in working directory.
[12/08/2015 15:42:47 > bf9dd6: SYS INFO] Run script 'run.cmd' with script host - 'WindowsScriptHost'
[12/08/2015 15:42:48 > bf9dd6: SYS INFO] Status changed to Running<br />
[12/08/2015 15:42:48 > bf9dd6: INFO]
[12/08/2015 15:42:48 > bf9dd6: INFO] D:\local\Temp\jobs\triggered\ffMpeg\y1bdnb1e.03k\ffmpegtest>del output.mp4
[12/08/2015 15:42:48 > bf9dd6: INFO]
[12/08/2015 15:42:48 > bf9dd6: INFO] D:\local\Temp\jobs\triggered\ffMpeg\y1bdnb1e.03k\ffmpegtest>ffmpeg -i screencast.wmv -c:v libx264 -r 15 output.mp4
[12/08/2015 15:42:49 > bf9dd6: SYS INFO] Status changed to Failed
[12/08/2015 15:42:49 > bf9dd6: SYS ERR ] Job failed due to exit code -1073741515Edit :
Additionally, it was suggested that I run using Kudu console. Still no luck :
Solution :
I ended up needing to run the 32 version of ffMpeg and not the 64 bit. Thanks so much @mathewc ! -
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.


-
Remove .travis.yml
17 avril 2024, par Martin Storsjö