
Recherche avancée
Médias (91)
-
Géodiversité
9 septembre 2011, par ,
Mis à jour : Août 2018
Langue : français
Type : Texte
-
USGS Real-time Earthquakes
8 septembre 2011, par
Mis à jour : Septembre 2011
Langue : français
Type : Texte
-
SWFUpload Process
6 septembre 2011, par
Mis à jour : Septembre 2011
Langue : français
Type : Texte
-
La conservation du net art au musée. Les stratégies à l’œuvre
26 mai 2011
Mis à jour : Juillet 2013
Langue : français
Type : Texte
-
Podcasting Legal guide
16 mai 2011, par
Mis à jour : Mai 2011
Langue : English
Type : Texte
-
Creativecommons informational flyer
16 mai 2011, par
Mis à jour : Juillet 2013
Langue : English
Type : Texte
Autres articles (13)
-
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 (...) -
Participer à sa traduction
10 avril 2011Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
Actuellement MediaSPIP n’est disponible qu’en français et (...) -
List of compatible distributions
26 avril 2011, parThe table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...)
Sur d’autres sites (2960)
-
FFMPEG concatenating videos with and without audios
6 juillet 2023, par najam ulhassanI'm concatenating multiple videos using FFMPEG, with and without audios to certain videos, i'm using following command but FFMPEG generating error over (:a audio filer) Stream specifier ':a' in filtergraph description, matches no streams.
Even I'm using anullsrc for videos having no sound.


Command :


ffmpeg -i Video_202306_23_102709.mp4 -i Video_202306_23_102838.mp4 -i Screenshot_298.mp4 -i MG16885528.mp4
-f lavfi -i anullsrc=channel_layout=stereo:sample_rate=48000
-filter_complex
[0:v]scale=1280x720:force_original_aspect_ratio=decrease,pad=1280x720 :-1 :-1,setsar=1,fps=24,format=yuv420p[v0] ;
[1:v]scale=1280x720:force_original_aspect_ratio=decrease,pad=1280x720 :-1 :-1,setsar=1,fps=24,format=yuv420p[v1] ;
[2:v]scale=1280x720:force_original_aspect_ratio=decrease,pad=1280x720 :-1 :-1,setsar=1,fps=24,format=yuv420p[v2] ;
[3:v]scale=1280x720:force_original_aspect_ratio=decrease,pad=1280x720 :-1 :-1,setsar=1,fps=24,format=yuv420p[v3] ;
[0:a]aformat=sample_rates=48000:channel_layouts=stereo[a0] ;
[1:a]aformat=sample_rates=48000:channel_layouts=stereo[a1] ;
[2:a]aformat=sample_rates=48000:channel_layouts=stereo[a2] ;
[3:a]aformat=sample_rates=48000:channel_layouts=stereo[a3] ;
[v0][a0][v1][a1][v2][a2][v3][a3]concat=n=4:v=1:a=1[v][a]
-map "[v]" -map "[a]" -c:v libx264 -crf 28 -c:a aac
-movflags +faststart FinalTempVideo.mp4


I'm following this query Concatenate Video in ffmpegby llogan,
It seems the :a filter is not utilize with the videos having no sound, but issue is that I couldn't distinguish between the videos having audio or not.
Moreover anullsrc is not making it a fix.


-
FFMPEG/FFPLAY : Where does AVCodecContext contents get filled
16 décembre 2013, par ZaxI have integrated a custom decoder into FFMPEG's Multimedia framework. However i still feel i have missed out a lot of things during the integration. As a result, when i'm trying to render the output data using FFPLAY, the resolution that it is assuming is wrong for my stream.
The command that i use to render the stream is :
./ffplay -vcodec myCustDec -i BasketBallPass_416x240.bin
So when the above command is executed, on my terminal what it is displaying is :
Stream #0:0: Video: bintext, pal8, 1280x23168, 25 tbr, 25 tbn, 25 tbc
From whatever i know, bintext is the parser my decoder is using, then the resolution it is assuming is 1280x23168 (which is wrong).
Then the FFPLAY's window pops up with a window of size 416x240, with a distorted image in it. What i think is that the decoder is decoding and putting the YUV420 data into the necessary buffer with proper width and height initialization of the
AVFrame
.However due to the resolution that it is displaying in the command line i.e. 1280x23168, the output is distorted. This thing i can confirm because, when i dump the output frame, i'm able to get proper YUV dumped data which can be played in any YUV player.
The same command when i tryout with some existing codec inside the frame work, below are its dumps :
Command :
./ffplay -vcodec h264 input.m4v
treminal displays :
Stream #0:0: Video: h264, yuv420p, 416x240, 25 fps, 25 tbr, 1200k tbn, 25 tbc
As we see here, the framework is getting the resolution right.
Now my query is :
In which place is the resolution of this frames being dumped in the code and should i define my own probe function? can this problem be because of the probe/demuxer?
-
How can I make my loop command for a pythin discord bot work ?
17 octobre 2022, par Dioso I am kinda new to python and wanted to make a discord music bot. It works pretty well, except that I am not able to figure out how to code the queue loop command and the playing now command(this one gives me a full link instead of just the name). I have bolded the 2 commands that I cannot figure out.


