
Recherche avancée
Médias (1)
-
The pirate bay depuis la Belgique
1er avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
Autres articles (35)
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains 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 ;
-
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 -
Les images
15 mai 2013
Sur d’autres sites (6338)
-
Rolling screen capture with ffmpeg on windows
11 décembre 2020, par gap210I have the following code to capture a video stream from my webcam. I use ffmpeg to write to named windows pipe, then read it with python and display with opencv. The thing is that the opencv stream is 'rolling' as shown here https://www.youtube.com/watch?v=H78TRo3DZIo


If I capture the output to a video instead of a pipe, with the command :


ffmpeg -f dshow -video_size 1920x1080 -framerate 60 -i video="USB Video" -c:v copy out.avi


everything looks fine. What should I change to achieve the desired effect ? (non-rolling stream)


My code below :


import cv2
import time
import subprocess
import numpy as np

w, h = 800, 600

# Get frame generator
gen = ffmpegGrab()

# Get start time
start = time.time()

# Read video frames from ffmpeg in loop
nFrames = 0
cmd = 'C:/Users/......./Downloads/ffmpeg-4.3.1-2020-11-19-full_build/bin/ffmpeg.exe -f dshow -framerate 60 -video_size 800x600 -i video="USB Video" -pix_fmt bgr24 -vcodec rawvideo -f image2pipe -'

proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True, bufsize=10**9)
while True:
 # Read next frame from ffmpeg

 frame = proc.stdout.read(w * h * 3)
 frame = np.frombuffer(frame, dtype=np.uint8).reshape((h, w, 3))
 cv2.imshow('screenshot', frame)

 if cv2.waitKey(1) == ord("q"):
 break

 fps = nFrames / (time.time() - start)
 print(f'FPS: {fps}')

cv2.destroyAllWindows()



-
why am I getting undefined for fluentffmpeg's method setFfmpegPath()
5 décembre 2020, par Hamza JI am trying to build a thumbnail generator but I get an undefined error when I run the script in node js.


const fluentffmpeg = require("fluent-ffmpeg");
const ffmpegPath = require("@ffmpeg-installer/ffmpeg").path;
const ffprobePath = require("@ffprobe-installer/ffprobe").path;
const fs = require("fs");

fluentffmpeg.setFfmpegPath(ffmpegPath)
console.log('fluentffmpeg.setFfmpegPath(ffmpegPath)', fluentffmpeg.setFfmpegPath(ffmpegPath))
//
fluentffmpeg.setFfprobePath(ffprobePath);
console.log('fluentffmpeg.setFfprobePath(ffprobePath)', fluentffmpeg.setFfprobePath(ffprobePath));



console output :


fluentffmpeg.setFfmpegPath(ffmpegPath) undefined
fluentffmpeg.setFfprobePath(ffprobePath) undefined



-
Unexpected Exception when using ffmpeg.wasm in Chrome extension
18 novembre 2020, par Javierd98I'm trying to implement a chrome extension which allows me to play flv videos by transcoding them to mp4 and then inserting a video player as it's done on the transcode example from ffmpeg.wasm.


As chrome extensions don't support the execution of downloaded code, I need to use a downloaded version of ffmpeg-core.
I've downloaded the 0.8.4 version and included the folder on the manifest under web_accessible_resources, so that on the javascript file for trancoding the code is :


const { createFFmpeg, fetchFile } = FFmpeg;
const ffmpeg = createFFmpeg({
 log: true,
 corePath: chrome.runtime.getURL('ffmpeg-core/ffmpeg-core.js'),
});

const transcode = async (file) => {
 const { name } = file;
 console.log('Loading ffmpeg-core.js. Transcode URL.');
 await ffmpeg.load();
 console.log('ffmpeg-core loaded.');

 let blob = await fetch(file).then(r => r.blob());
 console.log('blob downloaded');

 ffmpeg.FS('writeFile', name, blob);
 console.log('Start transcoding');
 await ffmpeg.run('-i', name, 'output.mp4');
 console.log('Complete transcoding');
 const data = ffmpeg.FS('readFile', 'output.mp4');

 const video = document.getElementById('output-video');
 video.src = URL.createObjectURL(new Blob([data.buffer], { type: 'video/mp4' }));
}



Once the transcode function is executed, I get the following exception :


ffmpeg.min.js:1 Uncaught (in promise) TypeError: t is not a function
 at ffmpeg.min.js:1
 at f (ffmpeg.min.js:1)
 at Generator._invoke (ffmpeg.min.js:1)
 at Generator.next (ffmpeg.min.js:1)
 at i (ffmpeg.min.js:1)
 at c (ffmpeg.min.js:1)





Does somebody have any idea of why could this be happening ?


Thanks a lot !