
Recherche avancée
Autres articles (45)
-
Qualité du média après traitement
21 juin 2013, parLe bon réglage du logiciel qui traite les média est important pour un équilibre entre les partis ( bande passante de l’hébergeur, qualité du média pour le rédacteur et le visiteur, accessibilité pour le visiteur ). Comment régler la qualité de son média ?
Plus la qualité du média est importante, plus la bande passante sera utilisée. Le visiteur avec une connexion internet à petit débit devra attendre plus longtemps. Inversement plus, la qualité du média est pauvre et donc le média devient dégradé voire (...) -
Mise à jour de la version 0.1 vers 0.2
24 juin 2013, parExplications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...) -
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 ;
Sur d’autres sites (7146)
-
Discord.py music bot doesn't play next song in queue
10 mai 2019, par Lewis HThis is my code for the bot I’m trying to create, it plays the music fine.
ytdl_options = {
'format': 'bestaudio/best',
'restrictfilenames': True,
'noplaylist': True,
'nocheckcertificate': True,
'quiet':True,
'ignoreerrors': False,
'logtostderr': False,
'no_warnings': True,
'default_search': 'auto',
'source_address': '0.0.0.0' # using ipv4 since ipv6 addresses causes issues sometimes
}
# ffmpeg options
ffmpeg_options= {
'options': '-vn'
}
@bot.command()
async def play(ctx, url:str = None):
queue = {}
channel = ctx.author.voice.channel
if ctx.voice_client is not None:
await ctx.voice_client.move_to(channel)
elif ctx.author.voice and ctx.author.voice.channel:
await channel.connect()
if not url:
await ctx.send("Try adding a URL. e.g. !play https://youtube.com/watch?v=XXXXXXXXX")
if ctx.voice_client is not None:
vc = ctx.voice_client #vc = voice client, retrieving it
ytdl = youtube_dl.YoutubeDL(ytdl_options)
loop = asyncio.get_event_loop()
data = await loop.run_in_executor(None, lambda: ytdl.extract_info(url))
if 'entries' in data:
data = data['entries'][0]
svr_id = ctx.guild.id
if svr_id in queue:
queue[svr_id].append(data)
else:
queue[svr_id] = [data]
await ctx.send(data.get('title') + " added to queue")
source = ytdl.prepare_filename(queue[svr_id][0])
def pop_queue():
if queue[svr_id] != []:
queue[svr_id].pop(0)
data = queue[svr_id][0]
else:
vc.stop()
if not vc.is_playing():
vc.play(discord.FFmpegPCMAudio(source, **ffmpeg_options), after=lambda: pop_queue())The next song downloads and queues it fine, but once the first song finishes, it doesn’t play the next one. I can’t figure out how to make it play after the first song has commenced. I have the
after=
set to remove the top item of the queue, but how do I get it to play again ? Thanks -
How to play random part of mp4 file with vlc or something else ?
13 septembre 2011, par pprzemekI have random part (99,9% somewhere in the middle) of the mp4 file. Problem is that it's not in any container or anything just a binary piece of the file in random offset and send to me... it will keep growing but it'll take a while and I need to play content right away.
I can get all necessary metadata information for that file from other source before I even start receiving those binary data, but :
- How to do this ? I mean what headers do I need and how to get them ?
and - How to later tell vlc (or maybe some other player) that this moov atom (or some other data) that it should use for this part of the file and start playing it ?
- How to do this ? I mean what headers do I need and how to get them ?
-
Play just audio (without launching a window)
6 août 2017, par Paradise on EIs there a way to hide
ffplay
window on Windows ? I want to play audio files (some of them have video streem as well), but I don’t want a window to appear. Is there any way to hide window completelly ?I took a look at their documentationa and I didn’t find a way to do it. I also searched on the internet and didn’t find anything useful. Everyone are asking "Why in the world do you want to hide window..." and similar questions instead of actually posting an answer on how to do it.
I believe ffplay doesn’t have native way to hide window. So, what are the most easiest alternative ? One of the alternatives would be to download ffplay source code, modify it and recompile it, but it is definitelly not an easy and quick way.
Is there any way I can launch a process without showing window. It would be great if there is some way to achieve it when ffplay is launched from Node.js (becuase I am using Node.js’s module
child_process
to play audio files). So, how can I hide ffplay’s window ?My current code is following :
var cp = require('child_process');
var proc = cp.spawn('ffplay', [
'-no_banner',
'-loglevel', 'panic',
playlist.splice(Math.random() * playlist.length | 0, 1)[0]
]);Question
How to hide ffplay’s window ? If it is possible using
ffplay
native arguemnts (which I didn’t find in ther documentation) then what arguments to use ? If there is no native way, then is it possible to do it using Node.js’s modulechild_process
? If not, is there any other way I can hide ffplay’s window ? Again, I must note that some of files I play have video stream as well. So, is there any way to hide ffplay’s window ?Thanks in advance.