Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
tried ALSA and OSS ( /dev/audio and dsp ) device names, different codecs..... with no success.
The "immediatemode=0" is required to get audio out of DVC100 - for mencoder - is there an equivalent in ffmpeg?
Quote:
immediatemode=<bool>
A value of 0 means capture and buffer audio and video together (default for MEncoder). A value of 1 (default for MPlayer) means to do video capture only and let the audio go through a loopback cable from the TV card to the sound card.
ffmpeg latest git version: N-42170-g71e5a14 - tested also with 4-5 other, older versions incl 0.10.2
Not being too familiar with the DVC100 and it's peculiarities, I'm curious which actual sound devices *are* available on your system. Looking at the rc script for alsasound, I noted the following section:
So, do you have any devices at /dev/sound/* or /dev/snd/*? One of those may be the input point you need to use. But, from my experience, if ffmpeg is given an audio stream, it should put it into the output file unless you specifically say otherwise. (Another thought might be the "-newaudio" option for 'ffmpeg'?)
mencoder with options:
forceaudio : forces audio if v4l2 does not report any audio devices
and immediatemode
makes possible to capture audio with no problem.... from many pieces of hardware including the pinnacle 100
if I use ffmpeg, to capture just audio, from alsa or oss devices, it shows the right parameters for the input stream, but there is no sound:
That should grab *any* active ALSA-enabled audio stream from the DVC100 connection. And, if it works, the output should show you where the stream is coming from exactly. I got that idea from ffplay:
Quote:
Originally Posted by The ffplay man page
Code:
alsa
ALSA (Advanced Linux Sound Architecture) input device.
To enable this input device during configuration you need libasound installed on your system.
This device allows capturing from an ALSA device. The name of the device to capture has to be an ALSA card identifier.
An ALSA identifier has the syntax:
hw:<CARD>[,<DEV>[,<SUBDEV>]]
where the DEV and SUBDEV components are optional.
The three arguments (in order: CARD,DEV,SUBDEV) specify card number or identifier, device number and subdevice number (-1 means any).
I created a fifo: "bridge" and it is being fed with mencoder's output ( a simple copy for A/V ), the other side of fifo is read by ffmpeg, encoded and saved to aaa.mp4.
what a wild process... I am not calling this a "solution", just curious if this is going to work with ffserver - it should if the output will be the server's http....
Then what about trying each point that ALSA sees from the DVC100 as a sound device, starting with the obvious ones? I find it hard to believe that ffmpeg can't grab the audio from this thing, but I *can easily* believe that it might take a weird "little trick" to get it. So, with that in mind, how about trying the following?
no go...
ALSA lib pcm.c:2212snd_pcm_open_noupdate) Unknown PCM /dev/snd/by-id/usb-Pinnacle_Systems_GmbH_DVC100-01
[alsa @ 0x24fa160] cannot open audio device /dev/snd/by-id/usb-Pinnacle_Systems_GmbH_DVC100-01 (No such file or directory)
/dev/snd/by-id/usb-Pinnacle_Systems_GmbH_DVC100-01: Input/output error
The mencoder / ffmpeg duo fails due to buffer underrun ( most likely ) when both are connected via FIFO.
I found this: http://linux.die.net/man/1/bfr
it pre-buffers result from mencoder and pushes the data to ffmpeg, which then connects to ffserver:
so far I can get about 4 minutes of "live" A/V content via VLC player - than everything just stops with no err - probably another underrun or broken pipe.
Now, unless something got twisted around in the ALSA startup, that *should* be the Audigy card, but I'm thinking of thoroughness at this point of testing.
And, another thought occurs to me: Have you checked via alsamixer whether or not the input line from the DVC100 is actually playing and not muted? I *just* thought of that, so if that is the case, don't feel bad. But, it occurred to me that, by default, ALSA will mute any lines on startup that it doesn't directly recognize as being part of the standard configuration by it's saved state.
HTH. Let us know.
Last edited by ShadowCat8; 07-09-2012 at 12:42 PM.
This is the fourth day I am trying to find what is causing ffmpeg not to be able to capture audio from Pinnacle - v4l2...
mencoder has no issues, but I >>need<< to use ffmpeg along with ffserver
Although I could pipe output from mencoder to ffmpeg to ffserver via FIFO or 'bfr', but too much overhead, buffer underruns, etc....
Finally I ran 'v4lctl list' and I found out, that it is.... MUTED by default.
Code:
# v4lctl list
attribute | type | current | default | comment
-----------+--------+---------+---------+-------------------------------------
norm | choice | PAL-DK | NTSC | NTSC NTSC-M NTSC-M-JP NTSC-M-KR NTSC-443 PAL PAL-BG PAL-H PAL-I PAL-DK PAL-M PAL-N PAL-Nc PAL-60 SECAM SECAM-B SECAM-G SECAM-H SECAM-DK SECAM-L SECAM-Lc
input | choice | Composi | Composi | Composite1 S-Video
bright | int | 128 | 128 | range is 0 => 255
contrast | int | 64 | 64 | range is 0 => 127
color | int | 64 | 64 | range is 0 => 127
hue | int | 0 | 0 | range is -128 => 127
volume | int | 31 | 31 | range is 0 => 31
mute | bool | on | on |
Chroma AGC | bool | on | on |
It was not my suspicion, since:
1> alsamixer did not show MUTE, level was good
2> mencoder was able to capture without any problems, every time....
3> ffmpeg was able to capture audio ONLY if I did not include v4l2 to also get the video..... once v4l2 specified I had to re-initialize pinnacle or reboot the box ( I do it only when changing hardware or testing a kernel... and in a few other more or less odd situations, like this )
after running
# v4lctl volume mute off
ffmpeg started capturing audio and video...
Is there any way, to send a v4l2 cmd as a ffmpeg argument - similar to what mencoder does with forceaudio and immediatemode=0 or similar to 'v4lctl volume mute off' ?
Thank you for all your suggestions, input, your kindness, for being helpful!
Mike
ps: I cannot believe that this took me 4 days... it "sounds" like a bad joke
EDIT:
funny, I submitted this post before reading yours to the end... ShadowCat8.. and you did mention MUTE
Last edited by paziulek; 07-09-2012 at 07:22 PM.
Reason: EDIT
I am suffering from the same problem, it's just that in my case it's the NVidia soundcard that seems to be muted.
I would like to give a try and check following your method but I am a Linux newbie and I am not familiar with commands.
Could you pls help me as to what commands to be used to get the list to see if my soundcard (or the front mic I am trying to use) is actually muted?
Also the unmuting command would help.
The strange thing about the muting is that using mplayer to watch the video input will give me sound, while the recording with ffmpeg still does not have the sound.
This is how I check for the muting: I use a utility from video-for-linux (v4l). I call it like this from the command line:
v4l2ucp &
It gives me a GUI, where I can uncheck the mute.
I need to install this - the package is called v4l2ucp (Version 2.0.2-3) in my distro.
I keep this GUI open during my recording sessions. However, sometimes when I start a new recording, again there is no sound,
while the GUI still claims the sound is unmuted. In that case, I first mute and the unmute in the GUI (so basically click the "mute" box two times). This has worked fine until now - I'm tranferring old Hi8 und Digital8 tapes to my harddisk, and after the help here I have now successfully archived 20+ tapes before Xmas.
Note also that recording with ffmpeg only works if I watched video input using mplayer - not sure why it is like that, I think this will set the video input to S-Video.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.