
Recherche avancée
Médias (1)
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (4)
-
ANNEXE : Les extensions, plugins SPIP des canaux
11 février 2010, parUn plugin est un ajout fonctionnel au noyau principal de SPIP. MediaSPIP consiste en un choix délibéré de plugins existant ou pas auparavant dans la communauté SPIP, qui ont pour certains nécessité soit leur création de A à Z, soit des ajouts de fonctionnalités.
Les extensions que MediaSPIP nécessite pour fonctionner
Depuis la version 2.1.0, SPIP permet d’ajouter des plugins dans le répertoire extensions/.
Les "extensions" ne sont ni plus ni moins que des plugins dont la particularité est qu’ils se (...) -
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 (...) -
Installation en mode standalone
4 février 2011, parL’installation de la distribution MediaSPIP se fait en plusieurs étapes : la récupération des fichiers nécessaires. À ce moment là deux méthodes sont possibles : en installant l’archive ZIP contenant l’ensemble de la distribution ; via SVN en récupérant les sources de chaque modules séparément ; la préconfiguration ; l’installation définitive ;
[mediaspip_zip]Installation de l’archive ZIP de MediaSPIP
Ce mode d’installation est la méthode la plus simple afin d’installer l’ensemble de la distribution (...)
Sur d’autres sites (4027)
-
Not able to link ffmpeg library in cython package
12 août 2020, par Sagar DonadkarI am using cython package to call Cpp API and in my cpp code i am using ffmpeg library when i try to build my code i got and linking issue
In header file add include ffmpeg header file to call ffmpeg library function


header file
#ifndef RECTANGLE_H
#define RECTANGLE_H
#include <iostream>

extern "C"
{
 #include "libavformat/avformat.h"
 #include "libavutil/dict.h"
}

using namespace std;

namespace shapes 
{
 class Rectangle {
 public:
 int x0, y0, x1, y1;
 Rectangle();
 Rectangle(int x0, int y0, int x1, int y1);
 ~Rectangle();
 int getArea();
 int ffmpegFile();
 void getSize(int* width, int* height);
 void move(int dx, int dy);
 };
}

#endif
</iostream>


Rectangle.Cpp file in ffmpegFile() i am using ffmpeg example code to test ffmpeg my code where i call mostly ffmpeg API



#include <iostream>
#include "Rectangle.hpp"

namespace shapes {
 

 // Default constructor
 Rectangle::Rectangle () {}

 // Overloaded constructor
 Rectangle::Rectangle (int x0, int y0, int x1, int y1) {
 this->x0 = x0;
 this->y0 = y0;
 this->x1 = x1;
 this->y1 = y1;
 }

 // Destructor
 Rectangle::~Rectangle () {}

 // Return the area of the rectangle
 int Rectangle::getArea () {
 return 10;
 }

 // Get the size of the rectangle.
 // Put the size in the pointer args
 void Rectangle::getSize (int *width, int *height) {
 (*width) = x1 - x0;
 (*height) = y1 - y0;
 }

 // Move the rectangle by dx dy
 void Rectangle::move (int dx, int dy) {
 this->x0 += dx;
 this->y0 += dy;
 this->x1 += dx;
 this->y1 += dy;
 }
 int Rectangle::ffmpegFile()
 {
 AVFormatContext *fmt_ctx = NULL;
 AVDictionaryEntry *tag = NULL;
 int ret = 0;
 char* filename = "D:\\Discovery.mp4";

 if ((ret = avformat_open_input(&fmt_ctx, filename, NULL, NULL)))
 return ret;

 if ((ret = avformat_find_stream_info(fmt_ctx, NULL)) < 0) {
 av_log(NULL, AV_LOG_ERROR, "Cannot find stream information\n");
 return ret;
 }

 while ((tag = av_dict_get(fmt_ctx->metadata, "", tag, AV_DICT_IGNORE_SUFFIX)))
 printf("%s=%s\n", tag->key, tag->value);

 avformat_close_input(&fmt_ctx);
 return ret;
 }
}
</iostream>


Rectangle.pxd file declaration for cpp file function and variable


cdef extern from "Rectangle.cpp":
 pass
cdef extern from "Rectangle.hpp" namespace "shapes":
 cdef cppclass Rectangle:
 Rectangle() except +
 Rectangle(int, int, int, int) except +
 int x0, y0, x1, y1
 int getArea()
 void getSize(int* width, int* height)
 void move(int, int)
 int ffmpegFile()



