
Recherche avancée
Autres articles (17)
-
Les formats acceptés
28 janvier 2010, parLes commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
ffmpeg -codecs ffmpeg -formats
Les format videos acceptés en entrée
Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
Les formats vidéos de sortie possibles
Dans un premier temps on (...) -
Ajouter notes et légendes aux images
7 février 2011, parPour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
Modification lors de l’ajout d’un média
Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...) -
Emballe Médias : Mettre en ligne simplement des documents
29 octobre 2010, parLe plugin emballe médias a été développé principalement pour la distribution mediaSPIP mais est également utilisé dans d’autres projets proches comme géodiversité par exemple. Plugins nécessaires et compatibles
Pour fonctionner ce plugin nécessite que d’autres plugins soient installés : CFG Saisies SPIP Bonux Diogène swfupload jqueryui
D’autres plugins peuvent être utilisés en complément afin d’améliorer ses capacités : Ancres douces Légendes photo_infos spipmotion (...)
Sur d’autres sites (5190)
-
Kill a process started by exec() after some duration and store frames in an array
19 février 2013, par asprinLet me start off by saying that I'm completely new to Java. I'm from PHP background, but it so happens that one of my PHP tasks need to be converted into Java.
The task is splitting a video into frames using ffmpeg and then working with those frames. I've completed this process in PHP. And now I can to convert it into Java.
I went over some tutorials and have got the bases covered (Using IDE, Running a java program etc). I'm using Eclipse for this purpose.
I've so far managed to start ffmpeg from withing a java program by using
public static void main(String[] args) throws IOException {
String livestream = "D:/video.mpg";
String folderpth = "D:/frames";
String cmd="D:/ffmpeg/bin/ffmpeg.exe -i "+ livestream +" -r 10 "+folderpth+"/image%d.jpg";
//System.out.println(cmd);
Runtime r = Runtime.getRuntime();
Process p = r.exec(cmd); // this starts creating frames
// and stores them on local disk
// any way to store that frame name in array?
// something like String[] frames = {"image%d.jpg"}
// so that frames array contains image1.jpg, image2.jpg..and so on?
}This is working fine, I'm getting the frames in the folder. Now what I want to do is kill the process after some, say 5 minutes, as the video is over 2 hours long and I don't want to have to go to the taskbar and kill the process manually. I also would like to know if there is a way to store the frame names created by ffmpeg into an array for future use.
I tried using
p.destroy()
but that didn't stop the process at all. How would I go about using something similar likesetTimeout()
which is used in jQuery ?Some Metadata
OS : Windows 7
IDE : Eclipse
-
avcodec/mjpegenc_common : Store approximate aspect if exact cannot be stored
19 mars 2016, par Michael Niedermayer -
I need to create a streaming app Where videos store in aws S3
27 juillet 2023, par abuzar zaidiI need to create a video streaming app. where my videos will store in S3 and the video will stream from the backend. Right now I am trying to use ffmpeg in the backend but it does not work properly.


what am I doing wrong in this code ? And if ffmpeg not support streaming video that store in aws s3 please suggest other options.


Backend


const express = require('express');
const aws = require('aws-sdk');
const ffmpeg = require('fluent-ffmpeg');
const cors = require('cors'); 
const app = express();

// Set up AWS credentials
aws.config.update({
accessKeyId: '#######################',
secretAccessKey: '###############',
region: '###############3',
});

const s3 = new aws.S3();
app.use(cors());

app.get('/stream', (req, res) => {
const bucketName = '#######';
const key = '##############'; // Replace with the key/path of the video file in the S3 bucket
const params = { Bucket: bucketName, Key: key };
const videoStream = s3.getObject(params).createReadStream();

// Transcode to HLS format
 const hlsStream = ffmpeg(videoStream)
.format('hls')
.outputOptions([
 '-hls_time 10',
 '-hls_list_size 0',
 '-hls_segment_filename segments/segment%d.ts',
 ])
.pipe(res);

// Transcode to DASH format and pipe the output to the response
ffmpeg(videoStream)
.format('dash')
.outputOptions([
 '-init_seg_name init-stream$RepresentationID$.mp4',
 '-media_seg_name chunk-stream$RepresentationID$-$Number%05d$.mp4',
 ])
.output(res)
.run();
});

const port = 5000;
app.listen(port, () => {
console.log(`Server running on http://localhost:${port}`);
});



Frontend


import React from 'react';

 const App = () => {
 const videoUrl = 'http://localhost:3000/api/playlist/runPlaylist/6c3e7af45a3b8a5caf2fef17a42ef9a0'; // Replace with your backend URL
Please list down solution or option i can use here
 const videoUrl = 'http://localhost:5000/stream';
 return (
 <div>
 <h1>Video Streaming Example</h1>
 <video controls="controls">
 <source src="{videoUrl}" type="video/mp4"></source>
 Your browser does not support the video tag.
 </video>
 </div>
 );
 };

 export default App;