
Recherche avancée
Autres articles (37)
-
(Dés)Activation de fonctionnalités (plugins)
18 février 2011, parPour gérer l’ajout et la suppression de fonctionnalités supplémentaires (ou plugins), MediaSPIP utilise à partir de la version 0.2 SVP.
SVP permet l’activation facile de plugins depuis l’espace de configuration de MediaSPIP.
Pour y accéder, il suffit de se rendre dans l’espace de configuration puis de se rendre sur la page "Gestion des plugins".
MediaSPIP est fourni par défaut avec l’ensemble des plugins dits "compatibles", ils ont été testés et intégrés afin de fonctionner parfaitement avec chaque (...) -
Le plugin : Podcasts.
14 juillet 2010, parLe problème du podcasting est à nouveau un problème révélateur de la normalisation des transports de données sur Internet.
Deux formats intéressants existent : Celui développé par Apple, très axé sur l’utilisation d’iTunes dont la SPEC est ici ; Le format "Media RSS Module" qui est plus "libre" notamment soutenu par Yahoo et le logiciel Miro ;
Types de fichiers supportés dans les flux
Le format d’Apple n’autorise que les formats suivants dans ses flux : .mp3 audio/mpeg .m4a audio/x-m4a .mp4 (...) -
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
Sur d’autres sites (5381)
-
How do I resolve ffmpeg concat command error "unknown keyword..." ?
6 décembre 2023, par ScorbI am trying to concatenate two video files using ffmpeg, and I am receiving an error.


To eliminate compatibility issues between the two videos, I have been concatenating the same video with itself, and the same error persists.


ffmpeg \
 -f concat \
 -safe 0 \
 -i intro_prepped.avi intro_prepped.avi \
 -c copy \
 concat.avi 



And the error output I receive is....




[concat @ 0x220d420] Line 1 : unknown keyword 'RIFFf� ?'
intro_prepped.avi : Invalid data found when processing input




I have tried various combinations of concat flags and have not been able to get it to work. Has anyone seen this error before ?


-
avformat_write_header error() error -22 : Could not write header to '' "
11 septembre 2023, par Saurabh SharmaI am trying to extract audio from video byte array file using ffmpeg library and store the output in another byte array.
Here is my implementation :


