Re: [Mlt-devel] Avformat producer not cleaning up [PATCH]

2011-06-16 Thread j-b-m
On Thursday 16 June 2011 07:18:33 Dan Dennedy wrote:
 On Tue, Jun 14, 2011 at 12:32 AM, j-b-m j-...@users.sourceforge.net wrote:

 Then, I run
 melt -verbose -profile quarter_ntsc
 video4linux2:/dev/video0?width:320\height:240\frame_rate:15
 -consumer avformat:test.mpg
 
 When I press 'q', I always see producer_avformat_close. Does that
 reproduce the problem for you?

Ouch, my fault. It works correctly. 
I found the problem, I was passing audio parameters to the avformat consumer 
without having audio input:

melt -verbose -profile quarter_ntsc 
video4linux2:/dev/video0?width:320\height:240\frame_rate:15 -consumer 
avformat:test.mp4 f=mp4 acodec=libmp3lame ab=128k ar=44100 vcodec=mpeg4

Reproduces the issue for me. I guess it is waiting for audio input... however 
I think that could be fixed in MLT so that closing producer and consumer really 
closes everything.

regards and thanks for your help in finding the issue.
jb

--
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
___
Mlt-devel mailing list
Mlt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlt-devel


Re: [Mlt-devel] Avformat producer not cleaning up [PATCH]

2011-06-14 Thread Dan Dennedy
On Tue, Jun 14, 2011 at 12:32 AM, j-b-m j-...@users.sourceforge.net wrote:
 On Sunday 22 May 2011 18:39:08 j-b-m wrote:

 Creating a video4linux producer like (simplified code):

 producer = new Mlt::Producer(*profile, video4linux2:/dev/video0);
 consumer-connect(*producer);
 consumer-start();

 It works fine. But when I want to stop the capture, there is no way to stop
 the video4linux producer. Deleting the producer and the consumer still
 leaves the video4linux device open.

 After a few hours of struggling, I figured out that some stuff was kept in
 the cache. Adding :

 mlt_service_cache_purge( MLT_PRODUCER_SERVICE(parent) );

 This issue came back in a different way since the refactoring of 
 producer_open,
 in this commit:

 http://mltframework.org/gitweb/mlt.git?p=mltframework.org/mlt.git;a=commit;h=a0c82f0eb433e5b756e8239ebb684abc81b796d9

 When connecting the producer to an sdl_preview consumer, it works fine,
 deleting the producer and consumer closes the video4linux device.

 However, when connecting the producer to an avformat consumer, deleting
 producer and consumer leaves the device open, producer_avformat_close is
 never called. Something must remain in cache or is not deleted. The only way
 to close the video4linux device is to close MLT's factory.

 So Dan, if you have an idea about what happens here, I am listening because I
 couldn't find the exact problem...

Basically, all frames must be closed to release the reference. I will
look for it soon.

-- 
+-DRD-+

--
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
___
Mlt-devel mailing list
Mlt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlt-devel


Re: [Mlt-devel] Avformat producer not cleaning up [PATCH]

