
Recherche avancée
Médias (1)
-
Collections - Formulaire de création rapide
19 février 2013, par
Mis à jour : Février 2013
Langue : français
Type : Image
Autres articles (92)
-
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 ) (...) -
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
Sur d’autres sites (7538)
-
How to Combine two Live Streams(mjpeg + pcm) for ffmpeg or ffplay playback ?
7 septembre 2022, par sharimkenWhat's the correct command to combine two live streams (mjpeg + pcm) for playback ?
Currently, I have to playback them separately via ffplay. Is it possible to combine them as one for playback ?


//video stream mjpeg
ffplay "udp://127.0.0.1:3001"

//audio stream raw pcm
ffplay -f s16le -ac 1 -ar 11025 "udp://127.0.0.1:3002"



I found some example commands suggested by others, but not sure how to implement for my above use case. https://superuser.com/questions/1410764/how-to-play-two-remote-streams-simultaneously


ffmpeg -headers X -i .. -headers Y -i .. -c copy -f nut - | ffplay -f nut -i -



Edit 2022/09/07 :


Thanks for @kesh suggestion, below script works for first 1 second with video and sound.


ffmpeg -i "udp://127.0.0.1:3001" \
-f s16le -ac 1 -ar 11025 -i "udp://127.0.0.1:3002" \
-c copy -f nut - | ffplay -f nut -i -



However, sound was muted after first error occured.


udp://127.0.0.1:3001: Input/output error



Updates :
Above issue has been solved, with below commands :


ffmpeg -i "udp://127.0.0.1:3001?overrun_nonfatal=1&fifo_size=100000" \
-f s16le -ac 1 -ar 11025 -i "udp://127.0.0.1:3002?overrun_nonfatal=1&fifo_size=100000" \
-c copy -f nut - | ffplay -f nut -i -



However, if the mjpeg stream is paused or skipped few frames, the audio will stop too. It's not necessary to sync them, and how to keep the audio stream playing as long as it receives data ?


Q1 : the default video fps is 25, can I set it to 30 or 60 ?


Q2 : pcm data stream is consistence, but mjpeg is not consistence. audio stream will stop once mjpeg is paused/resumed. What's the best solution ?


-
avfilter : add bilateral_cuda filter
30 août 2022, par Mohamed Khaled Mohamedavfilter : add bilateral_cuda filter
GSoC 2022
Signed-off-by : Mohamed Khaled <mohamed.elbassiony00@eng-st.cu.edu.eg>
Signed-off-by : Timo Rothenpieler <timo@rothenpieler.org> -
Buffer as input and output for fluent-ffmpeg
9 septembre 2022, par nickcoding2The below looks like a lot but a it's primarily just output.


I'm trying to take in a buffer using multer (being send the request containing the video (.mov format) through Alamofire from an iPhone) as the input before a fluent-ffmpeg conversion, then I want it to output as a buffer, and then send the result to S3. I think I'm close, but I don't think fluent-ffmpeg can have a buffer passed in. This is deployed on heroku using this buildpack : https://github.com/jonathanong/heroku-buildpack-ffmpeg-latest.... How do I pass it in correctly ?


const multer = require('multer')
const upload = multer({ limits: { fieldSize: 100_000_000 } })
app.post('/create', upload.single('video'), async function (request, response, next) {
 let data = request.body
 console.log(data) // prints [Object: null prototype] { param1: '' }
 let bufferStream = new stream.PassThrough();
 console.log(request.file.buffer) // prints '<buffer 00="00" 14="14" 66="66" 74="74" 79="79" 70="70" 71="71" 20="20" 08="08" 77="77" 69="69" 64="64" 65="65" 01="01" 0e="0e" 28="28" 55="55" 6d="6d" 61="61" 21="21" 03="03" 40="40" 68="68" 1c="1c" 4e="4e" ff="ff" 3c="3c" 59="59" 96="96" 7c="7c" 82="82" 17718642="17718642" more="more" bytes="bytes">'

 new ffmpeg({
 source: stream.Readable.from(request.file.buffer, { objectMode: false })
 })
 // .format('mp4')
 .on('error', function (err) {
 console.log(Error: ${err})
 })
 .on('progress', function (progress) {
 console.log("progress")
 })
 .on('end', function () {
 console.log('Formatting finished!');
 console.log("after");
 })
 .writeToStream(bufferStream);

 // Read the passthrough stream
 const buffers = [];
 bufferStream.on('data', function (buf) {
 buffers.push(buf);
 });
 bufferStream.on('end', function () {
 const outputBuffer = Buffer.concat(buffers);
 // use outputBuffer
 });
 console.log("Added.")
 response.send("Success")
});
</buffer>


