
Recherche avancée
Autres articles (9)
-
Déploiements possibles
31 janvier 2010, parDeux types de déploiements sont envisageable dépendant de deux aspects : La méthode d’installation envisagée (en standalone ou en ferme) ; Le nombre d’encodages journaliers et la fréquentation envisagés ;
L’encodage de vidéos est un processus lourd consommant énormément de ressources système (CPU et RAM), il est nécessaire de prendre tout cela en considération. Ce système n’est donc possible que sur un ou plusieurs serveurs dédiés.
Version mono serveur
La version mono serveur consiste à n’utiliser qu’une (...) -
Gestion des droits de création et d’édition des objets
8 février 2011, parPar défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;
-
Qu’est ce qu’un éditorial
21 juin 2013, parEcrivez votre de point de vue dans un article. Celui-ci sera rangé dans une rubrique prévue à cet effet.
Un éditorial est un article de type texte uniquement. Il a pour objectif de ranger les points de vue dans une rubrique dédiée. Un seul éditorial est placé à la une en page d’accueil. Pour consulter les précédents, consultez la rubrique dédiée.
Vous pouvez personnaliser le formulaire de création d’un éditorial.
Formulaire de création d’un éditorial Dans le cas d’un document de type éditorial, les (...)
Sur d’autres sites (3016)
-
OSError : [Errno 9] Bad file descriptor when downloading using pytube and playing with discord.py
15 septembre 2022, par Trevor MathisenWhen using pytube to download a YouTube video and discord.py to play it, I am getting a OSError : [Errno 9] Bad file descriptor error. I've had this working at one point and can't seem to figure out what I changed which broke it.


Full traceback :


2022-09-15 20:20:44 INFO discord.voice_client The voice handshake is being terminated for Channel ID 902294184994693224 (Guild ID 902294184994693220)
2022-09-15T20:20:44.010142763Z 2022-09-15 20:20:44 INFO discord.voice_client Disconnecting from voice normally, close code 1000.
2022-09-15T20:20:44.058592513Z 2022-09-15 20:20:44 ERROR discord.player Exception in voice thread Thread-5
2022-09-15T20:20:44.058623864Z Traceback (most recent call last):
2022-09-15T20:20:44.058629130Z File "/usr/local/lib/python3.10/dist-packages/discord/player.py", line 698, in run
2022-09-15T20:20:44.058632003Z self._do_run()
2022-09-15T20:20:44.058634500Z File "/usr/local/lib/python3.10/dist-packages/discord/player.py", line 691, in _do_run
2022-09-15T20:20:44.058637013Z play_audio(data, encode=not self.source.is_opus())
2022-09-15T20:20:44.058639334Z File "/usr/local/lib/python3.10/dist-packages/discord/voice_client.py", line 683, in send_audio_packet
2022-09-15T20:20:44.058648759Z self.socket.sendto(packet, (self.endpoint_ip, self.voice_port))
2022-09-15T20:20:44.058653057Z OSError: [Errno 9] Bad file descriptor
2022-09-15T20:20:44.058673762Z 2022-09-15 20:20:44 INFO discord.player ffmpeg process 12 has not terminated. Waiting to terminate...
2022-09-15T20:20:44.062083854Z 2022-09-15 20:20:44 INFO discord.player ffmpeg process 12 should have terminated with a return code of -9.



Dockerfile :


ENV MEDIA_DIR='/media/'
RUN mkdir -p /media



Download function (check_path returns True, showing the file is there) :


def download_videos(stream, filename):
 print(f'downloading {filename}')
 filepath = stream.download(output_path=config_db.environ_path, filename=f'{filename}.mp4')
 print(f'completed download of {filepath}')
 check_path = Path(filepath)
 if check_path.is_file():
 print(check_path)
 return filepath



Play function :


async def play(voice_channel, message, control = None):
 vc = get_vc()
 if not vc:
 vc = await voice_channel.connect()
 next_yt = YouTube(next_song)
 next_file = sub(r'\W+', '', next_yt.title.replace(' ', '_').replace('__', '_')).lower()
 next_song_path = download_videos(next_yt.streams.filter(only_audio=True, file_extension='mp4')[0], next_file)

 await message.channel.send(f'Done getting ready, I\'ll be there in a moment.')

while next_song:
 while vc.is_playing():
 await asynciosleep(0.5)
 continue

 try:
 vc.play(FFmpegPCMAudio(next_song_path))
 print(f'Playing {next_song_path} with latency of {vc.average_latency}')
 vc.source = PCMVolumeTransformer(vc.source, volume=0.15)
 except Exception as e:
 print(e)
 await vc.disconnect()
 next_song = None
 return
 next_song = sounds_db.get_next_song()
 next_yt = YouTube(next_song) if next_song else None
 next_file = sub(r'\W+', '', next_yt.title.replace(' ', '_').replace('__', '_')).lower() if next_song else None
 next_song_path = download_videos(next_yt.streams.filter(only_audio=True, file_extension='mp4')[0], next_file) if next_song else None



I've mounted the /media/ dir during docker -v and can see the file is getting downloaded and when I copy the file to my local machine I can play it in an audio player.


The program can access the SQLite database right next to the files in question just fine.


I've deployed the container locally and to two different VPS's with the same file structure with the same behavior. I'm ripping my hair out.


-
ffmpeg framemd5 errors with FFV1.mkv in Windows
19 août 2022, par jim_e_jibI'm using framemd5 to check lossless transcoding to FFV1.mkv and am getting mismatches between my source and FFV1 files.


If I generate the framemd5 files in Windows, I get presentation timestamp mismatches on the audio between the source file and FFV1. The MD5s themselves match.


If I generate the framemd5 files for the FFV1 in Linux (WSL), everything matches just fine.


Is there something I am doing wrong, or is this just a quirk of the ffmpeg/FFV1/Windows combination ?


I am using ffmpeg version 2022-07-14-git-882aac99d2-full_build-www.gyan.dev in Windows and
ffmpeg version 4.4.2-0ubuntu1 20.04.sav2 in WSL.


Many thanks !


Jim


-
Data Privacy in Business : A Risk Leading to Major Opportunities
9 août 2022, par Erin — Privacy