Recherche avancée

Médias (0)

Mot : - Tags -/médias

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (30)

  • Librairies et logiciels spécifiques aux médias

    10 décembre 2010, par

    Pour un fonctionnement correct et optimal, plusieurs choses sont à prendre en considération.
    Il est important, après avoir installé apache2, mysql et php5, d’installer d’autres logiciels nécessaires dont les installations sont décrites dans les liens afférants. Un ensemble de librairies multimedias (x264, libtheora, libvpx) utilisées pour l’encodage et le décodage des vidéos et sons afin de supporter le plus grand nombre de fichiers possibles. Cf. : ce tutoriel ; FFMpeg avec le maximum de décodeurs et (...)

  • Contribute to translation

    13 avril 2011

    You can help us to improve the language used in the software interface to make MediaSPIP more accessible and user-friendly. You can also translate the interface into any language that allows it to spread to new linguistic communities.
    To do this, we use the translation interface of SPIP where the all the language modules of MediaSPIP are available. Just subscribe to the mailing list and request further informantion on translation.
    MediaSPIP is currently available in French and English (...)

  • Demande de création d’un canal

    12 mars 2010, par

    En fonction de la configuration de la plateforme, l’utilisateur peu avoir à sa disposition deux méthodes différentes de demande de création de canal. La première est au moment de son inscription, la seconde, après son inscription en remplissant un formulaire de demande.
    Les deux manières demandent les mêmes choses fonctionnent à peu près de la même manière, le futur utilisateur doit remplir une série de champ de formulaire permettant tout d’abord aux administrateurs d’avoir des informations quant à (...)

