
Recherche avancée
Autres articles (35)
-
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 (...) -
Utilisation et configuration du script
19 janvier 2011, parInformations spécifiques à la distribution Debian
Si vous utilisez cette distribution, vous devrez activer les dépôts "debian-multimedia" comme expliqué ici :
Depuis la version 0.3.1 du script, le dépôt peut être automatiquement activé à la suite d’une question.
Récupération du script
Le script d’installation peut être récupéré de deux manières différentes.
Via svn en utilisant la commande pour récupérer le code source à jour :
svn co (...) -
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 (6167)
-
Google App Engine - Access file after uploaded to bucket
28 mai 2021, par jessiPPI have uploaded a file using my google app engine backend to my storage bucket but now I cannot access the file to pass in into ffmpeg. I am getting this error message from the try-catch : "The input file does not exist". I can see that the file was uploaded because I checked my developer console under the storage bucket. I am using the boilerplate code provided by google but added the ffmpeg for testing. I am trying to access the path to the uploaded file using, but it is incorrect, though I am getting the bucket.name value and the blob.name value. I am using the "flex" environment for this.


const originalFilePath = `gs://${bucket.name}/${blob.name}`; 



here is the full code :


const process = require('process'); // Required to mock environment variables
const express = require('express');
const helpers = require('./helpers/index');
const Multer = require('multer');
const bodyParser = require('body-parser');
const ffmpeg = require("ffmpeg"); //https://www.npmjs.com/package/ffmpeg
const {Storage} = require('@google-cloud/storage');

// Instantiate a storage client
const storage = new Storage();

const app = express();
app.set('view engine', 'pug');
app.use(bodyParser.json());

// Multer is required to process file uploads and make them available via
// req.files.
const multer = Multer({
storage: Multer.memoryStorage(),
 limits: {
 fileSize: 5 * 1024 * 1024, // no larger than 5mb, you can change as needed.
 },
});

// A bucket is a container for objects (files).
const bucket = storage.bucket(process.env.GCLOUD_STORAGE_BUCKET);

// Display a form for uploading files.
app.get('/', (req, res) => {
 res.render('form.pug');
});

// Process the file upload and upload to Google Cloud Storage.
app.post('/upload', multer.single('file'), (req, res, next) => {

if (!req.file) {
 res.status(400).send('No file uploaded.');
 return;
}

// Create a new blob in the bucket and upload the file data.
const blob = bucket.file(req.file.originalname);
const blobStream = blob.createWriteStream({
 resumable: false,
});

blobStream.on('error', err => {
 next(err);
});

blobStream.on('finish', () => {

const audioFile = helpers.replaceAllExceptNumbersAndLetters(new Date());

// this path is incorrect but I cannot find correct way to do it
const originalFilePath = `gs://${bucket.name}/${blob.name}`; 

const filePathOutput = `gs://${bucket.name}/${audioFile}.mp3`;

try {
 const process = new ffmpeg(originalFilePath);
 process.then(function (video) {
 // Callback mode
 video.fnExtractSoundToMP3(filePathOutput, (error, file) => {
 if (!error)
 res.send(`audio file: ${file}`);
 });
}, (error) => {
 res.send(`process error: ${error}`);

});
} catch (e) {
 res.send(`try catch error: ${JSON.stringify(e)} | bucket: ${JSON.stringify(bucket)} | 
 blob: : ${JSON.stringify(blob)}`);
} 


});

blobStream.end(req.file.buffer);

});

const PORT = process.env.PORT || 8080;
app.listen(PORT, () => {
 console.log(`App listening on port ${PORT}`);
 console.log('Press Ctrl+C to quit.');
});


module.exports = app;



-
Revision 25eeac0518 : Skip COMDAT sections when parsing COFF Fixes https://code.google.com/p/chromium
4 février 2014, par Rui UeyamaChanged Paths :
Modify /build/make/obj_int_extract.c
Skip COMDAT sections when parsing COFFFixes https://code.google.com/p/chromium/issues/detail?id=339889
when building Clang-based ASan on WindowsChange-Id : Ib77d9593636f46827dbb77f087d407ec0f463fc7
-
Revision 82593 : Support de google analytics universal : version 0.4.6 * Le mode universal ...
19 mai 2014, par cam.lafit@… — LogSupport de google analytics universal : version 0.4.6
* Le mode universal est prise en charge, il s’agit d’une case à cocher pour prendre en compte le script à charger
* La meta est préfixée ga pour éviter un conflit avec le mot potentiellement générique "universal"
Version testée et validée pour spip 3.0
Référence : https://developers.google.com/analytics/devguides/collection/upgrade/reference/gajs-analyticsjs