
Recherche avancée
Médias (1)
-
Revolution of Open-source and film making towards open film making
6 octobre 2011, par
Mis à jour : Juillet 2013
Langue : English
Type : Texte
Autres articles (96)
-
Qu’est ce qu’un éditorial
21 juin 2013, parEcrivez votre de point de vue dans un article. Celui-ci sera rangé dans une rubrique prévue à cet effet.
Un éditorial est un article de type texte uniquement. Il a pour objectif de ranger les points de vue dans une rubrique dédiée. Un seul éditorial est placé à la une en page d’accueil. Pour consulter les précédents, consultez la rubrique dédiée.
Vous pouvez personnaliser le formulaire de création d’un éditorial.
Formulaire de création d’un éditorial Dans le cas d’un document de type éditorial, les (...) -
Encoding and processing into web-friendly formats
13 avril 2011, parMediaSPIP automatically converts uploaded files to internet-compatible formats.
Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
All uploaded files are stored online in their original format, so you can (...) -
Le plugin : Gestion de la mutualisation
2 mars 2010, parLe plugin de Gestion de mutualisation permet de gérer les différents canaux de mediaspip depuis un site maître. Il a pour but de fournir une solution pure SPIP afin de remplacer cette ancienne solution.
Installation basique
On installe les fichiers de SPIP sur le serveur.
On ajoute ensuite le plugin "mutualisation" à la racine du site comme décrit ici.
On customise le fichier mes_options.php central comme on le souhaite. Voilà pour l’exemple celui de la plateforme mediaspip.net :
< ?php (...)
Sur d’autres sites (3950)
-
FFMPEG - Error during conversion : Input stream error : Status code : 403
18 août 2024, par SOURABH UPRETIconst express = require('express');
const ytdl = require('ytdl-core');
const ffmpeg = require('fluent-ffmpeg');
const ffmpegStatic = require('ffmpeg-static');

const app = express();
app.use(express.static('public'));

app.get('/videoInfo', async (req, res) => {
 const { url } = req.query;
 if (!ytdl.validateURL(url)) {
 return res.status(400).send('Invalid URL');
 }

 const requestOptions = {
 headers: {
 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36'
 }
 };

 try {
 const info = await ytdl.getInfo(url, requestOptions);
 const audioFormats = ytdl.filterFormats(info.formats, 'audioonly');
 const highestQualityAudio = audioFormats.reduce((prev, curr) => (prev.audioBitrate > curr.audioBitrate ? prev : curr));

 res.json({
 videoTitle: info.videoDetails.title,
 videoThumbnail: info.videoDetails.thumbnails[info.videoDetails.thumbnails.length - 1].url, 
 audioFormat: highestQualityAudio
 });
 } catch (error) {
 console.error('Error fetching video info:', error);
 res.status(500).send('Failed to retrieve video info.');
 }
});

app.get('/download', (req, res) => {
 const { url } = req.query;

 function downloadAndConvertAudio(retryCount = 0) {
 const requestOptions = {
 headers: {
 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36'
 }
 };

 res.header('Content-Disposition', 'attachment; filename="audio.mp3"');
 const videoStream = ytdl(url, { quality: 'highestaudio', requestOptions: requestOptions });

 ffmpeg(videoStream)
 .setFfmpegPath(ffmpegStatic)
 .audioBitrate(128)
 .toFormat('mp3')
 .on('error', (error) => {
 console.error('Error in ffmpeg conversion:', error);
 if (error.message.includes('403') && retryCount < 3) {
 console.log('Retrying download...');
 setTimeout(() => downloadAndConvertAudio(retryCount + 1), 2000); 
 } else {
 res.status(500).send(`Error during conversion: ${error.message}`);
 }
 })
 .pipe(res);
 }

 downloadAndConvertAudio();
});

const PORT = 3000;
app.listen(PORT, () => {
 console.log(`Server running on http://localhost:${PORT}`);
});



Getting Error during conversion on this server. I tried running it on replit but giving the error all the time. I'm new to this and can't figure out the issue. CHATGPT-4 couldn't help.
Can someone help me with this ???


ChatGPT said - The "Error during conversion : Input stream error : Status code : 410" indicates a "Gone" error, which means the resource you were trying to access is no longer available at the specified URL. This can occur in situations where YouTube content has been removed or is no longer accessible due to changes in YouTube's policy or the specific video's availability.


