
Recherche avancée
Autres articles (74)
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
La file d’attente de SPIPmotion
28 novembre 2010, parUne file d’attente stockée dans la base de donnée
Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...) -
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 (...)
Sur d’autres sites (9211)
-
why ffmpeg process successfully terminated with return code of 1 without play anything
24 juillet 2023, par Exc`I tried replacing youtube_dl with yt_dlp and replaced some of the code, the code worked fine but when using the command, the bot doesn't play music but immediately ffmpeg process 15076 successfully terminated with return code of 1


Is there a problem with my code or the ffmpg option or ytdlp option that doesn't support the yt_dlp library ?`


self.YTDL_OPTIONS = {
 'format': 'bestaudio/best',
 'outtmpl': 'F:/DISCORD BOT/Ex/music/%(extractor)s-%(id)s-%(title)s.%(ext)s',
 'restrictfilenames': True,
 'retry_max': 'auto',
 'noplaylist': True,
 'nocheckcertificate': True,
 'ignoreerrors': True,
 'logtostderr': False,
 'quiet': True,
 'no_warnings': True,
 'default_search': 'auto',
 'source_address': '0.0.0.0',
 'postprocessors': [{
 'key': 'FFmpegExtractAudio',
 'preferredcodec': 'mp3',
 'preferredquality': '192',
 }],
 'youtube_api_key': 'api'
 }
self.FFMPEG_OPTIONS = {
 'before_options': '-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5',
 'options': '-vn',
 'executable':r'F:\DISCORD BOT\Ex\ffmpeg\bin\ffmpeg.exe'
 }

 
 @commands.hybrid_command(
 name="play",
 aliases=["p"],
 usage="",
 description="KARAUKENAN.",
 
 )
 @app_commands.describe(
 judul_lagu="link ato judul lagunya"
 )
 async def play(self, ctx, judul_lagu:str):
 await ctx.defer()
 voice_channel = ctx.author.voice
 if not voice_channel or not voice_channel.channel:
 await ctx.send("Join voice channel dulu gblk!")
 return

 voice_channel = voice_channel.channel
 song = self.search_song(judul_lagu)
 if not song:
 await ctx.send("Lagnya tdk ditemukan, coba keword lain.")
 return

 if not self.bot.voice_clients:
 voice_client = await voice_channel.connect()
 else:
 voice_client = self.bot.voice_clients[0]
 if voice_client.channel != voice_channel:
 await voice_client.move_to(voice_channel)

 self.music_queue.append([song, voice_client])
 if not self.is_playing:
 await self.play_music(ctx)
 
 async def play_music(self, ctx):
 self.is_playing = True
 while len(self.music_queue) > 0:
 song = self.music_queue[0][0]
 voice_client = self.music_queue[0][1]
 await ctx.send(f"Playing {song['title']}")

 voice_client.play(discord.FFmpegPCMAudio(song['source'], **self.FFMPEG_OPTIONS), after=lambda e: self.play_next())
 voice_client.is_playing()

 while voice_client.is_playing():
 await asyncio.sleep(1)

 self.music_queue.pop(0)
 self.is_playing = False

 await ctx.send("Queue is empty.")
 voice_client.stop()

 def play_next(self):
 if len(self.music_queue) > 0:
 self.is_playing = False

 def search_song(self, judul_lagu):
 ydl = yt_dlp.YoutubeDL(self.YTDL_OPTIONS)
 with ydl:
 try:
 info = ydl.extract_info(f"ytsearch:{judul_lagu}", download=False)['entries'][0]
 return {'source': info['formats'][0]['url'], 'title': info['title']}
 except Exception:
 return None





when i use /play the bot sucess serch song but immediately terminate does not play any music


2023-04-10 13:06:45 INFO discord.voice_client Connecting to voice...
2023-04-10 13:06:45 INFO discord.voice_client Starting voice handshake... (connection attempt 1)
2023-04-10 13:06:46 INFO discord.voice_client Voice handshake complete. Endpoint found singapore11075.discord.media
2023-04-10 13:06:50 INFO discord.player ffmpeg process 15076 successfully terminated with return code of 1.





-
How to play RTSP IP camera using ffmpeg and exoPlayer in android
3 juin 2023, par jcredkingI was trying
LibVlc
but I get dealy in this and can't record the stream

-
ffmpeg adding play image to thumbnail output
26 août 2014, par StealthRTHey all I am currently able to get a thumbnail capture from my MP4 video by doing the following command line :
[Sets Per-file main options time_off start time offset]
|| [The # of start time offsets]
|| || [Sets input video file option]
|| || || [Video file name here]
|| || || || [Sets video option to # of video frames to record]
|| || || || || [Asking for the first frame]
|| || || || || || [Name of the captured video frame]
|| || || || || || ||
\/ \/ \/ \/ \/ \/ \/
ffmpeg -ss 0 -i vidfile.mp4 -vframes 1 frame.pngNow as I said above, this command works just fine in producing a thumbnail of the first frame of my MP3 video. However, I am needing to place an overlay image of a "play" button on top of that newly created frame image.
Is there another command that i can tell it to overlay another image on top of frame.png ?
The image I would like to overlay on top of the frame looks like this (a transparent PNG) :
Any help would be great ! Thanks !