from ast import alias
import discord
from discord.ext import commands

from youtube_dl import YoutubeDL

class music_cog(commands.Cog):
 def __init__(self, bot):
 self.bot = bot
 
 #all the music related stuff
 self.is_playing = False
 self.is_paused = False
 self.is_loop = False
 self.now_playing =""
 # 2d array containing [song, channel]
 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

 #searching the item on youtube
 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 {'source': info['formats'][0]['url'], 'title': info['title']}

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

 #get the first url
 m_url = self.music_queue[0][0]['source']
 self.now_playing = self.music_queue[0][0]['title']
 #remove the first element as you are currently playing it
 self.music_queue.pop(0)

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

 # infinite loop checking 
 async def play_music(self, ctx):
 if len(self.music_queue) > 0:
 self.is_playing = True
 m_url = self.music_queue[0][0]['source']
 
 #try to connect to voice channel if you are not already connected
 if self.vc == None or not self.vc.is_connected():
 self.vc = await self.music_queue[0][1].connect()

 #in case we fail to 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.now_playing = m_url
 #remove the first element as you are currently playing it
 self.music_queue.pop(0)

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

 @commands.command(name="play", aliases=["p","playing"], help="Plays a selected song from youtube")
 async def play(self, ctx, *args):
 query = " ".join(args)
 
 voice_channel = ctx.author.voice.channel
 if voice_channel is None:
 #you need to be connected so that the bot knows where to go
 await ctx.send("Connect to a voice channel!")
 elif self.is_paused:
 self.vc.resume()
 else:
 global song
 song = self.search_yt(query)
 if type(song) == type(True):
 await ctx.send("Could not download the song. Incorrect format try another keyword. This could be due to playlist or a livestream format.")
 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()
 await ctx.send("Music paused")
 elif self.is_paused:
 self.is_paused = False
 self.is_playing = True
 self.vc.resume()
 await ctx.send("Music resumed")

 @commands.command(name = "resume", aliases=["r"], help="Resumes playing with the discord bot")
 async def resume(self, ctx, *args):
 if self.is_paused:
 self.is_paused = False
 self.is_playing = True
 self.vc.resume()
 await ctx.send("Music resumed")
 else:
 await ctx.send("Music is not paused")

 @commands.command(name="skip", aliases=["s"], help="Skips the current song being played")
 async def skip(self, ctx):
 if self.vc != None and self.vc:
 self.vc.stop()
 #try to play next in the queue if it exists
 await self.play_music(ctx)
 await ctx.send("Skipped current song")

 @commands.command(name="queue", aliases=["q"], help="Displays the current songs in queue")
 async def queue(self, ctx):
 global retval 
 retval = "```"
 for i in range(0, len(self.music_queue)):
 # display a max of 5 songs in the current queue
 #if (i > 4): break
 l = str(i+1)
 retval += l +". " + self.music_queue[i][0]['title'] + "\n"

 if retval != "```":
 retval+="```"
 await ctx.send(retval)
 else:
 await ctx.send("No music in queue")

 **@commands.command(name="loop", help="Loops the queue")**
 async def loop(self, ctx):
 if self.is_loop == False:
 self.is_loop = True
 else:
 self.is_loop = False 
 if self.is_loop == True:
 if len(self.music_queue)==0:
 await ctx.send("No music to loop")
 else:
 i=0
 while self.is_loop == True and i code>