Recherche avancée

Médias (1)

Mot : - Tags -/censure

Autres articles (107)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • (Dés)Activation de fonctionnalités (plugins)

    18 février 2011, par

    Pour gérer l’ajout et la suppression de fonctionnalités supplémentaires (ou plugins), MediaSPIP utilise à partir de la version 0.2 SVP.
    SVP permet l’activation facile de plugins depuis l’espace de configuration de MediaSPIP.
    Pour y accéder, il suffit de se rendre dans l’espace de configuration puis de se rendre sur la page "Gestion des plugins".
    MediaSPIP est fourni par défaut avec l’ensemble des plugins dits "compatibles", ils ont été testés et intégrés afin de fonctionner parfaitement avec chaque (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-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

Sur d’autres sites (21364)

  • For custom FFmpeg I/O API : incorrect data about write_packet Callback function of avio_alloc_context()

    13 avril 2021, par oaho

    I would like to ask a question about ffmpeg custom I/O api.

    


    Description of the problem : I used the FFmpeg official example - remuxing.c to test a simple conversion package operation. (test1.ts -> test1.mp4). This operation result is normal.
But when I use Custom I/O

    


    


    avio_alloc_context(buf, 65535, 1, nullptr, nullptr, write_cb, seek) ;

    


    


    function, the custom I/O output is written to the memory, and then the mp4 file is written from this memory. It is found that the output file data is different from Internal file Protocol write. VLC and MediaInfo can't probe it.

    


    I Use Beyond Compare4 to compare file data :

    


    Beyond Compare 4 Picture Comparasion

    


    In this picture, the left is my customized I/O output, and the right is the official example (according to file URLProtocol to Output)

    


    I tested it many times, and each time the data size, data location, and data content are all in the same place. When I change the data of the few bytes with the difference on the left to the data on the right, VLC can play normally.

    


    Is my operation improper, or is it another problem ?

    


    Source Code :

    


    extern "C"{&#xA;#include <libavformat></libavformat>avformat.h>&#xA;#include <libavcodec></libavcodec>avcodec.h>&#xA;}&#xA;#include &#xA;#include <cstdio>&#xA;#include &#xA;void process_error(int ret, const char* info)&#xA;{&#xA;   if( ret &lt; 0)&#xA;   {&#xA;      fprintf(stderr, info);&#xA;      std::exit(-1);&#xA;   }&#xA;}&#xA;int fd;&#xA;int write_packet(void *opaque, uint8_t *buf, int buf_size)&#xA; {&#xA;      int ret;&#xA;      ret = write(fd, buf, buf_size);&#xA;      printf("write bytes %d\n", ret);&#xA;      return (ret == -1) ? AVERROR(errno) : ret;&#xA; }&#xA; int64_t seek(void *opaque, int64_t offset, int whence)&#xA; {&#xA;      return offset;&#xA; }&#xA;&#xA; int main()&#xA; {&#xA;&#xA;     fd = open("/home/oaho/Desktop/22.mp4", O_CREAT | O_WRONLY, 0777);&#xA;     if ( fd &lt; 0)&#xA;     {&#xA;        return -1;&#xA;     }&#xA;&#xA;&#xA;     AVFormatContext *inputContext = nullptr;&#xA;     AVFormatContext *ouputContext = nullptr;&#xA;&#xA;     int ret = avformat_open_input(&amp;inputContext, "/home/oaho/Desktop/test1.ts", nullptr, nullptr);&#xA;     process_error(ret, "could&#x27;not open input\n");&#xA;     ret = avformat_find_stream_info(inputContext, nullptr);&#xA;     process_error(ret, "could&#x27;not find stream information\n");&#xA;&#xA;     avformat_alloc_output_context2(&amp;ouputContext, nullptr, "mp4", nullptr);&#xA;     if( ouputContext == nullptr)&#xA;     process_error(-1, "could&#x27;not alloc outputContext\n");&#xA;&#xA;&#xA;     if( ouputContext->oformat==nullptr)&#xA;     {&#xA;        ouputContext->oformat = av_guess_format("mp4", nullptr, nullptr);&#xA;     }&#xA;&#xA;     uint8_t* buf = nullptr;&#xA;     buf = (uint8_t*)av_malloc(200 * 1024);&#xA;     if( buf == nullptr)&#xA;     {&#xA;        return -1;&#xA;     }&#xA;     ouputContext->pb = nullptr;&#xA;     ouputContext->pb = avio_alloc_context(buf, 200 * 1024, 1, nullptr, nullptr, write_packet, seek);&#xA;     if( ouputContext->pb == nullptr)&#xA;     {&#xA;        return -1;&#xA;     }&#xA;     ouputContext->flags = AVFMT_FLAG_CUSTOM_IO;&#xA;     //pre the stream avalible&#xA;     int *arr = new int[inputContext->nb_streams];&#xA;     if( arr == nullptr )&#xA;       process_error(-1, "can&#x27;t alloc array\n");&#xA;     int stream_index = 0;&#xA;     //get stream : video stream , audio stream , subtitle stream&#xA;     for(int i = 0;i &lt; inputContext->nb_streams;i&#x2B;&#x2B;)&#xA;     {&#xA;        //get the single stream&#xA;        AVStream *stream = inputContext->streams[i];&#xA;        AVStream *outStream = nullptr;&#xA;        AVCodecParameters *codec = stream->codecpar;&#xA;        if(   codec -> codec_type != AVMediaType::AVMEDIA_TYPE_VIDEO&#xA;           &amp;&amp; codec -> codec_type != AVMediaType::AVMEDIA_TYPE_AUDIO&#xA;           &amp;&amp; codec -> codec_type != AVMediaType::AVMEDIA_TYPE_SUBTITLE)&#xA;        {&#xA;            arr[i] = -1;&#xA;            continue;&#xA;        }&#xA;        arr[i] = stream_index&#x2B;&#x2B;;&#xA;        outStream = avformat_new_stream(ouputContext, nullptr);&#xA;        if(outStream == nullptr)&#xA;           goto end;&#xA;        int ret = avcodec_parameters_copy(outStream->codecpar, stream->codecpar);&#xA;        if( ret &lt; 0)&#xA;           goto end;&#xA;         //not include additional information&#xA;        outStream->codecpar->codec_tag = 0;&#xA;      }&#xA;      ret = avformat_write_header(ouputContext, nullptr);&#xA;      process_error(ret, "can&#x27;t write header\n");&#xA;&#xA;      while(1)&#xA;      {&#xA;          AVPacket pkt;&#xA;          av_init_packet(&amp;pkt);&#xA;          AVStream *in_stream, *out_stream;&#xA;          ret = av_read_frame(inputContext, &amp;pkt);&#xA;          if( ret &lt; 0)&#xA;             break;  &#xA;          in_stream  = inputContext->streams[pkt.stream_index];&#xA;          if (arr[pkt.stream_index] &lt; 0) {&#xA;             av_packet_unref(&amp;pkt);&#xA;             continue;&#xA;          }&#xA;          pkt.stream_index = arr[pkt.stream_index];&#xA;          out_stream = ouputContext->streams[pkt.stream_index];&#xA;          /* copy packet */&#xA;          pkt.pts = av_rescale_q(pkt.pts, in_stream->time_base, out_stream->time_base);&#xA;          pkt.dts = av_rescale_q(pkt.dts, in_stream->time_base, out_stream->time_base);&#xA;          pkt.duration = av_rescale_q(pkt.duration, in_stream->time_base, out_stream->time_base);&#xA;          pkt.pos = -1;&#xA;          //log_packet(ofmt_ctx, &amp;pkt, "out");&#xA;          ret = av_interleaved_write_frame(ouputContext, &amp;pkt);&#xA;          if (ret &lt; 0) {&#xA;            fprintf(stderr, "Error muxing packet\n");&#xA;            break;&#xA;          }&#xA;          av_packet_unref(&amp;pkt);&#xA;       }&#xA;       av_write_trailer(ouputContext);&#xA;  end:&#xA;       close(fd);&#xA;       delete [] arr;&#xA;       avformat_free_context(inputContext);&#xA;       avformat_free_context(ouputContext);&#xA;       return 0;&#xA; }&#xA;</cstdio>

    &#xA;

  • riscv : Tweak names of cpu flags, print flags in libavutil/tests/cpu

    14 décembre 2023, par Martin Storsjö
    riscv : Tweak names of cpu flags, print flags in libavutil/tests/cpu
    

    The names of the cpu flags, when parsed from a string with
    av_parse_cpu_caps, are parsed by the libavutil eval functions. These
    interpret dashes as subtractions. Therefore, these previous cpu flag
    names haven't been possible to set.

    Use the official names for these extensions, as the previous ad-hoc
    names wasn't parseable.

    libavutil/tests/cpu tests that the cpu flags can be set, and prints
    the detected flags.

    Acked-by : Rémi Denis-Courmont <remi@remlab.net>
    Signed-off-by : Martin Storsjö <martin@martin.st>

    • [DH] libavutil/cpu.c
    • [DH] libavutil/tests/cpu.c
    • [DH] libavutil/version.h
  • Matomo 2 reaches end of life soon (December 2017), update now !

    7 décembre 2017, par Matomo Core Team — Community

    In less than three weeks, Matomo (Piwik) 2 will be no longer supported. This means that no further (security) updates will be released for this version. As per our Long Term Support announcement, Matomo 2.X is supported for 12 months after the initial release of Matomo 3.0.0 which was on December 18th 2016. Therefore, Matomo 2 will no longer receive any updates after December 18th 2017.

    It has been almost a year since we released Matomo (Piwik) 3 and we highly recommend updating to Matomo 3 ASAP. The major new release came with a new UI, performance and security improvements. If you are still on Matomo 2, the security improvements alone should be worth updating your Matomo to Matomo 3 now. We cannot recommend this enough.

    The update to Matomo (Piwik) 3 should be smooth, but may take a while depending on the amount of data you have.

    • If you have any problem with the update, feel free to get in touch with us, or ask in the forums.
    • If you are currently using Matomo (Piwik) self-hosted and would like to be upgraded, plus your Matomo managed in the official Cloud-hosted service, contact InnoCraft Cloud and they will migrate your database.

    At Matomo (Piwik) and InnoCraft, the company of the makers of Matomo, we have seen many thousands of Matomo installations upgraded over the past year and look forward to an exciting future for Matomo 3 and beyond !