2011-06-14 Thread Maksym Veremeyenko
14.06.11 10:32, j-b-m написав(ла):
[...[
 This issue came back in a different way since the refactoring of 
 producer_open,
 in this commit:

 http://mltframework.org/gitweb/mlt.git?p=mltframework.org/mlt.git;a=commit;h=a0c82f0eb433e5b756e8239ebb684abc81b796d9

 When connecting the producer to an sdl_preview consumer, it works fine,
 deleting the producer and consumer closes the video4linux device.

 However, when connecting the producer to an avformat consumer, deleting
 producer and consumer leaves the device open, producer_avformat_close is
 never called. Something must remain in cache or is not deleted. The only way
 to close the video4linux device is to close MLT's factory.

i am not sure if it related, but running melted for some hours with 
video in loop cause *SIGSEGV*:

(5) AS-RUN U0 /B02905.dv len 375 pos 339
[dv @ 0x80d3700] Estimating duration from bitrate, this may be inaccurate
[dv @ 0x8243100] Estimating duration from bitrate, this may be inaccurate
[dv @ 0x8211660] Estimating duration from bitrate, this may be inaccurate
(5) AS-RUN U0 /B02905.dv len 375 pos 339
[dv @ 0x8243100] Estimating duration from bitrate, this may be inaccurate
[dv @ 0x820b5c0] Estimating duration from bitrate, this may be inaccurate
[dv @ 0x8220200] Estimating duration from bitrate, this may be inaccurate
[...]
(5) AS-RUN U0 /B02905.dv len 375 pos 330
[dv @ 0x117911a0] Estimating duration from bitrate, this may be inaccurate
[dv @ 0x1203cee0] Estimating duration from bitrate, this may be inaccurate
[dv @ 0x114093c0] Estimating duration from bitrate, this may be inaccurate
(5) AS-RUN U0 /B02905.dv len 375 pos 330
[dv @ 0x117911a0] Estimating duration from bitrate, this may be inaccurate
[dv @ 0x1203cee0] Estimating duration from bitrate, this may be inaccurate
[dv @ 0x142b4160] Estimating duration from bitrate, this may be inaccurate
[...]
(5) AS-RUN U0 /B02905.dv len 375 pos 327
[dv @ 0x15c1c320] Estimating duration from bitrate, this may be inaccurate
[dv @ 0x156ef1c0] Estimating duration from bitrate, this may be inaccurate

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xa2ab6b70 (LWP 9156)]
0x00f78e7e in av_find_opt () from /usr/local/enctools/lib/libavutil.so.51
Missing separate debuginfos, use: debuginfo-install 
SDL-1.2.14-10.fc14.i686 alsa-lib-1.0.24-1.fc14.i686 
bzip2-libs-1.0.6-1.fc14.1.i686 cairo-1.10.2-1.fc14.i686 
expat-2.0.1-10.fc13.i686 fontconfig-2.8.0-2.fc14.i686 
freetype-2.4.2-4.fc14.i686 gdk-pixbuf2-2.22.0-1.fc14.i686 
glib2-2.26.0-2.fc14.i686 glibc-2.13-1.i686 gsm-1.0.13-2.fc12.i686 
gtk2-2.22.0-1.fc14.1.i686 libX11-1.3.4-4.fc14.i686 
libXau-1.0.6-1.fc14.i686 libXcomposite-0.4.2-1.fc14.i686 
libXcursor-1.1.10-5.fc14.i686 libXdamage-1.1.3-1.fc14.i686 
libXext-1.1.2-2.fc14.i686 libXfixes-4.0.5-1.fc14.i686 
libXi-1.3.2-1.fc14.i686 libXinerama-1.1-2.fc13.i686 
libXrandr-1.3.0-5.fc13.i686 libXrender-0.9.6-1.fc14.i686 
libgcc-4.5.1-4.fc14.i686 libgomp-4.5.1-4.fc14.i686 
libpng-1.2.44-1.fc14.i686 libsamplerate-0.1.7-2.fc12.i686 
libselinux-2.0.96-6.fc14.1.i686 libstdc++-4.5.1-4.fc14.i686 
libtool-ltdl-2.2.10-3.fc14.i686 libxcb-1.7-1.fc14.i686 
libxml2-2.7.7-3.fc14.i686 pango-1.28.1-5.fc14.i686 
pixman-0.18.4-1.fc14.i686 sox-14.3.2-1.fc14.i686 zlib-1.2.5-2.fc14.i686
(gdb) bt
#0  0x00f78e7e in av_find_opt () from 
/usr/local/enctools/lib/libavutil.so.51
#1  0x0001 in ?? ()
(gdb)

One thing i noticed is AS-RUN reported *pos* in decremented way.

if it not related i will makes a new record in bugracker.


-- 

Maksym Veremeyenko

--
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
___
Mlt-devel mailing list
Mlt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlt-devel