Linux - DesktopThis forum is for the discussion of all Linux Software used in a desktop context.
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.
ffmpeg version 0.8.3-6:0.8.3-1, Copyright (c) 2000-2012 the Libav developers
built on Jun 9 2012 13:36:42 with gcc 4.7.0
*** THIS PROGRAM IS DEPRECATED ***
This program is only provided for compatibility and will be removed in a future release. Please use avconv instead.
[x11grab @ 0x2474320] device: :0.0+0,0 -> display: :0.0 x: 0 y: 0 width: 1920 height: 1080
[x11grab @ 0x2474320] shared memory extension found
[x11grab @ 0x2474320] Estimating duration from bitrate, this may be inaccurate
Input #0, x11grab, from ':0.0+0,0':
Duration: N/A, start: 1340053863.559315, bitrate: 1592524 kb/s
Stream #0.0: Video: rawvideo, bgra, 1920x1080, 1592524 kb/s, 24 tbr, 1000k tbn, 24 tbc
[alsa @ 0x24873a0] Estimating duration from bitrate, this may be inaccurate
Input #1, alsa, from 'hw:0':
Duration: N/A, start: 3868.378728, bitrate: N/A
Stream #1.0: Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s
File 'test.out' already exists. Overwrite ? [y/N] y
Incompatible pixel format 'bgra' for codec 'flv', auto-selecting format 'yuv420p'
[buffer @ 0x2497600] w:1920 h:1080 pixfmt:bgra
[avsink @ 0x24977a0] auto-inserting filter 'auto-inserted scaler 0' between the filter 'src' and the filter 'out'
[scale @ 0x249b260] w:1920 h:1080 fmt:bgra -> w:1920 h:1080 fmt:yuv420p flags:0x4
Output #0, flv, to 'test.out':
Metadata:
encoder : Lavf53.21.0
Stream #0.0: Video: flv, yuv420p, 1920x1080, q=2-31, 1 kb/s, 1k tbn, 24 tbc
Stream #0.1: Audio: libmp3lame, 44100 Hz, 2 channels, s16, 1 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #1.0 -> #0.1
Press ctrl-c to stop encoding
[alsa @ 0x24873a0] ALSA buffer xrun.
^Cframe= 94 fps= 24 q=5.0 Lsize= 3930kB time=3.87 bitrate=8328.4kbits/s dup=0 drop=9
video:3911kB audio:15kB global headers:0kB muxing overhead 0.104241%
Received signal 2: terminating.
but in the end there is no sound in the output. I have pulse installed to test if it helps ('-i pulse'); no succeed. I have no loopbacks set cause I don't know if I need one and how to do that.
Are sure that's the correct alsa device?
Have you checked to see if your sound card has capturing output disabled in the hardware? Some sound devices like Intels and Nvidias have that disabled. You can get around it by jumping a cable from output to line in.
Code:
-ab 64
That should be 64k.
Code:
-qscale 5 -b 1024
You are doing q scale and then specifying a fixed bitrate. Either qscale 5 or -b 1024k
I followed your suggestions concerning -ab -qscale. Presence of -qscale seems have no impact on sound. I added 'k' to -ab and -b and sound is better.
Although sound is present, it is low quality (bassless) and very silent. It look like I didn't hear the sound yesterday cause I worked with my headphones.
To record I use now
Code:
$ ffmpeg -f x11grab -s 1920x1080 -r 24 -i :0.0+0,0 -f alsa -ac 2 -i hw:0 -acodec libmp3lame -ab 192k -threads 8 -b 4096k -ar 44100 -f flv test.out
ffmpeg version 0.8.3-6:0.8.3-1, Copyright (c) 2000-2012 the Libav developers
built on Jun 9 2012 13:36:42 with gcc 4.7.0
*** THIS PROGRAM IS DEPRECATED ***
This program is only provided for compatibility and will be removed in a future release. Please use avconv instead.
[x11grab @ 0x2641320] device: :0.0+0,0 -> display: :0.0 x: 0 y: 0 width: 1920 height: 1080
[x11grab @ 0x2641320] shared memory extension found
[x11grab @ 0x2641320] Estimating duration from bitrate, this may be inaccurate
Input #0, x11grab, from ':0.0+0,0':
Duration: N/A, start: 1340096864.961893, bitrate: 1592524 kb/s
Stream #0.0: Video: rawvideo, bgra, 1920x1080, 1592524 kb/s, 24 tbr, 1000k tbn, 24 tbc
[alsa @ 0x26543a0] Estimating duration from bitrate, this may be inaccurate
Input #1, alsa, from 'hw:0':
Duration: N/A, start: 4518.767438, bitrate: N/A
Stream #1.0: Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s
Incompatible pixel format 'bgra' for codec 'flv', auto-selecting format 'yuv420p'
[buffer @ 0x2664600] w:1920 h:1080 pixfmt:bgra
[avsink @ 0x26647a0] auto-inserting filter 'auto-inserted scaler 0' between the filter 'src' and the filter 'out'
[scale @ 0x266a540] w:1920 h:1080 fmt:bgra -> w:1920 h:1080 fmt:yuv420p flags:0x4
Output #0, flv, to 'test.out':
Metadata:
encoder : Lavf53.21.0
Stream #0.0: Video: flv, yuv420p, 1920x1080, q=2-31, 4096 kb/s, 1k tbn, 24 tbc
Stream #0.1: Audio: libmp3lame, 44100 Hz, 2 channels, s16, 4096 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #1.0 -> #0.1
Press ctrl-c to stop encoding
^Cframe= 375 fps= 24 q=31.0 Lsize= 8995kB time=15.73 bitrate=4685.6kbits/s dup=0 drop=1
video:8365kB audio:614kB global headers:0kB muxing overhead 0.173481%
Received signal 2: terminating.
I would record in an uncompressed format first, then reencode compressing video+audio.
You can try ffv1 as uncompressed video codec and pcm_s16le as uncompressed audio codec using avi as container.
After the recording finishes, you can recompress everything using your favorite formats.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.