Re: [Mlt-devel] Question about decklink producer
Brought to you by:
ddennedy,
lilo_booter
From: Dan D. <da...@de...> - 2011-05-28 04:14:27
|
On Fri, May 27, 2011 at 4:12 PM, j-b-m <j-...@us...> wrote: > Hi. > > I made a few tests with the Decklink producer, using an Intensity Pro card. I > can correctly preview the video: > > melt -profile atsc_1080i_50 decklink:0 > > 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 ); } > I used the following command to encode: > > 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. > because encoding is too slow and MLT caches more and more frames? Did anybody > succeed in capturing from the decklink producer to a file? > > regards > jb > -- +-DRD-+ |