
Recherche avancée
Médias (91)
-
Collections - Formulaire de création rapide
19 février 2013, par
Mis à jour : Février 2013
Langue : français
Type : Image
-
Les Miserables
4 juin 2012, par
Mis à jour : Février 2013
Langue : English
Type : Texte
-
Ne pas afficher certaines informations : page d’accueil
23 novembre 2011, par
Mis à jour : Novembre 2011
Langue : français
Type : Image
-
The Great Big Beautiful Tomorrow
28 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Texte
-
Richard Stallman et la révolution du logiciel libre - Une biographie autorisée (version epub)
28 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Texte
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (84)
-
MediaSPIP version 0.1 Beta
16 avril 2011, parMediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
MediaSPIP Player : problèmes potentiels
22 février 2011, parLe lecteur ne fonctionne pas sur Internet Explorer
Sur Internet Explorer (8 et 7 au moins), le plugin utilise le lecteur Flash flowplayer pour lire vidéos et son. Si le lecteur ne semble pas fonctionner, cela peut venir de la configuration du mod_deflate d’Apache.
Si dans la configuration de ce module Apache vous avez une ligne qui ressemble à la suivante, essayez de la supprimer ou de la commenter pour voir si le lecteur fonctionne correctement : /** * GeSHi (C) 2004 - 2007 Nigel McNie, (...) -
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...)
Sur d’autres sites (4816)
-
Animation with gnuplot : only one cruve plotted in an animation whereas 2 expected
26 mai 2022, par stefanI have the following script which is expected to produce the animations of 2 curves :


#!/bin/bash

for i in {1..397}; do
gnuplot -p <<-EOFMarker
set terminal png;
set output "pic$i.png";
set title "power spectrum";
set xlabel "scale (k)";
set ylabel "P(k)";
set key top left;
set grid;
set ytics out nomirror;
set xtics out nomirror;
set logscale x;
set logscale y;
set format x "10^{%L}";
set yrange [0:30000];
plot "CAMB-1.3.5/matter_camb$i" u 1:2 w l;
replot "EFTCAMB_v3_beta/matter_eftcamb$i" u 1:2 w l;
EOFMarker
done

# Build movie with ffmpeg
ffmpeg -start_number 1 -i pic%d.png movie.mpeg



Every works fine excepted the fact that only one curve is plotted in animation (CAMB-1.3.5) :


Here is an example of frame :




Why the "
replot
" command is not taken into account in the generated image ?

-
Application using FFMPEG Library does not compile with CMAKE error avformat_alloc_context but I have imported the header files and libray
23 mai 2022, par ClockmanI compiled the FFMPEG source file myself and got the header and library files in an include and bin folder respectively, the target platform is Windows 10. I also setup my cmakelist.txt to find and include both the library and header files. The application finds the path or so it seems because during compilation I get a "LNK2019 error unresolved external symbol avformat_alloc_context referenced in function main". Below is an extract from my cmake list ; I will like to note that I got the .lib and .dll versions of the library hence the approach below based on the book "professional cmake" and other stackflow examples.


ProjectDir/AudMan/cmakelist.txt


list(APPEND CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH};PATH-TO-INCLUDES;PATH-TO-LIBRARY)
find_path(AVFORMAT_INCLUDE_DIR libavformat/avformat.h)
find_library(AVFORMAT_LIBRARY avformat)
add_library(ffmpegHeaders INTERFACE)
target_include_directories(ffmpegHeaders INTERFACE ${AVFORMAT_INCLUDE_DIR})



ProjectDir/cmakelist.txt


set(Rapid_Prefix PATH-TO-LIBRARY)
 add_library(AVformat SHARED IMPORTED)
 set_target_properties(AVformat PROPERTIES IMPORTED_LOCATION ${Rapid_Prefix}/avformat-59.dll IMPORTED_IMPLIB ${AVFORMAT_LIBRARY})
target_link_libraries(App_target PRIVATE AVformat)



A sample of the codes is this


extern "C" {
#include <libavcodec></libavcodec>avcodec.h>
#include <libavformat></libavformat>avformat.h>
}

int main()
{
 AVFormatContext* format = avformat_alloc_context();
 if (avformat_open_input(&format, R"(\test.m4a)", NULL, NULL) != 0) {
 fprintf(stderr, "Could not open file '%s'\n", R"(\test.m4a)");
 return -1;
 }
 if (avformat_find_stream_info(format, NULL) < 0) {
 fprintf(stderr, "Could not retrieve stream info from file '%s'\n", R"(test.m4a)");
 return -1;
 }
 return 0;
}



I have been at it for about five days and will appreciate any help I can get.


-
FFmpegPCMaudio doesn't work on my server but it works on my computer
4 mai 2023, par AlexI am developing a Discord bot with python that can play music. When I do the tests on my computer all work find but when I take all the files to put there in my server it stop working. So I tried to run it on an other computer and no, it still does not work.


First I was thinking it was a power problems but the other computer is almost the same. I tried to install all the packages that I have on my computer to the second but the music part still not work. It's not a Discord API problem because my others commands work find.


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

 # 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 = ""

 # 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].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 = discord.utils.get(ctx.guild.voice_channels, name='General')
 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()
 # try to play next in the queue if it exists
 await self.play_music()

 @commands.command(name="disconnect", help="Disconnecting bot from VC")
 async def dc(self, ctx):
 await self.vc.disconnect()

 @commands.command(name="pause")
 async def pause(self, ctx):
 voice = discord.utils.get(self.bot.voice_clients, guild=ctx.guild)
 if voice.is_playing():
 voice.pause()
 else:
 await ctx.send("Currently no audio is playing.")

 @commands.command(name="resume")
 async def resume(self, ctx):
 voice = discord.utils.get(self.bot.voice_clients, guild=ctx.guild)
 if voice.is_paused():
 voice.resume()
 else:
 await ctx.send("The audio is not paused.")



There are not any error messages, the bot just joins the voice chat and does nothing.


If someone can tell me we it work just on my computer I will be very grateful.