[FFmpeg-user] Sound or Video - but I can't get both to work...
Bradley D. Thornton
Bradley at NorthTech.US
Mon Jun 13 12:23:53 CEST 2011
-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160
On 06/13/2011 03:14 AM, Fabian Lesniak wrote:
> The problem may be your sound card: AFAIK, you can only record your local
> playback (PCM) when your sound card supports to set it as a "recording"
> channel. You may try if you can set capture to your pcm via alsamixer.
> And specifying the -f parameter before -i is okay in this case, because it
> tells ffmpeg to not read a file named "hw:0,0" but open hw:0,0 using alsa. You
> may also try to open the "default" device.
> I did my last screen capture some time ago, but I noted the following:
>
> sox -t alsa "hw:0,0" -t ogg -A -2 -c1 -r44100 - | ffmpeg -i - -f x11grab -s
> 1280x1024 -g 300 -r 15 -i :0.0 -s 640x512 -ab 128k -ar 44100 -b 1500k -vc
> mpeg4 out.avi
>
> As you can see, I used sox to record audio, but I don't actually know anymore
> why I did...
ah... You may be on to something there. I saw a mention *somewhere*
about recording audio w/sox while screencasting with ffmpeg.
I'm about 40 minutes from crashing out for the evening yet I will
definitely give this a good look over in the morning when I get up and
test this type of scenario.
I am used to using sox from a long time ago when I used it for my
Asterisk prompts back in the 1.2 days and before.
I will definately report back here with my findings one way or another
regards to success :)
And thank you Fabian!
>
> Am Montag, 13. Juni 2011, 04:11:26 schrieb Bradley D. Thornton:
>> On 06/12/2011 06:58 PM, Reindl Harald wrote:
>>> Am 13.06.2011 03:54, schrieb Bradley D. Thornton:
>>>> I get video but no sound when I do this:
>>>>
>>>> ffmpeg -f alsa -i plughw:0,0 -f x11grab -r 25 -s 1440x900 -i :0.0
>>>> -acodec pcm_s16le -vcodec huffyuv -sameq screencast.avi
>>>>
>>>> or this:
>>>>
>>>> ffmpeg -f alsa -ac 2 -i plughw:0,0 -f x11grab -r 25 -s 1440x900 -i :0.0
>>>> -acodec pcm_s16le -vcodec libx264 -vpre lossless_ultrafast -threads 0
>>>> output.mkv
>>>>
>>>> -f oss (gives an error - no device) and I do not have pulse.
>>>
>>> why do you specifiy params before "-i"?
>>> these are normally for the input-file and i guess
>>> ffmpeg will in most cases know better what the input is
>>
>> That's what the tutorial here:
>> http://verb3k.wordpress.com/2010/01/26/how-to-do-proper-screencasts-on-linu
>> x/ gave as examples, and also what other people were offering up.
>>
>> I get the following errors when I try your suggestion with the
>> corresponding command:
>>
>> <snip>
>>
>> ffmpeg -i plughw:0 -f x11grab -r 25 -s 1440x900 -i :0.0 -acodec
>> pcm_s16le -vcodec huffyuv -sameq screencast.avi
>>
>> FFmpeg version 0.6.1, Copyright (c) 2000-2010 the FFmpeg developers
>> built on Feb 3 2011 00:17:04 with gcc 4.4.4
>> configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64
>> --mandir=/usr/man --enable-libmp3lame --enable-libfaac --enable-nonfree
>> --enable-gpl --enable-version3 --enable-postproc --enable-avfilter
>> --enable-libdc1394 --enable-libfaad --enable-libgsm
>> --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp
>> --enable-libschroedinger --enable-libspeex --enable-libtheora
>> --enable-libvpx --enable-libx264 --enable-runtime-cpudetect
>> --enable-vaapi --disable-vdpau --enable-memalign-hack --enable-pthreads
>> --enable-x11grab --enable-bzlib --enable-zlib --enable-shared
>> --enable-static --disable-debug --arch=x86_64 --enable-pic
>> --extra-cflags='-I/tmp/build/tmp-ffmpeg/ffmpegdeps/usr/include
>> -DRUNTIME_CPUDETECT'
>> --extra-ldflags='-L/tmp/build/tmp-ffmpeg/ffmpegdeps/usr/lib64 -lssl
>> -lcrypto -lz -lusb'
>> libavutil 50.15. 1 / 50.15. 1
>> libavcodec 52.73. 2 / 52.73. 2
>> libavformat 52.64. 2 / 52.64. 2
>> libavdevice 52. 2. 0 / 52. 2. 0
>> libavfilter 1.19. 0 / 1.19. 0
>> libswscale 0.11. 0 / 0.11. 0
>> libpostproc 51. 2. 0 / 51. 2. 0
>> plughw:0,0: No such file or directory
>>
>>
>> </snip>
>>
>> And I only removed the first -f for the audio device. I get the same
>> error when I remove both -f parameters, although it doesn't make sense
>> to me why I would not have them there anyway, and even if they were
>> optional to specify, why it would be better not to?
>>
>>> _______________________________________________
>>> ffmpeg-user mailing list
>>> ffmpeg-user at ffmpeg.org
>>> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
- --
Bradley D. Thornton
Manager Network Services
NorthTech Computer
TEL: +1.760.666.2703 (US)
TEL: +44.203.318.2755 (UK)
http://NorthTech.US
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Find this cert at x-hkp://pool.sks-keyservers.net
iQEcBAEBAwAGBQJN9eU5AAoJEE1wgkIhr9j38k0H/3ZhH6PQYhnxx1FnkKugZZrZ
LNRYQ2f47/RWc5t4jfjYJjRXHFth2Xzb9EM9F0T/g4SvMOAAjn31eXQE7D02Eka4
FFNCivG5juU42B1qAehlEG+E+SBauNj6T6taY5yfVnOLZwKAtD1qcLGXwCxI+dpS
tIkg2PSfYNu7ZIkcWVxgC66WmTMQRuH4sKFXa6yyRszr42INIa/tVobahXrcRFg0
DCFz7svpJW0fsZ3DmWhCvDZpPmCMRXgzB7+beof9rp8/J2wmte16TYYQXOcslBXa
QV+H4L/KwJHT0K9G5lHg2MQt1cszAJHqz4ZqNLgxUnTbVdlvCza07pMCUwodH1E=
=pjb0
-----END PGP SIGNATURE-----
More information about the ffmpeg-user
mailing list