rect.pyx file i am calling cpp API form pyx file


# distutils: language = c++

from Rectangle cimport Rectangle

cdef class PyRectangle:
 cdef Rectangle c_rect # Hold a C++ instance which we're wrapping

 def __cinit__(self, int x0, int y0, int x1, int y1):
 self.c_rect = Rectangle(x0, y0, x1, y1)

 def get_area(self):
 return self.c_rect.getArea()

 def get_size(self):
 cdef int width, height
 self.c_rect.getSize(&width, &height)
 return width, height

 def move(self):
 print(self.c_rect.ffmpegFile())



setup.py
I provided pyx file and ffmpeg library path as well as include path


from setuptools import setup,Extension
from Cython.Build import cythonize 


directives={'linetrace':False, 'language_level':3}

setup(name = 'superfastcode', version = '1.0',
 description = 'Python Package with superfastcode C++ extension',
 ext_modules=cythonize([
 Extension(
 'demo',["rect.pyx"],
 include_dirs=['ffmpeg\\include'],)
 library_dirs=["ffmpeg\\lib"],
 libraries=["avcodec","avformat","avutil","swscale","avdevice","avfilter","postproc","swresample"]),
 
]))



getting below error


PS D:\SiVUE\Backend\Cython\demo> python setup.py build_ext --inplace
Compiling rect.pyx because it depends on .\Rectangle.pxd.
[1/1] Cythonizing rect.pyx
C:\python3.8\lib\site-packages\Cython\Compiler\Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: D:\SiVUE\Backend\Cython\demo\rect.pyx
 tree = Parsing.p_module(s, pxd, full_module_name)
running build_ext
building 'demo' extension
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\HostX86\x86\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -I. -Iffmpeg\include -IC:\python3.8\include -IC:\python3.8\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt" /EHsc /Tprect.cpp /Fobuild\temp.win32-3.8\Release\rect.obj
rect.cpp
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\HostX86\x86\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:ffmpeg\lib /LIBPATH:C:\python3.8\libs /LIBPATH:C:\python3.8\PCbuild\win32 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\lib\x86" "/LIBPATH:C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\lib\um\x86" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\ucrt\x86" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\um\x86" avcodec.lib avformat.lib avutil.lib swscale.lib avdevice.lib avfilter.lib postproc.lib swresample.lib /EXPORT:PyInit_demo build\temp.win32-3.8\Release\rect.obj /OUT:build\lib.win32-3.8\demo.cp38-win32.pyd /IMPLIB:build\temp.win32-3.8\Release\demo.cp38-win32.lib
 Creating library build\temp.win32-3.8\Release\demo.cp38-win32.lib and object build\temp.win32-3.8\Release\demo.cp38-win32.exp
rect.obj : error LNK2001: unresolved external symbol _avformat_open_input
rect.obj : error LNK2001: unresolved external symbol _av_log
rect.obj : error LNK2001: unresolved external symbol _avformat_close_input
rect.obj : error LNK2001: unresolved external symbol _avformat_find_stream_info
rect.obj : error LNK2001: unresolved external symbol _av_dict_get
build\lib.win32-3.8\demo.cp38-win32.pyd : fatal error LNK1120: 5 unresolved externals
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.26.28801\\bin\\HostX86\\x86\\link.exe' failed with exit status 1120



Thank You