-
how to prevent the hls video player dont refresh when m3u8 changes
6 juin 2024, par Leohere i am using ffmpeg to use camera and audio to make a hls stream on server as the stream continious old m3u8 components deletes and new ones gets added to main.m3u8. but as we insert the url of hls stream file main.m3u8. the player refreshes as soon as the file gets rewritten because of new and old ones. so


i have tried to change the players like hls.js or videojs etc none were to solve this. how to solve this and make sure the stream runs smoothly.


Server.js


const startStreaming = (viddev,auddev) => {
 if (ffmpegProcess) {
 ffmpegProcess.kill();
 }
 const segmentDuration = 10;
 const outputFilename = './video/output.m3u8';
 const ffmpegCommand = `ffmpeg -f dshow -i video="${viddev}" -f dshow -i audio="${auddev}" -codec:v libx264 -preset ultrafast -tune zerolatency -codec:a aac -b:a 128k -hls_time ${segmentDuration} -hls_list_size 3 -hls_flags delete_segments -start_number 0 -hls_segment_type mpegts ${outputFilename}`;

 ffmpegProcess = exec(ffmpegCommand);

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

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

app.use('/video', express.static(path.join(__dirname, 'video')));

// Endpoint to list audio and video devices
app.get('/devices', async (req, res) => {
 const data=await parseDevices()
 // console.log(data.cameras[0].name)
 startStreaming(data.cameras[0].name,data.microphones[0].name);
 res.json(data)
});



index.html





 
 
 
 
 



 
 <source src="https://localhost:3000/video/output.m3u8" type="application/x-mpegURL">
 

 <code class="echappe-js"><script src="https://vjs.zencdn.net/8.10.0/video.min.js"></script>

<script>&#xA; // Initialize Video.js player&#xA; var player = videojs(&#x27;video&#x27;, {&#xA; autoplay: &#x27;play&#x27;,&#xA; liveui: true // Enable the live UI for live streams&#xA; });&#xA;&#xA; // Seek to live when the player is ready&#xA; player.ready(function() {&#xA; player.liveTracker.on(&#x27;liveedgechange&#x27;, function() {&#xA; player.currentTime(player.liveTracker.liveCurrentTime());&#xA; });&#xA; });&#xA;&#xA; // Handle any errors encountered by Video.js&#xA; player.on(&#x27;error&#x27;, function() {&#xA; console.error(&#x27;Video.js encountered an error:&#x27;, player.error());&#xA; });&#xA; </script>







-
How to Extract Frames from the uploaded video through ffmpeg using node js ?
2 février 2021, par Aditya VyasI have created application in which user uploads a video , from that video i want to extract 50 images using ffmpeg in nodejs, but i am unable to get that file after uploading it in specific folder. I am uploading video through multer as it stores video in specified folder, after that i read that video using read stream but it is not giving proper information on that particular video


Code :


var express = require('express');

var app = express();

var bodyParser = require('body-parser');

var path = require('path');

var multer = require('multer');

var cfenv = require('cfenv');

var watson = require('watson-developer-cloud');

var ffmpeg = require('ffmpeg');

app.use(bodyParser.json());

app.use(bodyParser.urlencoded({"extended": false}));

app.use(express.static(__dirname + '/public'));

var storage = multer.diskStorage({
 destination: function(req, file, callback){
 callback(null, './public/class'); // set the destination
 },
 filename: function(req, file, callback){
 callback(null, 199212+ '.avi'); // set the file name and extension
 }
});

var upload = multer({storage: storage});
 
 app.upload = upload;
 
 // get the app environment from Cloud Foundry
 var appEnv = cfenv.getAppEnv();

var VisualRecognitionV3 = require('watson-developer-cloud/visual-recognition/v3');

var fs = require('fs');


var visualRecognition = new VisualRecognitionV3({
 version: '2018-03-19',
 iam_apikey: 'aaIFu-fHWBXgj09eVarEQUFlIaTeH9bpgvRqHIJxu_8N'
});


app.post('/imgtable',app.upload.single('video-upl'),function(req,res){
 
 var video_file = fs.createReadStream(req.file.path);
 
 try {
 var process = new ffmpeg('./public/class/199212.avi');
 process.then(function (video) {
 // Video metadata
 console.log('******************************');
 console.log(video);
 // FFmpeg configuration
 console.log('*********************************');
 console.log(video.info_configuration);
 }, function (err) {
 console.log('Error: ' + err);
 });
} catch (e) {
 console.log(e.code);
 console.log(e.msg);
}

 
})

app.listen(3000);`