
Recherche avancée
Autres articles (21)
-
La sauvegarde automatique de canaux SPIP
1er avril 2010, parDans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...) -
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 -
Encodage et transformation en formats lisibles sur Internet
10 avril 2011MediaSPIP transforme et ré-encode les documents mis en ligne afin de les rendre lisibles sur Internet et automatiquement utilisables sans intervention du créateur de contenu.
Les vidéos sont automatiquement encodées dans les formats supportés par HTML5 : MP4, Ogv et WebM. La version "MP4" est également utilisée pour le lecteur flash de secours nécessaire aux anciens navigateurs.
Les documents audios sont également ré-encodés dans les deux formats utilisables par HTML5 :MP3 et Ogg. La version "MP3" (...)
Sur d’autres sites (5047)
-
How to extract frames in sequence as PNG images from ffmpeg stream ?
7 janvier, par JamesJGoodwinI'm trying to create a program that would capture my screen (a game to be precise) using ffmpeg and stream frames to NodeJS for live processing. So, if the game runs at 60 fps then I expect ffmpeg to send 60 images per second down to stdout. I've written a code for that


import { spawn as spawnChildProcess } from 'child_process';

 const videoRecordingProcess = spawnChildProcess(
 ffmpegPath,
 [
 '-init_hw_device',
 'd3d11va',
 '-filter_complex',
 'ddagrab=0,hwdownload,format=bgra',
 '-c:v',
 'png',
 '-f',
 'image2pipe',
 '-loglevel',
 'error',
 '-hide_banner',
 'pipe:',
 ],
 {
 stdio: 'pipe',
 },
 );

 videoRecordingProcess.stderr.on('data', (data) => console.error(data.toString()));

 videoRecordingProcess.stdout.on('data', (data) => {
 fs.promises.writeFile(`/home/goodwin/genshin-repertoire-autoplay/imgs/${Date.now()}.bmp`, data);
 });



Currently I'm streaming those images onto disk for debugging and it's almost working except that the image is cropped. Here's what's going on. I get 4 images saved on disk :


- 

- Valid image that is 2560x1440, but only 1/4 or even 1/5 of the screen is present at the top, the remaining part of the image is empty (transparent)
- Broken image that won't open
- Broken image that won't open
- Broken image that won't open










This pattern is nearly consistent. Sometimes it's 3, sometimes 4 or 5 images between valid images. What did I do wrong and how do I fix it ? My guess is that ffmpeg is streaming images in chunks, each chunk represents a part of the frame that was already processed by progressive scan. Though I'm not entirely sure if I should try and process it manually. There's gotta be a way to get fully rendered frames in one piece sequentially.


-
WebRTC Multi-Stream recording
11 janvier 2021, par Tim SpechtI'm currently trying to build a WebRTC streaming architecture that contains multiple users streaming content from their camera in the same "room" and a SFU / MCU on server-side "recording" the incoming video packets, merging them into one image and re-distributing them to the viewers as either RTMP or HLS for added scalability.


Upon doing some initial research on this, Janus Gateway seems like a good fit for this given it's wide adoption across the space + their (seemingly) extensible plugin architecture. Thus, I'm currently trying to figure out what a recommended architecture for my use-case would look like.
I looked at the following plugins :


- 

- Janus Streaming
- Janus Recordings






While Janus and the Streaming plugin seem like a good start to get the broadcasting aspect within the group of casters in the room, I'm trying to piece together how I could combine the different video sources into a combined one (split horizontally for example if there are 2 casters active) and retransmit the final result as something optimized for broadcast-consumption like HLS. Some of the ways I could imagine doing that :


- 

- Implement a custom Janus plugin that transcodes the incoming buffers on the gateway itself
- Forwarding the incoming packets via RTP to a Transcoding server

- 

- In this specific case I am not sure what would be best to implement that ? Are the video frames different tracks ? Could I stream all of them to the same port and have
ffmpeg
or something similar take care of the merging for me ?




- In this specific case I am not sure what would be best to implement that ? Are the video frames different tracks ? Could I stream all of them to the same port and have






-
YouTube-DL Python details of extracted audio file are not displayed
16 septembre 2020, par SushilI have written a small piece of code in python to extract the audio from a YouTube video. Here is the code :


from __future__ import unicode_literals
import youtube_dl

link = input("Enter the video link:")

ydl_opts = {
 'format': 'bestaudio/best',
 'postprocessors': [{
 'key': 'FFmpegExtractAudio',
 'preferredcodec': 'mp3',
 'preferredquality': '192',
 }],
}
with youtube_dl.YoutubeDL(ydl_opts) as ydl:
 info_dict = ydl.extract_info(link, download=False)
 video_title = info_dict.get('title', None)

path = f'D:\\{video_title}.mp3'

ydl_opts.update({'outtmpl':path})

with youtube_dl.YoutubeDL(ydl_opts) as ydl:
 ydl.download([link])



This is the folder where the output audio file is saved :



As you can see, all the details of the audio file are displayed, such as Date Modified, Type and Size.


However, if I change
path = f'D:\\{video_title}.mp3'
topath = f'D:\\YT_Files\\{video_title}.mp3'
, then the file details are not getting displayed.


Any idea about why this is so ? Is there any way to solve this problem ? Any help would be appreciated. Thanks.