The output is what you can see below (without .format('mp4')) :


2022-09-03T13:12:24.194384+00:00 heroku[router]: at=info method=POST path="/createBusiness" host=sparrow-testing.herokuapp.com request_id=2774a4ec-e21e-4c2f-8086-460a4cba7d1d fwd="74.71.236.5" dyno=web.1 connect=0ms service=13157ms status=200 bytes=762 protocol=https
2022-09-03T13:12:24.186257+00:00 app[web.1]: [Object: null prototype] { title: '' }
2022-09-03T13:12:24.187296+00:00 app[web.1]: <buffer 00="00" 14="14" 66="66" 74="74" 79="79" 70="70" 71="71" 20="20" 08="08" 77="77" 69="69" 64="64" 65="65" 01="01" 0e="0e" 28="28" 55="55" 6d="6d" 61="61" 21="21" 03="03" 40="40" 68="68" 1c="1c" 4e="4e" ff="ff" 3c="3c" 59="59" 96="96" 7c="7c" 82="82" 17718642="17718642" more="more" bytes="bytes">
2022-09-03T13:12:24.189891+00:00 app[web.1]: Added.
2022-09-03T13:12:24.891564+00:00 app[web.1]: Error: Error: ffmpeg exited with code 1: pipe:1: Invalid argument
2022-09-03T13:12:24.891570+00:00 app[web.1]: 
</buffer>


This output is what you see with .format('mp4') :


2022-09-03T13:17:07.380415+00:00 app[web.1]: [Object: null prototype] { title: '' }
2022-09-03T13:17:07.381335+00:00 app[web.1]: <buffer 00="00" 14="14" 66="66" 74="74" 79="79" 70="70" 71="71" 20="20" 08="08" 77="77" 69="69" 64="64" 65="65" 01="01" 0e="0e" 28="28" 55="55" 6d="6d" 61="61" 21="21" 03="03" 40="40" 68="68" 1c="1c" 4e="4e" ff="ff" 3c="3c" 59="59" 96="96" 7c="7c" 82="82" 17718642="17718642" more="more" bytes="bytes">
2022-09-03T13:17:07.384047+00:00 app[web.1]: Added.
2022-09-03T13:17:07.388457+00:00 heroku[router]: at=info method=POST path="/createBusiness" host=sparrow-testing.herokuapp.com request_id=84e69ead-09b1-4668-8fc8-b9fc9d5f229d fwd="74.71.236.5" dyno=web.1 connect=0ms service=13079ms status=200 bytes=762 protocol=https
2022-09-03T13:17:08.339746+00:00 app[web.1]: Error: Error: ffmpeg exited with code 1: Conversion failed!
2022-09-03T13:17:08.339783+00:00 app[web.1]: 
</buffer>


My uploadFile function works correctly because I use it elsewhere—normally, I just pass in the request.file.buffer, but here it needs to be a buffer after the ffmpeg conversion


EDIT :


At Heiko's suggestion, I tried changing the multer initialization to


multer({ limits: { fieldSize: 100_000_000 }, dest: "uploads/" })



and the source I was passing in to ffmpeg to


new ffmpeg({
 source: request.file.path // request.file.path seems to be a path of a Multer-generated file, I'd assume the one I'm sending to the server
})
.format('mp4')



but it still errored out to


Error: ffmpeg exited with code 1: Conversion failed!



when the request.file was :


{
 fieldname: 'video',
 originalname: 'video',
 encoding: '7bit',
 mimetype: 'clientMime',
 destination: 'uploads/',
 filename: '08d5d3bbdcf1ac29fb97800136a306e9',
 path: 'uploads/08d5d3bbdcf1ac29fb97800136a306e9',
 size: 1567480
}