private byte[] extractAudioFromVideo(byte[] videoBytes) {

 try {
 FFmpegLogCallback.set();
 ByteArrayInputStream videoData = new ByteArrayInputStream(videoBytes);

 ByteArrayOutputStream audioData = new ByteArrayOutputStream();

 FFmpegFrameGrabber grabber = new FFmpegFrameGrabber(videoData);
 grabber.start();
 
 FrameRecorder recorder = new FFmpegFrameRecorder(audioData, grabber.getAudioChannels());
 recorder.setFormat("wav");
 recorder.setAudioCodec(avcodec.AV_CODEC_ID_ADPCM_IMA_WAV);
 recorder.setAudioBitrate(grabber.getAudioBitrate());
 recorder.setAudioChannels(grabber.getAudioChannels());
 recorder.setAudioQuality(0);
 recorder.start();


 // Grab and record audio frames
 Frame audioFrame;
 while ((audioFrame = grabber.grabSamples()) != null) {
 recorder.record(audioFrame);
 }

 
 grabber.stop();
 recorder.stop();
 
 return audioData.toByteArray();
 } catch (FFmpegFrameGrabber.Exception | FrameRecorder.Exception e) {
 e.printStackTrace();
 }



On running the above code, I am running into the error


org.bytedeco.javacv.FrameRecorder$Exception: avformat_write_header error() error -22: Could not write header to ''
 at org.bytedeco.javacv.FFmpegFrameRecorder.startUnsafe(FFmpegFrameRecorder.java:900)
 at org.bytedeco.javacv.FFmpegFrameRecorder.start(FFmpegFrameRecorder.java:406)



On adding FFmpegLogCallback.set() in the above code for detailed logs it says
Error : [wav @ 0x7f9910eb4780] No streams to mux were specified


Info: Input #0, matroska,webm, from 'java.io.ByteArrayInputStream@36d592ba':

Info: Metadata:

Info: encoder : 
Info: Chrome
Info: 

Info: Duration: 
Info: N/A
Info: , start: 
Info: 0.000000
Info: , bitrate: 
Info: N/A
Info: 

Info: Stream #0:0
Info: (eng)
Info: : Audio: opus, 48000 Hz, mono, fltp
Info: (default)
Info: 

Info: Stream #0:1
Info: (eng)
Info: : Video: h264 (Constrained Baseline), yuv420p(progressive), 1280x720 [SAR 1:1 DAR 16:9]
Info: , 
Info: 30.30 fps, 
Info: 30 tbr, 
Info: 1k tbn, 
Info: 60 tbc
Info: (default)
Info: 

Error: [wav @ 0x7f9910eb4780] No streams to mux were specified



Can someone please suggest how to resolve it


Thanks


-
Keep getting "discord.ext.commands.errors.CommandInvokeError : Command raised an exception : KeyError : 'source'" error
22 février 2023, par krisEverytime I try to run play command in my bot, I get this error in the terminal, kind of new to coding so not exactly sure whats going on. It was working just fine, then it started not to work.


import discord

from discord.ext import commands

from youtube_dl import YoutubeDL

class music_cog(commands.Cog):
 def __init__(self, bot):
 self.bot = bot
 
 self.is_playing = False
 self.is_paused = False

 self.music_queue = []
 self.YDL_OPTIONS = {'format': 'bestaudio', 'noplaylist': 'True'}
 self.FFMPEG_OPTIONS = {'before_options': '-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5', 'options': '-vn'}

 self.vc = None

 def search_yt(self, item):
 with YoutubeDL(self.YDL_OPTIONS) as ydl:
 try:
 info = ydl.extract_info("ytsearch:%s" % item, download=False)['entries'][0]
 except Exception:
 return False
 return {'sourcffmpege': info['formats'][0]['url'], 'title': info['title']}
 
 def play_next(self):
 if len(self.music_queue) > 0:
 self.is_playing = True

 m_url = self.music_queue[0][0]['source']

 self.music_queue.pop(0)

 self.vc.play(discord.FFmpegPCMAudio(executable="ffmpeg", source=m_url, **self.FFMPEG_OPTIONS), after=lambda e: self.play_next())
 else:
 self.is_playing = False

 async def play_music(self, ctx):
 if len(self.music_queue) > 0:
 self.is_playing = True

 m_url=self.music_queue[0][0]['source']

 if self.vc == None or not self.vc.is_connected():
 self.vc = await self.music_queue[0][1].connect()

 if self.vc == None:
 await ctx.send("Could not connect to the voice channel")
 return
 else:
 await self.vc.move_to(self.music_queue[0][1])

 self.music_queue.pop(0)

 self.vc.play(discord.FFmpegPCMAudio(executable="ffmpeg", source=m_url, **self.FFMPEG_OPTIONS), after=lambda e: self.play_next())

 @commands.command(name="play", aliases=["p", "playing"], help="Play the selected song from youtube")
 async def play(self, ctx, *args):
 query = " ".join(args)

 voice_channel = ctx.author.voice.channel
 if voice_channel is None:
 await ctx.send("Connect to a voice channel!")
 elif self.is_paused:
 self.vc.resume()
 else:
 song = self.search_yt(query)
 if type(song) == type(True):
 await ctx.send("Could not download the song. Incorrect format, try a different keyword")
 else:
 await ctx.send("Song added to the queue")
 self.music_queue.append([song, voice_channel])

 if self.is_playing == False:
 await self.play_music(ctx)

 @commands.command(name="pause", help="Pauses the current song being played")
 async def pause(self, ctx, *args):
 if self.is_playing:
 self.is_playing = False
 self.is_paused = True
 self.vc.pause()
 elif self.is_paused:
 self.vc.resume()

 @commands.command(name="resume", aliases=["r"], help="Resumes playing the current song")
 async def resume(self, ctx, *args):
 if self.is_paused:
 self.is_playing = True
 self.is_paused = False
 self.vc.resume()

 @commands.command(name="skip", aliases=["s"], help="Skips the currently played song")
 async def skip(self, ctx, *args):
 if self.vc != None and self.vc:
 self.vc.stop()
 await self.play_music(ctx)

 @commands.command(name="queue", aliases=["q"], help="Displays all the songs currently in the queue")
 async def queue(self, ctx):
 retval = ""

 for i in range(0, len(self.music_queue)):
 if i > 5: break
 retval += self.music_queue[i][0]['title'] + '\n'

 if retval != "":
 await ctx.send(retval)
 else:
 await ctx.send("No music in queue.")
 
 @commands.command(name="clear", aliases=["c", "bin"], help="Stops the current song and clears the queue")
 async def clear(self, ctx, *args):
 if self.vc != None and self.is_playing:
 self.vc.stop()
 self.music_queue = []
 await ctx.send("Music queue cleared")

 @commands.command(name="leave", aliases=["l"], help="Kicks the bot from the voice channel")
 async def leave(self, ctx):
 self.is_playing = False
 self.is_paused = False
 await self.vc.disconnect()

async def setup(bot):
 await bot.add_cog(music_cog(bot))



this is my music_cogs.py, this is where error is coming from


was working just fine then it started to give me this error after a while.


raceback (most recent call last):
 File "C:\Users\poopt\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\ext\commands\core.py", line 229, in wrapped
 ret = await coro(*args, **kwargs)
 File "c:\Users\poopt\Code\cool_bot\cogs\music_cog.py", line 77, in play
 await self.play_music(ctx)
 File "c:\Users\poopt\Code\cool_bot\cogs\music_cog.py", line 44, in play_music
 m_url=self.music_queue[0][0]['source']
KeyError: 'source'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
 line 1349, in invoke
 await ctx.command.invoke(ctx)
 File "C:\Users\poopt\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\ext\commands\core.py", line 1023, in invoke
 await injected(*ctx.args, **ctx.kwargs) # type: ignore
 File "C:\Users\poopt\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\ext\commands\core.py", line 238, in wrapped
 raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: KeyError: 'source'