
Recherche avancée
Autres articles (56)
-
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...) -
De l’upload à la vidéo finale [version standalone]
31 janvier 2010, parLe chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
Upload et récupération d’informations de la vidéo source
Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...) -
Librairies et binaires spécifiques au traitement vidéo et sonore
31 janvier 2010, parLes logiciels et librairies suivantes sont utilisées par SPIPmotion d’une manière ou d’une autre.
Binaires obligatoires FFMpeg : encodeur principal, permet de transcoder presque tous les types de fichiers vidéo et sonores dans les formats lisibles sur Internet. CF ce tutoriel pour son installation ; Oggz-tools : outils d’inspection de fichiers ogg ; Mediainfo : récupération d’informations depuis la plupart des formats vidéos et sonores ;
Binaires complémentaires et facultatifs flvtool2 : (...)
Sur d’autres sites (10452)
-
ffmpeg settings for high quality youtube videos [migrated]
1er avril 2018, par pb.I am trying to record short video of my desktop and upload it to youtube.
The problem is that every time when I upload it to youtube or even dropbox (as video), the quality is much worse.My ffmpeg execution :
ffmpeg -f x11grab -s 1366x768 -r 30 -i :0.0 -codec:v libx264 -crf 10 -bf 20 -flags +cgop -pix_fmt yuv440p -movflags faststart help.mp4
based on :
ffmpeg -i <input file="file" /> -codec:v libx264 -crf 21 -bf 2 -flags +cgop -pix_fmt yuv420p -codec:a aac -strict -2 -b:a 384k -r:a 48000 -movflags faststart .mp4
which I found here
Original file (.zip) :
https://www.dropbox.com/s/xlkr83rkqfxon23/help.mp4.zip?dl=0File after upload to youtube :
https://www.youtube.com/watch?v=ewEUgpXOpmgAs you can see, I loss quality after upload to youtube.
Could you help me ?
How should I choose the appropriate parameters to record and upload high quality video ? -
ffmpeg settings for high quality youtube videos [migrated]
1er avril 2018, par pb.I am trying to record short video of my desktop and upload it to youtube.
The problem is that every time when I upload it to youtube or even dropbox (as video), the quality is much worse.My ffmpeg execution :
ffmpeg -f x11grab -s 1366x768 -r 30 -i :0.0 -codec:v libx264 -crf 10 -bf 20 -flags +cgop -pix_fmt yuv440p -movflags faststart help.mp4
based on :
ffmpeg -i <input file="file" /> -codec:v libx264 -crf 21 -bf 2 -flags +cgop -pix_fmt yuv420p -codec:a aac -strict -2 -b:a 384k -r:a 48000 -movflags faststart .mp4
which I found here
Original file (.zip) :
https://www.dropbox.com/s/xlkr83rkqfxon23/help.mp4.zip?dl=0File after upload to youtube :
https://www.youtube.com/watch?v=ewEUgpXOpmgAs you can see, I loss quality after upload to youtube.
Could you help me ?
How should I choose the appropriate parameters to record and upload high quality video ? -
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 ?