Recherche avancée

Médias (91)

Autres articles (36)

  • Pas question de marché, de cloud etc...

    10 avril 2011

    Le vocabulaire utilisé sur ce site essaie d’éviter toute référence à la mode qui fleurit allègrement
    sur le web 2.0 et dans les entreprises qui en vivent.
    Vous êtes donc invité à bannir l’utilisation des termes "Brand", "Cloud", "Marché" etc...
    Notre motivation est avant tout de créer un outil simple, accessible à pour tout le monde, favorisant
    le partage de créations sur Internet et permettant aux auteurs de garder une autonomie optimale.
    Aucun "contrat Gold ou Premium" n’est donc prévu, aucun (...)

  • 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 (...)

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

Sur d’autres sites (5398)

  • How to get the information of bit-rate from YouTube videos ?

    21 février 2017, par Ashutosh Singla

    I was using YouTube videos for my test and I was wondering how can I get the information of bit-rate of the played video ?

    I used 2 methods to know the information about the bit-rate but didn’t get any information.

    1. Right-click on a video and choose "Stats for nerds".
    2. ffmpeg -i input_video -f ffmetadata metadata.txt

    I don’t know if by doing the right click on the video and then properties, then details would give me the correct way of showing the bit-rate.

    Any suggestions ?

  • How to Capture a Sequence of High-Quality PDF Frames from a Website (Without Screen Recording) ?

    9 mars, par Pubg Mobile

    In 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 !

    


  • record video from website using puppeteer + ffmpeg

    8 novembre 2020, par rudolfninja

    I'm trying to record video from website using the way similar to puppeteer-recorder, but I want to stop recording by myself and then save it to file (after I stopped it). I wrote simple web service for this purpose :

    


    var express = require('express');
var app = express();
const { spawn } = require('child_process');
const puppeteer = require('puppeteer');
var record = true;


app.get('/startRecord', function (req, res)
{
const frun_record = async () => {
    console.log("Start recording");
    const browser = await puppeteer.launch();
    const page = await browser.newPage();
    await page.goto('http://worldfoodclock.com/', { waitUntil: 'networkidle2' });
    var ffmpegPath = 'ffmpeg';
    var fps = 60;

    var outFile = 'E:\\Code\\video-record\\output.webm';

    const args = ffmpegArgs(fps);

    args.push(outFile);

    const ffmpeg = spawn(ffmpegPath, args);

    const closed = new Promise((resolve, reject) => {
        ffmpeg.on('error', reject);
        ffmpeg.on('close', resolve);
    });

    console.log("Entering loop");

    while (record) {
        let screenshot = await page.screenshot({ omitBackground: true });
        await write(ffmpeg.stdin, screenshot);
    }
    ffmpeg.stdin.end();
    console.log("Recording stopped");
    await closed;
};
frun_record();
res.end( "starting recording" );
})

app.get('/stopRecord', function (req, res) {
 record = false;
 res.end( "stopped" );
})

const ffmpegArgs = fps => [
  '-y',
  '-f',
  'image2pipe',
  '-r',
  `${+fps}`,
  '-i',
  '-',
  '-c:v',
  'libvpx',
  '-auto-alt-ref',
  '0',
  '-pix_fmt',
  'yuva420p',
  '-metadata:s:v:0',
  'alpha_mode="1"'
];

const write = (stream, buffer) =>
    new Promise((resolve, reject) => {
        stream.write(buffer, error => {
            if (error) reject(error);
            else resolve();
        });
    });

var server = app.listen(8081, function () {
var host = server.address().address
var port = server.address().port
console.log("Example app listening at http://%s:%s", host, port)
})


    


    But it always record only 1 second video, looks like stream is just overwritten. I tried just save screenshots on disk and it was more than 1 second of video.
So the main question is how to put all the screenshots into the stream and then save it on disk ? And another thing I'd like to know is what the frequency of taking screenshots from web page ?