
Recherche avancée
Médias (3)
-
GetID3 - Bloc informations de fichiers
9 avril 2013, par
Mis à jour : Mai 2013
Langue : français
Type : Image
-
GetID3 - Boutons supplémentaires
9 avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
-
Collections - Formulaire de création rapide
19 février 2013, par
Mis à jour : Février 2013
Langue : français
Type : Image
Autres articles (94)
-
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 (...) -
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 -
Emballe médias : à quoi cela sert ?
4 février 2011, parCe plugin vise à gérer des sites de mise en ligne de documents de tous types.
Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;
Sur d’autres sites (5283)
-
Error : Unable to extract uploader id - Youtube, Discord.py
22 juillet 2024, par nikita goncharovI have a very powerful bot in discord (discord.py, PYTHON) and it can play music in voice channels. It gets the music from youtube (youtube_dl). It worked perfectly before but now it doesn't want to work with any video.
I tried updating youtube_dl but it still doesn't work
I searched everywhere but I still can't find a answer that might help me.


This is the Error :
Error: Unable to extract uploader id


After and before the error log there is no more information.
Can anyone help ?


I will leave some of the code that I use for my bot...
The youtube setup settings :


youtube_dl.utils.bug_reports_message = lambda: ''


ytdl_format_options = {
 'format': 'bestaudio/best',
 'outtmpl': '%(extractor)s-%(id)s-%(title)s.%(ext)s',
 'restrictfilenames': True,
 'noplaylist': True,
 'nocheckcertificate': True,
 'ignoreerrors': False,
 'logtostderr': False,
 'quiet': True,
 'no_warnings': True,
 'default_search': 'auto',
 'source_address': '0.0.0.0', # bind to ipv4 since ipv6 addresses cause issues sometimes
}

ffmpeg_options = {
 'options': '-vn',
}

ytdl = youtube_dl.YoutubeDL(ytdl_format_options)


class YTDLSource(discord.PCMVolumeTransformer):
 def __init__(self, source, *, data, volume=0.5):
 super().__init__(source, volume)

 self.data = data

 self.title = data.get('title')
 self.url = data.get('url')
 self.duration = data.get('duration')
 self.image = data.get("thumbnails")[0]["url"]
 @classmethod
 async def from_url(cls, url, *, loop=None, stream=False):
 loop = loop or asyncio.get_event_loop()
 data = await loop.run_in_executor(None, lambda: ytdl.extract_info(url, download=not stream))
 #print(data)

 if 'entries' in data:
 # take first item from a playlist
 data = data['entries'][0]
 #print(data["thumbnails"][0]["url"])
 #print(data["duration"])
 filename = data['url'] if stream else ytdl.prepare_filename(data)
 return cls(discord.FFmpegPCMAudio(filename, **ffmpeg_options), data=data)




Approximately the command to run the audio (from my bot) :


sessionChanel = message.author.voice.channel
await sessionChannel.connect()
url = matched.group(1)
player = await YTDLSource.from_url(url, loop=client.loop, stream=True)
sessionChannel.guild.voice_client.play(player, after=lambda e: print(
 f'Player error: {e}') if e else None)



-
Concat 3 videos, setting the output frame-rate based on one of the three videos
14 février 2023, par 3EKI have 3 videos that I would like to concat. An intro, a main video and an outro. All mp4s, all the same spec except the main video is a different frame rate to the other two video assets.


I am trying to use ffprobe to find out the frame rate of the main video and then apply that frame rate to the output file.


This is what I have so far, but it is not working.


#!/bin/bash

mezzfile=mezzfile.mp4
tailtime=20
duration=$(ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 $mezzfile)
framerate=$(ffprobe -v 0 -of compact=p=0 -select_streams 0 \
-show_entries stream=r_frame_rate '$mezzfile')

ffmpeg -hide_banner -y \
 -i sting.mp4 \
 -i $mezzfile \
 -i endboard.mp4 \
 -filter_complex \
 "[0:v]setpts=PTS-STARTPTS,fps=${framerate}[v_intro]; \
 [0:a]asetpts=PTS-STARTPTS,fps=${framerate}[a_intro]; \
 [1:v]setpts=PTS-STARTPTS,split[v_main1][v_main2]; \
 [1:a]asetpts=PTS-STARTPTS[a_main]; \
 [2:v]setpts=PTS-STARTPTS,fps=${framerate}[v_endboard]; \
 [v_main1]select='gt(t,$duration-$tailtime)',scale=w=iw/2:h=ih/2,setpts=PTS-STARTPTS[v_tail]; \
 [v_endboard][v_tail]overlay[v_pip]; \
 [v_main2]select='lte(t,$duration-$tailtime)',setpts=PTS-STARTPTS[v_mid]; \
 [v_intro][v_mid][v_pip]concat=n=3:v=1:a=0[v_out]; \
 [a_intro][a_main]concat=n=2:v=0:a=1[a_out]" \
 -map "[v_out]" \
 -map "[a_out]" \
 output.mp4



Any help would be greatly appreciated !
Cheers !


I have tried the code above. Hoping someone can help me figure out what I'm doing wrong ?


-
PyInstaller has strange interaction with YT_DLP
12 janvier 2023, par MDorcelianthis is for debugging - it's so I can get some test variables when im not passing a json as an argument.


try: 
 data_string = sys.argv[1]

 # Convert the string back into an object
 data = json.loads(data_string)

 URL = data['url']
 PATH = data['filePath'] + "/"

except:
 URL = "https://www.youtube.com/watch?v=o9oGBnXqCgU"
 PATH = "C:/Users/PC/Downloads/videos"




this is the weird part.


try:
 ydl_opts = {
 'outtmpl':PATH_VIDEO + '/%(title)s.%(ext)s',
 'noplaylist':True,
 'format': "bv*[height<=1080][ext=mp4]+ba[ext=m4a]/b[height<=1080][ext=mp4] / bv*+ba/b",
 'mergeoutputformat':'mp4',
 'restrictfilenames':True,
 'ignoreerrors': False,
 'verbose':True,
 
 }
 with yt_dlp.YoutubeDL(ydl_opts) as ydl:
 ydl.download(URL)

 info = ydl.extract_info(URL, download=False)
 final_path_os = ydl.prepare_filename(info)
 except yt_dlp.utils.DownloadError as e:
 setJsonData(str(e))



when i download videos as a script with code runner, it downloads normally completely fine. After I compile it as an exe and click it, it downloads completely fine.


but when i pass my json through it, it knows where to download, it knows what's downloading, but it ALWAYS leaves two seperate video and audio files that were supposed to be combined. i assume its FFMPEG but i've included FFMPEG with the exe of pyinstaller.


pyinstaller --add-data "ffmpeg.exe;." --add-data "ffmpeg.exe;." -F returnMessage.py 



and i've put ffmpeg in the same folder just in case


setJsonData()
writes to a json i have but i don't know how to debug because IT NEVER WRITES AN ERROR THERE. my exe just keepes running in the background. i've spent a day on this and am so lost.

I've tried Exception error as e, nothing. I can't check the console because the application that launches this runs it silently.


I'm sure it's the
ydl.download(URL)
that's the problem because I've set it up to make a test_json before it and it worked. if i put it after, it doesn't.

I've checked the os paths to see if anything was up, but it's downloading in the correct place, just not downloading fully.


i've downloaded the ffmpeg that was compatible with yt_dlp as well.