Recherche avancée

Médias (0)

Mot : - Tags -/signalement

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

Autres articles (20)

  • XMP PHP

    13 mai 2011, par

    Dixit Wikipedia, XMP signifie :
    Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
    Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
    XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...)

  • Use, discuss, criticize

    13 avril 2011, par

    Talk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
    The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
    A discussion list is available for all exchanges between users.

  • MediaSPIP en mode privé (Intranet)

    17 septembre 2013, par

    À partir de la version 0.3, un canal de MediaSPIP peut devenir privé, bloqué à toute personne non identifiée grâce au plugin "Intranet/extranet".
    Le plugin Intranet/extranet, lorsqu’il est activé, permet de bloquer l’accès au canal à tout visiteur non identifié, l’empêchant d’accéder au contenu en le redirigeant systématiquement vers le formulaire d’identification.
    Ce système peut être particulièrement utile pour certaines utilisations comme : Atelier de travail avec des enfants dont le contenu ne doit pas (...)

Sur d’autres sites (3580)

  • JavaCPP FFMpeg to JavaSound

    8 août 2020, par TW2

    I have a problem to be able to read audio using JavaCPP FFMpeg library. I don’t know how to pass it to java sound and I don’t know too if my code is correct.

    


    Let’s see the more important part of my code (video is OK so I drop this)  :

    


    The variables  :

    


    //==========================================================================&#xA;// FFMpeg 4.x - Video and Audio&#xA;//==========================================================================&#xA;&#xA;private final AVFormatContext   pFormatCtx = new AVFormatContext(null);&#xA;private final AVDictionary      OPTIONS_DICT = null;&#xA;private AVPacket                pPacket = new AVPacket();&#xA;    &#xA;//==========================================================================&#xA;// FFMpeg 4.x - Audio&#xA;//==========================================================================&#xA;    &#xA;private AVCodec                 pAudioCodec;&#xA;private AVCodecContext          pAudioCodecCtx;&#xA;private final List<streaminfo>  audioStreams = new ArrayList&lt;>();&#xA;private int                     audio_data_size;&#xA;private final BytePointer       audio_data = new BytePointer(0);&#xA;private int                     audio_ret;&#xA;private AVFrame                 pAudioDecodedFrame = null;&#xA;private AVCodecParserContext    pAudioParser;&#xA;private SwrContext              audio_swr_ctx = null;&#xA;</streaminfo>

    &#xA;

    Then I call prepare functions in this order  :

    &#xA;

    private void prepareFirst() throws Exception{&#xA;    oldFile = file;&#xA;            &#xA;    // Initialize packet and check for error&#xA;    pPacket = av_packet_alloc();&#xA;    if(pPacket == null){&#xA;        throw new Exception("ALL: Couldn&#x27;t allocate packet");&#xA;    }&#xA;&#xA;    // Open video file&#xA;    if (avformat_open_input(pFormatCtx, file.getPath(), null, null) != 0) {&#xA;        throw new Exception("ALL: Couldn&#x27;t open file");&#xA;    }&#xA;&#xA;    // Retrieve stream information&#xA;    if (avformat_find_stream_info(pFormatCtx, (PointerPointer)null) &lt; 0) {&#xA;        throw new Exception("ALL: Couldn&#x27;t find stream information");&#xA;    }&#xA;&#xA;    // Dump information about file onto standard error&#xA;    av_dump_format(pFormatCtx, 0, file.getPath(), 0);&#xA;&#xA;    // Find the first audio/video stream&#xA;    for (int i = 0; i &lt; pFormatCtx.nb_streams(); i&#x2B;&#x2B;) {&#xA;        switch(pFormatCtx.streams(i).codecpar().codec_type()){&#xA;            case AVMEDIA_TYPE_VIDEO -> videoStreams.add(new StreamInfo(i, pFormatCtx.streams(i)));&#xA;            case AVMEDIA_TYPE_AUDIO -> audioStreams.add(new StreamInfo(i, pFormatCtx.streams(i)));&#xA;        }&#xA;    }&#xA;    &#xA;    if(videoStreams.isEmpty() &amp;&amp; type != PlayType.AudioOnly){&#xA;        throw new Exception("Didn&#x27;t find an audio stream");&#xA;    }&#xA;    if(audioStreams.isEmpty() &amp;&amp; type != PlayType.VideoOnly){&#xA;        throw new Exception("Didn&#x27;t find a video stream");&#xA;    }&#xA;}&#xA;&#xA;private void prepareAudio() throws Exception{&#xA;    //&#x2B;&#x2B;&#x2B;&#x2B;&#x2B;&#x2B;&#x2B;&#x2B;&#x2B;&#x2B;&#x2B;&#x2B;&#x2B;&#x2B;&#x2B;&#x2B;&#x2B;&#x2B;&#x2B;&#x2B;&#x2B;&#x2B;&#x2B;&#x2B;&#x2B;&#x2B;&#x2B;&#x2B;&#x2B;&#x2B;&#x2B;&#x2B;&#x2B;&#x2B;&#x2B;&#x2B;&#x2B;&#x2B;&#x2B;&#x2B;&#x2B;&#x2B;&#x2B;&#x2B;&#x2B;&#x2B;&#x2B;&#x2B;&#x2B;&#x2B;&#x2B;&#x2B;&#x2B;&#x2B;&#x2B;&#x2B;&#x2B;&#x2B;&#x2B;&#x2B;&#x2B;&#x2B;&#x2B;&#x2B;&#x2B;&#x2B;&#xA;    // AUDIO&#xA;    //------------------------------------------------------------------&#xA;&#xA;    if(audioStreams.isEmpty() == false){&#xA;        //===========================&#xA;        //------------&#xA;        &#xA;//                // Let&#x27;s search for AVCodec&#xA;//                pAudioCodec = avcodec_find_decoder(pFormatCtx.streams(audioStreams.get(0).getStreamIndex()).codecpar().codec_id());&#xA;//                if (pAudioCodec == null) {&#xA;//                    throw new Exception("AUDIO: Unsupported codec or not found!");&#xA;//                }&#xA;//&#xA;//                // Let&#x27;s alloc AVCodecContext&#xA;//                pAudioCodecCtx = avcodec_alloc_context3(pAudioCodec);&#xA;//                if (pAudioCodecCtx == null) {            &#xA;//                    throw new Exception("AUDIO: Unallocated codec context or not found!");&#xA;//                }&#xA;        &#xA;        // Get a pointer to the codec context for the video stream&#xA;        pAudioCodecCtx = pFormatCtx.streams(audioStreams.get(0).getStreamIndex()).codec();&#xA;&#xA;        // Find the decoder for the video stream&#xA;        pAudioCodec = avcodec_find_decoder(pAudioCodecCtx.codec_id());&#xA;        if (pAudioCodec == null) {&#xA;            throw new Exception("AUDIO: Unsupported codec or not found!");&#xA;        }&#xA;&#xA;        //===========================&#xA;        //------------&#xA;&#xA;        /* open it */&#xA;        if (avcodec_open2(pAudioCodecCtx, pAudioCodec, OPTIONS_DICT) &lt; 0) {&#xA;            throw new Exception("AUDIO: Could not open codec");&#xA;        }&#xA;&#xA;        pAudioDecodedFrame = av_frame_alloc();&#xA;        if (pAudioDecodedFrame == null){&#xA;            throw new Exception("AUDIO: DecodedFrame allocation failed");&#xA;        }&#xA;&#xA;        audio_swr_ctx = swr_alloc_set_opts(&#xA;                null,                           // existing Swr context or NULL&#xA;                AV_CH_LAYOUT_STEREO,            // output channel layout (AV_CH_LAYOUT_*)&#xA;                AV_SAMPLE_FMT_S16,              // output sample format (AV_SAMPLE_FMT_*).&#xA;                44100,                          // output sample rate (frequency in Hz)&#xA;                pAudioCodecCtx.channels(),  // input channel layout (AV_CH_LAYOUT_*)&#xA;                pAudioCodecCtx.sample_fmt(),    // input sample format (AV_SAMPLE_FMT_*).&#xA;                pAudioCodecCtx.sample_rate(),   // input sample rate (frequency in Hz)&#xA;                0,                              // logging level offset&#xA;                null                            // parent logging context, can be NULL&#xA;        );&#xA;        &#xA;        swr_init(audio_swr_ctx);&#xA;        &#xA;        av_samples_fill_arrays(&#xA;                pAudioDecodedFrame.data(),      // audio_data,&#xA;                pAudioDecodedFrame.linesize(),  // linesize&#xA;                audio_data,                     // buf&#xA;                (int)AV_CH_LAYOUT_STEREO,       // nb_channels&#xA;                44100,                          // nb_samples&#xA;                AV_SAMPLE_FMT_S16,              // sample_fmt&#xA;                0                               // align&#xA;        );&#xA;        &#xA;    }&#xA;    &#xA;    // Audio treatment end ---------------------------------------------&#xA;    //==================================================================&#xA;}&#xA;

    &#xA;

    And then when I launch the thread  :

    &#xA;

    private void doPlay() throws Exception{&#xA;    av_init_packet(pPacket);&#xA;&#xA;    // Read frames&#xA;    while (av_read_frame(pFormatCtx, pPacket) >= 0) {&#xA;        if (type != PlayType.AudioOnly &amp;&amp; pPacket.stream_index() == videoStreams.get(0).getStreamIndex()) {&#xA;            // Is this a packet from the video stream?&#xA;            decodeVideo();&#xA;            renewPacket();&#xA;        }&#xA;&#xA;        if (type != PlayType.VideoOnly &amp;&amp; pPacket.stream_index() == audioStreams.get(0).getStreamIndex()) {&#xA;            // Is this a packet from the audio stream?&#xA;            if(pPacket.size() > 0){&#xA;                decodeAudio();&#xA;                renewPacket();&#xA;            }&#xA;        }&#xA;    }&#xA;}&#xA;&#xA;private void renewPacket(){&#xA;    // Free the packet that was allocated by av_read_frame&#xA;    av_packet_unref(pPacket);&#xA;&#xA;    pPacket.data(null);&#xA;    pPacket.size(0);&#xA;    av_init_packet(pPacket);&#xA;}&#xA;

    &#xA;

    And again, this is where I don’t read audio  :

    &#xA;

    private void decodeAudio() throws Exception{&#xA;&#xA;    do {&#xA;        audio_ret = avcodec_send_packet(pAudioCodecCtx, pPacket);&#xA;    } while(audio_ret == AVERROR_EAGAIN());&#xA;    System.out.println("packet sent return value: " &#x2B; audio_ret);&#xA;&#xA;    if(audio_ret == AVERROR_EOF || audio_ret == AVERROR_EINVAL()) {&#xA;        StringBuilder sb = new StringBuilder();&#xA;        Formatter formatter = new Formatter(sb, Locale.US);&#xA;        formatter.format("AVERROR(EAGAIN): %d, AVERROR_EOF: %d, AVERROR(EINVAL): %d\n", AVERROR_EAGAIN(), AVERROR_EOF, AVERROR_EINVAL());&#xA;        formatter.format("Audio frame getting error (%d)!\n", audio_ret);&#xA;        throw new Exception(sb.toString());&#xA;    }&#xA;&#xA;    audio_ret = avcodec_receive_frame(pAudioCodecCtx, pAudioDecodedFrame);&#xA;    System.out.println("frame received return value: " &#x2B; audio_ret);&#xA;&#xA;    audio_data_size = av_get_bytes_per_sample(AV_SAMPLE_FMT_S16);&#xA;&#xA;    if (audio_data_size &lt; 0) {&#xA;        /* This should not occur, checking just for paranoia */&#xA;        throw new Exception("Failed to calculate data size");&#xA;    }&#xA;    &#xA;    double frame_nb = 44100d / pAudioCodecCtx.sample_rate() * pAudioDecodedFrame.nb_samples();&#xA;    long out_count = Math.round(Math.floor(frame_nb));&#xA;&#xA;    int out_samples = swr_convert(&#xA;            audio_swr_ctx,&#xA;            audio_data, &#xA;            (int)out_count,&#xA;            pAudioDecodedFrame.data(0),&#xA;            pAudioDecodedFrame.nb_samples()&#xA;    );&#xA;    &#xA;    if (out_samples &lt; 0) {&#xA;        throw new Exception("AUDIO: Error while converting");&#xA;    }&#xA;    &#xA;    int dst_bufsize = av_samples_get_buffer_size(&#xA;        pAudioDecodedFrame.linesize(), &#xA;        (int)AV_CH_LAYOUT_STEREO,  &#xA;        out_samples,&#xA;        AV_SAMPLE_FMT_S16,&#xA;        1&#xA;    );&#xA;    &#xA;    AudioFormat audioFormat = new AudioFormat(&#xA;            pAudioDecodedFrame.sample_rate(),&#xA;            16,&#xA;            2, &#xA;            true, &#xA;            false&#xA;    );&#xA;    &#xA;    BytePointer bytePointer = pAudioDecodedFrame.data(0);&#xA;    ByteBuffer byteBuffer = bytePointer.asBuffer();&#xA;&#xA;    byte[] bytes = new byte[byteBuffer.remaining()];&#xA;    byteBuffer.get(bytes);&#xA;    &#xA;    try (SourceDataLine sdl = AudioSystem.getSourceDataLine(audioFormat)) {&#xA;        sdl.open(audioFormat);                &#xA;        sdl.start();&#xA;        sdl.write(bytes, 0, bytes.length);&#xA;        sdl.drain();&#xA;        sdl.stop();&#xA;    } catch (LineUnavailableException ex) {&#xA;        Logger.getLogger(AVEntry.class.getName()).log(Level.SEVERE, null, ex);&#xA;    }    &#xA;}&#xA;

    &#xA;

    Do you have an idea  ?

    &#xA;

  • Why Matomo is a serious alternative to Google Analytics 360

    12 décembre 2018, par Jake Thornton — Marketing

    There’s no doubt about it, the free version of Google Analytics offers great value when it comes to making data-driven decisions for your business. But as your business starts to grow, so does the need for a more powerful web analytics tool.

    Why would I need to use a different web analytics tool ? It’s because Google Analytics (free version) is very limited when it comes to meeting the needs of a fast growing business whose website plays a pivotal role in converting its customers.

    This is where the Google Analytics 360 suite comes in, which is designed to meet the needs of businesses looking to get more accurate and insightful metrics.

    So what’s holding a growing business back from using Google Analytics 360 ?

    While GA360 sounds like a great option when upgrading your web analytics platform, we have found there are three core reasons holding businesses back from taking the leap :

    • Businesses can’t bear to swallow the US$150,000+ price tag (per year !) that comes with upgrading
    • Businesses can’t rely on GA360 to give them all the insights they need
    • Businesses want more control and ownership of their data

    Thankfully there are (only a few) alternatives and as the leading open-source alternative to Google Analytics, we hope to share insights on why Matomo Analytics can be the perfect solution for anyone at this crossroads in their web analytics journey.

    First, what does Google Analytics 360 offer that Google Analytics (free) doesn’t ?

    There’s no doubt about it, the GA360 suite is designed for larger sized businesses with demanding data limits, big budgets to use across the Google Marketing Platform (Google Adwords, DoubleClick etc.) and to get more advanced reporting visualisations and options.

    Data Sampling

    Data sampling is the elephant in the room when it comes to comparing GA360 with the freemium version. This is an entire article in its own right but at a basic level, Google Analytics samples your data (makes assumptions based on patterns) once the number of traffic visiting your website reaches a certain limit.

    Google Analytics provides the following information :

    Ad-hoc queries of your data are subject to the following general thresholds for sampling :

    Analytics Standard : 500k sessions at the property level for the date range you are using

    Analytics 360 : 100M sessions at the view level for the date range you are using

    In short, sampled data means inaccurate data. This is why as businesses grow, GA360 becomes a more attractive prospect because there’s no point making data-driven business decisions based on inaccurate data. This is a key weapon Google uses when selling to large businesses, however, this may not seem as concerning if you’re a small business within the sampled data range. For small businesses though, make sure you know the full extent of how this can affect your metrics, for example, your ecommerce data could be sampled, hence your GA reporting not matching your CRM/Ecommerce store data.

    Benefit of using Matomo : There is no data sampling anywhere in Matomo Analytics, that’s why we say 100% Accurate Data reporting across all plans.

    All Matomo data is 100% accurate

    Integration with the Google Marketing Platform

    Yes ok, we’ll admit it, GA does a great job at integrating seamlessly with its own products like Google Ads, Google Optimize etc. with a touch of Salesforce integration ; while GA360 takes this to another level compared to it’s freemium version (integration with Google Search 360, Google Display & Video 360 etc.)

    But… what about non-Google advertising platforms ? Well with Google being a dominant leader as a search engine, web browser, email provider, social media channel ; sometimes Google needs to keep its best interests at heart.

    Google is an online advertising giant and a bonus of Google Search 360 is that you can integrate your Bing Ads, Baidu and Yahoo Japan Search campaigns but that’s about it when it comes to integrations from its direct competitors. 

    Benefit of using Matomo : No biased treatment. You can integrate your Google, Yahoo and Bing search consoles for accurate search engine reporting, and in early 2019, Matomo will be releasing a Google Ads, Bing Ads and Facebook Ads Manager integration feature.

    Roll-Up Reporting
    Roll-Up Reporting for Matomo Nalytics

    Roll-up reporting lets you combine multiple accounts and properties into one view. This is a great benefit when upgrading from GA freemium to GA360. For example, if you’re a digital agency with multiple clients or you manage multiple websites under the one account, the roll-up reporting feature is wonderful when you need to combine data and reporting, instantly.

    Benefit of using Matomo : Matomo’s got this covered ! Roll-up reporting is available in the Matomo Business package (starting at $29 per month) for cloud hosting or you can purchase as a Premium Feature for On-Premise starting at $99 per year.

    Staying in full control of your data

    Who would have thought that one of biggest reasons people choose Matomo isn’t because of anything that leads to a higher ROI, but for the fact that users want more control of their data.
    100% Data Ownership with Matomo

    Matomo’s philosophy around data ownership is simple, you own your data, no one else. If you choose to host Matomo Analytics On-Premise then you are in complete control because your data is stored on your own servers where no one can gain access to it in whichever country you choose.

    So what about when you cloud host Matomo ? For users who don’t have the technical knowledge to host Matomo On-Premise, you can still have 100% data ownership and fully respect your user’s privacy when choosing to host Matomo Analytics through our cloud service.

    The difference between cloud hosting Matomo Analytics vs Google Analytics is that when you choose Matomo, we acknowledge you own the data and we have no right to access it. This means we can’t on-sell it to third-parties, we can’t claim ownership of it, you can export your data at anytime (how awesome is that !) and you can migrate between cloud hosting and hosting on-premise for ultimate flexibility whenever you want.

    Matomo also prides itself in allowing its users to be GDPR compliant with ease with a powerful GDPR Manager.

    Businesses can’t rely on Google Analytics 360 to give them all the insights they need

    Unlike Google Analytics 360, Matomo blends its Premium Web Analytics platform with Conversion Optimization features to allow its users to fully evaluate the user-experience on your website.

    Matomo is designed to be a complete analytics platform, meaning you have everything you need all in the one place which gives you greater insights and better business outcomes.

    Matomo Complete Analytics
    These features include :

    Premium Web Analytics – You can still (accurately) measure all the basic metrics you love and are familiar with in Google Analytics like Location, Referrer traffic, Multi Attribution, Campaign Tracking and Ecommerce etc.

    Conversion Optimization – Eliminate the need for multiple analytics tools to get what Google Analytics doesn’t offer. These features include Heatmaps, Session Recordings, Form Analytics and more – giving you the best chance possible to convert more traffic by evaluating the user-experience.

    By having one tool for all your features you can integrate metrics, have one single view for all your data and it’s easy to use.

    Enhanced SEO – Get more insights into the performance of your search campaigns with unbiased search engine reporting, keyword ranking positions, integration with multiple search consoles and crawling stats. Google Analytics offers limited features to help with your SEO campaigns and only integrates with Google products.

    Visitor Profiles – Get a detailed life-time evaluation of every user who visits your website.

    Tag Manager – A powerful open-source Tag Manager tool to embed your third-party marketing tags. By being open-source and with our commitment to giving you 100% data ownership, you can always ensure you are in full control.

    Just putting it out there ...

    Google leads the market with its freemium tool which offers great insights for businesses (fyi – Matomo has a forever free analytics tool too !), but when it comes to upgrading to get accurate reporting (kind of a big deal), owning your own data (a huge deal !) and having a complete range of features to excel ROI for your business, Matomo Analytics is often a preferred option to the Google Analytics 360 suite.

    Matomo is designed to be easy to use, is fully flexible and gives users full peace of mind by respecting user privacy. Want to learn more about the benefits of Matomo ?

  • How can i demux/remux video stream h264 ? [on hold]

    25 avril 2018, par Benji Joa

    I’m looking for a command line in ffmpeg that demux audio and video in order to send the video in my bitstream filter and remux it in the output file.
    I have a video treatment to do in the bitstream filter without audio.
    I don’t find the correct grammar..
    Thank you