Jump to content

mencoder records in bursts [solved]


theYinYeti
 Share

Recommended Posts

[EDIT: Sorry, I just tried uploading.com for the first time; it is awful! Do you know of a better alternative?]

 

I moved the TV capture card from “salon†to “sedentaireâ€. And I kept the same recording method (same command line). Basically, here's what I do:

mencoder tv:// -tv driver=v4l2:device=/dev/video0:input=1:width=384:height=576:fps=25:norm=PAL:normid=5:audiorate=48000:alsa=1:amode=1:immediatemode=0 -aspect 4/3 -ofps 25 -oac copy -ovc lavc -lavcopts vcodec=mjpeg:vqscale=2:aspect=4/3 -o test.avi

This command-line is so far tailored to the limited power of “salonâ€, but before changing it for the more powerful “sedentaireâ€, I'd like to achieve using it as is. But the result I get is this:

http://uploading.com/files/UWVCEZY1/test.avi.html

 

I can't see what's wrong. All I know is this:

 

If I look at the TV like this:

mplayer tv:// -tv driver=v4l2:device=/dev/video0:input=1:width=384:height=576:fps=25:norm=PAL:normid=5:audiorate=48000:alsa=1:amode=1:immediatemode=0 -aspect 4/3

I get the exact same behaviour. And the standard output spits loads of:

video buffer full - dropping frame

 

video buffer full - dropping frame

 

video buffer full - dropping frame

A: 2.6 V: 2.6 A-V: 0.069 ct: 0.000 12/ 12 0% 0% 0.0% 0 0

video buffer full - dropping frame

 

video buffer full - dropping frame

 

video buffer full - dropping frame

A: 2.8 V: 2.6 A-V: 0.195 ct: 0.000 12/ 12 0% 0% 0.0% 0 0

video buffer full - dropping frame

A: 2.9 V: 2.7 A-V: 0.250 ct: 0.000 14/ 14 0% 0% 0.0% 0 0

video buffer full - dropping frame

 

video buffer full - dropping frame

 

If, on the other hand, I change the immediatemode to 1, then playback is OK, but immediatemode to 1 is not suitable for recording…

What can I do? The only differences (apart from the difference in processing power) I can see are those: “sedentaire†is dual-core and uses PulseAudio, while “salon†is mono-core and alsa only.

 

Also note that I did manage to use mencoder on “sedentaire†a while back (Mdv 2007.1 or 2008, I don't remember). So, an idea?

 

Yves.

Edited by theYinYeti
Link to comment
Share on other sites

I would suggest to disable Pulseaudio and try without it.

 

I haven't yet found any reason why to use pulseaudio, it has only given me problems so far with no conceiveable benefit, therefore I always disable it immediately on any new install.

Link to comment
Share on other sites

Recording with PulseAudio disabled does not help.

I will however run all further tests without PulseAudio, and then enable it back when I have something working (I use a lot the possibility to swith off sound for a single application).

 

So back to square one: what could make mencoder fail even without pulseaudio?

 

Yves.

Link to comment
Share on other sites

So… It took me longer than I thought, but I did test your suggestion, Greg2, and… it works :)

 

Still, there is something strange with Mandriva 2009 (and now 2009.1).

I first tried buffersize=50, and then 100, and then 1000. But although the result was immediately better, there were still skipped framed as well as duplicate frames, more than I'm used to. Then I tried buffersize=0, which told me the minimum was 16, so I tried buffersize=16 and the result was the same. I changed the channel on the TV modem (or whatever it is called: ADSL TV box), and then there were less skipped/duplicate frames.

 

What is strange is this: if the result is good enough (no “video buffer fullâ€) with buffersize's value all the way from 16 (minimum) to 1000 MB (half my RAM), then what could possibly be the default value for mencoder to fail without this option?

 

One more thing: if I try and use v4lctl to control /dev/video0, I get the message “no grabber device available†and failure of course. Similarly, I get an error if I try and use ffmpeg directly! Only mencoder seems to be able to get something out of the card, where previously almost any tool could.

 

By the way, wether PulseAudio is enabled or not seems not to make any difference, and I'm glad it is so because I like this tool more and more.

 

Yves.

Link to comment
Share on other sites

By the way, wether PulseAudio is enabled or not seems not to make any difference, and I'm glad it is so because I like this tool more and more.

 

Yves.

 

Interesting that you say so, as I have never found a benefit from using pulseaudio (or arts or esd), as alsa has been directly supporting multiple concurrent sound applications outputing sound for quite a while already.

The only sound server that I find useful is Jack, but that's primarily for music production software (rosegarden, soft-synths, etc...)

 

Could you explain why you like pulseaudio so much?

(I'm not trying to be polemic, I'm just genuinely curious what pulseaudio could be good for)

 

With regards to the mencoder issue, maybe it could be worth filing a bug report to mandriva, or try to compile the latest svn source directly yourself and see if the problem is still there (it probably is more a kernel or driver issue though, if you say ffmpeg is affected too).

Edited by tux99
Link to comment
Share on other sites

For some background, let me say that I, too, was never keen on using a sound server such as esd or arts. These always gave me problems, and gave nothing in return (as you say, alsa is enough by itself for earing multiple sources). Besides, I've never wanted to listen to multiple sources at the same time, up to recently. All in all, sound servers appeared to me as a waste of precious resources.

 

And then three things happened:

— I moved and the PC is now in the living room (I moved to a smaller place);

— I changed the hardware from a PII350 with 384MB RAM to a Dual-Core with 2GB RAM;

— I upgraded to Mandriva 2009.0.

 

I discovered PulseAudio with Mandriva 2009.0, and I was lucky enough not to have problems with it, as I know many others did.

With this version, I already saw two benefits with the PulseAudio-related control panels:

 

I can easily (GUI) (un)mute any single application with the provided panel. This is handy when I listen to a conference on Internet for example, and don't want to be disturbed by the sounds of the game I play in the meantime when things being said aren't that much interesting; or to quickly switch the sound off without interrupting the game when the telephone is ringing.

 

And also, there's a slider for each application playing sound, so that I can choose each playback level. I use this for example when I play music from Internet for the whole room to enjoy, but still wish to have some feedback sound from my game, though at a faint level I'm the only one taking notice of.

 

Now I upgraded to 2009.1 (cooker) and I also start recording TV/tapes.

 

With this version, there's the additionnal benefit of seeing in real-time, alongside the sliders, a vu-meter (right word? ie: sound level) for sound playback (so I can see applications that are currently actually outputting sound), AND for input too, so I can adjust the slider to avoid the recorded sound to saturate (too loud).

 

Well, that's all, but that's enough for me, especially now that CPU power isn't that much a problem for me any more.

 

Yves.

Link to comment
Share on other sites

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...