
Recherche avancée
Médias (91)
-
#3 The Safest Place
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#4 Emo Creates
15 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#2 Typewriter Dance
15 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#1 The Wires
11 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
ED-ME-5 1-DVD
11 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Audio
-
Revolution of Open-source and film making towards open film making
6 octobre 2011, par
Mis à jour : Juillet 2013
Langue : English
Type : Texte
Autres articles (84)
-
MediaSPIP en mode privé (Intranet)
17 septembre 2013, parÀ partir de la version 0.3, un canal de MediaSPIP peut devenir privé, bloqué à toute personne non identifiée grâce au plugin "Intranet/extranet".
Le plugin Intranet/extranet, lorsqu’il est activé, permet de bloquer l’accès au canal à tout visiteur non identifié, l’empêchant d’accéder au contenu en le redirigeant systématiquement vers le formulaire d’identification.
Ce système peut être particulièrement utile pour certaines utilisations comme : Atelier de travail avec des enfants dont le contenu ne doit pas (...) -
Diogene : création de masques spécifiques de formulaires d’édition de contenus
26 octobre 2010, parDiogene est un des plugins ? SPIP activé par défaut (extension) lors de l’initialisation de MediaSPIP.
A quoi sert ce plugin
Création de masques de formulaires
Le plugin Diogène permet de créer des masques de formulaires spécifiques par secteur sur les trois objets spécifiques SPIP que sont : les articles ; les rubriques ; les sites
Il permet ainsi de définir en fonction d’un secteur particulier, un masque de formulaire par objet, ajoutant ou enlevant ainsi des champs afin de rendre le formulaire (...) -
MediaSPIP version 0.1 Beta
16 avril 2011, parMediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)
Sur d’autres sites (5078)
-
I have a problem with node js rtsp streaming server
11 décembre 2022, par sangeun joI made rtsp cctv streaming server with nodjs.


But it is not stable.


Some cctvs works well but others are not.


First I thought rtsp url has its own problem, but it may not.
Because the url worked well in vlc player.


I don't know what I'm missing.


below is my whole code related cctv streaming.




var express = require('express');
var router = express.Router();
var kill = require('tree-kill');
var fs = require('fs');
var path = require('path');

var ffmpeg = require('fluent-ffmpeg');
var ffmpegInstaller = require('@ffmpeg-installer/ffmpeg');
ffmpeg.setFfmpegPath(ffmpegInstaller.path)

var streams = {};

//start cctv
router.post('/', (req, res) => {

 var cname = req.body.cname;
 var url = req.body.url;

 //if there is same cctv name
 if(streams[cname] != null) {
 res.status(409).send("duplicate name");
 return;
 };

 //create dir as given cctv name;
 mkdir(cname);

 stream = ffmpeg(url).addOptions([
 '-hls_time 5', 
 '-hls_list_size 10',
 '-hls_flags delete_segments',
 '-f hls' 
 ]).output('./public/video/' + cname + '/' + cname + '.m3u8'); //save path

 console.log("Start cctv streaming");
 stream.on('error', function(err, stdout, stderr) {
 console.log("cctv has been stoped");
 console.log(err);
 });

 stream.run(); 

 streams[cname] = stream;
 res.status(201).send("OK");
});

//bring cctv pid by cctv name
router.get('/:cname', (req, res) => {
 var cname = req.params.cname;

 if(streams[cname] == null) {
 res.status(404).send("not found such a cctv");
 return;
 };

 var pid = streams[cname].ffmpegProc.pid;
 res.send({"pid": pid});
});


//stop cctv by pid 
router.delete('/:cname', async (req, res) => {
 var cname = req.params.cname;
 
 //no cctv
 if(streams[cname] == null) {
 res.status(404).send("not found such a cctv");
 return;
 };


 //del dir
 var filePath = './public/video/' + cname;
 fs.rmdir(filePath, { recursive: true }, (err) => {
 if (err) {
 console.log(err)
 } else {
 console.log('dir is deleted.');
 }
 });

 //var pid = streams[cname].ffmpegProc.pid;
 streams[cname].kill();
 res.status(204).send("OK");
});

const mkdir = (name) => {
 var root = './public/video/';
 if(!fs.existsSync(root + name)){
 fs.mkdirSync(root + name);
 }
}







And this is ts file save folder.
cctv1 dosen't work well but cctv2 works well.
(cctv1 started first but created less ts file than cctv2.)



-
How to fix Ffmpeg cut video in nextjs ?
27 juillet 2023, par Duy TịnhI'm currently working on a Next.js project where I need to use ffmpeg to cut video files. However, I've encountered an error that occurs specifically when I navigate from one page to another using ffmpeg. Strangely, I don't encounter this error when I use an element or directly redirect to the page without involving ffmpeg.
The error message I'm receiving is as follows :


ReferenceError: SharedArrayBuffer is not defined

Source
Views\EditVideo\index.tsx (264:4) @ async handleEditVideo

 262 | const ffmpegInstance = createFFmpeg({ log: true });
 263 | // error
> 264 | await ffmpegInstance.load();
 | ^
 265 | // if (srcVideoEdit) {
 266 | // ffmpegInstance.FS(
 267 | // "writeFile",



you can see more details at : https://i.stack.imgur.com/Z1OBx.png
This is my code in page have using ffmpeg :


