
Recherche avancée
Autres articles (79)
-
Organiser par catégorie
17 mai 2013, parDans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...) -
Récupération d’informations sur le site maître à l’installation d’une instance
26 novembre 2010, parUtilité
Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...) -
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 (...)
Sur d’autres sites (5130)
-
Invalid data found when processing input when using Streaming Discord Bot (python)
4 mai 2022, par DimKewlAfter refactoring and working on all possible solutions I could find on google
I always get the following error :


Invalid data found when processing input


My code snippet :


FFMPEG_OPTIONS = {
 "before_options": "-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5",
 "options": "-vn -sn -dn"
}
@commands.command()
async def radio(self,ctx,url):
 await self.joinLogic(ctx)
 await self.playStreamOpus(ctx,url)

async def joinLogic(self, ctx):
 if ctx.author.voice is None:
 await ctx.send("Please join a voice channel!")
 else:
 voice_channel = ctx.author.voice.channel
 if ctx.voice_client is None:
 await voice_channel.connect()

async def playStreamOpus(self, ctx, url):
 source = await discord.FFmpegOpusAudio.from_probe(url, **self.FFMPEG_OPTIONS)
 ctx.voice_client.play(source)



What have I already tried :


- 

- Re-install all dependencies on pip.
- A variety of streaming links that were working in the past for the same code.
- Tried the PCM instead of Opus.
- Different streaming URLs.
- More options in FFMPEG_Options to explicit that I need only audio.
- Made sure that my bot is joined in my channel and can reach other places in my code.














Streaming (sample) links I tried (worked before) :


- 

- https://streema.com/radios/StereoAnime
- http://www.e-radio.gr/Radio-Polis-994-Larisa-i54/live
- http://live24.gr/radio/generic.jsp?sid=169








Full FFmpeg options from Debugger console :
['ffmpeg', '-reconnect', '1', '-reconnect_streamed', '1', '-reconnect_delay_max', '5', '-i', 'http://www.e-radio.gr/Radio-Polis-994-Larisa-i54/live', '-map_metadata', '-1', '-f', 'opus', '-c:a', 'libopus', '-ar', '48000', '-ac', '2', '-b:a', 'Nonek', '-loglevel', 'warning', '-vn', 'pipe:1']


Youtube links work just fine in a similar method in the class.


async def playYouTube(self,ctx,url): 
 await self.joinLogic(ctx) 
 YDL_OPTIONS = { "format": "bestaudio" }
 voiceClient = ctx.voice_client 

 with youtube_dl.YoutubeDL(YDL_OPTIONS) as youTube: 
 info = youTube.extract_info(url, download=False) 
 formattedUrl = info['formats'][0]['url'] 
 source = await discord.FFmpegOpusAudio.from_probe(formattedUrl, **self.FFMPEG_OPTIONS)
 voiceClient.play(source) 



So most likely the problem lies with the URLs, which still boggles me cause they were working before ?


Any insights will be highly appreciated !


-
Matomo maker InnoCraft named 2023 Hi-Tech Awards finalist
20 avril 2023, par Erin — Press Releases -
ffmpeg combine multiple images - output video incorrect xfade transition time, and total length
24 janvier 2021, par jsalujaI want to merge 5 images with transition at specific times 4.00, 10.0, 16.0, 22.0, with a transition duration of 1 sec, and a 27 sec audio into a 27 sec video clip.


I used the below command, and got output video of 10 min 43 sec


