
Recherche avancée
Médias (91)
-
Spitfire Parade - Crisis
15 mai 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Wired NextMusic
14 mai 2011, par
Mis à jour : Février 2012
Langue : English
Type : Video
-
Video d’abeille en portrait
14 mai 2011, par
Mis à jour : Février 2012
Langue : français
Type : Video
-
Sintel MP4 Surround 5.1 Full
13 mai 2011, par
Mis à jour : Février 2012
Langue : English
Type : Video
-
Carte de Schillerkiez
13 mai 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
-
Publier une image simplement
13 avril 2011, par ,
Mis à jour : Février 2012
Langue : français
Type : Video
Autres articles (87)
-
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
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 (...) -
MediaSPIP Player : problèmes potentiels
22 février 2011, parLe lecteur ne fonctionne pas sur Internet Explorer
Sur Internet Explorer (8 et 7 au moins), le plugin utilise le lecteur Flash flowplayer pour lire vidéos et son. Si le lecteur ne semble pas fonctionner, cela peut venir de la configuration du mod_deflate d’Apache.
Si dans la configuration de ce module Apache vous avez une ligne qui ressemble à la suivante, essayez de la supprimer ou de la commenter pour voir si le lecteur fonctionne correctement : /** * GeSHi (C) 2004 - 2007 Nigel McNie, (...)
Sur d’autres sites (8050)
-
avutil : remove deprecated FF_API_HDR_VIVID_THREE_SPLINE
19 février, par James Almer -
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 ?

-
website performance issues when using ffmpeg on separate server
10 décembre 2018, par RichI am currently working on a site that uses wordpress and ffmpeg. I have it setup so that I have 3 servers - main, database, ffmpeg. So far I have it all working, however I am still running into issues when I am trying to encode a video.
Whenever I start encoding a video, if I try opening any other links in a new tab, it gets stuck on loading until ffmpeg is done. I dont understand why, since im using multiple servers.
My specs for my servers —
Main (web server) - 4 vCPUs / 8GB RAM / 160GB Disk
Database server - 2 vCPUs / 4GB RAM / 80GB Disk
Ffmpeg server - 8 vCPUs / 32GB / 640GB Disk
They are all in the same region as well, and I have private IPs as public for them. Public IPs uses IPv4.
On my template page I have a form that the users fills out and uploads images, then using ajax it sends the info to my ffmpeg functions in my functions.php file.
Images are uploaded to the main server and then on that server in my functions.php file I use ssh2 to login to the ffmpeg server and run different commands, for example —
$server = "FFMPEG SERVER IP"; // server IP/hostname of the SSH server
$username = "user"; // username for the user you are connecting as on the SSH server
$password = "pass"; // password for the user you are connecting as on the SSH server
// Establish a connection to the SSH Server. Port is the second param.
$connection = ssh2_connect($server, 22);
// Authenticate with the SSH server
ssh2_auth_password($connection, $username, $password);
$sftp = ssh2_sftp($connection);
ssh2_sftp_mkdir($sftp, $thepathw);
$command = '/usr/local/bin/ffmpeg -threads 1 -i '.$thepath .'/audio.mp3 -safe 0 -f concat -i '.$thepath.'/paths.txt -vf "scale=1280:720,setsar=1" -pix_fmt yuv420p -c:a aac -af "volume=-5dB" -c:v libx264 -movflags +faststart '.$fixedtime.' -y '.$output.' 2>&1';
// Execute a command on the connected server and capture the response
$stream = ssh2_exec($connection, $command);
// Sets blocking mode on the stream
stream_set_blocking($stream, true);
// Get the response of the executed command in a human readable form
$output1 = stream_get_contents($stream);
// echo output
echo $output1;The video file that is created is then saved to the ffmpeg server.
This all works as should and Im able to create videos, but the rest of the site doesnt seem to respond/load until ffmpeg is done. This is a big problem since I plan on having multiple users at once on the site.
So how can I improve this setup so that the ffmpeg server doesnt slow down the main server, and multiple users can safely use the site ?
Im also open to the idea of getting another server to upload my images to, instead of on the main. Im not sure if that would help though cause it seems like a lot of pulling/sending data between multiple sources/IPs may slow down the response time.
Any suggestions is appreciated, thanks.