
Recherche avancée
Médias (3)
-
Valkaama DVD Cover Outside
4 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Image
-
Valkaama DVD Label
4 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Image
-
Valkaama DVD Cover Inside
4 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Image
Autres articles (40)
-
Les vidéos
21 avril 2011, parComme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...) -
Les tâches Cron régulières de la ferme
1er décembre 2010, parLa gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
Le super Cron (gestion_mutu_super_cron)
Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...) -
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs
Sur d’autres sites (2392)
-
DWT of frames by FFMPEG API
13 mars 2015, par VaigardHow can I spend the DWT Y component is considered of H.264 video frame ? Do not quite understand the principle of filling the structure
DWTContext
and its schema. And is not a matter ofAVFrame->data[0][x]
values are already converted, for example by DCT ?Thanks and sorry for my English=)
-
Extract subtitle by language code via ffmpeg
7 mai 2023, par TrustFoundI have a simple task - extract subtitle for exact language from tvshows.
For example, I want to extract English subtitles from Netflix's show.
As you know there're a few different types of subtitles : forced, full and SDH.
So I want to extract all of them if it has eng language code.


To extract 1 subtitle from file I used this code for windows :


FOR %%i IN (*.mkv) DO (ffmpeg.exe -i "%%i" -map 0:s:m:language:eng -c copy "%%~ni".eng.srt)



It worked fine with 1 english subtitle per file. But if it contains 2, ffmpeg shows error




SRT supports only a single subtitles stream





MI is...


- 

- Stream #0:2(eng) : Subtitle : subrip
- Stream #0:3(eng) : Subtitle : subrip
- Stream #0:4(ara) : Subtitle : subrip
- ...











So I should set 2 or more output files. I tried to figure out how to do this and found similar threads on reddit and stacksoverflow. They said there's no way to do this without ffprobe.
So I used ffprobe to parse all subtitle tracks and their language code.


FOR %%i IN (*.mkv) DO (ffprobe -loglevel error -select_streams s -show_entries stream=index:stream_tags=language -of csv=p=0 -i %%i > subs.txt)



File contains this info :


- 

- 2,eng
- 3,eng
- 4,ara
- ...











As I understand I should use integers and set them values 2 and 3. I want to get output like this




- 

- MovieName.2.eng.srt
- MovieName.3.eng.srt








If it easier to extract all subs, let it be. I tried to do this too but I dont know how to set integers and use them :(
So what I should do ?
Thanks in advance


-
record video from website using puppeteer + ffmpeg
8 novembre 2020, par rudolfninjaI'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 ?