./ffmpeg \
-i 27.m4a \
-loop 1 -t 4.0 -i image01.jpeg \
-loop 1 -t 6.0 -i image02.jpeg \
-loop 1 -t 6.0 -i image03.jpeg \
-loop 1 -t 6.0 -i image04.jpeg \
-loop 1 -t 5.0 -i image05.jpeg \
-movflags faststart -pix_fmt yuva420p \
-filter_complex " \
[1:v] format=pix_fmts=yuva420p, \
scale=1080:1920:force_original_aspect_ratio=decrease, \
pad=1080:1920:(ow-iw)/2:(oh-ih)/2, \
zoompan=z='if(eq(on,1),1,zoom+0.0004170)':x='iw-iw/zoom':y='0':fps=60:d=60*4.000:s=1080x1920, \
crop=w=1080:h=1920:x='(iw-ow)/2':y='(ih-oh)/2', \
setpts=PTS-STARTPTS+0.000/TB[v0]; \
[2:v] format=pix_fmts=yuva420p, \
scale=1080:1920:force_original_aspect_ratio=decrease, \
pad=1080:1920:(ow-iw)/2:(oh-ih)/2, \
zoompan=z='if(eq(on,1),1,zoom+0.0004170)':x='0':y='ih-ih/zoom':fps=60:d=60*6.000:s=1080x1920, \
crop=w=1080:h=1920:x='(iw-ow)/2':y='(ih-oh)/2', \
setpts=PTS-STARTPTS+4.000/TB[v1]; \
[3:v] format=pix_fmts=yuva420p, \
scale=1080:1920:force_original_aspect_ratio=decrease, \
pad=1080:1920:(ow-iw)/2:(oh-ih)/2, \
zoompan=z='if(eq(on,1),1,zoom+0.0004170)':x='0':y='ih-ih/zoom':fps=60:d=60*6.000:s=1080x1920, \
crop=w=1080:h=1920:x='(iw-ow)/2':y='(ih-oh)/2', \
setpts=PTS-STARTPTS+10.000/TB[v2]; \
[4:v] format=pix_fmts=yuva420p, \
scale=1080:1920:force_original_aspect_ratio=decrease, \
pad=1080:1920:(ow-iw)/2:(oh-ih)/2, \
zoompan=z='if(eq(on,1),1,zoom+0.0004170)':x='iw-iw/zoom':y='0':fps=60:d=60*6.000:s=1080x1920, \
crop=w=1080:h=1920:x='(iw-ow)/2':y='(ih-oh)/2', \
setpts=PTS-STARTPTS+16.000/TB[v3]; \
[5:v] format=pix_fmts=yuva420p, \
scale=1080:1920:force_original_aspect_ratio=decrease, \
pad=1080:1920:(ow-iw)/2:(oh-ih)/2, \
zoompan=z='if(eq(on,1),1,zoom+0.0004170)':x='iw-iw/zoom':y='ih-ih/zoom':fps=60:d=60*5.000:s=1080x1920, \
crop=w=1080:h=1920:x='(iw-ow)/2':y='(ih-oh)/2', \
setpts=PTS-STARTPTS+22.000/TB[v4]; \
[v0][v1]xfade=transition=circlecrop:duration=1.00:offset=3.000[v01];\
[v01][v2]xfade=transition=hrslice:duration=1.00:offset=8.000[v12];\
[v12][v3]xfade=transition=slideleft:duration=1.00:offset=13.000[v23];\
[v23][v4]xfade=transition=vdslice:duration=1.00:offset=18.000[v34]" \
-map "0:a" -map [v34] -y output.mp4



====


I think I need to tweak the time values are specified at 4 places to get this right


-loop 1 -t TIMESTAMP1


I set this to expected duration of each image i.e, 4, 6, 6, 6, 5


zoompan=z='if(eq(on,1),1,zoom+0.0004170)':x='iw-iw/zoom':y='0':fps=60:d=60* TIMESTAMP2 :s=1080x1920,


I set this to expected duration of each image i.e, 4, 6, 6, 6, 5


setpts = PTS - STARTPTS+ TIMESTAMP3 /TB


I set this to cumulative offset from 0 i.e, 0, 4, 10, 16, 22


Additionally, I ensured that
TIMESTAMP2 + TIMESTAMP3 = time at which each image display should end ie., 4, 10, 16, 22, 27


xfade=transition=circlecrop:duration=1.00:offset=TIMESTAMP4


=======


Few problems


- 

- The transition between images, is not as per the times i expect
- Overall clip length is long 10:43 as opposed to expected 00:27
- Overall processing time is 5+ minutes








Am i missing something ?