
Recherche avancée
Autres articles (45)
-
Supporting all media types
13 avril 2011, parUnlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)
-
Contribute to translation
13 avril 2011You can help us to improve the language used in the software interface to make MediaSPIP more accessible and user-friendly. You can also translate the interface into any language that allows it to spread to new linguistic communities.
To do this, we use the translation interface of SPIP where the all the language modules of MediaSPIP are available. Just subscribe to the mailing list and request further informantion on translation.
MediaSPIP is currently available in French and English (...) -
Librairies et binaires spécifiques au traitement vidéo et sonore
31 janvier 2010, parLes logiciels et librairies suivantes sont utilisées par SPIPmotion d’une manière ou d’une autre.
Binaires obligatoires FFMpeg : encodeur principal, permet de transcoder presque tous les types de fichiers vidéo et sonores dans les formats lisibles sur Internet. CF ce tutoriel pour son installation ; Oggz-tools : outils d’inspection de fichiers ogg ; Mediainfo : récupération d’informations depuis la plupart des formats vidéos et sonores ;
Binaires complémentaires et facultatifs flvtool2 : (...)
Sur d’autres sites (3354)
-
Change Audio Pitch with Audio Speed Ffmpeg
22 juin 2021, par Vivek Thummari'm using
Ffmpeg
to change AudioPitch
andSpeed
and here's some command i'm trying :

- 

-
ffmpeg -i audioPath -filter:a atempo=audioSpeed,asetrate=audioPitch -ar sampleRate -b:a xValue(k) output.mp3


-
ffmpeg -i audioPath -filter:a atempo=(audioSpeed / audioPitch),asetrate=(sampleRate * audioPitch),aresample=sampleRate








and i tried some more commands also with little bit of changes.


(here
audioSpeed
andaudioPitch
are in range of0.5
to2.0
,sampleRate
is between8000
to48000
andbitRate
is between range of96k
to320k
)

Now let's talk about the problem, if we only use
atempo
, it will change audio speed and if we useasetrate
, it will changeaudio pitch
along withspeed
and looks like it will ignoreaudioPitch
value if we do something like -samplerate * audioPitch
(if i usesampleRate = 8000
audio speed will decrease with thick voice and ifsampleRate = 48000
audio speed will increase with thin voice(with meansaudioPitch
will adjust according tosampleRate
, as of i experienced from output audios))

What i want is if i change
audioSpeed
to0.5
andaudioPitch
to2.0
, then in output file speed will decrease and pitch will be also applied plus i have to changefrequency(sample rate)
andbitrate
..

Any help will be appreciated, Thank you..


-
-
Discord.py music_cog, bot joins channel but plays no sound
20 juin 2021, par OzzyI have started using python a week ago or so. I have watched all the related videos on YT and checked google pages etc. But still no luck. My bot perfectly joins to the voice channel and when i use play it downloads and presumebly starts the play function but there is no sound or anything, it just joins and waits 1-2 mins then leaves with timeout error.


from discord.ext import commands
import logging

from youtube_dl import YoutubeDL

logging.basicConfig(level=logging.INFO)


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

 # all the music related stuff
 self.is_playing = False

 # 2d array containing [song, channel]
 self.music_queue = []
 self.YDL_OPTIONS = {'format': 'bestaudio', 'noplaylist': 'True', 'no_warnings': 'False'}
 self.FFMPEG_OPTIONS = {'before_options': '-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5',
 'options': '-vn'}

 self.vc = ""

 # 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']

 # 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):
 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 == "" or not self.vc.is_connected() or self.vc == None:
 self.vc = await self.music_queue[0][1].channel.connect()
 else:
 await self.vc.move_to(self.music_queue[0][1])

 print(self.music_queue)
 # 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", help="Plays a selected song from youtube")
 async def p(self, ctx, *args):
 query = " ".join(args)

 voice_channel = ctx.author.voice
 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!")
 else:
 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()

 @commands.command(name="queue", help="Displays the current songs in queue")
 async def q(self, ctx):
 retval = ""
 for i in range(0, len(self.music_queue)):
 retval += self.music_queue[i][0]['title'] + "\n"

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

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


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



I enabled logs to be sure, when it connects there's just that info :


INFO:discord.voice_client:Connecting to voice... | INFO:discord.voice_client:Starting voice handshake... (connection attempt 1)


I have also checked FFMPEG and its Path, tried different codes and methods but even though they work there is no sound. Also I installed discord.py[voice] too.


I appreciate help already, thanks.


-
RTMP server - without watermarks everything works fine --- with watermark one stream will not work nginx ffmpeg overlay watermark
10 juin 2021, par Ashley Taylorokay so i used the below config and everything works great both youtube and facebook work .


rtmp {
 server {
 listen 1935;
 chunk_size 8192;
 application live {
 record off;
 live on;
 push rtmp://a.rtmp.youtube.com/live2/djfghjkdfhgkjsdfglsjdfhj;
 push rtmp://127.0.0.1:19350/rtmp/453uy4uty8ryt85ty85yt8; (facbook)
 }
 
 }
 

 }



Now i have tried 2 seprate way to add a water mark (Youtube works fine Every time)
Facebook does not stream at all let alone with a watermark


examples i have tried below


rtmp {
server {
 listen 1935;
 chunk_size 8192;
 application live {
 record off;
 live on;
 exec /bin/ffmpeg -i rtmp://127.0.0.1:1935/live/$name
 -vf "movie=/etc/nginx/images/logo.png[logo];[0][logo]overlay=0:300"
 -c:v libx264 -f flv rtmp://127.0.0.1:1935/push/$name;
 }

 application push {
 live on;
 push rtmp://a.rtmp.youtube.com/live2/djfghjkdfhgkjsdfglsjdfhj;
 }
 }
}



and another


rtmp {
server {
 listen 1935;
 chunk_size 8192;
 application live {
 record off;
 live on;
 exec /bin/ffmpeg -i rtmp://127.0.0.1:1935/live/$name
 -vf "movie=/etc/nginx/images/logo.png[logo];[0][logo]overlay=0:300"
 -c:v libx264 -f flv rtmp://127.0.0.1:1935/push/$name;
 
 exec /bin/ffmpeg -i rtmp://127.0.0.1:1935/live/$name
 -vf "movie=/etc/nginx/images/logo.png[logo];[0][logo]overlay=0:300"
 -c:v libx264 -f flv rtmp://127.0.0.1:1935/pushh/$name;
 }

 application push {
 live on;
 push rtmp://a.rtmp.youtube.com/live2/djfghjkdfhgkjsdfglsjdfhj;
 }

 application pushh {
 live on;
 push rtmp://127.0.0.1:19350/rtmp/453uy4uty8ryt85ty85yt8;
 }
 }
}



Now for the life of me i just cannot get my brain to work.
i am very new to rtmp and have tried a dozen other ways before coming here for help.


i know this is going to be something i where i am making such a simple mistake


but on the other hand paying over $49 for restream.io for a shoddy service i just have to learn this for my own servers