
Recherche avancée
Autres articles (78)
-
Creating farms of unique websites
13 avril 2011, parMediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...) -
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 (...)
Sur d’autres sites (7603)
-
ffmpeg php - shell_exec returns Permission Denied
21 juin 2013, par Sotiris Akis Mitracosi'm integrating ffmpeg into my php webapp (on a windows server). Calling the library through shell_exec like this
$out_shell = shell_exec("$ffmpeg myfile.avi 2>&1");
i receive the following output :
ffmpeg version N-54117-gf9739a3 Copyright (c) 2000-2013 the FFmpeg developers
built on Jun 19 2013 23:42:15 with gcc 4.7.3 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth -- enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
libavutil 52. 37.101 / 52. 37.101
libavcodec 55. 16.100 / 55. 16.100
libavformat 55. 9.100 / 55. 9.100
libavdevice 55. 2.100 / 55. 2.100
libavfilter 3. 77.101 / 3. 77.101
libswscale 2. 3.100 / 2. 3.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 3.100 / 52. 3.100
C:\ffmpeg: Permission deniedwhat's wrong with the code ? if i run ffmpeg myfile.avi 2>&1 in cmd, I can also read video's meta-data.
Could anybody help me ?
thank you -
FFmpeg avio_open_dir returns -40 on Windows, even when directory exists
28 janvier, par グルグルI'm use ffmpeg7.1 on windows 10. And libavformat's version is 61.
I use a absolute path of a directory on
avio_open_dir
but it's failed, and return -40.
I useav_err2str
gotFunction not implemented
.
What problem it is ?

extern "C"
{
#include <libavformat></libavformat>avformat.h>
}

int main()
{
 av_log_set_level(AV_LOG_DEBUG);

 auto dir = "D:\\music";
 AVIODirContext* dirCtx;
 auto ret = avio_open_dir(&dirCtx, dir, nullptr);
 if (ret < 0)
 {
 av_log(nullptr, AV_LOG_ERROR, "Can't open %s: %s\n", dir, av_err2str(ret));
 exit(EXIT_FAILURE);
 }
}



output


Can't open D:\music: Function not implemented



It's not the path incorrect problem. I used
std::filesystem::exists("D:\\music") && std::filesystem::is_directory("D:\\music")
to verify that the path is correct.

-
Youtube Dlp returns with error code of 400 [closed]
10 mars 2024, par nikita goncharovI have a python discord bot that can play music and uses discord.py https://discordpy.readthedocs.io/en/stable/. To play get the music I use yt_dlp or youtube_dl. But when requesting a video it returns with a 400 error code.


This is the error with yt_dlp :


WARNING: [youtube] YouTube said: ERROR - Precondition check failed.


WARNING: [youtube] HTTP Error 400: Bad Request. Retrying (1/3)...


WARNING: [youtube] YouTube said: ERROR - Precondition check failed.


WARNING: [youtube] HTTP Error 400: Bad Request. Retrying (2/3)...


WARNING: [youtube] YouTube said: ERROR - Precondition check failed.


WARNING: [youtube] HTTP Error 400: Bad Request. Retrying (3/3)...


WARNING: [youtube] YouTube said: ERROR - Precondition check failed.


WARNING: [youtube] Unable to download API page: HTTP Error 400: Bad Request (caused by <httperror>)</httperror>


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


import youtube_dl


or


import yt_dlp as youtube_dl


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) 



I searched for posts with the same error and they where either old or didn't solve my problem.


I tried importing instead of yt_dlp, I tried importing youtube_dl. But when I make the request it does not answer, no exception and no warning it just does not answer, as if the funcion is empty


I will link my other post that I asked. It might be usefull : Error : Unable to extract uploader id - Youtube, Discord.py