
Recherche avancée
Médias (1)
-
Bug de détection d’ogg
22 mars 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Video
Autres articles (64)
-
Le profil des utilisateurs
12 avril 2011, parChaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...) -
Configurer la prise en compte des langues
15 novembre 2010, parAccéder à la configuration et ajouter des langues prises en compte
Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...) -
XMP PHP
13 mai 2011, parDixit Wikipedia, XMP signifie :
Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...)
Sur d’autres sites (5280)
-
checkasm : added additional dstW tests for hscale
26 mai 2022, par Swinney, Jonathan -
Is there a way to use youtube-dl in async
8 octobre 2024, par Stam KalyI have an application where I use
zmq
withasyncio
to communicate with the clients who have the ability to download a video withyoutube-dl
to the server. I tried addingawait
toyoutube_dl
's download function but it gave me an error since it was not a coroutine. My code right now is simply looking like this :


import asyncio
import youtube_dl


async def networking_stuff():
 download = True
 while True:
 if download:
 print("Received a request for download")
 await youtube_to_mp3("https://www.youtube.com/watch?v=u9WgtlgGAgs")
 download = False
 print("Working..")
 await asyncio.sleep(2)


async def youtube_to_mp3(url):
 ydl_opts = {
 'format': 'bestaudio/best',
 'postprocessors': [{
 'key': 'FFmpegExtractAudio',
 'preferredcodec': 'mp3',
 'preferredquality': '192',
 }]
 }

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


loop = asyncio.get_event_loop()
loop.create_task(networking_stuff())
loop.run_forever()




which gives the following output :



Received a request for download
[youtube] u9WgtlgGAgs: Downloading webpage
[youtube] u9WgtlgGAgs: Downloading video info webpage
[youtube] u9WgtlgGAgs: Extracting video information
[youtube] u9WgtlgGAgs: Downloading MPD manifest
[download] Destination: The Cardigans - My Favourite Game “Stone Version”-u9WgtlgGAgs.webm
[download] 100% of 4.20MiB in 00:03
[ffmpeg] Destination: The Cardigans - My Favourite Game “Stone Version”-u9WgtlgGAgs.mp3
Deleting original file The Cardigans - My Favourite Game “Stone Version”-u9WgtlgGAgs.webm (pass -k to keep)
Working..
Working..
....
Working..
Working..




whereas I would expect the
Working..
message to be printed in betweenyoutube-dl
's messages as well. Am I missing something here or is this impossible withasync
/await
? Isffmpeg
blocking ? If so, can I run the download inasync
without converting tomp3
or is using threads the only way ?

-
Convert byte array to frames [closed]
4 juin 2021, par karen.nik98I have received an mp4 video via HTTP and save it all on a byte array. Now I want to get frames from that byte array. How can I do that ?


Video is sent with curl, via this command.


curl --location --request POST '0.0.0.0:5007/check' --form 'video=@"/home/user/Downloads/test/test.mp4"'