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.
Hello dear LinuxQuestions community, I'm a delightful arch linux user and recently I wanted to do a recording with ffmpeg. I compiled x264 from git and then compiled ffmpeg from git with libx264 support. After I was done with compiling I tried to record something with this command:
The outcome was somehow disappointing though. I had no audio, the video on the other hand was perfectly fine. I've been searching ever since ffmpeg refused to record my audio for a solution. I found many, but none of them worked (except one that didn't involve ffmpeg, more to that in a minute). Before we start, I want to point out that this thread is kinda a repost from the arch linux forum, I reposted it here, because nobody was answering me there. Here's the link: ffmpeg records no sound
-------------------------------------------------------------------------------------------------------
I only have alsa, no PulseAudio or OSS stuff.
I've been trying everything I managed to find through google but nothing seems to work. General sound output works, I can listen to music and do all my stuff like I'm used to, I just can't get ffmpeg to record my sound.
Here are logs from aplay and arecord:
Code:
aplay -L
Quote:
null
Discard all samples (playback) or generate zero samples (capture)
default:CARD=PCH
HDA Intel PCH, ALC898 Analog
Default Audio Device
sysdefault:CARD=PCH
HDA Intel PCH, ALC898 Analog
Default Audio Device
front:CARD=PCH,DEV=0
HDA Intel PCH, ALC898 Analog
Front speakers
surround40:CARD=PCH,DEV=0
HDA Intel PCH, ALC898 Analog
4.0 Surround output to Front and Rear speakers
surround41:CARD=PCH,DEV=0
HDA Intel PCH, ALC898 Analog
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=PCH,DEV=0
HDA Intel PCH, ALC898 Analog
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=PCH,DEV=0
HDA Intel PCH, ALC898 Analog
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=PCH,DEV=0
HDA Intel PCH, ALC898 Analog
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=PCH,DEV=0
HDA Intel PCH, ALC898 Digital
IEC958 (S/PDIF) Digital Audio Output
I tried using -i default, -i sysdefault and -i plughw:0,0 instead of -i hw:0,0. I also tried various hw:0,1 etc. combinations, because I was fustrated and didn't know how to continue. I also tried recording only the sound, without the video, but nothing works at all. Only the video runs perfectly fine.
-------------------------------------------------------------------------------------------------------
Recording sound directly while playing something works with the following .asoundrc script:
Quote:
pcm.!default
{
type file
slave.pcm
{
type plug
slave.pcm
{
type hw
card 0
device 0
subdevice -1
}
}
file /dev/shm/audio.raw
format raw
}
I then convert the raw file with ffmpeg from RAM. This is extremely annoying though, because the audio file isn't synced to the video. But IT WORKS. I want a solution with ffmpeg though, I have gathered more information, if somebody is interested:
Is there any way to add Item 'IEC958 Default PCM' to numid=28,iface=MIXER,name='Input Source'? I tried recording from 'Line' but it doesn't work.
Am I doing something wrong? I'm still digging mad for a solution, and only the .asoundrc script works this far.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.