
Recherche avancée
Médias (91)
-
Valkaama DVD Cover Outside
4 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Image
-
Valkaama DVD Label
4 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Image
-
Valkaama DVD Cover Inside
4 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Image
-
1,000,000
27 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Demon Seed
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
The Four of Us are Dying
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (43)
-
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page. -
De l’upload à la vidéo finale [version standalone]
31 janvier 2010, parLe chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
Upload et récupération d’informations de la vidéo source
Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...) -
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 (7019)
-
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.


-
webm Video file is around 1GB (expected to be 45 minutes), but only plays 5 minutes and stops. how to repair with ffmpeg ?
25 juillet 2021, par AcidMicrowaveI have a .webm video file that is expected to be 45 minutes (this is how long the recording was). It was 45mins of 720p and the filesize is around 1GB.


The video file stops playing after 5 minutes. When I tried converting it with ffmpeg, to see if there is any damage, the conversion happens, but only the first 5 minutes are output with a 30MB file. During conversion, the console shows the following warnings :




[webm @ 0x7ffa2181f000] Non-monotonous DTS in output stream 0:1 ; previous : 299933, current : 299893 ; changing to 299933. This may result in incorrect timestamps in the output file.






[webm @ 0x7ffa2181f000] Non-monotonous DTS in output stream 0:1 ; previous : 299933, current : 299913 ; changing to 299933. This may result in incorrect timestamps in the output file.






[libopus @ 0x7ffa2180f800] Queue input is backward in time




(These errors appear many many many times..... I assume over 1000x.. are these corrupted frames ?)


I would appreciate any help,


Thank you very much.


-
Using ffmpeg, jpg to mp4 to mpegts, play with HLS M3U8, only first TS file plays - why ?
29 avril 2022, par Ran BoBefore posting I have searched and found similar questions on stackoverflow (I list some below) - none have helped me towards a solution, hence this post. The duration that each image is shown within the movie file differs from many posts that I have seen thus far.


A camera captures 1 image every 30 seconds. I need stream them, preferably via HLS, thus I wrap 2 images in an MP4. I then convert MP4 to mpegts. Each MP4 and TS file play fine individually (each contain two images, each image transitions after 30seconds, each movie file is 1minute long).


When I reference the two TS files in an M3U8 playlist, only the first TS file gets played. Can anyone advise why it stops and how I can get it to play all the TS files that I expect to create, not just the first TS file ? Besides my ffmpeg commands, I also include my VLC log file (though I expect to stream to Firefox/Chrome clients). I am using ffmpeg 4.2.2-static installed on an AWS EC2 with AMI2 Linux.


I have four jpgs named image11.jpg, image12.jpg, image21.jpg, image22.jpg - The images look near identical as only the timestamp in top left changes.


The following command creates 1.mp4, using image11.jpg and image12.jpg, each image displayed for 30 seconds, total duration of the mp4 is 1 minute. It plays like expected.


ffmpeg -y -framerate 1/30 -f image2 -i image1%1d.jpg -c:v libx264 -vf "fps=1,format=yuvj420p" 1.mp4


I then convert 1.mp4 to an mpegts file, creating 1.ts. It plays like expected.


ffmpeg -y -i 1.mp4 -c:v libx264 -vbsf h264_mp4toannexb -flags -global_header -f mpegts 1.ts


I repeat the above steps except specific to image21.jpg and image22.jpg, creating 2.mp4 and 2.ts


ffmpeg -y -framerate 1/30 -f image2 -i image1%1d.jpg -c:v libx264 -vf "fps=1,format=yuvj420p" 2.mp4


ffmpeg -y -i 1.mp4 -c:v libx264 -vbsf h264_mp4toannexb -flags -global_header -f mpegts 2.ts


Thus now I have 1.mp4, 1.ts, 2.mp4, 2.ts and all four play individually just fine.


Using ffprobe I can confirm their duration is 60seconds, for example :


ffprobe -i 1.ts -v quiet -show_entries format=duration -hide_banner -print_format json


My m3u8 playlist follows :


#EXTM3U
#EXT-X-VERSION:4
#EXT-X-PLAYLIST-TYPE:VOD
#EXT-X-MEDIA-SEQUENCE:1
#EXT-X-TARGETDURATION:60.000
#EXTINF:60.0000,
1.ts
#EXTINF:60.000,
2.ts
#EXT-X-ENDLIST



Can anyone advise where I am going wrong ?


VLC Error Log (though I expect to play via web browser)


I have researched the process using these (and other pages) as a guide :


How to create a video from images with ffmpeg


convert from jpg to mp4 by ffmpeg




FFMPEG An Intermediate Guide/image sequence


How to use FFmpeg to convert images to video