
Recherche avancée
Médias (2)
-
Valkaama DVD Label
4 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Image
-
Podcasting Legal guide
16 mai 2011, par
Mis à jour : Mai 2011
Langue : English
Type : Texte
Autres articles (52)
-
La file d’attente de SPIPmotion
28 novembre 2010, parUne file d’attente stockée dans la base de donnée
Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...) -
List of compatible distributions
26 avril 2011, parThe table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...) -
Contribute to documentation
13 avril 2011Documentation is vital to the development of improved technical capabilities.
MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
To contribute, register to the project users’ mailing (...)
Sur d’autres sites (5361)
-
Revision 36114 : Éviter que les navigateurs gardent en cache les étapes de la mutu ...
11 mars 2010, par kent1@… — LogÉviter que les navigateurs gardent en cache les étapes de la mutu notemment intéressant pour ne pas garder la page http://xxx.domaine.tld/ qui restait en cache (sur FF notemment) après l’installation de SPIP en cliquant sur "visiter"
-
POST http://localhost:3000/api/video/thumbnail 500 (Internal Server Error) MongoDB and FFmpeg
5 juillet 2022, par VoicedCreatorI am trying to insert a thumbnail on my page using POST and im getting this error
I want to screenshot a video using FFmpeg


const express = require('express');
const router = express.Router();
const multer = require('multer');
var ffmpeg = require('fluent-ffmpeg');
const { User } = require("../models/User");

const { auth } = require("../middleware/auth");
const storage = multer.diskStorage({
 destination: function (req, file, cb) {
 cb(null, 'uploads/')
 },
 filename: function (req, file, cb) {
 cb(null, `${Date.now()}_${file.originalname}`)
 },
 fileFilter: (req, file, cb) => {
 const ext = path.extname(file.originalname);
 if(ext !== '.mp4' || ext !== '.mov' || ext !== '.wmv'){
 return cb(res.status(400).end('Solo archivos mp4-mov-wmv son aceptados'), false);
 }
 cb(null, true)
 }
 })
 
 const upload = multer({ storage: storage }).single("file")


//=================================
// User
//=================================

router.post("/uploadfiles", (req, res) => {

 upload(req, res, err => {
 if(err) {
 return res.json({ success: false, err })
 }
 return res.json({ success: true, filePath: res.req.file.path, fileName: res.req.file.filename })
 })

});

router.post("/thumbnail", (req, res) => {


 let filePath = ""
 let fileDuration = ""


 ffmpeg.ffprobe(req.body.url, function (err, metadata) {
 console.dir(metadata); // all metadata
 console.log(metadata.format.duration);
 console.log(metadata) 
 fileDuration = metadata.format.duration
 });


 ffmpeg(req.body.url)
 .on('filenames', function (filenames) {
 console.log('Will generate ' + filenames.join(', '))
 console.log(filenames)


 filePath = "uploads/thumbnails/" + filenames[0]
 })
 .on('end', function () {
 console.log('Screenshots taken');
 return res.json({ success: true, url: filePath, fileName: filenames, fileDuration: fileDuration });
 })
 .on('error', function (err) {
 console.error(err);
 return res.json({ success: false, err });
 })
 .screenshots({
 // Will take screenshots at 20%, 40%, 60% and 80% of the video
 count: 3,
 folder: 'uploads/thumbnails',
 size: '320x240',
 //'%b': input basename (filename w/o extension)
 filename: 'thumbnail-%b.png'
 })
});




router.post("/thumbnail", (req, res) => {


 let filePath = ""
 let fileDuration = ""


 ffmpeg(req.body.url)
 .on('filenames', function (filenames) {
 console.log('Will generate ' + filenames.join(', '))
 console.log(filenames)


 filePath = "uploads/thumbnails/" + filenames[0]
 })
 .on('end', function () {
 console.log('Screenshots taken');
 return res.json({ success: true, url: filePath, fileName: filenames, fileDuration: fileDuration });
 })
 .on('error', function (err) {
 console.error(err);
 return res.json({ success: false, err });
 })
 .screenshots({
 // Will take screenshots at 20%, 40%, 60% and 80% of the video
 count: 3,
 folder: 'uploads/thumbnails',
 size: '320x240',
 //'%b': input basename (filename w/o extension)
 filename: 'thumbnail-%b.png'
 })
});



module.exports = router;



Error : POST http://localhost:3000/api/video/thumbnail 500 (Internal Server Error)
TypeError : Cannot read properties of undefined (reading 'format')


I think is because ffmpeg is not connecting to mongodb


-
7 Fintech Marketing Strategies to Maximise Profits in 2024
24 juillet 2024, par Erin