
Recherche avancée
Médias (2)
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
-
Carte de Schillerkiez
13 mai 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
Autres articles (53)
-
Gestion générale des documents
13 mai 2011, parMédiaSPIP ne modifie jamais le document original mis en ligne.
Pour chaque document mis en ligne il effectue deux opérations successives : la création d’une version supplémentaire qui peut être facilement consultée en ligne tout en laissant l’original téléchargeable dans le cas où le document original ne peut être lu dans un navigateur Internet ; la récupération des métadonnées du document original pour illustrer textuellement le fichier ;
Les tableaux ci-dessous expliquent ce que peut faire MédiaSPIP (...) -
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 -
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.
Sur d’autres sites (7871)
-
ffmpeg - add music to an audiobook, and loop the music [closed]
23 novembre 2024, par RhysI found these example, and they all work. But I cannot overlay 2 audios and loop the shortest audio until the longest audio is finished.


Audio to match Video Length


ffmpeg -i VIDEO1.mp4 -stream_loop -1 -i bgmusic.mp3 -shortest -c:v copy -c:a aac -map 0:v:0 -map 1:a:0 output.mp4



Loop Audio


ffmpeg -i audio.mp3 -filter_complex "aloop=loop=-1:size=10" output_loop.mp3



Overlay 2 Audios


ffmpeg -y -i bgmusic.mp3 -i audio.mp3 -filter_complex "[0:0]volume=1.0[a];[1:0]volume=1.0[b];[a][b]amix=inputs=2:duration=longest" -c:a libmp3lame output.mp3



Here is my attempt.


ffmpeg -y -i audio.mp3 -stream_loop -1 -i bgmusic.mp3 -shortest -filter_complex "[0:0]volume=1.0[a];[1:0]volume=1.0[b];[a][b]amix=inputs=2:duration=longest" -c:a libmp3lame output.mp3



But this example is looping bgmusic.mp3 forever ... and audio.mp3 is stopping after the song finishes


how can I get to audios to play togeather, but the shortest audio loops until the longest audio is finished ?


-
FFMPEG use -strict -2
21 août 2020, par GILOHi I've been recently using the command below


Ffmpeg -i song.mp3 -loop 1 -i image.jpg -filter_complex \
"[0:a]showfreqs=mode=line:ascale=log:fscale=log:s=1280x518[sf]; \
 [0:a]showwaves=s=1280x202:mode=p2p[sw]; \
 [sf][sw]vstack[fg]; \
 [1:v]scale=1280:-1,crop=iw:720[bg]; \
 [bg][fg]overlay=shortest=1:format=auto,format=yuv420p,drawtext=fontfile=/usr/share/fonts/TTF/Vera.ttf:fontcolor=white:x=10:y=10:text='\"Rated80s Prophets Prey\" by Comics On Film'[out]" \
-map "[out]" -map 0:a -c:v libx264 -preset fast -crf 18 -c:a libopus output.mp4 



from this post Showfreqs and showwaves over background image ?.




However I changed the output file to from output.mkv to output.mp4 as I would prefer to use mp4




I get the below error


[mp4 @ 0x7f962b816800] opus in MP4 support is experimental, add '-strict -2' if you want to use it.
Could not write header for output file #0 (incorrect codec parameters ?) : Experimental feature
Error initializing output stream 0:0 —
[libopus @ 0x7f962b819800] 1 frames left in the queue on closing


The main information from that error is




opus in MP4 support is experimental, add '-strict -2' if you want to use it.




but where do I use -strict -2 within the command to make the command possible


-
Code returns AttributeError : 'VoiceChannel' object has no attribute 'play' when running on Discloud
18 septembre 2023, par Sc4rl3ttfir3So, my code works fine when I run it locally, but even after adapting it to run on Discloud, it returns an error I can't solve.


Code :


@bot.command(name='play', help='To play song')
async def play(ctx, url):
 voice_channel = ctx.author.voice.channel

 if voice_channel is None:
 return await ctx.send('You are not connected to a voice channel.')

 async with ctx.typing():
 filename = await YTDLSource.from_url(url, loop=bot.loop)
 
 if ctx.voice_client is not None:
 ctx.voice_client.stop()

 source = discord.FFmpegPCMAudio(
 executable="ffmpeg",
 source=filename
 )
 
 voice_channel.play(source)

 await ctx.send('**Now playing:** {}'.format(filename))



When it runs on the Discloud server, it returns the following error/traceback message :


Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/discord/ext/commands/core.py", line 235, in wrapped
ret = await coro(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user_686208406444572830/Sc4rl3ttb0t.py", line 357, in play 
voice_channel.play(source)
^^^^^^^^^^^^^^^^^^
AttributeError: 'VoiceChannel' object has no attribute 'play'



Anybody with any idea of what is going wrong would be greatly appreciated for helping out