Recherche avancée

Médias (91)

Autres articles (27)

  • List of compatible distributions

    26 avril 2011, par

    The table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
    If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...)

  • Support de tous types de médias

    10 avril 2011

    Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

Sur d’autres sites (4772)

  • avcodec/thread : Don't use ThreadFrame when unnecessary

    6 février 2022, par Andreas Rheinhardt
    avcodec/thread : Don't use ThreadFrame when unnecessary
    

    The majority of frame-threaded decoders (mainly the intra-only)
    need exactly one part of ThreadFrame : The AVFrame. They don't
    need the owners nor the progress, yet they had to use it because
    ff_thread_(get|release)_buffer() requires it.

    This commit changes this and makes these functions work with ordinary
    AVFrames ; the decoders that need the extra fields for progress
    use ff_thread_(get|release)_ext_buffer() which work exactly
    as ff_thread_(get|release)_buffer() used to do.

    This also avoids some unnecessary allocations of progress AVBuffers,
    namely for H.264 and HEVC film grain frames : These frames are not
    used for synchronization and therefore don't need a ThreadFrame.

    Also move the ThreadFrame structure as well as ff_thread_ref_frame()
    to threadframe.h, the header for frame-threaded decoders with
    inter-frame dependencies.

    Reviewed-by : Anton Khirnov <anton@khirnov.net>
    Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@outlook.com>

    • [DH] libavcodec/aic.c
    • [DH] libavcodec/alac.c
    • [DH] libavcodec/av1dec.c
    • [DH] libavcodec/av1dec.h
    • [DH] libavcodec/bitpacked_dec.c
    • [DH] libavcodec/cfhd.c
    • [DH] libavcodec/cllc.c
    • [DH] libavcodec/cri.c
    • [DH] libavcodec/dnxhddec.c
    • [DH] libavcodec/dvdec.c
    • [DH] libavcodec/dxtory.c
    • [DH] libavcodec/dxv.c
    • [DH] libavcodec/dxva2_av1.c
    • [DH] libavcodec/error_resilience.h
    • [DH] libavcodec/exr.c
    • [DH] libavcodec/ffv1.h
    • [DH] libavcodec/ffv1dec.c
    • [DH] libavcodec/flacdec.c
    • [DH] libavcodec/fraps.c
    • [DH] libavcodec/h264_picture.c
    • [DH] libavcodec/h264_slice.c
    • [DH] libavcodec/h264dec.c
    • [DH] libavcodec/h264dec.h
    • [DH] libavcodec/hapdec.c
    • [DH] libavcodec/hevc_refs.c
    • [DH] libavcodec/hevcdec.c
    • [DH] libavcodec/hevcdec.h
    • [DH] libavcodec/hqx.c
    • [DH] libavcodec/huffyuvdec.c
    • [DH] libavcodec/jpeg2000dec.c
    • [DH] libavcodec/lagarith.c
    • [DH] libavcodec/lcldec.c
    • [DH] libavcodec/libopenjpegdec.c
    • [DH] libavcodec/magicyuv.c
    • [DH] libavcodec/mdec.c
    • [DH] libavcodec/mpegpicture.h
    • [DH] libavcodec/notchlc.c
    • [DH] libavcodec/nvdec_av1.c
    • [DH] libavcodec/photocd.c
    • [DH] libavcodec/pixlet.c
    • [DH] libavcodec/proresdec2.c
    • [DH] libavcodec/pthread_frame.c
    • [DH] libavcodec/rv34.c
    • [DH] libavcodec/sheervideo.c
    • [DH] libavcodec/takdec.c
    • [DH] libavcodec/thread.h
    • [DH] libavcodec/threadframe.h
    • [DH] libavcodec/tiff.c
    • [DH] libavcodec/tta.c
    • [DH] libavcodec/utils.c
    • [DH] libavcodec/utvideodec.c
    • [DH] libavcodec/v210dec.c
    • [DH] libavcodec/v410dec.c
    • [DH] libavcodec/vaapi_av1.c
    • [DH] libavcodec/vble.c
    • [DH] libavcodec/vp8.h
    • [DH] libavcodec/vp9shared.h
    • [DH] libavcodec/webp.c
    • [DH] libavcodec/ylc.c
  • using libav instead of ffmpeg

    21 janvier 2015, par n00bie

    I want to streaming video over http, i am using ogg(theora + vorbis), now i have sender and receiver, and i can run them using command line :

    Sender :

    ffmpeg -f video4linux2 -s 320x240 -i /dev/mycam -codec:v libtheora -qscale:v 5 -f ogg http://127.0.0.1:8080

    Receiver :

    sudo gst-launch-0.10 tcpserversrc port = 8080 ! oggdemux ! theoradec ! autovideosink

    Now, sender sends both audio and video, but receiver plays only video.

    It works perfect, but now i want not to use ffmpeg and use only libav* instead.

    Here’s my class for streaming :

    class VCORE_LIBRARY_EXPORT VVideoWriter : private boost::noncopyable
    {
    public:
       VVideoWriter( );
       ~VVideoWriter( );

       bool openFile( const std::string&amp; name,
                      int fps, int videoBitrate, int width, int height,
                      int audioSampleRate, bool stereo, int audioBitrate );
       void close( );

       bool writeVideoFrame( const uint8_t* image, int64_t timestamp );
       bool writeAudioFrame( const int16_t* data, int64_t timestamp  );

       int audioFrameSize( ) const;

    private:
       AVFrame *m_videoFrame;
       AVFrame *m_audioFrame;

       AVFormatContext *m_context;
       AVStream *m_videoStream;
       AVStream *m_audioStream;

       int64_t m_startTime;
    };

    Initialization :

    bool VVideoWriter::openFile( const std::string&amp; name,
                                int fps, int videoBitrate, int width, int height,
                                int audioSampleRate, bool stereo, int audioBitrate )
    {
            if( ! m_context )
            {
               // initalize the AV context
               m_context = avformat_alloc_context( );
               assert( m_context );

               // get the output format
               m_context->oformat = av_guess_format( "ogg", name.c_str( ), nullptr );
               if( m_context->oformat )
               {
                   strcpy( m_context->filename, name.c_str( ) );

                   auto codecID = AV_CODEC_ID_THEORA;
                   auto codec = avcodec_find_encoder( codecID );

                   if( codec )
                   {
                       m_videoStream = avformat_new_stream( m_context, codec );
                       assert( m_videoStream );

                       // initalize codec
                       auto codecContext = m_videoStream->codec;
                       bool globalHeader = m_context->oformat->flags &amp; AVFMT_GLOBALHEADER;
                       if( globalHeader )
                           codecContext->flags |= CODEC_FLAG_GLOBAL_HEADER;
                       codecContext->codec_id = codecID;
                       codecContext->codec_type = AVMEDIA_TYPE_VIDEO;
                       codecContext->width = width;
                       codecContext->height = height;
                       codecContext->time_base.den = fps;
                       codecContext->time_base.num = 1;
                       codecContext->bit_rate = videoBitrate;
                       codecContext->pix_fmt = PIX_FMT_YUV420P;
                       codecContext->flags |= CODEC_FLAG_QSCALE;
                       codecContext->global_quality = FF_QP2LAMBDA * 5;

                       int res = avcodec_open2( codecContext, codec, nullptr );

                       if( res >= 0 )
                       {
                           auto codecID = AV_CODEC_ID_VORBIS;
                           auto codec = avcodec_find_encoder( codecID );

                           if( codec )
                           {
                               m_audioStream = avformat_new_stream( m_context, codec );
                               assert( m_audioStream );
                               // initalize codec
                               auto codecContext = m_audioStream->codec;

                               bool globalHeader = m_context->oformat->flags &amp; AVFMT_GLOBALHEADER;
                               if( globalHeader )
                                   codecContext->flags |= CODEC_FLAG_GLOBAL_HEADER;
                               codecContext->codec_id = codecID;
                               codecContext->codec_type = AVMEDIA_TYPE_AUDIO;
                               codecContext->sample_fmt = AV_SAMPLE_FMT_FLTP;
                               codecContext->bit_rate = audioBitrate;
                               codecContext->sample_rate = audioSampleRate;
                               codecContext->channels = stereo ? 2 : 1;
                               codecContext->channel_layout = stereo ? AV_CH_LAYOUT_STEREO : AV_CH_LAYOUT_MONO;

                               res = avcodec_open2( codecContext, codec, nullptr );

                               if( res >= 0 )
                               {
                                   // try to open the file
                                   if( avio_open( &amp;m_context->pb, m_context->filename, AVIO_FLAG_WRITE ) >= 0 )
                                   {
                                       m_audioFrame->nb_samples = codecContext->frame_size;
                                       m_audioFrame->format = codecContext->sample_fmt;
                                       m_audioFrame->channel_layout = codecContext->channel_layout;

                                       boost::posix_time::ptime time_t_epoch( boost::gregorian::date( 1970, 1, 1 ) );
                                       m_context->start_time_realtime = ( boost::posix_time::microsec_clock::universal_time( ) - time_t_epoch ).total_microseconds( );
                                       m_startTime = -1;

                                       // write the header
                                       if( avformat_write_header( m_context, nullptr ) >= 0 )
                                       {
                                           return true;
                                       }
                                       else std::cerr &lt;&lt; "VVideoWriter: failed to write video header" &lt;&lt; std::endl;
                                   }
                                   else std::cerr &lt;&lt; "VVideoWriter: failed to open video file " &lt;&lt; name &lt;&lt; std::endl;
                               }
                               else std::cerr &lt;&lt; "VVideoWriter: failed to initialize audio codec" &lt;&lt; std::endl;
                           }
                           else std::cerr &lt;&lt; "VVideoWriter: requested audio codec is not supported" &lt;&lt; std::endl;
                       }
                       else std::cerr &lt;&lt; "VVideoWriter: failed to initialize video codec" &lt;&lt; std::endl;
                   }
                   else std::cerr &lt;&lt; "VVideoWriter: requested video codec is not supported" &lt;&lt; std::endl;
               }
               else std::cerr &lt;&lt; "VVideoWriter: requested video format is not supported" &lt;&lt; std::endl;

               avformat_free_context( m_context );
               m_context = nullptr;
               m_videoStream = nullptr;
               m_audioStream = nullptr;
           }
           return false;
    }

    Writing video :

    bool VVideoWriter::writeVideoFrame( const uint8_t* image, int64_t timestamp )
    {
       if( m_context ) {
           auto codecContext = m_videoStream->codec;
           avpicture_fill( reinterpret_cast( m_videoFrame ),
                           const_cast( image ),
                           codecContext->pix_fmt, codecContext->width, codecContext->height );

           AVPacket pkt;
           av_init_packet( &amp; pkt );
           pkt.data = nullptr;
           pkt.size = 0;
           int gotPacket = 0;
           if( ! avcodec_encode_video2( codecContext, &amp;pkt, m_videoFrame, &amp; gotPacket ) ) {
               if( gotPacket == 1 ) {
                   pkt.stream_index = m_videoStream->index;
                   int res;
                   {
                       pkt.pts = AV_NOPTS_VALUE;
                       pkt.dts = AV_NOPTS_VALUE;
                       pkt.stream_index = m_videoStream->index;
                       res = av_write_frame( m_context, &amp;pkt );
                   }
                   av_free_packet( &amp; pkt );
                   return res >= 0;
               }
               assert( ! pkt.size );
               return true;
           }
       }
       return false;
    }

    Writing audio (now i write test dummy audio) :

    bool VVideoWriter::writeAudioFrame( const int16_t* data, int64_t timestamp )
    {
       if( m_context ) {
           auto codecContext = m_audioStream->codec;

           int buffer_size = av_samples_get_buffer_size(nullptr, codecContext->channels, codecContext->frame_size, codecContext->sample_fmt, 0);

           float *samples = (float*)av_malloc(buffer_size);

           for (int i = 0; i &lt; buffer_size / sizeof(float); i++)
               samples[i] = 1000. * sin((double)i/2.);

           int ret = avcodec_fill_audio_frame( m_audioFrame, codecContext->channels, codecContext->sample_fmt, (const uint8_t*)samples, buffer_size, 0);

           assert( ret >= 0 );
           (void)(ret);

           AVPacket pkt;
           av_init_packet( &amp; pkt );
           pkt.data = nullptr;
           pkt.size = 0;
           int gotPacket = 0;
           if( ! avcodec_encode_audio2( codecContext, &amp;pkt, m_audioFrame, &amp; gotPacket ) ) {
               if( gotPacket == 1 ) {
                   pkt.stream_index = m_audioStream->index;
                   int res;
                   {
                       pkt.pts = AV_NOPTS_VALUE;
                       pkt.dts = AV_NOPTS_VALUE;
                       pkt.stream_index = m_audioStream->index;
                       res = av_write_frame( m_context, &amp;pkt );
                   }
                   av_free_packet( &amp; pkt );
                   return res >= 0;
               }
               assert( ! pkt.size );
               return true;
           }
           return false;
       }
       return false;
    }

    Here’s test example (i send video from webcam and dummy audio) :

    class TestVVideoWriter : public sigslot::has_slots&lt;>
    {
    public:
       TestVVideoWriter( ) :
           m_fileOpened( false )
       {
       }

       void onCapturedFrame( cricket::VideoCapturer*, const cricket::CapturedFrame* capturedFrame )
       {
           if( m_fileOpened ) {
               m_writer.writeVideoFrame( reinterpret_cast<const>( capturedFrame->data ),
                                         capturedFrame->time_stamp / 1000 );
               m_writer.writeAudioFrame( nullptr , 0 );


           } else {
                 m_fileOpened = m_writer.openFile( "http://127.0.0.1:8080",
                                                   15, 40000, capturedFrame->width, capturedFrame->height,
                                                   16000, false, 64000 );
           }
       }

    public:
       vcore::VVideoWriter m_writer;
       bool m_fileOpened;
    };

    TestVVideoWriter testWriter;

    BOOST_AUTO_TEST_SUITE(TEST_VIDEO_WRITER)

    BOOST_AUTO_TEST_CASE(testWritingVideo)
    {
       cricket::LinuxDeviceManager deviceManager;
       std::vector devs;
       if( deviceManager.GetVideoCaptureDevices( &amp;devs ) ) {
           if( devs.size( ) ) {
               boost::shared_ptr camera( deviceManager.CreateVideoCapturer( devs[ 0 ] ) );
               if( camera ) {
                   cricket::VideoFormat format( 320, 240, cricket::VideoFormat::FpsToInterval( 30 ),
                                                camera->GetSupportedFormats( )->front( ).fourcc );
                   cricket::VideoFormat best;
                   if( camera->GetBestCaptureFormat( format, &amp;best ) ) {
                       camera->SignalFrameCaptured.connect( &amp;testWriter, &amp;TestVVideoWriter::onCapturedFrame );
                       if( camera->Start( best ) != cricket::CS_FAILED ) {
                           boost::this_thread::sleep( boost::posix_time::seconds( 10 ) );
                           return;
                       }
                   }
               }
           }
       }
       std::cerr &lt;&lt; "Problem has occured with camera" &lt;&lt; std::endl;
    }

    BOOST_AUTO_TEST_SUITE_END() // TEST_VIDEO_WRITER
    </const>

    But, in this case, gstreamer start playing video only when my test program stop executing (after 10 seconds in this case). It does not suit me, i want gstreamer start playing immediately after starting my test program.

    Could someone help me ?

    P.S. Sorry for my English.

  • Exceeded GA’s 10M hits data limit, now what ?

    21 juin 2019, par Joselyn Khor

    Exceeded GA’s 10M hits data limit, now what ? Matomo has the answers

    “Your data volume (1XXM hits) exceeds the limit of 10M hits per month as outlined in our Terms of Service. If you continue to exceed the limit, we will stop processing new data on XXX 21, 2019. Learn more about possible solutions.”

    Yikes. Alarm bells were ringing when a Google Analytics free user came to us faced with this notice. Let’s call him ‘Mark’. Mark had reached the limits on the data he could collect through Google Analytics and was shocked by the limited options available to fix the problem, without blowing the budget. The thoughts racing through his head were :

    • “What happens to all my data ?”
    • “What if Google starts charging USD150K now ?”

    Then he came across Matomo and decided to get in touch with our support team …

    “Can you fix this issue ?” he asked us.

    “Absolutely !” we said.

    We’ll get back to helping Mark in a minute. For now let’s go over why this was such a dilemma for him.

    In order to resolve this data limits issue, one of the solutions was for him to upgrade to Google Analytics 360, which meant shelling out USD150,000 per year for their 1 billion hits per month option. Going from free to USD150,000 was too much of a stretch for a growing company.

    “Your data volume (1XXM hits) exceeds the limit of 10M hits per month …”, what did this message mean ?

    With the free version, Mark could collect up to 10 million “hits” per month, per account. Going over meant Google Analytics could stop collecting any more data for free as outlined in their Terms.

    Google Analytics’ Terms of Service (2018, sec. 2) states, “Subject to Section 15, the Service is provided without charge to You for up to 10 million Hits per month per account.”[1]

    In general, what’s a "hit" ?

    Data being sent to Google Analytics. It can be a transaction, event, social interaction or pageview - these all produce what Google calls a “hit”.

    Google Analytics data limits
    Google Analytics Terms of Service

    And their Analytics Help Data Limits (n.d.) support page makes clear that : “If a property sends more hits per month to Analytics than allowed by the Analytics Terms of Service, there is no assurance that the excess hits will be processed. If the property’s hit volume exceeds this limit, a warning may be displayed in the user interface and you may be prevented from accessing reports.”[2]

    Google Analytics data collection limit
    Google Analytics’ data limits support page

    Possible solutions

    So the possible solutions given by Google Analytics’ Data Limits support page were (also shown in image below) :

    • To pay USD150K to upgrade to Google Analytics 360
    • To send fewer hits by setting up sampling
    • Or choose the slightly less relevant option to upgrade mobile app tracking to Google Analytics for Firebase.

    Without the means to pay, the free version was fast becoming inaccessible for Mark as he was facing a future where he risked no longer having access to up-to-date data used in his business’ reporting.

    Mark was facing a problem that potentially didn’t have a cost-effective solution.

    Google Analytics data limits
    Google Analytics’ data limits support page

    So what can you really do about it ?

    This is where we can help provide some assistance. If you’re reading this article, we’ll assume you can relate to Mark and share with you the advice on options we gave him.

    Options :

    One option posed by Google is for you to send fewer hits by auditing your data collection processes

    If you really don’t have the budget, you’ll need to reassess your data collection priorities and go over your strategies to see what is necessary to track, and what isn’t.

    • Make sure you know what you’re tracking and why. Look at what websites are being tracked by Google and into what properties.
    • Go through what data you’re tracking and decide what is or isn’t of value.
    • Set up data sampling, this however, will lead to inaccurate data.

    From here you can start to course correct. If you’ve found data you’re not using for analysis, get rid of these events/pageviews in your Google Analytics.

    But the limitations here are that eventually, you’re going to run out of irrelevant metrics and everything you’re tracking will be essential. So you’ll hit another brick wall and return to the same situation.

    Option 2 Ignore and continue using the free version of Google Analytics

    With this option, you’ll have to bear the business risks involved by basing decisions off of analytics reports that may or may not be updated. In this case, you may still get contacted about exceeding the limits. As the free service is provided for only up to 10 million hits, once you’ve gone over them, you’re violating what’s stipulated in the Terms of Service. 

    There’s also the warning that “… you may be prevented from accessing reports” (Data limits, n.d.). So while we may not know for certain what Google Analytics will do, in this case it may be better to be safe rather than sorry by acting quickly to resolve it. 

    Option 3 The Matomo solution. Upgrade to a web analytics platform that can handle your demanding data requirements

    Save money while continuing to gain valuable insights by moving over to Matomo Analytics (recommended)

    This is where you can save up to USD130,000 a year. As well as that, the transition from Google Analytics to the Matomo Cloud is a seamless experience as setup and maintenance is taken care of by our experts.

    For example, you can get up to 15M pageviews for USD1,612.50/month (or USD19,350/year) on the Essentials plan.

    Or even 25M pageviews for USD2400/month (or USD24000/year) on the Business plan – which offers additional web analytics and conversion optimization resources.

    Matomo Cloud is a great option if you’re looking for a secure, cost-effective and powerful analytics solution. You also get what Google Analytics could never offer you : full control and ownership of your own data and privacy. 

    No need to worry about losing your Google Analytics data because …

    Now you can import your historic Google Analytics data directly into your Matomo with the Google Analytics Importer tool. Simply follow the step-by-step guide to get started for free.

    Along with savings you can get :

    • A solution for the data limits issue forever. You choose the right plan to suit your data needs and adapt as you continue growing
    • 100% accurate data (no data sampling)
    • 100% data ownership of all your information without signing away your data to a third party
    • Powerful web analytics and conversion optimization features
    • Matomo Tag Manager
    • Easy setup
    • Support from Matomo’s specialists

    Learn more about Matomo Cloud pricing.

    Or go for Matomo On-Premise

    If you have the in-house infrastructure to support self-hosting Matomo on your own servers then there’s also the option of Matomo On-Premise. Here you’ll get full security knowing the data is on your own servers. 

    Setup will also require technical knowledge. There will also be costs associated with acquiring your own servers, and keeping up with regular maintenance and updates. With On-Premise you get maximum flexibility, with no data limits whatsoever. But if you’re coming over from Google Analytics and don’t have the infrastructure and team to host On-Premise, the Matomo Cloud could be right for you.

    Learn more about Matomo On-Premise.

    Where do you go from here ?

    Getting 10 millions hits per month is no small feat, it’s actually pretty fantastic. But if it means having to shell out USD150,000 just to be able to continue with Google Analytics, we feel your problem could be fixed with Matomo Cloud. You could then put the rest of the money you save to better use.

    If you choose Matomo, you now have the option to : 

    • Raise your data limits for a fraction of Google Analytics 360’s price
    • Get a comprehensive range of analytics features for the most impactful insights to ensure your website continues excelling
    • Get data that’s not sampled – meaning 100% accuracy in your reports
    • Migrate your data easily with the help of Matomo’s support team

    We’ll have you covered. 

    By sharing with you the options and advice we gave to Mark, we hope you’ll be able to find a solution that makes your life easier and solves the issue of data restrictions forever.

    The team at Matomo is here to help you every step of the way to ensure a stress-free transition from Google Analytics if that is what works best for you.

    For next steps, why not check out our pricing page to see what could suit your needs !

    References :

    [1] Terms of Service. (2018, July 24). In Google Analytics Terms of Service. Retrieved June 12, 2019, from https://www.google.com/analytics/terms/us.html

    [2] Data limits. (n.d.). In Analytics Help Data limits. Retrieved June 12, 2019, from https://support.google.com/analytics/answer/1070983?hl=en