
Recherche avancée
Médias (1)
-
GetID3 - Bloc informations de fichiers
9 avril 2013, par
Mis à jour : Mai 2013
Langue : français
Type : Image
Autres articles (44)
-
La file d’attente de SPIPmotion
28 novembre 2010, parUne file d’attente stockée dans la base de donnée
Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...) -
Les vidéos
21 avril 2011, parComme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...) -
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
Sur d’autres sites (6832)
-
Tell users about supported audio samplerates in mmf.
19 mars 2012, par Carl Eugen HoyosTell users about supported audio samplerates in mmf.
-
How to make a bot available to multiple users on blocking operations ? python, aiogram, pytube, ffmpeg
27 février 2023, par Tony ReznikI'm trying to deal with multithreading and asynchrony, but I can't figure out how to deal with this situation.


There is a telegram bot that downloads videos from YouTube and cuts only the first minute of the video into a separate file. Pytube and ffmpeg are used. The second bot user does not receive any response from the bot while the tasks of the first one are running. How to deal with such difficulties ?


import subprocess

from aiogram import Bot, Dispatcher, types
from aiogram.utils import executor
from pytube import YouTube
import time

API_TOKEN = 'tkn'

bot = Bot(token=API_TOKEN)
dp = Dispatcher(bot)

video_folder = 'video/'


@dp.message_handler()
async def start_convert(message: types.Message):
 url = message.text
 yt = YouTube(url)

 await message.reply('accepted')

 video_name = time.strftime("%d-%m-%Y-%H-%M-%S") + '.mp4'

 video = yt.streams.get_highest_resolution()
 video.download(video_folder, filename=video_name)

 await message.reply('downloaded')

 subprocess.call(['ffmpeg', '-hide_banner', '-loglevel', 'error', '-i', f'{video_folder}{video_name}',
 '-ss', '0', '-c:v', 'libx264', '-c:a', 'aac', '-b:v', '5M', '-to', '60',
 f'{video_folder}1_min_{video_name}'])

 await message.reply('trimmed')

if __name__ == '__main__':
 executor.start_polling(dp, skip_updates=True)




This is a code template.
In the current form, I want to understand how to implement the task correctly.


-
How do I stream remote multiple webcams to multiple users
29 juin 2016, par Joe HillI need to capture multiple users’ webcams in the browser and then broadcast it to multiple users. This must include an audio and video stream with low and high quality options. Ideally, I would not like to use flash but having flash as a fallback is totally fine.
When the webcam is broadcast to the users, this must work on as many platforms as possible.