Recherche avancée

Médias (91)

Autres articles (102)

  • 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

  • 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.

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

Sur d’autres sites (11471)

  • Thread safety of FFmpeg when using av_lockmgr_register

    12 août 2013, par Stocastico

    My application uses FFmpeg to read video streams. So far, I ensured thread safety by defining my own global lock and looking for all the methods inside FFmpeg libraries which are not thread safe.
    This makes the code a bit messy, so while looking for better ideas I found this answer, but apparently I couldn't make use of the suggestions.
    I tried testing it in my own environment, but I always get critical heap error. Here's the test code

    class TestReader
    {
    public:
    TestReader( std::string sVid )
    {
      m_sVid = sVid;
      m_cVidPtr.reset( new VideoReader() );
    }

    ~TestReader()
    {}

    void operator() ()
    {
       readVideoThread();
    }

    private:
    int readVideoThread()
    {
      m_cVidPtr->init( m_sVid.c_str() );
      MPEGFrame::pointer cFramePtr;

      for ( int i=0; i< 500; i++ )
      {
        cFramePtr = m_cVidPtr->getNextFrame();
      }

      return 0;
    }
    boost::shared_ptr<videoreader> m_cVidPtr;
    std::string m_sVid;
    };

    /*****************************************************************************/
    int lockMgrCallback(void** cMutex, enum AVLockOp op)
    {
    if (nullptr == cMutex)
      return -1;

    switch(op)
    {
    case AV_LOCK_CREATE:
      {
        *cMutex = nullptr;
        boost::mutex* m = new boost::mutex();
        *cMutex = static_cast(m);
        break;
      }
    case AV_LOCK_OBTAIN:
      {
        boost::mutex* m =  static_cast(*cMutex);
        m->lock();
        break;
      }
    case AV_LOCK_RELEASE:
      {
        boost::mutex * m = static_cast(*cMutex);
        m->unlock();
        break;
      }
    case AV_LOCK_DESTROY:
      {
        boost::mutex * m = static_cast(*cMutex);
        delete m;
        break;
      }
    default:
      break;
    }
    return 0;
    }

    int testFFmpegMultiThread( std::string sVideo )
    {
    if ( ::av_lockmgr_register( &amp;lockMgrCallback ) )
    {
      std::cout &lt;&lt; "Could not initialize lock manager!" &lt;&lt; std::endl;
      return -1;
    }
    TestReader c1(sVideo);
    TestReader c2(sVideo);
    boost::thread t1( c1 );
    boost::thread t2( c2 );

    t1.join();
    t2.join();

    return 0;
    }
    </videoreader>

    The classes VideoReader and MPEGFrame are just wrappers and have always worked perfectly in single threaded scenarios, or in multi-threaded scenario managed using my own global lock.
    Am I missing something obvious ? Can anybody point me to some working code ? Thanks in advance

  • HEVC/H.265 interlaced format support in ffmpeg or VLC

    30 décembre 2020, par Ernestas Gruodis

    "Music Box Russia" channel over satellite transmits in HEVC 1920x1080 25fps interlaced - and after recording VLC recognizes file as 50 fps, and resolution 1920x540 - half a height. But on satellite tuner the player works fine - it plays a file as 1920x1080 25fps... When we can expect support for HEVC/H.265 interlaced ? Here is recorded file (Garry Grey & Eva Miller - wtf). Also - a lot of lost frames in VLC player statistics..

    &#xA;

    EDIT :

    &#xA;

    I found some interesting info how in HEVC the interlace video content can be indicated here :

    &#xA;

    &#xA;

    Unlike to H.264/AVC, interlace-dedicated coding in HEVC is not exist :

    &#xA;

      &#xA;
    • No mixed frame-field interaction (like PAFF in H.264/AVC)
    • &#xA;

    • No interlace scanning of transform coefficients
    • &#xA;

    • No correction MVX[1] (or y-component of MV) if current and reference pictures are in different polarity (top-bottom or&#xA;bottom-top).
    • &#xA;

    &#xA;

    However, in HEVC the interlace video content can be indicated&#xA;(signaled in VPS/SPS and pic_timing SEI messages the latter are&#xA;transmitted for every picture in the sequence). Interlace-related&#xA;setting :

    &#xA;

      &#xA;
    • in VPS/SPS set general_interlaced_source_flag=1 and general_progressive_source_flag=0. Indeed, the HEVC standard says :

      &#xA;

      if general_progressive_source_flag is equal to 0 and&#xA;general_interlaced_source_flag is equal to 1, the source scan type of&#xA;the pictures in the CVS should be interpreted as interlaced only.

      &#xA;

    • &#xA;

    • in VPS/SPS set general_frame_only_constraint_flag=0

      &#xA;

    • &#xA;

    • in SPS VUI set field_seq_flag=1 and frame_field_info_present_flag=1. Notice that if these flags are ON&#xA;then picture timing SEIs shall be present for each picture.

      &#xA;

    • &#xA;

    • transmission of Picture Timing SEI per picture with the following parameters :

      &#xA;

      source_scan_type = 0 to indicate interlace mode&#xA;for top field picture signal pict_struct=1 and for bottom field picture pict_struct=2

      &#xA;

    • &#xA;

    &#xA;

    &#xA;

    Perhaps it is possible to pass these parameters to ffmpeg/vlc before playing a file ?

    &#xA;

  • avformat/utils : Use static mutexes instead of ff_lock_avformat()

    17 mai 2024, par Andreas Rheinhardt
    avformat/utils : Use static mutexes instead of ff_lock_avformat()
    

    Its existence is a remnant of (libavcodec's) lock-manager API
    which has been removed in a04c2c707de2ce850f79870e84ac9d7ec7aa9143.
    There is no need to use the same lock for avisynth, chromaprint
    or tls, so switch to ordinary static mutexes instead.

    Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@outlook.com>

    • [DH] libavformat/avisynth.c
    • [DH] libavformat/chromaprint.c
    • [DH] libavformat/internal.h
    • [DH] libavformat/tls_gnutls.c
    • [DH] libavformat/tls_openssl.c
    • [DH] libavformat/utils.c