
Recherche avancée
Médias (1)
-
Collections - Formulaire de création rapide
19 février 2013, par
Mis à jour : Février 2013
Langue : français
Type : Image
Autres articles (15)
-
Creating farms of unique websites
13 avril 2011, parMediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...) -
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 -
Gestion des droits de création et d’édition des objets
8 février 2011, parPar défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;
Sur d’autres sites (2341)
-
FFmpeg live streaming with a camera source but the camera source can be changed in realtime
11 janvier 2018, par Faiz A. FarooquiI have a scenario where I would be using a camera source for the live streaming onto YouTube / Facebook.
But I have more than one camera source, so basically I need to change the camera source in real time.
Streaming with a single camera source is working fine for me, here below is the command I am using for the same.
ffmpeg -f avfoundation -framerate 30 -i "1:0" # Camera Source with Mic -f avfoundation -framerate 30 -i "0" # Screen Capture -loop 1 -i background.jpg # Background Image -filter_complex " [2:v] format=argb,colorchannelmixer=aa=0.5 [base] ; [0:v] setpts=PTS-STARTPTS, scale=1440x900 [upperleft] ; [1:v] setpts=PTS-STARTPTS, scale=576x324 [lowerright] ; [base][upperleft] overlay=shortest=1:x=20:y=20 [interim] ; [interim][lowerright] overlay=shortest=1:x=1320:y=740 " -preset fast -pix_fmt bgr0 -s 1920x1080 -threads 1 -f flv "rtmp ://a.rtmp.youtube.com/live2/stream-api-key"
Here I am using a camera source and a screen capture source with a background image for live streaming, and I need to change the camera source in real-time.
-
Video player scroll doesn't work after ffmpeg audio and video merge (NodeJS)
1er novembre 2022, par Pietro LetoI made youtube downloader to download video from youtube using nodejs library ytdl-core. If I wanted to download video with best quality I had to download them without sound. So, in my script, I download audio and video separately and I merge them into an mp4 file.
What's the problem ? Video player scroll doesn't work. I can see the video but I can't going back or move on, and I can't see video duration.


const express = require("express");
const cors = require("cors");
const app = express();
const ffmpeg = require('ffmpeg-static');
const cp = require('child_process');
const ytdl = require("ytdl-core");

app.use(cors());

app.listen(3000, () => {
 console.log("Server is working at port 3000 !!");
});

app.get('/download', (req,res) => {
 var url = req.query.URL;
 var formato = req.query.FORMAT;

 try {
 let vid = ytdl(url,{filter:'videoonly', quality:'highestvideo'})
 let aud = ytdl(url, {filter: 'audioonly', quality:'highestaudio'});

 ytdl.getInfo(url).then(info => {
 titolo = info.videoDetails.title;

 res.header("Content-Disposition", 'attachment; filename=' + titolo + '.mp4');

 const ffmpegProcess = cp.spawn(ffmpeg, [
 '-i', `pipe:3`,
 '-i', `pipe:4`,
 '-map','0:v:0',
 '-map','1:a:0',
 '-c:v', 'copy',
 '-c:a', 'aac',
 '-crf','27',
 '-preset','veryfast',
 '-movflags','frag_keyframe+empty_moov',
 '-f','mp4',
 '-loglevel','error',
 '-'
 ], {
 stdio: [
 'pipe', 'pipe', 'pipe', 'pipe', 'pipe',
 ],
 });
 
 aud.pipe(ffmpegProcess.stdio[4]);
 vid.pipe(ffmpegProcess.stdio[3]);
 ffmpegProcess.stdio[1].pipe(res);
 });
 }
 catch(err) {
 console.log("Error with URL: " + url + "\nERROR: " + err + "\n\n");
 }
});



I have not found alternatives to do this. I need a working script to download youtube videos with good quality.


-
NodeJS fluent-ffmpeg + ytdl-core
22 décembre 2019, par hydr8I’m trying to write a very simple youtube converter/downloader in NodeJS.
So I wrote a srv.js File with Express to handle the whole Website stuff (Requests etc). In this file I also handle a post request on the url+’/download’ which receives the youtube url via a HTML form from the the main page. Within this POST handling I included a function from my api.js.
In the api.js in defined some functions I want to use during the whole process. One of them is responsible for converting a downloaded audio file from youtube. Almost everything is working fine except one thing.
As soon as the user submits the url and is directed to the mentioned ’/download’-site, he will see that the download is in progress and that he will be referred to the download asap. So far so good. The file will be downloaded and converted without any problems.
But as soon as the file is downloaded and converted the the user will not be redirected to a following site.
I tried already a lot of stuff with the ffmpeg events (end, saveToFile, save etc) but I can’t establish a working solution, that as soon as the file is completeley downloaded the user will be rteferred to the next website.
Maybe someone can give me a hint or some suggestion how to proceed.
srv.js :
........
// This is the Handler which calls the function from the api.js file
// After the execution of this process I need to load a new page
app.post('/download', function(req, res){
res.sendFile(path.join(__dirname + '/views/download.html'));
api.downloadConverter(req.body.url)
});
........api.js :
........
downloadConverter: function(url){
console.log("Downloading File from: " + url);
ffmpeg()
.input(ytdl(url), {
... options ....
})
.... some processing ....
.on('end', () => {
console.log("Download Done!");
})
.save('./files/file.mp4')
}
......I tried a lot with the events of the function in api.js. To return vaulues to the srv.js etc but nothings seems to work.
Edit
Of course I did already a lot of research on SO and other NodeJS related sites. But without any help. And I can’t provide tests of possible solutions of the last two days because I didn’t save them and I’m too lazy to retry every step I tried and provide codes with non-working solutions.