
Recherche avancée
Médias (1)
-
MediaSPIP Simple : futur thème graphique par défaut ?
26 septembre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Video
Autres articles (35)
-
Support de tous types de médias
10 avril 2011Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)
-
Supporting all media types
13 avril 2011, parUnlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)
-
Configuration spécifique pour PHP5
4 février 2011, parPHP5 est obligatoire, vous pouvez l’installer en suivant ce tutoriel spécifique.
Il est recommandé dans un premier temps de désactiver le safe_mode, cependant, s’il est correctement configuré et que les binaires nécessaires sont accessibles, MediaSPIP devrait fonctionner correctement avec le safe_mode activé.
Modules spécifiques
Il est nécessaire d’installer certains modules PHP spécifiques, via le gestionnaire de paquet de votre distribution ou manuellement : php5-mysql pour la connectivité avec la (...)
Sur d’autres sites (6511)
-
Test if YouTube stream key is still active
17 avril 2022, par codingmaster398I'm making a service to stream to YouTube, simply put.


If the live stream ends or the stream key is no longer being used, we need to know. So far, it plays a short 3 second clip every once in a while, and if FFMpeg stops before it streams, we assume that the stream key is invalid. However, once we start a stream with the correct stream key, then end it and reset the stream key in another stream, the stream key still is being picked up as active.


Is there any API to see if the stream key is still being used ?


-
upload and stream ffmpeg stream chunk and mpd file in s3
29 juin 2024, par Kamruzzaman Rabeeni want to make ann web app where i can upload a video. After uploading video its should be compress by ffmpeg after that i want to keep the data on aws S3.


I can compress by ffmpeg. but i have no idea which file i should keep in s3 because after compress its create many chunk file and one mpd xml file.


Also i want to stream the video from mpd file after fetching data from s3.
here is my upload function code.

const videoPath = req.file.path; const outputDir = path.join(__dirname, 'dash'); const uniqueId = uuidv4(); const outputFilePath = path.join(outputDir,
$uniqueId_stream.mpd); const bucketName = process.env.S3_BUCKET_NAME; const s3Key =
dash/$uniqueId_stream.mpd` ;

// Ensure the output directory exists
if (!fs.existsSync(outputDir)) {
 fs.mkdirSync(outputDir, { recursive: true });
}

ffmpeg(videoPath)
 .outputOptions([
 '-profile:v main',
 '-use_template 1',
 '-use_timeline 1',
 '-b:v 1000k',
 '-b:a 128k',
 '-f dash'
 ])
 .on('end', async () => {
 console.log('DASH file created successfully');
 try {
 const s3Url = await uploadToS3(outputFilePath, bucketName, s3Key);
 res.status(200).json({ message: 'Video uploaded and DASH file created', url: s3Url });
 } catch (err) {
 console.error('Error uploading to S3: ', err);
 res.status(500).json({ message: 'Error uploading to S3', error: err.message });
 }
 })
 .on('error', (err) => {
 console.error('Error processing video: ', err);
 res.status(500).json({ message: 'Error processing video', error: err.message });
 })
 .save(outputFilePath);`

`const uploadToS3 = (filePath, bucketName, key) => {
return new Promise((resolve, reject) => {
 fs.readFile(filePath, (err, data) => {
 if (err) return reject(err);

 const params = {
 Bucket: bucketName,
 Key: key,
 Body: data,
 ContentType: 'application/dash+xml'
 };

 s3.upload(params, (err, data) => {
 if (err) return reject(err);
 resolve(data.Location);
 });
 });
});



;`


i have tried this version of code.


now i want to know what is the best to way to keep data in s3 for compress video after ffmpeg.


-
NextJS not working with jsmpeg/node-rtsp-stream. Trying to display RTSP stream
15 septembre 2022, par Vlad CrehulFollowing : https://github.com/kyriesent/node-rtsp-stream and How to display IP camera feed from an RTSP url onto reactjs app page ? I was trying to display the RTSP stream from a CCTV but it gives me an error.
ReferenceError: document is not defined
atscripts\jsmpeg.min.js (1:701) @ eval


I haven't found a single implementation of this module in NextJS so I might be doing something wrong but I can't tell what. And I didn't find any better solution for NextJS.


There wasn't anything to get me out in : https://github.com/phoboslab/jsmpeg but I might be using it wrong in here.


The rabbit hole started from this : How can I display an RTSP video stream in a web page ? but things are either outdated, do not apply or I couldn't figure them out.


The actual question :


How can I fix the error I get ? Is there an alternative to this in NextJS ? I don't care how all I need is to stream the RTSP feed from a CCTV.


Folder Structure :


components
 -layout
 -Stream.js
pages
 -api
 -stream
 -[streamId].js
 -app.js
 -index.js
scripts
 -jsmpeg.min.js



Stream.js
is a component instream/app.js
andstream/app.js
is used instream/[streamId].js


Client-side :
Stream.js


import JSMpeg from "../../scripts/jsmpeg.min.js";

const Stream = (props) => {
 const player = new JSMpeg.Player("ws://localhost:9999", {
 canvas: document.getElementById("video-canvas"), // Canvas should be a canvas DOM element
 });

 return (
 <fragment>
 
 </fragment>
 );
};



Server-side :
[streamId.js]


export async function getStaticProps(context) {
const StreamCCTV = require("node-rtsp-stream");
 const streamCCTV = new StreamCCTV({
 ffmpegPath: "C:\\Program Files\\ffmpeg\\bin\\ffmpeg.exe", //! remove on Ubuntu
 name: "name",
 streamUrl: "rtsp://someuser:somepassword@1.1.1.1",
 wsPort: 9999,
 ffmpegOptions: {
 // options ffmpeg flags
 "-stats": "", // an option with no neccessary value uses a blank string
 "-r": 30, // options with required values specify the value after the key
 },
 });




Edit :


I have also tried with https://www.npmjs.com/package/jsmpeg
Where i changed
Stream.js
to :

import jsmpeg from 'jsmpeg';

const Stream = (props) => {
 const client = new WebSocket("ws://localhost:9999")
 const player = new jsmpeg(client, {
 canvas: document.getElementById("video-canvas"), // Canvas should be a canvas DOM element
 });

 return (
 <fragment>
 
 </fragment>
 );
};



Now the error is :
ReferenceError: window is not defined