Dainius (GreatEmerald)
2010-12-17 23:02:40 UTC
I am trying to capture a video in which I need to have one video
stream, that is, screen capture, and two audio streams, namely system
sounds and the microphone, using OpenSUSE Linux 11.3 through the
command line. If my command line looks like this (testing with sound
only at the moment):
/usr/bin/ffmpeg \
-xerror \
-f alsa \
-ac 2 \
-i hw:1,0 \
-f alsa \
-i hw:0,0 \
-acodec pcm_s16le \
-y /home/dainius/temp/test.wav
Only the first stream gets recorded. It reports that both streams are
being captured, but only the first one is being recorded and output to
file:
[alsa @ 0x6376d0] Estimating duration from bitrate, this may be inaccurate
Input #0, alsa, from 'hw:1,0':
Duration: N/A, start: 7886.368401, bitrate: N/A
Stream #0.0: Audio: pcm_s16le, 44100 Hz, 2 channels, s16, 1411 kb/s
[alsa @ 0x638950] Estimating duration from bitrate, this may be inaccurate
Input #1, alsa, from 'hw:0,0':
Duration: N/A, start: 7886.381408, bitrate: N/A
Stream #1.0: Audio: pcm_s16le, 44100 Hz, 2 channels, s16, 1411 kb/s
Output #0, wav, to '/home/dainius/temp/test.wav':
Metadata:
encoder : Lavf52.83.0
Stream #0.0: Audio: pcm_s16le, 44100 Hz, 2 channels, s16, 1411 kb/s
Stream mapping:
Stream #0.0 -> #0.0
As you can tell, I use ALSA as the sound source (hw:1,0 is the
microphone - and yes, it it indeed a stereo microphone - while hw:0,0
is system audio). Is there a way to mix both these streams together
into one? Or maybe output the streams into different files, and then
mux them together later?
stream, that is, screen capture, and two audio streams, namely system
sounds and the microphone, using OpenSUSE Linux 11.3 through the
command line. If my command line looks like this (testing with sound
only at the moment):
/usr/bin/ffmpeg \
-xerror \
-f alsa \
-ac 2 \
-i hw:1,0 \
-f alsa \
-i hw:0,0 \
-acodec pcm_s16le \
-y /home/dainius/temp/test.wav
Only the first stream gets recorded. It reports that both streams are
being captured, but only the first one is being recorded and output to
file:
[alsa @ 0x6376d0] Estimating duration from bitrate, this may be inaccurate
Input #0, alsa, from 'hw:1,0':
Duration: N/A, start: 7886.368401, bitrate: N/A
Stream #0.0: Audio: pcm_s16le, 44100 Hz, 2 channels, s16, 1411 kb/s
[alsa @ 0x638950] Estimating duration from bitrate, this may be inaccurate
Input #1, alsa, from 'hw:0,0':
Duration: N/A, start: 7886.381408, bitrate: N/A
Stream #1.0: Audio: pcm_s16le, 44100 Hz, 2 channels, s16, 1411 kb/s
Output #0, wav, to '/home/dainius/temp/test.wav':
Metadata:
encoder : Lavf52.83.0
Stream #0.0: Audio: pcm_s16le, 44100 Hz, 2 channels, s16, 1411 kb/s
Stream mapping:
Stream #0.0 -> #0.0
As you can tell, I use ALSA as the sound source (hw:1,0 is the
microphone - and yes, it it indeed a stereo microphone - while hw:0,0
is system audio). Is there a way to mix both these streams together
into one? Or maybe output the streams into different files, and then
mux them together later?