Public bug reported:

Binary package hint: mencoder

I am using the following command to record a television program for
later viewing:

mencoder dvb://CWTV-HD -cache 8192 -of mpeg -oac copy -ovc copy -endpos
3720 -o /home/jeremy/shows/Smallville/CWTV-HD-2008-05-08-18:59:01.mpeg

After about 30 minutes of this, my system is using quite a bit of
memory:

$ free -m
             total       used       free     shared    buffers     cached
Mem:          3033       2913        119          0          6        835
-/+ buffers/cache:       2071        961
Swap:         3773       1421       2351

When I look at top, and sort by memory usage, I see this line:

29911 jeremy    20   0 2715m 1.6g  10m S    2 54.1   0:46.42 mencoder

As top refreshes, the virtual and RSS memory numbers continue to grow.
My system begins to feel sluggish and things start to crawl,  then once
mencoder exceeds 3072MB (or 3GB) memory, it crashes, which usually
happens about 30-40 minutes into the program I was recording.  (Log
attached)

I am logging the output from mencoder to a file, as well as the output
from top (using the command:   top -c -b -d 10 -p 29911 >
mencoder.memlog), which I will attach to this bugreport.

As a background, let me explain why I'm doing this:  I'm in the United
States (Texas), and the VDR package does not support ATSC used in North
American broadcast television.  All I have is an antenna so I really
don't have much choice.  MythTV doesn't support my card according to
their website.  (It's a Hauppauge HVR-1800).  I can play video just fine
from the card using mplayer, and mencoders works just fine about 50% of
the time, never going above 18MB of memory when it's working fine.  The
other 50% of time time it hits it's 3GB limit and crashes.

Now, let me explain the command line options.  I added the -cache to see
if it would help with this problem (it didn't have any effect).  I added
the -of mpeg for two reasons:  1.)  I wanted to see if it would help the
problem (it didn't) and 2.) I wanted to be able to watch the streams as
they were recording and be able to seek forward over the commercials
(Like a DVR), and the MPEG container lets me do that, while the AVI
container will not let you seek unless you wait for the recording to
finish.  I'm not doing any encoding here (as evidenced by "-oac copy
-ovc copy") so I don't see why it would use so much memory.  All it
needs to do is copy the data from the card to a file, simple, no
encoding.  I ran the -exact- command (well, different timestamp on the
filename) about an hour or so earlier, and it ran fine recording the
whole hour without ever going above 18 MB memory.

I'd love a workaround if anyone can provide one.  I have no emotional
attachment to mencoder and will gladly use any tool that allows me to
record DVB streams (and hopefully let me watch while recording, letting
me fast forward/rewind).  I've seen several forums recommend dvbstream,
but I've yet to see one person explain what all the parameters mean that
are passed into it, and they aren't documented.

Thanks,
-Jeremy

** Affects: mplayer (Ubuntu)
     Importance: Undecided
         Status: New

-- 
Memory leak in mencoder when copying data from dvb stream to file (no encoding)
https://bugs.launchpad.net/bugs/228488
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to