[pulseaudio-discuss] How to get mencoder to use, pulseaudio in capturing audio?
Miroslav Rovis
m.rovis at inet.hr
Sat Nov 10 14:08:21 PST 2012
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 10/11/12 09:47, Raymond Yau <superquad.vortex2 at gmail.com> wrote:
>>>
>>> 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!
>>
>>>
>>
>
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)
>
> afaik, pulseaudio does not use capture device 2 of your hda
> realtek
alc88x
> for capturing as pulseaudio does not sopport multi streaming
> capture
I don't fully understand this. I'm currently unwell, and urge myself
to reply because I promised. Sorry.
But I see that you must be right.
> did you select the "line in" in correct "input source" control
> ,the
capture
> volume and unmute capture switch of device 2
I did look up these with alsamixer, and they weren't muted.
Even then though, I remember not being in the clear about which is
which and why they behaved and not behaved like they did. I can not go
into it at this time. Am unwell.
There is sense in my replyint to your query even limitedly like I am
doing, because my problem is solved. Read on, pls.
> Simple mixer control 'Capture',0 Capabilities: cvolume cswitch
> penum Capture channels: Front Left - Front Right Limits: Capture 0
> - 46 Front Left: Capture 16 [35%] [0.00dB] [on] Front Right:
> Capture 16 [35%] [0.00dB] [on] Simple mixer control 'Capture',1
> Capabilities: cvolume cswitch penum Capture channels: Front Left -
> Front Right Limits: Capture 0 - 46 Front Left: Capture 0 [0%]
> [-16.00dB] [off] Front Right: Capture 0 [0%] [-16.00dB] [off]
>
> Simple mixer control 'Input Source',0 Capabilities: cenum Items:
> 'Rear Mic' 'Front Mic' 'Line' Item0: 'Front Mic' Simple mixer
> control 'Input Source',1 Capabilities: cenum Items: 'Rear Mic'
> 'Front Mic' 'Line' Item0: 'Rear Mic'
>
> arecord -l **** List of CAPTURE Hardware Devices ****
>
>> shm_open() failed: Permission denied
>
> you have a customised asoundrc which use shm
>
> card 0: SB [HDA ATI SB], device 0: ALC892 Analog [ALC892 Analog]
> Subdevices: 0/1 Subdevice #0: subdevice #0 card 0: SB [HDA ATI SB],
> device 2: ALC892 Analog [ALC892 Analog] Subdevices: 1/1 Subdevice
> #0: subdevice #0 card 2: CX8811 [Conexant CX8811], device 0: CX88
> Digital [CX88 Digital] Subdevices: 0/1 Subdevice #0: subdevice #0
I will look into these when I get better. Also, as my work was
suffering for my inability to record the shows that people are still
waiting for, I'll first post those shows on my channels, God willing.
Then I'll be back... it might be days, and only if I don't grow even
worse in health than I am at this time... Pls. allow time.
But here is how the issue is solved, even without my figuring out
which channel is which and how they work.
My mencoder profiles that work even if I don't issue:
$ arecord -Ddefault > /dev/null
in a terminal (I use konsole which I hold dear since the times of the
true German SuSE, which has become something completely non-German now
and is of those corporate linuces that I feel GNU sadnesss for)
and fire up in another terminal (konsole actually):
$ mencoder tv:// -profile mpeg4_capt_pulse -profile mpeg4_capt_MP3 -o
Compo_`date +C%m%d_%H%M`.avi
(again, that works even if I don't fire up the above line of arecord ...)
And it works, to repeat the start of the sentence with these mencoder
profiles:
$ cat ~/.mplayer/mencoder.conf
...[snip]...
[mpeg4_capt_pulse]
profile-desc="mpeg4 capture"
tv=input=1:driver=v4l2:device=/dev/video0:normid=3:input=1:alsa=1:adevice=default:audiorate=48000:amode=1:width=768:height=576
ovc=lavc=1
#nosound=1
lavcopts=vcodec=mpeg4:autoaspect=1:vqscale=4:vb_strategy=1:vmax_b_frames=2:mbd=0:turbo=1
vf=softskip,harddup
mc=0
[mpeg4_capt_MP3]
profile=mpeg4_capt_MP3
oac=mp3lame=1
lameopts=cbr=1:preset=standard
...[snip]...
So, it is obvious now why I allowed myself to not spend time on more
in-depth consideration of the channels.
The profile mpeg4_capt_MP3 is the same and unchanged as before.
The line, before, previous, the command line that didn't work and
which didn't capture audio, was:
$ mencoder tv:// -profile mpeg4_capt -profile mpeg4_capt_MP3 -o
Compo_`date +C%m%d_%H%M`.avi
Now the line is
$ mencoder tv:// -profile mpeg4_capt_pulse -profile mpeg4_capt_MP3 -o
Compo_`date +C%m%d_%H%M`.avi
So the difference is only in the first of the two profiles in the line:
mpeg4_capt
changed into:
mpeg4_capt_pulse
You build you further looking into channels on the currently
abbandoned for use profile, because it did not work. I'll call it
no-sound profile and I'll call the other, the working profile
captures-sound profile
The no-sound profile has:
alsa=1:adevice=hw.0,2:audiorate=48000:amode=1
and that entire string is substituted in the captures-sound profile with:
alsa=1:adevice=default:audiorate=48000:amode=1
Even more sinply: the sole difference btwn the no-sound profile and
captures-sound profile is just:
no-sound profile: adevice=hw.0,2
captures-sound profile: adevice=default
(That is the exact change that Tanu suggested would work, as it did,
and I feel really honored to have had my issue addressed by on the the
developers of a program of such versatility and innovativness! A
Commons program, not one that makes a few people rich and widens the
gap like Windoze's or Mac's, even if you fo "philantropist" after you
bloated on legal pillage of everybody like Billy the Gates and his
Gang... Arpi of Mplayer's fame is also my hero...)
Of course, I have selected Line-in in tab "Input Devices", and if need
be (can't check now, really putting some effort to write these lines)
(and evendeselect other channels in tab "Configuration") :
all of that in pavucontrol, which is always open in my Gentoo GNU Linux.
And I did just check to make adamant certain the difference btwn
no-sound profile and captures-sound profile!
I'll try and remember to make a better viewable video than the one I
warned about it clumsiness in my ffmpeg post of yesteray's or the day
before. I'll try and do it, but I do first need to recover.
Let's work for peace, people. And also keeping Linux as faithfully GNU
as possible is working for peace, because all the work for the Commons
is also the work for peace, just like the banksters' fraud because of
which tens of millions in my Europe, and hundred of millions worldwide
is crime against humanity!
God bless you all, and for those who understand this last wish
vaguely, may the Good and the Peace and the Justice and the Desire for
everyone's benefit be with you all!
Miroslav Rovis,
Zagreb, Croatia
miro.rovis at gmail.com
m.rovis at inet.hr
+385 1 660 2633
+385 91 266 0202
http://www.CroatiaFidelis.hr
http://www.exDeo.com
http://groups.google.com/group/croatian-news/
http://www.youtube.com/user/miroR2
Pls. allow for later corrections. I died typing (joking a little)...
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/
iEYEARECAAYFAlCe0FQACgkQ5NaGZVDan0pyPwCgqknSg/d+kqNzMi06TQMsKHAb
FvcAoKcUKWsW6Y44ZYXVjrChNDB92Yyr
=3ARw
-----END PGP SIGNATURE-----
More information about the pulseaudio-discuss
mailing list