[pulseaudio-discuss] How to get mencoder to use, pulseaudio in capturing audio?

Miroslav Rovis m.rovis at inet.hr
Fri Nov 9 06:39:46 PST 2012


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 09/11/12 09:40, Tanu Kaskinen wrote:
> On Fri, 2012-11-09 at 03:02 +0100, Miroslav Rovis wrote:
>> Would there be any help from you guys in the issue that I
>> haven't solve and have trouble with for a week or so...
> 
> To make sure that I have understood the problem correctly, I'll try
> to summarize it here: You have been happily capturing video and
> audio from a video capture card for some time now. The audio
> capture has been done by connecting the video capture card's audio
> output to a sound card's line-in using a physical loopback cable.
> The audio capturing has been done so far with direct alsa access
> without pulseaudio in the middle. This has been working fine, until
> recently it just stopped working.

You did understand the problem perfectly.

> What are the symptoms of the breakage? Do you get silence instead
> of real audio, or does mencoder refuse to do anything at all? Do
> you get any error messages from mencoder?

No error messages by mencoder, just recording silence!

>> Pls, so I don't have to explain all over, could someone take a
gander at:
>> 
>> 
http://lists.mplayerhq.hu/pipermail/mencoder-users/2012-November/013229.html
>> 
>> Just to get you in the right mode (hopefully), I will copy a
>> line
or two:
>> 
>> ... My question is:
>> 
>> how do I either:
>> 
>> 1) configure mencoder to capture pulseaudio just like ffmpeg
>> does
> 
> While it would probably be better to figure out why capturing from
> alsa has suddenly stopped working,

I could go and post, actually I already did, on alsa mailing list:

http://sourceforge.net/mailarchive/forum.php?thread_name=509334CB.2060402%40inet.hr&forum_name=alsa-user

so I'll probably try and give them another poke, now that you seem to
get us (it's not going to be only me who will benefit) the solution
coming...

EDIT (later edit): No need. Other than inform them and all the lists
(mencoder, ffmpeg lists,

and Gentoo forums
- -- where I seem to be starting to be censored as well:

https://www.youtube.com/watch?v=JExAwgsUuLo
, "Screen 2012_11_03, my posts on Gentoo forums",

mostly for the following post, someone get that thread archived
somewhere!:

http://forums.gentoo.org/viewtopic-t-905472.html ,
"System attacked, Konqueror went on window-popping spree!",

which is about NSA, USA's secret services' institution,

getting a hold in GNU Linux,

get me serious folks, please!

Because GNU Linux is sacred and if the Gentoo Linux, which is still
just about the best there is in free software, goes to the "ruling
elite", because it's not about the USA's people, but about the shadow
rulers, we, the good of the World, have lost a lot!)

But I was only saying how I will inform all the lists that I sought
help at, that the issue is solved.

> capturing from pulseaudio should be possible too.
> 
> I'm looking at the mencoder man page at 
> http://www.mplayerhq.hu/DOCS/man/en/mplayer.1.html

I did search "man mencoder" for pulse, and there're currently options
only for mplayer, not mencoder (one and the same man for both mplayer
and mencoder it is)

> Currently you seem to configure audio capturing using the "tv"
> option:
> 
> 
tv=input=1:driver=v4l2:device=/dev/video0:normid=3:input=1:alsa=1:adevice=hw.0,2:audiorate=48000:amode=1:width=768:height=576
> 
> The audio specific parts are: alsa=1 (use alsa) adevice=hw.0,2 (use
> direct hardware access with device 2 of card 0) audiorate=48000
> (audio sample rate) amode=1 (stereo)
> 
> The documentation for the "tv" option doesn't say anything about 
> pulseaudio, so direct support for pulseaudio in mencoder doesn't
> seem to exist.

At this time. I bet it'll be forthcoming.

> Pulseaudio can be accessed through the alsa interface, however.

I'm now following your instructions below.

> Most distributions configure the "default" alsa device to use 
> pulseaudio. To check whether this is configured on your machine,
> you can do this:
> 
> arecord -Ddefault > /dev/null

Command issued.

> That will make arecord capture from the alsa device named "default"
> and direct the output to /dev/null. While the command is running,
> open pavucontrol

pavucontrol is open here all the time anyway.

> and see if the capture stream is visible in the "Recording" tab.

the Recording tab shows that the recording is going on.

> The stream should be listed as "ALSA plug-in [aplay]: ALSA 
> Capture". For reference, that string is generated by the alsa
> plugin that acts as the bridge between the alsa application and
> pulseaudio. It says "aplay" instead of "arecord", because arecord
> is actually a symlink to aplay.

All verified here. Thanks for the effort.

> If you don't see the arecord stream in pavucontrol, that needs to
> be fixed. I'll assume in this mail that it works, however.

It does.

> If arecord can capture from the "default" device, mencoder should
> be able to do it too. So, change the "adevice" option from "hw.0,2"
> to "default". With luck, this is all you have to do.

I'm trying literal substituting of the above.

Yes, the audio is captured again!

> There may be multiple capture sources in pulseaudio. If the device
> that the mencoder capture stream is routed to is wrong, you can
> change it with pavucontrol in the "Recording" tab.

Yes, the interface offers it.

> Also the right port (line-in) needs to be selected in the "Input
> Devices" tab (I see you're already familiar with this, you're
> changing the port in the youtube video).