const handleEditVideo = async () => {
 const { createFFmpeg, fetchFile } = ffmpeg;
 const ffmpegInstance = createFFmpeg({ log: true });
 // error
 await ffmpegInstance.load();
 };

 return (
 <>
 <button>Test</button>



code the page navigation to it


import { useRouter } from 'next/router'

export default function Upload() {
 const route = useRouter();
 const onOk = () => {
 route.push("/editvideo");
 setIsLoading(false);
 }
}



-
Socket.io client in js and server in Socket.io go doesn't send connected messege and data
24 mars 2023, par OmriHalifaI am using
ffmpeg
andsocket.io
and I have some issues. I'm trying to send a connection request to a server written in Go through React, but I'm unable to connect to it. I tried adding the events in useEffect and it's still not working, what should I do ? i attaching my code in js and in go :
main.go


package main

import (
 "log"

 "github.com/gin-gonic/gin"

 socketio "github.com/googollee/go-socket.io"
)

func main() {
 router := gin.New()

 server := socketio.NewServer(nil)

 server.OnConnect("/", func(s socketio.Conn) error {
 s.SetContext("")
 log.Println("connected:", s.ID())
 return nil
 })

 server.OnEvent("/", "notice", func(s socketio.Conn, msg string) {
 log.Println("notice:", msg)
 s.Emit("reply", "have "+msg)
 })

 server.OnEvent("/", "transcoded-video", func(s socketio.Conn, data string) {
 log.Println("transcoded-video:", data)
 })

 server.OnEvent("/", "bye", func(s socketio.Conn) string {
 last := s.Context().(string)
 s.Emit("bye", last)
 s.Close()
 return last
 })

 server.OnError("/", func(s socketio.Conn, e error) {
 log.Println("meet error:", e)
 })

 server.OnDisconnect("/", func(s socketio.Conn, reason string) {
 log.Println("closed", reason)
 })

 go func() {
 if err := server.Serve(); err != nil {
 log.Fatalf("socketio listen error: %s\n", err)
 }
 }()
 defer server.Close()

 if err := router.Run(":8000"); err != nil {
 log.Fatal("failed run app: ", err)
 }
}




App.js


import './App.css';
import { useEffect } from 'react';
import { createFFmpeg, fetchFile } from '@ffmpeg/ffmpeg';
import { io } from 'socket.io-client'; 

function App() {
 const socket = io("http://localhost:8000",function() {
 // Send a message to the server when the client is connected
 socket.emit('clientConnected', 'Client has connected to the server!');
 })

 const ffmpegWorker = createFFmpeg({
 log: true
 })

 // Initialize FFmpeg when the component is mounted
 async function initFFmpeg() {
 await ffmpegWorker.load();
 }

 async function transcode(webcamData) {
 const name = 'record.webm';
 await ffmpegWorker.FS('writeFile', name, await fetchFile(webcamData));
 await ffmpegWorker.run('-i', name, '-preset', 'ultrafast', '-threads', '4', 'output.mp4');
 const data = ffmpegWorker.FS('readFile', 'output.mp4');
 
 // Set the source of the output video element to the transcoded video data
 const video = document.getElementById('output-video');
 video.src = URL.createObjectURL(new Blob([data.buffer], { type: 'video/mp4' }));
 
 // Remove the output.mp4 file from the FFmpeg virtual file system
 ffmpegWorker.FS('unlink', 'output.mp4');
 
 // Emit a "transcoded-video" event to the server with the transcoded video data
 socket.emit("transcoded-video", data.buffer)
 }
 
 

 let mediaRecorder;
 let chunks = [];
 
 // Request access to the user's camera and microphone and start recording
 function requestMedia() {
 const webcam = document.getElementById('webcam');
 navigator.mediaDevices.getUserMedia({ video: true, audio: true })
 .then(async (stream) => {
 webcam.srcObject = stream;
 await webcam.play();

 // Set up a MediaRecorder instance to record the video and audio
 mediaRecorder = new MediaRecorder(stream);

 // Add the recorded data to the chunks array
 mediaRecorder.ondataavailable = async (e) => {
 chunks.push(e.data);
 }

 // Transcode the recorded video data after the MediaRecorder stops
 mediaRecorder.onstop = async () => {
 await transcode(new Uint8Array(await (new Blob(chunks)).arrayBuffer()));

 // Clear the chunks array after transcoding
 chunks = [];

 // Start the MediaRecorder again after a 0 millisecond delay
 setTimeout(() => {
 mediaRecorder.start();
 
 // Stop the MediaRecorder after 3 seconds
 setTimeout(() => {
 mediaRecorder.stop();
 }, 500);
 }, 0);
 }

 // Start the MediaRecorder
 mediaRecorder.start();

 // Stop the MediaRecorder after 3 seconds
 setTimeout(() => {
 mediaRecorder.stop();
 }, 700);
 })
 }
 
 useEffect(() => {
 // Set up event listeners for the socket connection
 socket.on('/', function(){
 // Log a message when the client is connected to the server
 console.log("Connected to server!"); 
 });

 socket.on('transcoded-video', function(data){
 // Log the received data for debugging purposes
 console.log("Received transcoded video data:", data); 
 });

 socket.on('notice', function(data){
 // Emit a "notice" event back to the server to acknowledge the received data
 socket.emit("notice", "ping server!");
 });

 socket.on('bye', function(data){
 // Log the received data and disconnect from the server
 console.log("Server sent:", data); 
 socket.disconnect();
 });

 socket.on('disconnect', function(){
 // Log a message when the client is disconnected from the server
 console.log("Disconnected from server!"); 
 });
 }, [])

 return (
 <div classname="App">
 <div>
 <video muted="{true}"></video>
 <video autoplay="autoplay"></video>
 </div>
 <button>start streaming</button>
 </div>
 );
}

export default App;



What can i do to fix it ? thank you !!