-
Senior Software Engineer for Enterprise Analytics Platform
28 janvier 2016, par Matthieu Aubry — JobsWe’re looking for a lead developer to work on Piwik Analytics core platform software. We have some exciting challenges to solve and need you !
You’ll be working with both fellow employees and our open-source community. Piwik PRO staff lives in New Zealand, Europe (Poland, Germany) and in the U.S. We do the vast majority of our collaboration online.
We are a small, flexible team, so when you come aboard, you will play an integral part in engineering. As a leader you’ll help us to prioritise work and grow our community. You’ll help to create a welcoming environment for new contributors and set an example with your development practices and communications skills. You will be working closely with our CTO to build a future for Piwik.
Key Responsibilities
- Strong competency coding in PHP and JavaScript.
- Scaling existing backend system to handle ever increasing amounts of traffic and new product requirements.
- Outstanding communication and collaboration skills.
- Drive development and documentation of internal and external APIs (Piwik is an open platform).
- Help make our development practices better and reduce friction from idea to deployment.
- Mentor junior engineers and set the stage for personal growth.
Minimum qualifications
- 5+ years of experience in product development, security, usable interface design.
- 5+ years experience building successful production software systems.
- Strong competency in PHP5 and JavaScript application development.
- Skill at writing tests and reviewing code.
- Strong analytical skills.
Location
- Remote work position !
- or you can join us in our office based in Wellington, New Zealand or in Wrocław, Poland.
Benefits
- Competitive salary.
- Equity in Piwik PRO.
- Remote work is possible.
- Yearly meetup with the whole team abroad.
- Be part of a successful open source company and community.
- In our Wellington (NZ) and Wroclaw (PL) offices : snacks, coffee, nap room, Table football, Ping pong…
- Regular events.
- Great team of people.
- Exciting projects.
Learn more
Learn more what it’s like to work on Piwik in our blog post
About Piwik
At Piwik and Piwik PRO we develop the leading open source web analytics platform, used by more than one million websites worldwide. Our vision is to help the world liberate their analytics data by building the best open alternative to Google Analytics.
The Piwik platform collects, stores and processes a lot of information : hundreds of millions of data points each month. We create intuitive, simple and beautiful reports that delight our users.
About Piwik PRO company
At Piwik PRO we’re solving hard problems with simple solutions that make our users and customers happy. We practise agile methodology, test driven development and fast release cycles. Our backend is mostly built in modern PHP with a bit of Python. We use MySQL/MariaDB and Redis as data stores. Our frontends is built in JavaScript using AngularJS and jQuery. Our tools include Github, Travis CI, PhpStorm and Slack.
As a Lead Software Developer for Piwik PRO, you will be writing open source code that will run on more than 200,000 servers and be used in 200+ countries and 50 languages !
Apply online
To apply for this position, please Apply online here. We look forward to receiving your applications !
-
youtube_dl, ffmpeg, discord.py is not playing songs even w/o streaming
27 août 2021, par BlueFire02I have tried many times to make a basic queue system, I tested the play command to see if it worked back then and it did, unfortunately during this construction I have been having a lot of problems just playing the song. I did try to implement a queueing system but all that comes out is this specific error :


[tls @ 0x7f8244705240] IO Error: -9806 [https @ 0x7f824480b000] Will reconnect at 835584 in 0 second(s), error=Input/output error.



Additional Info : I also installed ffmpeg onto my mac, I only put the 1 file called ffmpeg in my path if that helps but I am pretty sure it has to do something with youtube_dl.


Code : (Make sure to put your guild_id in the guild_id spot, another thing is when you invite the bot make sure in the 2auth section click 'bot' and 'application.commands')


import discord
from discord.ext import commands
import youtube_dl
from discord_slash import cog_ext, SlashContext
from youtube_search import YoutubeSearch
import asyncio
import os


guild_ids = [GUILD ID GOES HERE]
queue = []
global is_playing
is_playing = False
time_video = 0 