Thanks. Sorry for the messy video, though. (Let me just tell here...

how curious I am what will the familiar secret services in Croatia,
called UDBA from the communist and into this neocommunist time;

our killers' children are ruling us in Croatia,

in short, worldwide, only Hitler's crew crimes are remembered, the
greater crimes, like Stalin's and Croat's traitor Tito's who was as
bloody as Stalin, who was bloodier yet than Hitler, are not remembered,

and not to mention that the most heinous crime is the US's on
Hiroshima and Nagasaki, because Japan has already surrendered in effect...

So let me just tell here how curious I am how many views is that video
going to get, because one of the means they use for censorship, and
the profiteer Youtube couldn't care less to give free hand to small
very well camouflaged stalinist-in-their-core governments to bash
small truth-video-makers like me...

So let me just tell here how curious I am how many views is that video
going to get (sometimes they do the opposite to be able to hide
censorship on other videos).

But I was saying: Thanks. Sorry for the messy video, again.

>> 2) get mencoder to capture audio from my Line-in in come other
>> way
> 
> I guess this is off-topic for this mailing list.
> 

It sure is!

If anybody needs it, tell me, I can make a video howto.

Since Tanu Kaskinen helped me, and Tanu thank you so much, I'll put
other things off, and do it.

The issue has been solved!

Miroslav Rovis
m.rovis at inet.hr
miro.rovis at gmail.com
01 660 2633
091 266 0202
#=== I was sentenced to four months jail: ===#
http://www.croatiafidelis.hr/Miroslav_Rovis_politicki_progon/
#=== by rigged Croatian Courts! ===#
#=== no English yet, unfortunately on that page, though ===#
http://www.exDeo.com #some English here
http://groups.google.com/group/croatian-news/ #some rare topics in
English here
http://www.youtube.com/user/miroR2 #some English here
http://vimeo.com/user9621785 #some English here
http://creativecommons.org/licenses/by-nc-sa/3.0/

Pls. look up possible follow-ups if things appear inconsistent. Also
because the matter need not wait and beg for the audience to allow me
for later corrections of possible typoes.
OTOH, if censorship grows blatant and my mail is not let through, I
will have to try other channels. God bless the Anonymous!

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iEYEARECAAYFAlCdFbAACgkQ5NaGZVDan0qiLgCfc1DmBDczyPt47u6QISwCoa35
cb0AoI1eucl2S37t6Adk5iArT+D61uQD
=AfeV
-----END PGP SIGNATURE-----


More information about the pulseaudio-discuss mailing list