
Recherche avancée
Médias (91)
-
MediaSPIP Simple : futur thème graphique par défaut ?
26 septembre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Video
-
avec chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
sans chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
config chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
SPIP - plugins - embed code - Exemple
2 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
GetID3 - Bloc informations de fichiers
9 avril 2013, par
Mis à jour : Mai 2013
Langue : français
Type : Image
Autres articles (99)
-
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...) -
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 (...)
Sur d’autres sites (8703)
-
ffmpeg black screen issue for video video generation from a list of frames
11 mai 2023, par arlaineI used a video to generate a list of frames from it, then I wanted to create multiple videos from this list of frames.
I've set starting and ending frames indexes for each "sub video", so for example,

indexes = [[0, 64], [64, 110], [110, 234], [234, 449]]
, and those indexes will help my code generate 4 videos of various durations. The idea is to decompose the original video into multiple sub videos. My code is working just fine, the video generated.

But every sub video start with multiple seconds of black screen, only the first generated video (so the one using
indexes[0]
for starting and ending frames) is generated without this black screen part. I've tried changing the frame rate for eachsub_video
, according to the number of frames and things like that, but I didn't work. You can find my code below

for i, (start_idx, end_idx) in enumerate(self.video_frames_indexes):
 if end_idx - start_idx > 10:
 shape = cv2.imread(f'output/video_reconstitution/{video_name}/final/frame_{start_idx}.jpg').shape
 os.system(f'ffmpeg -r 30 -s {shape[0]}x{shape[1]} -i output/video_reconstitution/{video_name}/final/frame_%d.JPG'
 f' -vf "select=between(n\,{start_idx}\,{end_idx})" -vcodec libx264 -crf 25'
 f' output/video_reconstitution/IMG_7303/sub_videos/serrage_{i}.mp4')



Just the ffmpeg command


ffmpeg -r 30 -s {shape[0]}x{shape[1]} -i output/video_reconstitution/{video_name}/final/frame_%d.JPG -vf "select=between(n\,{start_idx}\,{end_idx})" -vcodec libx264 -crf 25 output/video_reconstitution/IMG_7303/sub_videos/serrage_{i}.mp4



-
Xvfb records a black screen
11 mai 2024, par VivekI 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 {

 url = 'https://stackoverflow.com/questions/3143698/uncaught-syntaxerror-unexpected-token'; // Replace with your URL
 outputFilePath = `/app/output_video.mp4`; // Output file path within the container
 durationInSeconds = 6; // Duration of the video in seconds
 resolution = '1280x720';

 public async capture(): Promise<string> {
 const browser = await puppeteer.launch({
 args: [
 '--no-sandbox', // Required in Docker
 '--disable-setuid-sandbox', // Required in Docker
 '--disable-dev-shm-usage', // Required in Docker
 '--headless', // Run browser in headless mode
 '--disable-gpu', // Disable GPU acceleration
 `--window-size=${this.resolution}` // Set window size
 ],
 executablePath: '/usr/bin/chromium' // Specify the path to Chromium executable
 });

 const page = await browser.newPage();
 await page.goto(this.url);

 await page.screenshot({
 "type": "png", // can also be "jpeg" or "webp" (recommended)
 "path": `/app/screenshot.png`, // where to save it
 "fullPage": true, // will scroll down to capture everything if true
 });

 //ffmpeg -video_size `DISPLAY=:5 xdpyinfo | grep 'dimensions:'|awk '{print $2}'` -framerate 30 -f x11grab -i :5.0+0,0 output.mpg

 const ffmpegProcess = spawn('ffmpeg', [
 '-video_size', this.resolution,
 '-framerate', '30',
 '-f', 'x11grab',
 '-i', ':99', // Use display :99 (assuming Xvfb is running on this display)
 '-t', this.durationInSeconds.toString(),
 '-c:v', 'libx264',
 '-loglevel', 'debug',
 '-pix_fmt', 'yuv420p',
 this.outputFilePath
 ]);

 // Log ffmpeg output
 ffmpegProcess.stdout.on('data', data => {
 console.log(`ffmpegProcess stdout: ${data}`);
 });

 ffmpegProcess.stderr.on('data', data => {
 console.error(`ffmpegProcess stderr: ${data}`);
 });

 // Handle ffmpegProcess process exit
 ffmpegProcess.on('close', code => {
 console.log(`ffmpeg process exited with code ${code}`);
 });

 // Wait for the duration to complete
 await new Promise(resolve => setTimeout(resolve, this.durationInSeconds * 1000));

 // Close the FFmpeg stream and process
 ffmpegProcess.stdin.end();
 // Close Puppeteer
 await page.close();
 await browser.close();

 return "Video generated successfully";
 }
}
</string>




-
ffmpeg command produces black image as output
3 mars 2020, par Nishad DESHMUKHInput #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: -1frame= 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