
Recherche avancée
Médias (1)
-
La conservation du net art au musée. Les stratégies à l’œuvre
26 mai 2011
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (76)
-
MediaSPIP version 0.1 Beta
16 avril 2011, parMediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
Amélioration de la version de base
13 septembre 2013Jolie sélection multiple
Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...) -
Mise à jour de la version 0.1 vers 0.2
24 juin 2013, parExplications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...)
Sur d’autres sites (9984)
-
node.js ffmpeg pass directly to aws s3 bucket
30 décembre 2022, par Eivydas VickusHow to pass ffmpeg output directly to aws s3 bucket ? It should not store output file on my pc. This is my code.



 import {
 DeleteObjectCommand,
 GetObjectCommand,
 PutObjectCommand,
 PutObjectCommandInput,
 S3,
 S3Client,
 } from '@aws-sdk/client-s3';
 import { Inject, Injectable } from '@nestjs/common';
 import { ConfigType } from '@nestjs/config';
 import { nanoid } from 'nanoid';
 import awsConfig from './aws.config';
 import * as path from 'path';
 import { VideoInterface } from '../video/video.interface';
 import { PassThrough } from 'node:stream';

 @Injectable()
 export class S3BucketService {
 public readonly client = new S3Client({
 region: this.config.AWS_BUCKET_REGION,
 credentials: {
 accessKeyId: this.config.AWS_ACCESS_KEY,
 secretAccessKey: this.config.AWS_SECRET_KEY,
 },
 });
 constructor(
 @Inject(awsConfig.KEY)
 private readonly config: ConfigType<typeof awsconfig="awsconfig">,
 ) {}

 async videoPut(putObjectInput: Omit) {
 return new PutObjectCommand({
 ...putObjectInput,
 Bucket: this.config.AWS_BUCKET_NAME,
 });
 }

 async uploadFile({ fileName, file, folder }: VideoInterface) {
 const fullPath = path.normalize(`${folder}/${fileName}`);
 return await this.client.send(
 await this.videoPut({
 Key: fullPath,
 Body: file,
 }),
 );
 }
 }
</typeof>



 const passthroughs = new PassThrough();
 await new Promise<void>(async (resolve, reject) => {
 ffmpeg(fs.createReadStream(file.path))
 .format('webm')
 .outputOptions([
 `-vf scale=${videoOptions[2].scale}`,
 `-b:v ${videoOptions[2].avgBitRate}`,
 `-minrate ${videoOptions[2].minBitRate}`,
 `-maxrate ${videoOptions[2].maxBitRate}`,
 `-tile-columns ${videoOptions[2].tileColumns}`,
 `-g ${videoOptions[2].g}`,
 `-threads ${videoOptions[2].threads}`,
 `-quality ${videoOptions[2].quality}`,
 `-crf ${videoOptions[2].crf}`,
 `-c:v ${videoOptions[2].videoCodec}`,
 `-c:a ${videoOptions[2].audioCodec}`,
 `-speed ${videoOptions[2].speed}`,
 `-y`,
 ])
 .pipe(passthroughs, { end: true })
 .on('error', (err) => {
 reject(err);
 throw new InternalServerErrorException(err);
 })
 .on('data', (data) => {
 console.log({ data });
 })
 .on('end', async () => {
 console.log('Video conversion complete');
 resolve();
 });
 });

 await this.s3BucketService.uploadFile({
 folder: AwsFolder.VIDEOS,
 file: passthroughs,
 fileName: `${nanoid()}_${videoOptions[2].scale}.webm`,
 });

</void>


However i am getting error
Error: Output stream closed
. I saw on google different variants withPassthrough
none of them are working. So how it should be done ? By The Way I am using@aws-sdk/client-s3
and most solutions on google is using aws sdk-2. Maybe streams work different with version 3 ?

-
Opening Video with opencv3 and python on Amazon EC2
11 octobre 2016, par stmlI successfully set up python and opencv3 on an t2.micro instance by following these instructions : http://stackoverflow.com/a/38867965/1213715
The script which worked on my local machine no longer works. The problem seems to be with importing video. The start of my code now looks like this :
import numpy as np
import cv2
cap = cv2.VideoCapture('/home/ec2-user/test.mov')
if(cap.isOpened() == False):
print "Can't open video"
exit()This exits every time. I have tried different paths and different video formats (including .avi).
In other threads, I read that ffmpeg is essential to cv2 video functions, and successfully installed this using the instructions at https://forums.aws.amazon.com/thread.jspa?messageID=524523. I can now run ffmpeg from the command line - but it has not changed the cv2 output.
Do I need to link ffmpeg to cv2 somehow, or do I need to recompile entirely - and if so, what change should I make to the original installation instructions ?
Python version 2.7.12
Opencv version 3.1.0
-
use a wrapper script to call MS link.exe to avoid mixing with /usr/bin/link.exe
24 juillet 2015, par Steve Lhomme