
Recherche avancée
Autres articles (79)
-
MediaSPIP v0.2
21 juin 2013, parMediaSPIP 0.2 est la première version de MediaSPIP stable.
Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
MediaSPIP version 0.1 Beta
16 avril 2011, parMediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir
Sur d’autres sites (9742)
-
Terminating FFMPEG from Python using Linux
17 mai 2019, par smartzerSo I have a project that listens for button inputs in Python, and records video from a camera and an external microphone once a certain button is pressed, now when I want to stop recording, I press another button and stop recording on my camera and the microphone, and then I call ffmpeg using the subprocess module :
mergeFiles = subprocess.Popen("sudo ffmpeg -i /home/pi/Video/video.mov -i /home/pi/Audio/test.wav -acodec copy -vcodec copy -map 0:v -map 1:a -shortest /media/pi/USB/Output/output.mkv", shell=True)
to merge the audio and video files I just created.
Now once I call ffmpeg, it doesn’t stop until I send the process a signal interrupt from the keyboard... is there a way to either have the process stop as soon as it’s done merging, or to automatically terminate/kill ffmpeg after a certain amount of time ?
I have read up on other posts like this and none of the solutions work for me. I can’t kill the process using the PID because every time I look up ffmpeg’s PID, it is a different ID, and calling something like
mergeFiles.kill()
doesn’t work for me. -
Evolution #4203 (En cours) : Utiliser le type email sur les champs concernés en HTML5
25 octobre 2018, par b bComme indiqué dans cet article https://www.smashingmagazine.com/2018/10/form-design-patterns-excerpt-a-registration-form/ :
The input’s type attribute is set to email, which triggers an email-specific onscreen keyboard on mobile devices. This gives users easy access to the @ and . (dot) symbols which every email address must contain.
On devrait donc, si la config HTML5 est active (voir ce que je dis à ce sujet dans #4202), utiliser ce type sur les inputs des emails (comme c’est déjà le cas dans saisies).
-
How to Capture a Sequence of High-Quality PDF Frames from a Website (Without Screen Recording) ?
9 mars, par Pubg MobileIn Firefox, I can take very high-quality screenshots of a webpage by using Ctrl + P and saving the page as a PDF. This method preserves the text, images, and code in excellent resolution.


Now, I have created a movable bar chart race in Flourish Studio and want to convert it into a high-quality video. However, I do not want to use screen recording tools.


My Goal :

I want to capture 30 high-resolution PDF frames from the website at different points in time (like a video sequence). Ideally, I need a tool or script that can automate the process of saving multiple PDFs from the website as it plays the animation.

What I Tried :

I attempted to write a Python script that :

Opens the local HTML file of my Flourish chart in Firefox using Selenium.

Waits for the page to load.

Listens for the F1 key and triggers Ctrl + P to print the page as a PDF.

However, the script does not save the PDF file in the output folder. I'm not sure why.

Here is my code :


import time
import keyboard
from selenium import webdriver
from selenium.webdriver.firefox.service import Service
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.firefox.options import Options

# Define paths
html_file_path = r"E:\Desktop\New folder (4)\20250309101616805.html"
geckodriver_path = r"E:\Desktop\New folder (4)\geckodriver.exe"
save_path = r"E:\Desktop\New folder (4)\New folder\output.pdf" # Save PDF location

# Set up Firefox options
options = Options()
options.set_preference("print.always_print_silent", True) # Silent printing
options.set_preference("print.show_print_progress", False) # Hide progress
options.set_preference("print.print_to_file", True) # Print to file
options.set_preference("print.save_print_settings", True) # Save settings
options.set_preference("print.printer_PDF", "Save as PDF") # Set printer
options.set_preference("print.print_to_file", True) # Enable saving print output to file
options.set_preference("print.print_file_name", save_path) # Define the save location for PDF

# Start WebDriver
service = Service(executable_path=geckodriver_path)
driver = webdriver.Firefox(service=service, options=options)

# Open the HTML file
driver.get("file:///" + html_file_path)

# Wait for the page to load
time.sleep(2)

print("Press F1 to save as PDF.")

# Listen for F1 key press
while True:
 if keyboard.is_pressed('F1'):
 print("F1 pressed, saving as PDF...")
 
 # Trigger print command (Ctrl + P)
 body = driver.find_element(By.TAG_NAME, 'body')
 body.send_keys(Keys.CONTROL + 'p')
 
 # Wait for the print dialog to process
 time.sleep(2)

 print("PDF should be saved to:", save_path)
 break

# Close browser
driver.quit()



My Questions :


Why is my script not saving the PDF in the specified output folder ?


Is there a better way to automate capturing 30 sequential PDFs from the website at different animation frames ?


Is there any tool or script that can generate a sequence of PDFs (like 30 frames per second) from a webpage ?


Important :


I do NOT want to use screen recording tools.


I only need high-quality PDF frames that can later be converted into a video.


Any help would be greatly appreciated !