
Recherche avancée
Autres articles (92)
-
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 (...) -
ANNEXE : Les plugins utilisés spécifiquement pour la ferme
5 mars 2010, parLe site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)
-
Multilang : améliorer l’interface pour les blocs multilingues
18 février 2011, parMultilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.
Sur d’autres sites (3935)
-
Is ffmpeg able to read ArrayBuffer input from stream
7 juillet 2017, par jAndyI want to accomplish the following tasks :
- Record Video+Audio from any HTML5 (
MediaStream
) capable browser - Send that data via
WebSocket
asBlob
/ArrayBuffer
chunks to a server - Broadcast that input stream-data to multiple clients
As it turns out, this brought me into a world of pain. The first task is fairly simple using the HTML5
MediaStream
objects alongside WebSockets.// ... for simplicity...
navigator.mediaDevices.getUserMedia({ audio: true, video: true }).then(stream => {
let mediaRecorder = new MediaRecorder( stream );
// ...
mediaRecorder.ondataavailable = e => {
webSocket.send( 'newVideoData', e.data ); // configured for binary data
};
});Now, I want to receive those data fragments and stream those via
nginx vod module
, because I guess I want the output stream in HLS or DASH.
I could write a littlenodejs
script as backend, which just receives the binary chunks and write them to a file or stream, and just reference it songinx vod module
could possibly read it and create them3u8
manifest on the fly ?I am wondering now,
- if
ffmpeg
is able to read that binary data directly (should bewebm format
), without a man-in-the-middle script, "somehow" ? - If not, do I have to write the data down into a file and pass that as input to
ffmpeg
or can I (should I) pipe the data to a self spawnedffmpeg
instance ? (if so, how ?) - Do I actually need the
nginx server
(probably alongside rtmp module) to deliver the output stream as HLS or could I just useffmpeg
to also create a dynamic manifest ? - Is the
nginx vod module
capable of creating a dynamic hls/dash manifest or must the input data be complete beforehand ? - Ultimately, am I on the totally wrong track here ? :P
Actually I just want to create a little video-live-chat demo, without any plugins or 3rd party encoding software, pure browser.
- Record Video+Audio from any HTML5 (
-
How to compress base64 decoded video data using ffmpeg in django
23 mai 2021, par Sudipto SarkerI want to upload the video/audio file in my django-channels project. So I uploaded video(base64 encoded url) from websocket connection. It is working fine. But now after decoding base64 video data I want to compress that video using ffmpeg.But it showing error like this.
''Raw : No such file or directory''
I used 'AsyncJsonWebsocketConsumer' in consumers.py file.Here is my code :
consumers.py :


async def send_file_to_room(self, room_id, dataUrl, filename):
 # decoding base64 data
 format, datastr = dataUrl.split(';base64,')
 ext = format.split('/')[-1]
 file = ContentFile(base64.b64decode(datastr), name=filename)
 print(f'file: {file}')
 # It prints 'Raw content'
 output_file_name = filename + '_temp.' + ext
 ff = f'ffmpeg -i {file} -vf "scale=iw/5:ih/5" {output_file_name}'
 subprocess.run(ff,shell=True) 



May be here ffmpeg can not recognize the file to be compressed. I also tried to solve this using post_save signal.


signals.py :


@receiver(post_save, sender=ChatRoomMessage)
def compress_video_or_audio(sender, instance, created, **kwargs):
 print("Inside signal")
 if created:
 if instance.id is None:
 print("Instance is not present")
 else:
 video_full_path = f'{instance.document.path}'
 print(video_full_path)
 // E:\..\..\..\Personal Chat Room\media\PersonalChatRoom\file\VID_20181219_134306_w5ow8F7.mp4
 output_file_name = filename + '_temp.' + extension
 ff = f'ffmpeg -i {filename} -vf "scale=iw/5:ih/5" {output_file_name}'
 subprocess.run(ff,shell=True)
 instance.document = output_file_name
 instance.save()



It is also causing "E :..\Django\New_Projects\Personal : No such file or directory".
How can I solve this issue ? Any suggetions.It will be more helpful if it can be compressed before saving the object in database. Thanks in advance.


-
Encountered an exception of ffmpeg.wasm can only run one command at a time
2 mars 2023, par Itay113I want to make a video chat using ffmepg wasm (I know the standard is WebRTC but my assignment is to do this with ffmpeg wasm and a server connecting the 2 clients) and when doing the follow code I am getting ffmpeg.wasm can only run one command at a time exception on the ffmpegWorker.run line


function App() {
 const ffmpegWorker = createFFmpeg({
 log: true
 })

 async function initFFmpeg() {
 await ffmpegWorker.load();
 }

 async function transcode(webcamData) {
 const name = 'record.webm';
 await ffmpegWorker.FS('writeFile', name, await fetchFile(webcamData));
 ffmpegWorker.run('-i', name, '-preset', 'ultrafast', '-c:v', 'h264', '-crf', '28', '-b:v', '0', '-row-mt', '1', '-f', 'mp4', 'output.mp4')
 .then(()=> {

 const data = ffmpegWorker.FS('readFile', 'output.mp4');
 
 const video = document.getElementById('output-video');
 video.src = URL.createObjectURL(new Blob([data.buffer], { type: 'video/mp4' }));
 ffmpegWorker.FS('unlink', 'output.mp4');
 })
 }

 function requestMedia() {
 const webcam = document.getElementById('webcam');
 const chunks = []
 navigator.mediaDevices.getUserMedia({ video: true, audio: true })
 .then(async (stream) => {
 webcam.srcObject = stream;
 await webcam.play();
 const mediaRecorder = new MediaRecorder(stream);
 mediaRecorder.start(0);
 mediaRecorder.onstop = function(e) {
 stream.stop(); 
 }
 mediaRecorder.ondataavailable = async function(e) {
 chunks.push(e.data);
 await transcode(new Uint8Array(await (new Blob(chunks)).arrayBuffer()));
 
 }
 })
 }

 useEffect(() => {
 requestMedia();
 }, [])

 return (
 <div classname="App">
 <div>
 <video width="320px" height="180px"></video>
 <video width="320px" height="180px"></video>
 </div>
 </div>
 );
}



I have tried messing around with the time slice on the media recorder start method argument but it didn't helped