On Saturday 28 May 2011 06:14:20 Dan Dennedy wrote: > > However, when I try to encode the stream using an avformat consumer, the > > process quickly eats all my memory (goes up to more than 1 Giga in 20 > > seconds) and then freezes my system. > > I did not test this yet, but did a brief review and saw something. The > producer has a buffer queue between the decklink and MLT threads. This > defaults to a max of 25 frames, but when it overflows because they are > not consumed fast enough, it appears the frame is not closed. I think > this should fix it. > > diff --git a/src/modules/decklink/producer_decklink.cpp > b/src/modules/decklink/producer_decklink.cpp > index 5bd6ea3..6d327ab 100644 > --- a/src/modules/decklink/producer_decklink.cpp > +++ b/src/modules/decklink/producer_decklink.cpp > @@ -306,6 +306,8 @@ public: > mlt_deque_push_back( m_queue, frame ); > pthread_cond_broadcast( &m_condition ); > } > + else > + mlt_frame_close( frame ); > pthread_mutex_unlock( &m_mutex ); > } >
Hi. Yes, thanks that fixes the problem! The encoded video seems fine. Does it mean that those frames are dropped? > > melt -profile atsc_1080i_50 decklink:0 -consumer avformat:test.mpg > > vcodec=mpeg2video minrate=0 b=6000k acodec=mp2 ab=128k ar=48000 > > > > I tried a few other encoding params without more success. Any ideas? Is > > it > > When encoding HD, you probably want to add threads=2 or more. Yes, it helps a bit. Thanks for the quick investigation. regards jb ------------------------------------------------------------------------------ vRanger cuts backup time in half-while increasing security. With the market-leading solution for virtual backup and recovery, you get blazing-fast, flexible, and affordable data protection. Download your free trial now. http://p.sf.net/sfu/quest-d2dcopy1 _______________________________________________ Mlt-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mlt-devel