Sur d’autres sites (7016)

  • OpenCV-C++ VideoCapture fails to open video files

    9 août 2017, par Akihiko

    Recently I upgraded my OS from Ubuntu Precise Saucy (13.10) to Trusty (14.04). After this upgrade, cv::VideoCapture became not working properly. The program aborts when reading a video file. For example,

    int main(int argc, char**argv)
    {
     cv::VideoCapture vin("sample/vout2l.avi");
    ...

    Executing this program, it aborts with a message :

    *** Error in `./cv2-videoread.out': malloc(): memory corruption: 0x0000000000e3eff0 ***
    Abort (core dumped)

    The backtrace looks like :

    [New LWP 15586]
    [New LWP 15587]
    [Thread debugging using libthread_db enabled]
    Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
    Core was generated by `./cv2-videoread.out'.
    Program terminated with signal SIGABRT, Aborted.
    #0  0x00007ff953e61c37 in raise () from /lib/x86_64-linux-gnu/libc.so.6
    (gdb) bt
    #0  0x00007ff953e61c37 in raise () from /lib/x86_64-linux-gnu/libc.so.6
    #1  0x00007ff953e65028 in abort () from /lib/x86_64-linux-gnu/libc.so.6
    #2  0x00007ff953e9e2a4 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
    #3  0x00007ff953eabe26 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
    #4  0x00007ff953eac1ab in ?? () from /lib/x86_64-linux-gnu/libc.so.6
    #5  0x00007ff953eadba4 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
    #6  0x00007ff953eaf7d2 in posix_memalign () from /lib/x86_64-linux-gnu/libc.so.6
    #7  0x00007ff94fa640fe in av_malloc () from /usr/lib/x86_64-linux-gnu/libavutil.so.52
    #8  0x00007ff94fa641b1 in av_strdup () from /usr/lib/x86_64-linux-gnu/libavutil.so.52
    #9  0x00007ff94fa5e5db in av_dict_set ()
     from /usr/lib/x86_64-linux-gnu/libavutil.so.52
    #10 0x00007ff954738574 in CvCapture_FFMPEG::open(char const*) ()
     from /usr/lib/libopencv_highgui.so.2.4
    #11 0x00007ff954738719 in cvCreateFileCapture_FFMPEG ()
     from /usr/lib/libopencv_highgui.so.2.4
    #12 0x00007ff95473aac9 in cvCreateFileCapture_FFMPEG_proxy(char const*) ()
     from /usr/lib/libopencv_highgui.so.2.4
    ---Type <return> to continue, or q <return> to quit---
    #13 0x00007ff954722d89 in cvCreateFileCapture ()
     from /usr/lib/libopencv_highgui.so.2.4
    #14 0x00007ff954723045 in cv::VideoCapture::open(std::string const&amp;) ()
     from /usr/lib/libopencv_highgui.so.2.4
    #15 0x00007ff95472315c in cv::VideoCapture::VideoCapture(std::string const&amp;) ()
     from /usr/lib/libopencv_highgui.so.2.4
    #16 0x0000000000401281 in main (argc=1, argv=0x7fff1f938388) at cv2-videoread.cpp:30
    (gdb)
    </return></return>

    NOTE : cv::VideoCapture vin(... is 30th line.

    Before upgrading the OS, this code was working with the same input file.

    From the backtrace, it seems that the trouble happens at CvCapture_FFMPEG and libavutil. I upgraded the packages ffmpeg libavutil-dev libavutil51 libavutil52 but they were already up-to-date.
    Also, OpenCV packages are up-to-date (I checked libopencv-core-dev libopencv-core2.4 libopencv-dev libopencv-highgui-dev libopencv-highgui2.4).

    I also tested OpenCV built from source, but got the same results.

    Do you have ideas to figure this out ?

  • Evolution #4102 : Ordre des inclures dans cache/charger_plugins_options.php

    8 juillet 2019, par cam.lafit -

    On pourrait avoir ce patch, au lieu d’écrire ligne à ligne on passe par un tableau. Ce qui permet de gérer l’ordre des lignes.

    1. <span class="CodeRay"><span class="line head"><span class="head">--- </span><span class="filename">/ecrire/inc/plugin.php</span></span>
    2. <span class="line head"><span class="head">+++ </span><span class="filename">/ecrire/inc/plugin.php</span></span>
    3. <span class="line change"><span class="change">@@</span> -817,7 +817,7 <span class="change">@@</span></span>
    4.  }
    5.  
    6.  <span class="keyword">function</span> <span class="function">plugins_precompile_xxxtions</span>(<span class="local-variable">$plugin_valides</span>, <span class="local-variable">$ordre</span>) {
    7. <span class="line delete"><span class="delete">-</span>    <span class="local-variable">$contenu</span> = <span class="predefined">array</span>(<span class="string"><span class="delimiter">'</span><span class="content">options</span><span class="delimiter">'</span></span> => <span class="string"></span><span class="eyecatcher"><span class="string"><span class="delimiter">'</span><span class="delimiter">'</span></span>, <span class="string"><span class="delimiter">'</span><span class="content">fonctions</span><span class="delimiter">'</span></span> => <span class="string"><span class="delimiter">'</span><span class="delimiter">'</span></span></span>);</span>
    8. <span class="line insert"><span class="insert">+</span>    <span class="local-variable">$contenu</span> = <span class="predefined">array</span>(<span class="string"><span class="delimiter">'</span><span class="content">options</span><span class="delimiter">'</span></span> => <span class="eyecatcher"><span class="predefined">array</span>(), <span class="string"><span class="delimiter">'</span><span class="content">fonctions</span><span class="delimiter">'</span></span> => <span class="predefined">array</span>()</span>);</span>
    9.      <span class="local-variable">$boutons</span> = <span class="predefined">array</span>();
    10.      <span class="local-variable">$onglets</span> = <span class="predefined">array</span>();
    11.      <span class="local-variable">$sign</span> = <span class="string"><span class="delimiter">"</span><span class="delimiter">"</span></span>;
    12. <span class="line change"><span class="change">@@</span> -861,7 +861,7 <span class="change">@@</span></span>
    13.                              <span class="predefined">unset</span>(<span class="local-variable">$info</span>[<span class="local-variable">$charge</span>][<span class="local-variable">$k</span>]);
    14.                          }
    15.                              <span class="local-variable">$_file</span> = <span class="local-variable">$root_dir_type</span> . <span class="string"><span class="delimiter">"</span><span class="content">.'</span><span class="local-variable">$plug</span><span class="content">/</span><span class="local-variable">$file</span><span class="content">'</span><span class="delimiter">"</span></span>;
    16. <span class="line delete"><span class="delete">-</span>                            <span class="local-variable">$contenu</span>[<span class="local-variable">$charge</span>]<span class="eyecatcher"> .= <span class="string"><span class="delimiter">"</span><span class="content">include_once_check(</span><span class="local-variable">$_file</span><span class="content">);</span><span class="char">\n</span></span></span><span class="string"><span class="delimiter">"</span></span>;</span>
    17. <span class="line insert"><span class="insert">+</span>                            <span class="local-variable">$contenu</span>[<span class="local-variable">$charge</span>]<span class="eyecatcher">[] = <span class="string"><span class="delimiter">"</span><span class="content">include_once_check(</span><span class="local-variable">$_file</span><span class="content">);</span></span></span><span class="string"><span class="delimiter">"</span></span>;</span>
    18.                          }
    19.                      }
    20.                  }
    21. <span class="line change"><span class="change">@@</span> -870,12 +870,12 <span class="change">@@</span></span>
    22.          }
    23.      }
    24.  
    25. <span class="line delete"><span class="delete">-</span>    <span class="local-variable">$</span><span class="eyecatcher"><span class="local-variable">contenu</span>[<span class="string"><span class="delimiter">'</span><span class="content">options</span><span class="delimiter">'</span></span>] = <span class="string"><span class="delimiter">"</span><span class="content">define('_PLUGINS_HASH','</span><span class="delimiter">"</span></span> . <span class="predefined">md5</span>(<span class="local-variable">$sign</span>) . <span class="string"><span class="delimiter">"</span><span class="content">');</span><span class="char">\n</span><span class="delimiter">"</span></span> . <span class="local-variable">$contenu</span>[<span class="string"><span class="delimiter">'</span><span class="content">options</span><span class="delimiter">'</span></span>]</span>;</span>
    26. <span class="line delete"><span class="delete">-</span>    <span class="local-variable">$contenu</span>[<span class="string"><span class="delimiter">'</span><span class="content">fonctions</span><span class="delimiter">'</span></span>]<span class="eyecatcher"> .= plugin_ongletbouton(<span class="string"><span class="delimiter">"</span><span class="content">boutons_plugins</span><span class="delimiter">"</span></span>, <span class="local-variable">$boutons</span>)</span></span>
    27. <span class="line delete"><span class="delete">-</span>    <span class="eyecatcher">    .</span> plugin_ongletbouton(<span class="string"><span class="delimiter">"</span><span class="content">onglets_plugins</span><span class="delimiter">"</span></span>, <span class="local-variable">$onglets</span>);</span>
    28. <span class="line delete"><span class="delete">-</span></span>
    29. <span class="line delete"><span class="delete">-</span>    ecrire_fichier_php(_CACHE_PLUGINS_OPT, <span class="local-variable">$</span><span class="eyecatcher"><span class="local-variable">contenu</span>[<span class="string"><span class="delimiter">'</span><span class="content">options</span><span class="delimiter">'</span></span>]</span>);</span>
    30. <span class="line delete"><span class="delete">-</span>    ecrire_fichier_php(_CACHE_PLUGINS_FCT, <span class="eyecatcher"><span class="local-variable">$contenu</span>[<span class="string"><span class="delimiter">'</span><span class="content">fonctions</span><span class="delimiter">'</span></span>]</span>);</span>
    31. <span class="line insert"><span class="insert">+</span>    <span class="local-variable">$</span><span class="eyecatcher"><span class="local-variable">hash_opt</span> = <span class="string"><span class="delimiter">"</span><span class="content">define('_PLUGINS_HASH','</span><span class="delimiter">"</span></span> . <span class="predefined">md5</span>(<span class="local-variable">$sign</span>) . <span class="string"><span class="delimiter">"</span><span class="content">');</span><span class="char">\n</span><span class="delimiter">"</span></span></span>;</span>
    32. <span class="line insert"><span class="insert">+</span>    <span class="local-variable">$contenu</span>[<span class="string"><span class="delimiter">'</span><span class="content">fonctions</span><span class="delimiter">'</span></span>]<span class="eyecatcher">[] = plugin_ongletbouton(<span class="string"><span class="delimiter">"</span><span class="content">boutons_plugins</span><span class="delimiter">"</span></span>, <span class="local-variable">$boutons</span>);</span></span>
    33. <span class="line insert"><span class="insert">+</span>    <span class="eyecatcher"><span class="local-variable">$contenu</span>[<span class="string"><span class="delimiter">'</span><span class="content">fonctions</span><span class="delimiter">'</span></span>][] =</span> plugin_ongletbouton(<span class="string"><span class="delimiter">"</span><span class="content">onglets_plugins</span><span class="delimiter">"</span></span>, <span class="local-variable">$onglets</span>);</span>
    34. <span class="line insert"><span class="insert">+</span></span>
    35. <span class="line insert"><span class="insert">+</span>    ecrire_fichier_php(_CACHE_PLUGINS_OPT, <span class="local-variable">$</span><span class="eyecatcher"><span class="local-variable">hash_opt</span>.<span class="predefined">implode</span>(<span class="string"><span class="delimiter">"</span><span class="char">\n</span><span class="delimiter">"</span></span>,<span class="predefined">array_reverse</span>(<span class="local-variable">$contenu</span>[<span class="string"><span class="delimiter">'</span><span class="content">options</span><span class="delimiter">'</span></span>]))</span>);</span>
    36. <span class="line insert"><span class="insert">+</span>    ecrire_fichier_php(_CACHE_PLUGINS_FCT, <span class="eyecatcher"><span class="predefined">implode</span>(<span class="string"><span class="delimiter">"</span><span class="char">\n</span><span class="delimiter">"</span></span>,<span class="local-variable">$contenu</span>[<span class="string"><span class="delimiter">'</span><span class="content">fonctions</span><span class="delimiter">'</span></span>])</span>);</span>
    37.  }
    38.  
    39.  <span class="comment">/**</span>
    40.  
    41. </span>

    Télécharger

  • gcc missing ffmpeg static library in archlinux [duplicate]

    19 juillet 2023, par mopuless B

    I'am trying running this code in my archlinux computer :(maybe this code has something wrong) :

    &#xA;

    #include <iostream>&#xA;#include <string>&#xA;#include <cstdlib>&#xA;#include <cstdio>&#xA;#include <cstring>&#xA;#include &#xA;#include <libavformat></libavformat>avformat.h>&#xA;&#xA;int main(int argc, char* argv[]) {&#xA;    if (argc &lt; 3) {&#xA;        std::cout &lt;&lt; "Usage: " &lt;&lt; argv[0] &lt;&lt; "  " &lt;&lt; std::endl;&#xA;        return 0;&#xA;    }&#xA;    &#xA;    const char* input_file = argv[1];&#xA;    const char* rtsp_url = argv[2];&#xA;    &#xA;    //av_register_all();&#xA;    &#xA;    AVFormatContext* input_ctx = nullptr;&#xA;    AVFormatContext* output_ctx = nullptr;&#xA;    AVPacket packet;&#xA;    &#xA;    // Open input file&#xA;    if (avformat_open_input(&amp;input_ctx, input_file, nullptr, nullptr) &lt; 0) {&#xA;        std::cerr &lt;&lt; "Failed to open input file" &lt;&lt; std::endl;&#xA;        return -1;&#xA;    }&#xA;    &#xA;    // Find input stream information&#xA;    if (avformat_find_stream_info(input_ctx, nullptr) &lt; 0) {&#xA;        std::cerr &lt;&lt; "Failed to find input stream information" &lt;&lt; std::endl;&#xA;        avformat_close_input(&amp;input_ctx);&#xA;        return -1;&#xA;    }&#xA;    &#xA;    // Create output context&#xA;    if (avformat_alloc_output_context2(&amp;output_ctx, nullptr, "rtsp", rtsp_url) &lt; 0) {&#xA;        std::cerr &lt;&lt; "Failed to create output context" &lt;&lt; std::endl;&#xA;        avformat_close_input(&amp;input_ctx);&#xA;        return -1;&#xA;    }&#xA;    &#xA;    // Open output URL&#xA;    if (avio_open(&amp;output_ctx->pb, rtsp_url, AVIO_FLAG_WRITE) &lt; 0) {&#xA;        std::cerr &lt;&lt; "Failed to open output URL" &lt;&lt; std::endl;&#xA;        avformat_close_input(&amp;input_ctx);&#xA;        avformat_free_context(output_ctx);&#xA;        return -1;&#xA;    }&#xA;    &#xA;    // Copy stream information&#xA;    for (unsigned int i = 0; i &lt; input_ctx->nb_streams; i&#x2B;&#x2B;) {&#xA;        AVStream* in_stream = input_ctx->streams[i];&#xA;        AVStream* out_stream = avformat_new_stream(output_ctx, nullptr);&#xA;        if (!out_stream) {&#xA;            std::cerr &lt;&lt; "Failed to allocate output stream" &lt;&lt; std::endl;&#xA;            avformat_close_input(&amp;input_ctx);&#xA;            avformat_free_context(output_ctx);&#xA;            return -1;&#xA;        }&#xA;        &#xA;        avcodec_parameters_copy(out_stream->codecpar, in_stream->codecpar);&#xA;    }&#xA;    &#xA;    // Write header&#xA;    if (avformat_write_header(output_ctx, nullptr) &lt; 0) {&#xA;        std::cerr &lt;&lt; "Failed to write header" &lt;&lt; std::endl;&#xA;        avformat_close_input(&amp;input_ctx);&#xA;        avformat_free_context(output_ctx);&#xA;        return -1;&#xA;    }&#xA;    &#xA;    // Read packets from input and write to output&#xA;    while (true) {&#xA;        if (av_read_frame(input_ctx, &amp;packet) &lt; 0) {&#xA;            break;&#xA;        }&#xA;        &#xA;        AVStream* in_stream = input_ctx->streams[packet.stream_index];&#xA;        AVStream* out_stream = output_ctx->streams[packet.stream_index];&#xA;        &#xA;        // Set correct timestamps&#xA;        packet.pts = av_rescale_q(packet.pts, in_stream->time_base, out_stream->time_base);&#xA;        packet.dts = av_rescale_q(packet.dts, in_stream->time_base, out_stream->time_base);&#xA;        packet.duration = av_rescale_q(packet.duration, in_stream->time_base, out_stream->time_base);&#xA;        packet.pos = -1;&#xA;        &#xA;        // Write packet to output&#xA;        if (av_interleaved_write_frame(output_ctx, &amp;packet) &lt; 0) {&#xA;            std::cerr &lt;&lt; "Failed to write packet" &lt;&lt; std::endl;&#xA;            break;&#xA;        }&#xA;        &#xA;        av_packet_unref(&amp;packet);&#xA;    }&#xA;    &#xA;    // Write trailer&#xA;    av_write_trailer(output_ctx);&#xA;    &#xA;    // Clean up&#xA;    avformat_close_input(&amp;input_ctx);&#xA;    avformat_free_context(output_ctx);&#xA;    &#xA;    return 0;&#xA;}&#xA;</cstring></cstdio></cstdlib></string></iostream>

    &#xA;

    But when I run that command :

    &#xA;

    g&#x2B;&#x2B; rtsp_server.cpp -o rtsp_server -lavformat -lavcodec -lavutil #rtsp_server is its name.&#xA;

    &#xA;

    there comes errors :

    &#xA;

    /usr/bin/ld: /tmp/cc1a6hfM.o: in function `main&#x27;:&#xA;rtsp_server.cpp:(.text&#x2B;0xe8): undefined reference to `avformat_open_input(AVFormatContext**, char const*, AVInputFormat const*, AVDictionary**)&#x27;&#xA;/usr/bin/ld: rtsp_server.cpp:(.text&#x2B;0x138): undefined reference to `avformat_find_stream_info(AVFormatContext*, AVDictionary**)&#x27;&#xA;/usr/bin/ld: rtsp_server.cpp:(.text&#x2B;0x179): undefined reference to `avformat_close_input(AVFormatContext**)&#x27;&#xA;/usr/bin/ld: rtsp_server.cpp:(.text&#x2B;0x1a8): undefined reference to `avformat_alloc_output_context2(AVFormatContext**, AVOutputFormat const*, char const*, char const*)&#x27;&#xA;/usr/bin/ld: rtsp_server.cpp:(.text&#x2B;0x1e9): undefined reference to `avformat_close_input(AVFormatContext**)&#x27;&#xA;/usr/bin/ld: rtsp_server.cpp:(.text&#x2B;0x215): undefined reference to `avio_open(AVIOContext**, char const*, int)&#x27;&#xA;/usr/bin/ld: rtsp_server.cpp:(.text&#x2B;0x256): undefined reference to `avformat_close_input(AVFormatContext**)&#x27;&#xA;#... and many similar lines had been shown.  &#xA;

    &#xA;

    Obviously, the library didn't work.But in my folder /usr/lib, libavformat.so, libavcodec.so and libavutil.so do exists.

    &#xA;

    By the way, I installed ffmpeg by pacman. I use code (It also is called VScode) to write this, using bash to compile.

    &#xA;

    So what should I do to make the ffmpeg library work ?

    &#xA;

    I had tried to modify /etc/profiles and /etc/ld.so.conf, here is what I add :

    &#xA;

    # /etc/ld.so.conf&#xA;include /etc/ld.so.conf.d/*.conf&#xA;/usr/lib&#xA;/usr/local/lib&#xA;

    &#xA;

    # a part of /etc/profile that I add, I think the other part is not related to this question.&#xA;C_INCLUDE_PATH=/usr/include&#xA;export C_INCLUDE_PATH&#xA;&#xA;CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:/usr/include&#xA;export CPLUS_INCLUDE_PATH&#xA;&#xA;LIBRARY_PATH=$LIBRARY_PATH:/usr/lib&#xA;export LIBRARY_PATH&#xA;&#xA;LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib&#xA;export LD_LIBRARY_PATH&#xA;

    &#xA;

    I also tried to modify command :

    &#xA;

    g&#x2B;&#x2B; -o rtsp_server rtsp_server.cpp -L/usr/lib/libavformat.so -L/usr/lib/libavcodec.so -L/usr/lib/libavutil.so&#xA;# maybe it is very stupid.&#xA;

    &#xA;

    But it is in vain.Even the errors didn't change at all.

    &#xA;