Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place. |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
|
05-04-2015, 12:55 PM
|
#1
|
Member
Registered: Dec 2007
Location: FL, USA
Distribution: CentOS 5.3, Ubuntu 9.04
Posts: 245
Rep:
|
how to capture video and audio with vlc of desktop sessions
I'm capturing my video desktop recording sessions using vlc, but I'm unable to capture any audio, does anyone know how to capture audio along with video in vlc?
|
|
|
05-04-2015, 02:15 PM
|
#2
|
LQ Newbie
Registered: Apr 2015
Posts: 25
Rep:
|
Surprisingly, vlc can't capture audio as I've tried in the past. I use ffmpeg to do screen captures with audio and video.
Code:
ffmpeg -threads 4 -f x11grab -framerate 29.970 -video_size 1280x1024 -i :0.0+0,0 -f alsa -ac 1 -i hw:0,0 -pix_fmt yuv420p -c:v mpeg4 -c:a libmp3lame -q:v 3 outputfile.mkv
Replace items in blue to reflect your situation. Use xwininfo to get info on your desktop screen or a window area and note the geometry and corners values to use with the code above.
If using pulse audio, replace -f alsa hw:0,0 with -f pulse -i pulse
replace 29.970 with your desire framerate
The -q:v is the video quality. A value between 1 and 5 is best.
Replace outputfile.mkv with your desire output name
Do a test run like 15 or 30 seconds of a screen capture of your desktop and see the result.
|
|
|
05-04-2015, 02:52 PM
|
#3
|
Senior Member
Registered: Jan 2007
Location: Wild West Wales, UK
Distribution: Linux Mint 22 MATE, Peppermint OS-Devuan, EndeavourOS
Posts: 4,252
|
mia tech,
SimpleScreenRecorder works very well as an alternative to VLC and the audio is fine.
Code:
sudo add-apt-repository ppa:maarten-baert/simplescreenrecorder
sudo apt-get update && sudo apt-get install simplescreenrecorder
http://www.omgubuntu.co.uk/2013/12/s...recorder-linux
|
|
|
05-04-2015, 04:20 PM
|
#4
|
Member
Registered: Dec 2007
Location: FL, USA
Distribution: CentOS 5.3, Ubuntu 9.04
Posts: 245
Original Poster
Rep:
|
Quote:
Originally Posted by davidvNY
Surprisingly, vlc can't capture audio as I've tried in the past. I use ffmpeg to do screen captures with audio and video.
Code:
ffmpeg -threads 4 -f x11grab -framerate 29.970 -video_size 1280x1024 -i :0.0+0,0 -f alsa -ac 1 -i hw:0,0 -pix_fmt yuv420p -c:v mpeg4 -c:a libmp3lame -q:v 3 outputfile.mkv
is there a way to specify the audio input device? since I got several hooked up the computer (webcam, headphoe w/ microphone)
Replace items in blue to reflect your situation. Use xwininfo to get info on your desktop screen or a window area and note the geometry and corners values to use with the code above.
If using pulse audio, replace -f alsa hw:0,0 with -f pulse -i pulse
replace 29.970 with your desire framerate
The -q:v is the video quality. A value between 1 and 5 is best.
Replace outputfile.mkv with your desire output name
Do a test run like 15 or 30 seconds of a screen capture of your desktop and see the result.
|
Thanks, I will give it try, I've always used recordMydesktop, but it hugs a lot of resources, and since I started using vlc, I get better performance. Like you said, the only drawback is that it doesn't record audio. So I'll give ffmpeg a try...
Last edited by mia_tech; 05-04-2015 at 04:24 PM.
|
|
|
05-04-2015, 05:13 PM
|
#5
|
LQ Newbie
Registered: Apr 2015
Posts: 25
Rep:
|
Quote:
Originally Posted by mia_tech
is there a way to specify the audio input device? since I got several hooked up the computer (webcam, headphoe w/ microphone)
|
If you're using pulse, I'm not sure on how to map to those devices. But, with alsa, you can run this command.
aplay -l
that's a lowercase l
or
aplay -L
The address format is hw:X,Y
X = card number, Y = DEV number
You might have to experiment with the values to get the right audio device.
PS: If you want to capture audio from all sources, you can setup your mixer to capture from the Mix channel or the Capture channel.
Last edited by davidvNY; 05-04-2015 at 05:23 PM.
|
|
|
05-05-2015, 02:54 PM
|
#6
|
LQ Newbie
Registered: Apr 2015
Posts: 25
Rep:
|
Quote:
Originally Posted by mia_tech
Thanks, I will give it try, I've always used recordMydesktop, but it hugs a lot of resources, and since I started using vlc, I get better performance. Like you said, the only drawback is that it doesn't record audio. So I'll give ffmpeg a try...
|
There is another screen capture program called vokoscreen. It's more intuitive and straight forward to use. Not sure on how much resources it takes, maybe you can give it a try. It's available in the Mint repos, so it should be available in most debian/ubuntu derivatives and some other linux distros.
|
|
|
All times are GMT -5. The time now is 09:34 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|