
Recherche avancée
Médias (1)
-
SPIP - plugins - embed code - Exemple
2 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
Autres articles (57)
-
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 (...) -
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)
Sur d’autres sites (8886)
-
FFmpeg pipe input for concat
14 octobre 2020, par bluejaykeI am trying to make a real time video recorder with ffmpeg (not screen recorder, unity player recorder of Specific dimensions)


I am able to get the ARGB data, and so far I have been writing it to a bunch of bmps and then running ffmpegs concat command like


ffmpeg -i files.txt -i pictures/pic%06d.bmp output.mp4


With different codecs etc, and my files.txt is essentially (pseudo)


ffconcat version 1.0 file pic000000.bmp duration 0.016 #etc, basically the durations were generated from time stamps


Anyways that all works believe it or not, but writing the files to disk as bmp (or even encoding them as a compressed format then writing that to disk) takes up a lot of extra time and I would prefer to pipe the data directly to ffmpeg


I know in some cases you can input a file by using the
-
operator then in whatever programming language the prices was started from pass on the byte data though stdin I am pretty sure, although the problem :

I have only been able to find out how to do this with a set framerate, but not with the concat, and I (think ?) I need to use concat here because it's very important that the images have an exact time stamp on the body to line up with audio, as there will be a slight delay when capturing the frames, and so far I have been calculatabling each frames duration based on their timestamps (and the last one has no duration), in order to line them up perfectly with the audio, but as far as I can find the concat feature seems to require the files to already be written to the disk and then specified in a text file..


So is there any way to get a custom frame rate for each frame without writing the frames to disk first, and just piping them in ? Does concat in any way support
-
? Is there another way I can line up the frames with audio ? Do other video recording softwares face similar issues ?

-
Writing an MP4 slideshow video to S3 using the Lambda FFmpeg Layer
15 avril 2020, par GracieI am using AWS Lambda with the FFmpeg layer to try and build a 15 second MP4 file (beach.mp4) - from 3 static images that show for 3, 5 and 7 seconds in sequence.
These 3 images are within my Lambda upload deployment zip on S3, along with the sequence.txt file needed for the function.



SEQUENCE.TXT



file beach1.jpg
outpoint 3
file beach2.jpg
outpoint 8
file beach3.jpg
outpoint 15



FFMPEG COMMAND



ffmpeg -f concat -i sequence.txt -c:v libx264 -tune stillimage -c:a aac -b:a 192k -pix_fmt yuv420p -shortest beach.mp4



I am writing a file to S3, but it is blank, only 15 bytes. So doesn't contain the MP4 file created by FFmpeg. I think this has something to do with sync or streaming the video file so both the txt can be read and the MP4 can be written to a file, but not sure.



How can I read the .txt contents and then write the ffmpeg command to a file in /tmp/ ?



You can download or view the files at https://lifeisabeach.netlify.app/
(For some strange reason the MP4 length when built locally is 19 seconds, when it should be 15 !)



const util = require('util');
const AWS = require('aws-sdk');
const s3 = new AWS.S3();
const { readFileSync, writeFileSync, unlinkSync, writeFile, readdir } = require('fs');
//const fs = require('fs');
const path = require('path');
const { spawnSync } = require('child_process');

exports.handler = async (event, context, callback) => {

 const outputBucket = 'mys3bucket';
 const sequenceTXT = "sequence.txt";

 // FFmpeg creates the file, using the contents of sequence.txt to create timed image slides
 const mp4create = await spawnSync(
 '/opt/bin/ffmpeg',
 [
 '-f',
 'concat',
 '-i',
 sequenceTXT,
 '-c:v',
 'libx264',
 '-tune',
 'stillimage',
 '-c:a',
 'aac',
 '-b:a',
 '192k',
 '-pix_fmt',
 'yuv420p',
 '-shortest',
 'beach.mp4'
 ]
 );

 // Write ffmpeg output to a file in /tmp/
 const writeMP4File = util.promisify(writeFile);
 await writeMP4File('/tmp/beach.mp4', mp4create, 'binary');
 console.log('MP4 content written to /tmp/');

 // Copy MP4 data to a variable to enable write to S3 Bucket
 let result = mp4create;
 console.log('MP4 Result contents ', result);

 const vidFile = readFileSync('/tmp/beach.mp4');

 // Set S3 bucket details and put MP4 file into S3 bucket from /tmp/
 const s3 = new AWS.S3();
 const params = {
 Bucket: outputBucket,
 Key: 'beach.mp4',
 ACL: 'private',
 Body: vidFile
 };

 // Put MP4 file from AWS Lambda function /tmp/ to an S3 bucket
 const s3Response = await s3.putObject(params).promise();
 callback(null, s3Response);

};



-
Can not use the jsmpeg in react "Unexpected use of 'self'"
5 mai 2020, par Muhammad Anas Khancode that i want to convert in React




 
 <code class="echappe-js"><script type="text/javascript" src='http://stackoverflow.com/feeds/tag/jsmpeg.min.js'></script>


<script type="text/javascript">&#xA; var canvas = document.getElementById("videoCanvas");&#xA; console.log(document.location.hostname);&#xA; var url = "ws://localhost:9999/";&#xA; </script>

 




Can not change it to react format.When i try to convert it is giving jsmpeg error 
i.e



code that i tried but get an error



import React from 'react';
import ReactDOM from 'react-dom';
import "./jsmpeg.min.js"
const App =()=>{
 return(
 <h1>Hello</h1>
 )
}


ReactDOM.render(<app></app>,document.getElementById('root'));




Error



/src/jsmpeg.min.js
Line 606:9 : Unexpected use of 'self' no-restricted-globals
 Line 2771:13 : Expected an assignment or function call and instead saw an expression no-unused-expressions



Search for the keywords to learn more about each error.