Recherche avancée

Médias (1)

Mot : - Tags -/Christian Nold

Autres articles (4)

  • ANNEXE : Les extensions, plugins SPIP des canaux

    11 février 2010, par

    Un 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, par

    Le 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, par

    L’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 Donadkar

    I 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&#xA;#ifndef RECTANGLE_H&#xA;#define RECTANGLE_H&#xA;#include <iostream>&#xA;&#xA;extern "C"&#xA;{&#xA;    #include "libavformat/avformat.h"&#xA;    #include "libavutil/dict.h"&#xA;}&#xA;&#xA;using namespace std;&#xA;&#xA;namespace shapes &#xA;{&#xA;    class Rectangle {&#xA;        public:&#xA;            int x0, y0, x1, y1;&#xA;            Rectangle();&#xA;            Rectangle(int x0, int y0, int x1, int y1);&#xA;            ~Rectangle();&#xA;            int getArea();&#xA;            int ffmpegFile();&#xA;            void getSize(int* width, int* height);&#xA;            void move(int dx, int dy);&#xA;    };&#xA;}&#xA;&#xA;#endif&#xA;</iostream>

    &#xA;

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

    &#xA;

    &#xA;#include <iostream>&#xA;#include "Rectangle.hpp"&#xA;&#xA;namespace shapes {&#xA;    &#xA;&#xA;    // Default constructor&#xA;    Rectangle::Rectangle () {}&#xA;&#xA;    // Overloaded constructor&#xA;    Rectangle::Rectangle (int x0, int y0, int x1, int y1) {&#xA;        this->x0 = x0;&#xA;        this->y0 = y0;&#xA;        this->x1 = x1;&#xA;        this->y1 = y1;&#xA;    }&#xA;&#xA;    // Destructor&#xA;    Rectangle::~Rectangle () {}&#xA;&#xA;    // Return the area of the rectangle&#xA;    int Rectangle::getArea () {&#xA;        return 10;&#xA;    }&#xA;&#xA;    // Get the size of the rectangle.&#xA;    // Put the size in the pointer args&#xA;    void Rectangle::getSize (int *width, int *height) {&#xA;        (*width) = x1 - x0;&#xA;        (*height) = y1 - y0;&#xA;    }&#xA;&#xA;    // Move the rectangle by dx dy&#xA;    void Rectangle::move (int dx, int dy) {&#xA;        this->x0 &#x2B;= dx;&#xA;        this->y0 &#x2B;= dy;&#xA;        this->x1 &#x2B;= dx;&#xA;        this->y1 &#x2B;= dy;&#xA;    }&#xA;    int Rectangle::ffmpegFile()&#xA;    {&#xA;        AVFormatContext *fmt_ctx = NULL;&#xA;        AVDictionaryEntry *tag = NULL;&#xA;        int ret = 0;&#xA;        char* filename = "D:\\Discovery.mp4";&#xA;&#xA;        if ((ret = avformat_open_input(&amp;fmt_ctx, filename, NULL, NULL)))&#xA;            return ret;&#xA;&#xA;        if ((ret = avformat_find_stream_info(fmt_ctx, NULL)) &lt; 0) {&#xA;            av_log(NULL, AV_LOG_ERROR, "Cannot find stream information\n");&#xA;            return ret;&#xA;        }&#xA;&#xA;        while ((tag = av_dict_get(fmt_ctx->metadata, "", tag, AV_DICT_IGNORE_SUFFIX)))&#xA;            printf("%s=%s\n", tag->key, tag->value);&#xA;&#xA;        avformat_close_input(&amp;fmt_ctx);&#xA;        return ret;&#xA;    }&#xA;}&#xA;</iostream>

    &#xA;

    Rectangle.pxd file declaration for cpp file function and variable

    &#xA;

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

    &#xA;

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

    &#xA;

    # distutils: language = c&#x2B;&#x2B;&#xA;&#xA;from Rectangle cimport Rectangle&#xA;&#xA;cdef class PyRectangle:&#xA;    cdef Rectangle c_rect  # Hold a C&#x2B;&#x2B; instance which we&#x27;re wrapping&#xA;&#xA;    def __cinit__(self, int x0, int y0, int x1, int y1):&#xA;        self.c_rect = Rectangle(x0, y0, x1, y1)&#xA;&#xA;    def get_area(self):&#xA;        return self.c_rect.getArea()&#xA;&#xA;    def get_size(self):&#xA;        cdef int width, height&#xA;        self.c_rect.getSize(&amp;width, &amp;height)&#xA;        return width, height&#xA;&#xA;    def move(self):&#xA;        print(self.c_rect.ffmpegFile())&#xA;

    &#xA;

    setup.py&#xA;I provided pyx file and ffmpeg library path as well as include path

    &#xA;

    from setuptools import setup,Extension&#xA;from Cython.Build import cythonize &#xA;&#xA;&#xA;directives={&#x27;linetrace&#x27;:False, &#x27;language_level&#x27;:3}&#xA;&#xA;setup(name = &#x27;superfastcode&#x27;, version = &#x27;1.0&#x27;,&#xA;    description = &#x27;Python Package with superfastcode C&#x2B;&#x2B; extension&#x27;,&#xA;    ext_modules=cythonize([&#xA;    Extension(&#xA;        &#x27;demo&#x27;,["rect.pyx"],&#xA;        include_dirs=[&#x27;ffmpeg\\include&#x27;],)&#xA;        library_dirs=["ffmpeg\\lib"],&#xA;        libraries=["avcodec","avformat","avutil","swscale","avdevice","avfilter","postproc","swresample"]),&#xA;        &#xA;]))&#xA;

    &#xA;

    getting below error

    &#xA;

    PS D:\SiVUE\Backend\Cython\demo> python setup.py build_ext --inplace&#xA;Compiling rect.pyx because it depends on .\Rectangle.pxd.&#xA;[1/1] Cythonizing rect.pyx&#xA;C:\python3.8\lib\site-packages\Cython\Compiler\Main.py:369: FutureWarning: Cython directive &#x27;language_level&#x27; not set, using 2 for now (Py2). This will change in a later release! File: D:\SiVUE\Backend\Cython\demo\rect.pyx&#xA;  tree = Parsing.p_module(s, pxd, full_module_name)&#xA;running build_ext&#xA;building &#x27;demo&#x27; extension&#xA;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&#xA;rect.cpp&#xA;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&#xA;   Creating library build\temp.win32-3.8\Release\demo.cp38-win32.lib and object build\temp.win32-3.8\Release\demo.cp38-win32.exp&#xA;rect.obj : error LNK2001: unresolved external symbol _avformat_open_input&#xA;rect.obj : error LNK2001: unresolved external symbol _av_log&#xA;rect.obj : error LNK2001: unresolved external symbol _avformat_close_input&#xA;rect.obj : error LNK2001: unresolved external symbol _avformat_find_stream_info&#xA;rect.obj : error LNK2001: unresolved external symbol _av_dict_get&#xA;build\lib.win32-3.8\demo.cp38-win32.pyd : fatal error LNK1120: 5 unresolved externals&#xA;error: command &#x27;C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.26.28801\\bin\\HostX86\\x86\\link.exe&#x27; failed with exit status 1120&#xA;

    &#xA;

    Thank You

    &#xA;

  • Senior Software Engineer for Enterprise Analytics Platform

    28 janvier 2016, par Matthieu Aubry — Jobs

    We’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 BlueFire02

    I 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 :

    &#xA;

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

    &#xA;

    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.

    &#xA;

    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')

    &#xA;

    import discord&#xA;from discord.ext import commands&#xA;import youtube_dl&#xA;from discord_slash import cog_ext, SlashContext&#xA;from youtube_search import YoutubeSearch&#xA;import asyncio&#xA;import os&#xA;&#xA;&#xA;guild_ids = [GUILD ID GOES HERE]&#xA;queue = []&#xA;global is_playing&#xA;is_playing = False&#xA;time_video = 0 &#xA;&#xA;class music(commands.Cog):&#xA;  def __init__(self, client):&#xA;    self.client = client&#xA;  &#xA;  @cog_ext.cog_slash(name="ping", guild_ids=guild_ids)&#xA;  async def ping(self, ctx):&#xA;    await ctx.send(content="Pong!")&#xA;  &#xA;  @cog_ext.cog_slash(name="join", guild_ids=guild_ids)&#xA;  async def join(self, ctx):&#xA;    if ctx.author.voice is None:&#xA;      return await ctx.send ("You are not in a voice channel!")&#xA;    voice_channel = ctx.author.voice.channel&#xA;    await voice_channel.connect()&#xA;    await ctx.guild.change_voice_state(channel=ctx.author.voice.channel, self_mute=True, self_deaf=True)&#xA;    await ctx.send("I joined the party :tada:")&#xA;  &#xA;  @cog_ext.cog_slash(name="disconnect", guild_ids=guild_ids)&#xA;  async def disconnect(self, ctx):&#xA;    await ctx.voice_client.disconnect()&#xA;  &#xA;  @cog_ext.cog_slash(name="play", guild_ids=guild_ids)&#xA;  async def play(self, ctx, input):&#xA;    if &#x27;https://www.youtube.com/watch?&#x27; in input or &#x27;https://youtu.be/&#x27; in input:&#xA;      YTDL_OPTIONS = {&#x27;format&#x27;:"bestaudio"}&#xA;      with youtube_dl.YoutubeDL(YTDL_OPTIONS) as ydl:&#xA;        info_dict = ydl.extract_info(input, download=False)&#xA;        video_title = info_dict.get(&#x27;title&#x27;, None)&#xA;&#xA;        results = YoutubeSearch(video_title, max_results=1).to_json()&#xA;        print(results)&#xA;        url_suffix_int = results.find(&#x27;url_suffix&#x27;) &#x2B; 14&#xA;&#xA;&#xA;        results2 = "".join([&#x27;https://www.youtube.com&#x27;, str(results[url_suffix_int:-3])])&#xA;&#xA;        title_int = results.find(&#x27;title&#x27;) &#x2B; 9&#xA;        title_int2 = results.find(&#x27;long_desc&#x27;) - 4&#xA;        title_string = str(results[title_int:title_int2])&#xA;&#xA;        thumbnail_int = results.find(&#x27;thumbnail&#x27;) &#x2B; 15&#xA;        title_split = results.find(&#x27;title&#x27;) - 5&#xA;        splitboth = str(results[thumbnail_int:title_split])&#xA;        final_result = splitboth.split(&#x27;", "&#x27;, 1)[0]&#xA;&#xA;        channel_int = results.find(&#x27;channel&#x27;) &#x2B; 11&#xA;        channel_int2 = results.find(&#x27;duration&#x27;) - 4&#xA;        channel_string = str(results[channel_int:channel_int2])&#xA;&#xA;        duration_int = results.find(&#x27;duration&#x27;) &#x2B; 12&#xA;        duration_int2 = results.find(&#x27;views&#x27;) - 4&#xA;        duration_string = str(results[duration_int:duration_int2])&#xA;&#xA;        views_int = results.find(&#x27;views&#x27;) &#x2B; 9&#xA;        views_int2 = results.find(&#x27;publish_time&#x27;) - 4&#xA;        views_string = str(results[views_int:views_int2])&#xA;&#xA;        embed = discord.Embed(title=title_string, colour=discord.Colour(0x1), url=results2)&#xA;&#xA;        embed.set_thumbnail(url=final_result)&#xA;        embed.set_author(name="Added to queue", icon_url=self.client.user.avatar_url)&#xA;&#xA;        embed.add_field(name="Channel", value=channel_string, inline=True)&#xA;        embed.add_field(name="Song Duration", value=duration_string, inline=True)&#xA;        embed.add_field(name="Views", value=views_string, inline=True)&#xA;&#xA;        await ctx.send(embed=embed)&#xA;&#xA;        queue.append(input)&#xA;        await start_queue(self, ctx)&#xA;&#xA;    else:&#xA;      results = YoutubeSearch(input, max_results=1).to_json()&#xA;      print(results)&#xA;      url_suffix_int = results.find(&#x27;url_suffix&#x27;) &#x2B; 14&#xA;&#xA;&#xA;      results2 = "".join([&#x27;https://www.youtube.com&#x27;, str(results[url_suffix_int:-3])])&#xA;&#xA;      title_int = results.find(&#x27;title&#x27;) &#x2B; 9&#xA;      title_int2 = results.find(&#x27;long_desc&#x27;) - 4&#xA;      title_string = str(results[title_int:title_int2])&#xA;&#xA;      thumbnail_int = results.find(&#x27;thumbnail&#x27;) &#x2B; 15&#xA;      title_split = results.find(&#x27;title&#x27;) - 5&#xA;      splitboth = str(results[thumbnail_int:title_split])&#xA;      final_result = splitboth.split(&#x27;", "&#x27;, 1)[0]&#xA;&#xA;      channel_int = results.find(&#x27;channel&#x27;) &#x2B; 11&#xA;      channel_int2 = results.find(&#x27;duration&#x27;) - 4&#xA;      channel_string = str(results[channel_int:channel_int2])&#xA;&#xA;      duration_int = results.find(&#x27;duration&#x27;) &#x2B; 12&#xA;      duration_int2 = results.find(&#x27;views&#x27;) - 4&#xA;      duration_string = str(results[duration_int:duration_int2])&#xA;&#xA;      views_int = results.find(&#x27;views&#x27;) &#x2B; 9&#xA;      views_int2 = results.find(&#x27;publish_time&#x27;) - 4&#xA;      views_string = str(results[views_int:views_int2])&#xA;&#xA;      embed = discord.Embed(title=title_string, colour=discord.Colour(0x1), url=results2)&#xA;&#xA;      embed.set_thumbnail(url=final_result)&#xA;      embed.set_author(name="Added to queue", icon_url=self.client.user.avatar_url)&#xA;&#xA;      embed.add_field(name="Channel", value=channel_string, inline=True)&#xA;      embed.add_field(name="Song Duration", value=duration_string, inline=True)&#xA;      embed.add_field(name="Views", value=views_string, inline=True)&#xA;&#xA;      await ctx.send(embed=embed)&#xA;&#xA;      queue.append(results2)&#xA;      await start_queue(self, ctx)&#xA;    &#xA;&#xA;  @cog_ext.cog_slash(name="pause", guild_ids=guild_ids)&#xA;  async def pause(self, ctx):&#xA;    ctx.voice_client.pause()&#xA;  &#xA;  &#xA;  @cog_ext.cog_slash(name="resume", guild_ids=guild_ids)&#xA;  async def resume(self, ctx):&#xA;    ctx.voice_client.resume()&#xA;&#xA;  &#xA;def setup(client):&#xA;  client.add_cog(music(client))&#xA;&#xA;async def start_queue(self, ctx):&#xA;    print(is_playing)&#xA;    if len(queue) &lt;= 0:&#xA;      await ctx.voice_client.disconnect()&#xA;    while(len(queue) > 0):&#xA;      if(is_playing == False):&#xA;        await start(self, ctx, queue[0])&#xA;&#xA;    &#xA;&#xA;async def start(self, ctx, link_yt):&#xA;      global is_playing&#xA;      is_playing = True&#xA;      FFMPEG_OPTIONS = {&#x27;before_options&#x27;: &#x27;-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5&#x27;, &#x27;options&#x27;: &#x27;-vn&#x27;}&#xA;      YTDL_OPTIONS = {&#x27;format&#x27;:"bestaudio"}&#xA;      vc = ctx.voice_client&#xA;      with youtube_dl.YoutubeDL(YTDL_OPTIONS) as ydl:&#xA;        info = ydl.extract_info(link_yt, download=False)&#xA;        url2 = info[&#x27;formats&#x27;][0][&#x27;url&#x27;]&#xA;        source = await discord.FFmpegOpusAudio.from_probe(url2, **FFMPEG_OPTIONS)&#xA;        vc.play(source)&#xA;        await asyncio.sleep(info[&#x27;duration&#x27;] &#x2B; 1)&#xA;        print("Done")&#xA;        del queue[0]&#xA;        is_playing = False&#xA;

    &#xA;

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

    &#xA;

    Options reconnect not found.&#xA;

    &#xA;