class music(commands.Cog):
 def __init__(self, client):
 self.client = client
 
 @cog_ext.cog_slash(name="ping", guild_ids=guild_ids)
 async def ping(self, ctx):
 await ctx.send(content="Pong!")
 
 @cog_ext.cog_slash(name="join", guild_ids=guild_ids)
 async def join(self, ctx):
 if ctx.author.voice is None:
 return await ctx.send ("You are not in a voice channel!")
 voice_channel = ctx.author.voice.channel
 await voice_channel.connect()
 await ctx.guild.change_voice_state(channel=ctx.author.voice.channel, self_mute=True, self_deaf=True)
 await ctx.send("I joined the party :tada:")
 
 @cog_ext.cog_slash(name="disconnect", guild_ids=guild_ids)
 async def disconnect(self, ctx):
 await ctx.voice_client.disconnect()
 
 @cog_ext.cog_slash(name="play", guild_ids=guild_ids)
 async def play(self, ctx, input):
 if 'https://www.youtube.com/watch?' in input or 'https://youtu.be/' in input:
 YTDL_OPTIONS = {'format':"bestaudio"}
 with youtube_dl.YoutubeDL(YTDL_OPTIONS) as ydl:
 info_dict = ydl.extract_info(input, download=False)
 video_title = info_dict.get('title', None)

 results = YoutubeSearch(video_title, max_results=1).to_json()
 print(results)
 url_suffix_int = results.find('url_suffix') + 14


 results2 = "".join(['https://www.youtube.com', str(results[url_suffix_int:-3])])

 title_int = results.find('title') + 9
 title_int2 = results.find('long_desc') - 4
 title_string = str(results[title_int:title_int2])

 thumbnail_int = results.find('thumbnail') + 15
 title_split = results.find('title') - 5
 splitboth = str(results[thumbnail_int:title_split])
 final_result = splitboth.split('", "', 1)[0]

 channel_int = results.find('channel') + 11
 channel_int2 = results.find('duration') - 4
 channel_string = str(results[channel_int:channel_int2])

 duration_int = results.find('duration') + 12
 duration_int2 = results.find('views') - 4
 duration_string = str(results[duration_int:duration_int2])

 views_int = results.find('views') + 9
 views_int2 = results.find('publish_time') - 4
 views_string = str(results[views_int:views_int2])

 embed = discord.Embed(title=title_string, colour=discord.Colour(0x1), url=results2)

 embed.set_thumbnail(url=final_result)
 embed.set_author(name="Added to queue", icon_url=self.client.user.avatar_url)

 embed.add_field(name="Channel", value=channel_string, inline=True)
 embed.add_field(name="Song Duration", value=duration_string, inline=True)
 embed.add_field(name="Views", value=views_string, inline=True)

 await ctx.send(embed=embed)

 queue.append(input)
 await start_queue(self, ctx)

 else:
 results = YoutubeSearch(input, max_results=1).to_json()
 print(results)
 url_suffix_int = results.find('url_suffix') + 14


 results2 = "".join(['https://www.youtube.com', str(results[url_suffix_int:-3])])

 title_int = results.find('title') + 9
 title_int2 = results.find('long_desc') - 4
 title_string = str(results[title_int:title_int2])

 thumbnail_int = results.find('thumbnail') + 15
 title_split = results.find('title') - 5
 splitboth = str(results[thumbnail_int:title_split])
 final_result = splitboth.split('", "', 1)[0]

 channel_int = results.find('channel') + 11
 channel_int2 = results.find('duration') - 4
 channel_string = str(results[channel_int:channel_int2])

 duration_int = results.find('duration') + 12
 duration_int2 = results.find('views') - 4
 duration_string = str(results[duration_int:duration_int2])

 views_int = results.find('views') + 9
 views_int2 = results.find('publish_time') - 4
 views_string = str(results[views_int:views_int2])

 embed = discord.Embed(title=title_string, colour=discord.Colour(0x1), url=results2)

 embed.set_thumbnail(url=final_result)
 embed.set_author(name="Added to queue", icon_url=self.client.user.avatar_url)

 embed.add_field(name="Channel", value=channel_string, inline=True)
 embed.add_field(name="Song Duration", value=duration_string, inline=True)
 embed.add_field(name="Views", value=views_string, inline=True)

 await ctx.send(embed=embed)

 queue.append(results2)
 await start_queue(self, ctx)
 

 @cog_ext.cog_slash(name="pause", guild_ids=guild_ids)
 async def pause(self, ctx):
 ctx.voice_client.pause()
 
 
 @cog_ext.cog_slash(name="resume", guild_ids=guild_ids)
 async def resume(self, ctx):
 ctx.voice_client.resume()

 
def setup(client):
 client.add_cog(music(client))

async def start_queue(self, ctx):
 print(is_playing)
 if len(queue) <= 0:
 await ctx.voice_client.disconnect()
 while(len(queue) > 0):
 if(is_playing == False):
 await start(self, ctx, queue[0])

 

async def start(self, ctx, link_yt):
 global is_playing
 is_playing = True
 FFMPEG_OPTIONS = {'before_options': '-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5', 'options': '-vn'}
 YTDL_OPTIONS = {'format':"bestaudio"}
 vc = ctx.voice_client
 with youtube_dl.YoutubeDL(YTDL_OPTIONS) as ydl:
 info = ydl.extract_info(link_yt, download=False)
 url2 = info['formats'][0]['url']
 source = await discord.FFmpegOpusAudio.from_probe(url2, **FFMPEG_OPTIONS)
 vc.play(source)
 await asyncio.sleep(info['duration'] + 1)
 print("Done")
 del queue[0]
 is_playing = False



Final Note : I did try to download and play the song but in the end it gave me the following error :


Options reconnect not found.