Recherche avancée

Médias (1)

Mot : - Tags -/bug

Autres articles (78)

  • Mise à jour de la version 0.1 vers 0.2

    24 juin 2013, par

    Explications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
    Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains 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, par

    Pré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 (7726)

  • FFPLAY shows video, but FFMPEG just shows black

    22 mai 2017, par ahenshaw

    I’m trying to record video/audio from a VIDBOX device using ffmpeg. Using Windows 10 and ffmpeg version N-86129-g1e8daf3, I can see and hear the video/audio fine when I execute

    ffplay -f dshow -i video="VIDBOX NW07":audio="Microphone (VIDBOX NW07)"

    but, I only record a black screen (and the correct audio) when I execute

    ffmpeg -f dshow -i video="VIDBOX NW07":audio="Microphone (VIDBOX NW07)" -c:v libx264 out.mp4

    What could be causing this to work in ffplay but not ffmpeg ?

  • ffmpeg command produces black image as output

    3 mars 2020, par Nishad DESHMUKH

    Input #0, video4linux2,v4l2, from ’/dev/video0’ :

    Duration : N/A, start : 13555.753906, bitrate : 147456 kb/s

    Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 640x480, 147456 kb/s, 30 fps, 30 tbr, 1000k tbn, 1000k tbc

    Stream mapping :

    Stream #0:0 -> #0:0 (rawvideo (native) -> mjpeg (native))

    Press [q] to stop, [?] for help
    [swscaler @ 0x55fd0eafa3e0] deprecated pixel format used, make sure you did set range correctly
    Output #0, image2, to ’test1.jpeg’ :

    Metadata :

    encoder         : Lavf57.83.100

    Stream #0:0: Video: mjpeg, yuvj422p(pc), 640x480, q=2-31, 200 kb/s, 30 fps, 30 tbn, 30 tbc

    Metadata:

     encoder         : Lavc57.107.100 mjpeg

    Side data:

     cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1

    frame= 1 fps=0.0 q=1.6 Lsize=N/A time=00:00:00.03 bitrate=N/A speed=8.41x

    video:3kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead : unknown

  • Xvfb records a black screen

    11 mai 2024, par Vivek

    I am trying a record a video by running xvfb inside a docker image. No matter what I do it gives me black screen.

    


    Screen size same in xvfb and ffmpeg and puppeteer.

    


    It will would really great if someone can help.

    


    
start-xvfb.sh
---------------------------------------------------------------------
# Start Xvfb
Xvfb :99 -screen 0 1280x720x24 &

# Set the display environment variable
export DISPLAY=:99

# Run the application (assuming it starts with npm start)
npm run dev


    


    Dockerfile

    


    FROM node:lts-alpine3.19

# Install dependencies using apk
RUN apk update && \
    apk add --no-cache \
    gnupg \
    ffmpeg \
    libx11 \
    libxcomposite \
    libxdamage \
    libxi \
    libxtst \
    nss \
    cups-libs \
    libxrandr \
    alsa-lib \
    pango \
    gtk+3.0 \
    xvfb \
    bash \
    curl \
    udev \
    ttf-freefont \
    chromium \
    chromium-chromedriver

# Set working directory
WORKDIR /app

# Copy package.json and install dependencies
COPY package.json .
RUN npm install --force

# Copy remaining source code
COPY . .

# Add a script to start Xvfb
COPY start-xvfb.sh /app/start-xvfb.sh
RUN chmod +x /app/start-xvfb.sh

# Expose the port
EXPOSE 4200
EXPOSE 3000

# Command to start Xvfb and run the application
CMD ["./start-xvfb.sh"]


    


    Below

    


    this is code code that launches puppeteer and from a nodejs application and create spawns a process for ffmpeg

    


    export class UnixBrowserRecorder implements Recorder {&#xA;&#xA;  url = &#x27;https://stackoverflow.com/questions/3143698/uncaught-syntaxerror-unexpected-token&#x27;; // Replace with your URL&#xA;  outputFilePath = `/app/output_video.mp4`; // Output file path within the container&#xA;  durationInSeconds = 6; // Duration of the video in seconds&#xA;  resolution = &#x27;1280x720&#x27;;&#xA;&#xA;  public async capture(): Promise<string> {&#xA;    const browser = await puppeteer.launch({&#xA;      args: [&#xA;        &#x27;--no-sandbox&#x27;, // Required in Docker&#xA;        &#x27;--disable-setuid-sandbox&#x27;, // Required in Docker&#xA;        &#x27;--disable-dev-shm-usage&#x27;, // Required in Docker&#xA;        &#x27;--headless&#x27;, // Run browser in headless mode&#xA;        &#x27;--disable-gpu&#x27;, // Disable GPU acceleration&#xA;        `--window-size=${this.resolution}` // Set window size&#xA;      ],&#xA;      executablePath: &#x27;/usr/bin/chromium&#x27; // Specify the path to Chromium executable&#xA;    });&#xA;&#xA;    const page = await browser.newPage();&#xA;    await page.goto(this.url);&#xA;&#xA;    await page.screenshot({&#xA;      "type": "png", // can also be "jpeg" or "webp" (recommended)&#xA;      "path": `/app/screenshot.png`,  // where to save it&#xA;      "fullPage": true,  // will scroll down to capture everything if true&#xA;    });&#xA;&#xA;    //ffmpeg -video_size `DISPLAY=:5 xdpyinfo | grep &#x27;dimensions:&#x27;|awk &#x27;{print $2}&#x27;` -framerate 30 -f x11grab -i :5.0&#x2B;0,0 output.mpg&#xA;&#xA;    const ffmpegProcess = spawn(&#x27;ffmpeg&#x27;, [&#xA;      &#x27;-video_size&#x27;, this.resolution,&#xA;      &#x27;-framerate&#x27;, &#x27;30&#x27;,&#xA;      &#x27;-f&#x27;, &#x27;x11grab&#x27;,&#xA;      &#x27;-i&#x27;, &#x27;:99&#x27;, // Use display :99 (assuming Xvfb is running on this display)&#xA;      &#x27;-t&#x27;, this.durationInSeconds.toString(),&#xA;      &#x27;-c:v&#x27;, &#x27;libx264&#x27;,&#xA;      &#x27;-loglevel&#x27;, &#x27;debug&#x27;,&#xA;      &#x27;-pix_fmt&#x27;, &#x27;yuv420p&#x27;,&#xA;      this.outputFilePath&#xA;    ]);&#xA;&#xA;    // Log ffmpeg output&#xA;    ffmpegProcess.stdout.on(&#x27;data&#x27;, data => {&#xA;      console.log(`ffmpegProcess stdout: ${data}`);&#xA;    });&#xA;&#xA;    ffmpegProcess.stderr.on(&#x27;data&#x27;, data => {&#xA;      console.error(`ffmpegProcess stderr: ${data}`);&#xA;    });&#xA;&#xA;    // Handle ffmpegProcess process exit&#xA;    ffmpegProcess.on(&#x27;close&#x27;, code => {&#xA;      console.log(`ffmpeg process exited with code ${code}`);&#xA;    });&#xA;&#xA;    // Wait for the duration to complete&#xA;    await new Promise(resolve => setTimeout(resolve, this.durationInSeconds * 1000));&#xA;&#xA;    // Close the FFmpeg stream and process&#xA;    ffmpegProcess.stdin.end();&#xA;    // Close Puppeteer&#xA;    await page.close();&#xA;    await browser.close();&#xA;&#xA;    return "Video generated successfully";&#xA;  }&#xA;}&#xA;</string>

    &#xA;

    enter image description here

    &#xA;