[Ffmpeg-devel-irc] ffmpeg.log.20130312
burek
burek021 at gmail.com
Wed Mar 13 02:05:01 CET 2013
[00:08] <Jordan_> Does anyone know if it is ok to use ffmpeg in a proprietary application, if i use it via Process.Start(...);
[00:08] <Jordan_> And what about libx264
[00:32] <creep> http://images.nonexiste.net/popular/wp-content/uploads/2013/03/There-s-no-app-for-that.gif
[01:37] <stiell> Where do I find all the options for a specific codec, e.g. ffvhuff?
[01:40] <llogan> stiell: you can look at the code if in doubt
[01:41] <llogan> or: ffmpeg -h encoder=ffvhuff
[01:41] <llogan> doesn't provide options, but useful info
[01:42] <llogan> some private options are listed in "ffmpeg -h full" for some encoders, but not all IIRC
[01:49] <llogan> burek: have you done anything with that raspberry pi yet?
[06:12] <p4plus2> Has anybody else experianced a major regression using x11grab (60 -> 11 FPS here...)
[06:13] <p4plus2> Interestingly, the CPU usage of 8 threads caps out at 15%, so there is plenty of power to spare...
[06:27] <HorizonXP> is there anyone in here who has worked with StagefrightRecorder from Android?
[06:27] <HorizonXP> I ask because there seems to be some interface code for it in ffmpeg
[06:27] <HorizonXP> and I'm trying to ascertain the difficulty of subclassing it for my own uses
[12:10] <damarusama> I know it's basic stuff, but ffmpeg -i this.ogg -acode libmp3lame that.mp3 isn't working for me
[12:11] <damarusama> was I supposed to compile with mp3 support, or using outside library should work too ?
[12:11] <damarusama> I just compiled from the git few minutes ago
[12:12] <JEEB> if you build with libmp3lame, then it'd be -c:a libmp3lame
[12:12] <JEEB> if you get an error that there is no such codec, do `ffmpeg -codecs |grep "mp3"`
[12:13] <JEEB> and see what you get
[12:14] <damarusama> D.A.L. mp3
[12:14] <damarusama> D.A.L. mp3 MP3 (MPEG audio layer 3) (decoders: mp3 mp3float )
[12:14] <JEEB> that's all?
[12:15] <JEEB> then you didn't build with lame (which is a separate library and handles mp3 encoding)
[12:15] <damarusama> D.A.L. mp3adu ADU (Application Data Unit) MP3 (MPEG audio layer 3) (decoders: mp3adu mp3adufloat )
[12:15] <JEEB> anyways, if you don't see LAME there, then you built without it
[12:15] <damarusama> yep I don't think I compiled it with lame, I didn't think it was a separated
[12:15] <JEEB> it's a completely separate project >_>
[12:15] <damarusama> well - I just didn't think
[12:15] <JEEB> ffmpeg can just use it for encoding
[12:15] <damarusama> ._.
[12:16] <damarusama> can I still use ffmpeg with the external lame library ?
[12:16] <JEEB> ?
[12:16] <damarusama> with the -acodec ?
[12:16] <JEEB> ?
[12:16] <JEEB> what do you mean with that?
[12:17] <damarusama> like hey ffmpeg, you don't know mp3 but if you use lame library you could do it!
[12:17] <damarusama> or it has to be compiled with it to start ?
[12:17] <JEEB> if you haven't enabled it when configuring ffmpeg, you can't use it. And you need both development headers as well as the actual library for it to be found
[12:17] <JEEB> in other words, you'll have to make clean and re-configure ffmpeg with libmp3lame enabled
[12:18] <JEEB> and make sure you have both the headers as well as the library available in your system
[12:18] <damarusama> kool installing the dev for lame now
[12:19] <damarusama> I am still so annoyed by debian and the whole libav bullsh**
[12:21] <damarusama> make clean will remove all installed file too ?
[12:22] <JEEB> no idea, I don't generally touch/trust that thing
[12:22] <damarusama> how would you removed a compiled/make installed package ?
[12:23] <JEEB> I generally set my own --prefix for stuff, so I can easily remove stuff I've installed
[12:23] <JEEB> for example, at the university machines I have ${HOME}/ownapps/bin added to my PATH
[12:23] <JEEB> so when I build something, I do --prefix=${HOME}/ownapps
[12:23] <JEEB> and then it goes to my home folder
[12:23] <JEEB> under ownapps
[12:24] <JEEB> so if I remove ownapps, I can remove all of it :P
[12:24] <damarusama> hum that make sense... keeps it simple, I am not too used to compiling at this point, even if I can do it, I don't really get it
[12:26] <damarusama> what about the dependency on yasm?
[12:26] <damarusama> does it make sense to compile without it ?
[12:26] <JEEB> no
[12:26] <JEEB> also it's so simple to compile yasm anyways
[12:26] <JEEB> and you only need to have the newer one around in the PATH
[12:27] <damarusama> ho so I could have the one that comes with debian and one in my path?
[12:27] <JEEB> well, most probably both would be in your PATH
[12:27] <damarusama> yes
[12:27] <JEEB> but one would come before the other
[12:27] <damarusama> or should I just apt-get remove the debian one?
[12:27] <damarusama> I didn't need it until ffmpeg sowed up ;)
[12:28] <JEEB> whatever you choose, for x264 you need the newest atm so most probably the debian one isn't new enough (if yasm --version doesn't give you 1.2.0 then it's not new enough)
[12:28] <JEEB> not sure which version debian atm has
[12:28] <damarusama> yeah that's what is happenieng
[12:28] <damarusama> yasm 1.1.0 on deb
[12:28] <damarusama> x264 need 1.2
[12:29] <JEEB> yup
[12:29] <JEEB> so you can either grab the package from unstable
[12:29] <JEEB> as that seems to have 1.2.0
[12:29] <JEEB> or build yourself
[12:30] <damarusama> yeah I prefer to build it for now
[12:30] <damarusama> i would bet github.com/yasm.git
[12:31] <damarusama> :(
[12:31] <damarusama> github.com/yasm/yasm.git
[12:32] <damarusama> any flag I should care for before compiling yasm ?
[12:41] <damarusama> hum the make uninstall seems to work
[12:44] <JEEB> <damarusama> any flag I should care for before compiling yasm <- not really, just set a --prefix if you use one, and ./configure and make and make install
[12:45] <damarusama> yep it went pretty fast anyhow... compiling x264 now
[12:53] <damarusama> JEEB: compiling x264 cannot find -lavformat (code, scale util etc...)
[12:53] <JEEB> are you going to be using the x264 command line app or do you want to use libx264 in ffmpeg?
[12:53] <damarusama> just in ffmpeg
[12:54] <JEEB> then just do --disable-cli
[12:54] <JEEB> in configuration
[12:54] <JEEB> and don't care about those, as those are features for the command line encoder
[12:54] <JEEB> not the library
[12:54] <JEEB> libx264 only needs a compiler and yasm, basically
[12:54] <damarusama> shoud I re-configure and start make again?
[12:55] <JEEB> make clean, re-configure and make
[12:55] <damarusama> thanks
[12:57] <damarusama> what you think about libaacplus ?
[12:57] <damarusama> usefull for html5 and web audio ing general
[12:58] <JEEB> use fdk-aac
[12:58] <JEEB> it can do both normal (LC) AAC as well as HE-AAC(v2)
[12:58] <JEEB> https://github.com/mstorsjo/fdk-aac
[12:59] <damarusama> has to be compiled too before ffmpeg ?
[13:00] <JEEB> naturally
[13:00] <JEEB> everything you want to link into ffmpeg has to be built before ffmpeg
[13:00] <damarusama> ogg is built in?
[13:00] <JEEB> ahaha
[13:00] <damarusama> :(
[13:00] <JEEB> there's a vorbis encoder in libavcodec, yes
[13:01] <JEEB> it's something to remind people of the fact that you don't try to recreate a wheel
[13:01] <JEEB> it's bad
[13:01] <JEEB> very bad
[13:01] <JEEB> get aotuv's libvorbis if you need vorbis :)
[13:01] <JEEB> http://www.geocities.jp/aoyoume/aotuv/
[13:01] <damarusama> geocities!!
[13:02] <damarusama> so anything that I want to work with it's better I find the libraries, compile it
[13:02] <damarusama> then I need to specify which library to use when compiling ffmpeg right
[13:02] <damarusama> ?
[13:03] <JEEB> --enable-libraryname
[13:03] <damarusama> kool
[13:03] <JEEB> see --help for a listing
[13:03] <JEEB> and config.log should tell you if it fails to enable something
[13:03] <JEEB> decoders are generally in libavcodec itself btw
[13:03] <JEEB> encoders are what generally you need a library for
[13:03] <damarusama> yes it's only the encoders.. right
[13:03] <JEEB> not only, but in general you don't really need libraries for decoding
[13:04] <JEEB> opus I think is one of the few things you need a library for
[13:04] <JEEB> not that you really come up with opus content generally
[13:04] <JEEB> you can rebuild ffmpeg if you ever come by that stuff naturally
[13:04] <damarusama> for things like .wav encoder ?
[13:04] <JEEB> uhh
[13:04] <JEEB> raw audio and video stuff is internal
[13:04] <damarusama> kool
[13:05] <JEEB> also there are encoders for stuff like mpeg-1 and mpeg-2 video
[13:05] <JEEB> mpeg-4 visual
[13:05] <JEEB> vp3 methinks
[13:05] <JEEB> wmv2 and wmasomething
[13:05] <damarusama> yeah mp4 encoders is also needed
[13:05] <JEEB> "mp4 encoders"
[13:05] <JEEB> way to go with being vague
[13:06] <JEEB> "mp4" is generally meant to mean a container
[13:06] <JEEB> or a container family
[13:06] <damarusama> indeed
[13:06] <JEEB> then you can put all kinds of stuff into that container :P
[13:06] <held> vp8 in latest ffmpeg undershoots the targeted bitrate by about 30%, is there anything that might affect this?
[13:06] <JEEB> held, encoding with one pass?
[13:06] <held> 2-pass encoding
[13:06] <JEEB> interesting
[13:07] <held> same file with x264 hits the target bitrate, so it's not due to too-high bitrate
[13:08] <JEEB> well, x264 in general has very good rate control, has had for quite a while
[13:08] <JEEB> post your command line and terminal output in a pastebin and see if anyone can help you
[13:09] <held> yeah. i don't expect a perfect match, but 30% is quite a lot :)
[13:14] <held> JEEB: http://pastebin.com/RBnxrdqR it's getting 2123kbit/s instead of 3000kbit/s
[13:14] <held> maybe some of my rate-control parameters are wrong?
[13:21] <relaxed> held: did you try +30% to see if there's an equal difference?
[13:21] <held> relaxed: good idea, i'll try in a minute, currently doing a crf singlepass encode to compare the resulting bitrate
[13:27] <held> so crf gets me the exact same bitrate. i'll try a 30% higher one now.
[13:31] <francoisgfx> hello there
[13:33] <francoisgfx> I'm having issue with scale filter. when doing a scale with ffmpeg, and doing the same scale in After effects. The result is not as good in ffmpeg. AE is using bicubic, yet even lancoz in ffmpeg does not give as good result
[13:33] <francoisgfx> I try to find good documentation about the SWScaler since I see there is some parameter we can tweak. But I can't find anything
[13:34] <francoisgfx> does anyone can point me to the good direction ?
[13:37] <held> relaxed: +30% targeted bitrate gives +15% final bitrate
[14:06] <held> relaxed / JEEB: vp8's ratecontrol changes when using crf + vbr/2-pass, -vb becomes the maxrate... removing "-crf 10" helps reaching the targeted bitrate. thanks for your inputs!
[14:06] <held> i should have read http://ffmpeg.org/trac/ffmpeg/wiki/vpxEncodingGuide a bit more thorough, it was mentioned there ;)
[16:38] <Sashmo_> I posted a project on freelancer looking for some help with ffmpeg, anyone around here want to be the guru that I am looking for and help me out? here is the project link https://www.freelancer.com/projects/4323291.html
[17:03] <Sashmo_> If anyone is interested PM me
[17:52] <afflicto> Hello everyone, I'm trying to stream my desktop + audio + mic to justin/twitch using ffmpeg and it's working fine but the music/PC audio is very low compared to my mic. How can I increase it? Here's pastebin of my script: http://paste.ubuntu.com/5608253/
[17:58] <spaam> you forgot the api key. ;)
[17:58] <spaam> afflicto: have you tried change the volume in the mixer?
[17:58] <afflicto> spaam: I have the api key there. I just removed it on the paste :P
[17:59] <afflicto> spaam: sure, I can do that. but I don't want that :P
[17:59] <spaam> why not?
[17:59] <afflicto> spaam: because then I won't hear shit when I talk with ppl on skype xD
[18:00] <spaam> but cant you change it based on program with pulse?
[18:00] <spaam> like say. flash get 50% skype get 70% and so on
[18:01] <afflicto> spaam: That's what I've done. problem is ffmpeg is barely picking up the system sound
[18:09] <burek> afflicto, try using alsamixer/amixer, prior to starting ffmpeg, to set the recording level of the device you are capturing the audio from
[18:22] <afflicto> burek: uhm.. ok.. whenever I mute my mic or turn my micc volume to 0 the music stops on the stream too wtf :S
[18:23] <afflicto> here is my stream http://twitch.tv/dreamvoid
[18:23] <burek> afflicto, you are probably grabbing from your "stereo out" device (what you hear)
[18:23] <burek> -f alsa -i pulse doesn't tell much
[18:23] <burek> better use -f alsa -i hw:0
[18:24] <burek> or hw:X depending what your recording device is
[18:24] <burek> use arecord -l to list them all
[18:24] <afflicto> burek: hehe I don't know what I'm doing I just combined a bunch of forum posts etc :P
[18:24] <afflicto> I believe my mic is h0.0 or something
[18:24] <burek> and alsamixer (with TAB and F6 to select proper device) to turn the recording volume up (not the playback volume)
[18:25] <burek> https://ffmpeg.org/trac/ffmpeg/wiki/How%20to%20grab%20the%20desktop%20(screen)%20with%20FFmpeg
[18:25] <burek> wrong link
[18:25] <burek> try this one https://ffmpeg.org/trac/ffmpeg/wiki/Capturing%20audio%20with%20FFmpeg%20and%20ALSA
[18:27] <afflicto> What will that do different?
[18:27] <burek> it will work
[18:27] <afflicto> It works right now though
[18:28] <afflicto> http://twitch.tv/dreamvoid
[18:28] <afflicto> I just need to turn the system audio down on the stream itself.
[18:29] <burek> did you understand what your issue is exactly?
[18:29] <burek> if you did, go configure your pulse and it will work
[18:29] <burek> if you dont know how, use alsa directly with ffmpeg
[18:30] <afflicto> I know the problem but not the cause, no :P
[18:30] <afflicto> Ok I'll try the thing you linked
[18:33] <burek> you are taking your audio input from your "output" device
[18:33] <burek> take it directly from your "microphone input" device
[18:33] <afflicto> yes and my microphone
[18:37] <afflicto> what do you mean?
[18:37] <burek> please read again all that I wrote previously
[18:38] <afflicto> I still don't get it
[18:39] <afflicto> And it's subject to interpretation anyway :P
[18:40] <afflicto> Let me just ask a question istead. Is it possible to take 2 inputs into ffmpeg and encode at different volumes? Or is it only possible to change the cominbed/total volume output?
[18:40] <burek> use -i input1 -i input2 -vf avolume=...
[18:41] <afflicto> ok, so "-vf = avolume=256" ?
[18:42] <afflicto> Oops, I mean "-vf avolume=256" :P
[18:43] <afflicto> I'm getting an error, "no such filter avolume".
[18:49] <burek> oh man :)
[18:49] <burek> it's easier just to use -f alsa -i hw:...
[18:49] <burek> that way you know what you are doing
[18:51] <afflicto> burek: ok
[18:53] <afflicto> burek: like so? ffmpeg -f x11grab -s 1680x1050 -r 30 -f alsa -i hw:0.0 -vcodec libx264 -pix_fmt yuv420px -s 1280x800 -f flv "rtmp://live.twitch.tv/app/$API_KEY"
[18:53] <burek> yes, now go into your shell and type alsamixer
[18:53] <burek> press TAB
[18:53] <burek> and do a printscreen and show it to us
[18:53] <burek> (maximize the screen prior to taking a screenshot)
[18:56] <afflicto> k
[18:57] <afflicto> http://img199.imageshack.us/img199/926/afflictoafflicto2001.png
[18:58] <burek> ok, the first "Input Source" is what you need to set what your recording device is (which is in your case good and set to "Front Mic")
[18:58] <burek> you can try changing it, just to see if that's the device you actually need
[18:59] <burek> like: ffplay -f alsa -i hw:0
[18:59] <burek> and use alsamixer to change that first "Input Source"
[18:59] <burek> while it plays
[18:59] <burek> after that use the first "Capture" to select the recording volume
[18:59] <burek> up/down arrows or pgup/pgdn
[19:00] <afflicto> I need to listen with my headphones now?
[19:01] <afflicto> oh taht's neat
[19:02] <afflicto> yea I can see a graph thingy and I'm listening to my mic
[19:03] <burek> now, try increasing the recording volume
[19:03] <burek> you should hear it louder
[19:04] <afflicto> what doi you mean louder?
[19:04] <burek> the print screen you sent.. shows there is a "Capture" column.. go to it with your left/right arrow keys and turn the volume up
[19:04] <burek> with up/down
[19:05] <afflicto> ok
[19:05] <afflicto> yea changing the capture increases or decreases it
[19:06] <afflicto> So what is that capture thing anyway?
[19:06] <burek> it says how loud to capture the "Input source"
[19:06] <burek> but you need to capture your mic + the stereo out?
[19:06] <afflicto> ok
[19:06] <burek> hmh
[19:06] <afflicto> yea
[19:09] <burek> the problem with recording your stereo out is that you need to "hear" yourself talking on your stereo out
[19:09] <burek> which might create the loop
[19:09] <burek> and that annoying mic sound
[19:09] <afflicto> The ffmpeg script I used doesn't do that
[19:10] <afflicto> it just takes mic + stereo out just fine.
[19:10] <burek> but it doesn't equalize the levels of those two?
[19:11] <afflicto> equalize?
[19:12] <afflicto> the issue is that the stereo out is too low compared to the mic
[19:12] <afflicto> And if I change volume in my sound settings or alsa mixer or whatever. It messes up volumes for ME and skype etc.
[19:13] <burek> http://r3dux.org/2010/10/how-to-enable-stereo-mix-in-pulseaudio-and-record-absolutely-any-playing-audio/
[19:13] <afflicto> So the settings I have now are perfect for myself and skype etc. I just need the stream to increase the volume of the "stereo out" into ffmpeg
[19:13] <burek> I think that answers your question
[19:14] <afflicto> noo not really
[19:15] <burek> it lets you balance the volumes of both stereo out and your mic
[19:15] <burek> so you can fine tune it before you start streaming?
[19:16] <afflicto> So is it not possible to change volumes with ffmpeg at all?
[19:16] <Sashmo_> burek, I posted a project on freelancer looking for some help with ffmpeg, anyone around here want to be the guru that I am looking for and help me out? here is the project link https://www.freelancer.com/projects/4323291.html
[19:17] <burek> afflicto no, you are using pulse wrapper which does that instead
[19:17] <burek> you made it nonpublic :)
[19:17] <burek> @Sashmo_
[19:17] <Sashmo_> ahhhh.... true
[19:18] <afflicto> burek: so what is the -vf avolume thing then?
[19:19] <burek> afflicto, audio filter for changing volume of the input
[19:19] <Sashmo_> burek: http://tinypic.com/r/10mr21s/6
[19:19] <afflicto> burek: exactly! that's what I need!
[19:19] <burek> but it's better to just set your input volume, rather than to fix it after you grab the audio
[19:20] <burek> afflicto, ok, then use -f alsa -i pulse -af ...
[19:20] <afflicto> Ok how do I set it? this gives me unknown filter error: -i :0.0+0,0 -vf avolume=256
[19:20] <burek> http://ffmpeg.org/ffmpeg-filters.html#volume
[19:20] <burek> -avolume +volume
[19:20] <burek> :)
[19:21] <afflicto> No such filter: 'volume'
[19:21] <afflicto> Error opening filters!
[19:21] <burek> -af volume=0.5 for example
[19:21] <burek> Sashmo_, just a sec
[19:21] <afflicto> Ops, sorry for spam. It seems filters are not available somehow? do I need to install filters?
[19:22] <burek> show us the pastebin and I'll be able to tell you
[19:23] <afflicto> ok
[19:23] <burek> Sashmo_ "I have set the min and max bit rates to the same number, but it is still a VBR, not CBR."
[19:23] <burek> you didnt set the mux buffer
[19:24] <Sashmo_> I did
[19:24] <burek> that's the usual reason for such issue
[19:24] <Sashmo_> its there too
[19:24] <burek> -maxrate also, right?
[19:24] <Sashmo_> thats only part of the problem, the other part is the strobing video, when the camera pans left and right
[19:24] <Sashmo_> burek: yes
[19:24] <afflicto> burek: http://paste.ubuntu.com/5608475/
[19:24] <burek> afflicto "Copyright (c) 2000-2012 the Libav developers"
[19:24] <burek> that's not ffmpeg
[19:25] <afflicto> lol?
[19:25] <burek> our ffmpeg tool says "Copyright (c) 2000-2012 the FFmpeg developers"
[19:25] <burek> that's a fake ffmpeg you have, sorry
[19:26] <burek> what you are using is a fork of ffmpeg and I'm not quite willing to support someone else's project here
[19:26] <burek> Sashmo_, I'm reading it, just a sec
[19:26] <afflicto> ok
[19:27] <burek> yes !fork, i couldnt remember the proper trigger :)
[19:27] <burek> thanks :)
[19:27] <bk76_> hi
[19:28] <burek> Sashmo_, is there anywhere your cmd line posted?
[19:28] <Sashmo_> http://pastebin.com/JmJNqEES
[19:29] <bk76_> I'm trying to capture my desktop with sound from mic
[19:30] <bk76_> I'm useing alsa for sound
[19:30] <bk76_> my command is: ffmpeg -f x11grab -r 20 -s 1920x1080 -i :0.0 -vcodec libx264 -threads 2 -q:v 2 -f alsa -i hw:1,0 -y recorddesktop.mkv
[19:31] <bk76_> but it exits with error Unknown decoder 'libx264'
[19:31] <bk76_> but with command ffmpeg -f x11grab -r 20 -s 1920x1080 -i :0.0 -vcodec libx264 -threads 2 -q:v 2 -y recorddesktop.mkv it works
[19:31] <bk76_> but I need sound
[19:33] <burek> bk76_, first setup all your inputs
[19:33] <burek> and then your outputs
[19:33] <burek> ffmpeg -f x11grab -r 20 -s 1920x1080 -i :0.0 -f alsa -i hw:1,0 -vcodec libx264 -threads 2 -q:v 2 -y recorddesktop.mkv
[19:33] <burek> that should work
[19:33] <bk76_> ok
[19:34] <afflicto> ok I managed to add the repository and install ffmpeg now
[19:34] <Sashmo_> burek: sent you PM with console output
[19:35] <burek> ok
[19:35] <bk76_> burek thank you
[19:35] <burek> bk76_, also setup your -acodec, -ac, -ab
[19:36] <burek> if you want to fine tune the audio compression
[19:36] <burek> like
[19:36] <burek> -acodec aac -strict experimental -ab 128k
[19:36] <bk76_> what is aac?
[19:37] <LithosLaptop> built-in aac encoder
[19:37] <LithosLaptop> ok for testing
[19:38] <bk76_> I know that it is encoder but I don't know what it is different from other encoders
[19:38] <bk76_> I don't have it compiled in
[19:39] <bk76_> is it compatible with youtube?
[19:40] <bk76_> why not use pcm_s16le ?
[19:40] <LithosLaptop> Youtube can accept AAC yes, but is best to upload the best quality that you can get
[19:40] <LithosLaptop> because youtube will transcode it to AAC again even though it was AAC
[19:41] <LithosLaptop> you can do pcm_s16le yes
[19:41] <LithosLaptop> I've done it before
[19:41] <LithosLaptop> it was in AVI container
[19:41] <bk76_> ok
[19:42] <bk76_> thx
[19:42] <LithosLaptop> no prob
[19:45] <afflicto> burek: ok it's working except ffmpeg isn't picking up the speaker audio
[19:46] <afflicto> burek: here's the script http://paste.ubuntu.com/5608560/
[19:49] <burek> just a sec
[19:49] <burek> I'll take a look
[19:49] <burek> afflicto, did it work before?
[19:50] <afflicto> no not with the real ffmpeg
[19:52] <burek> try looking into pulse settings
[19:52] <burek> should be 2 ffmpegs there now
[19:52] <burek> if you didnt uninstall previous one
[19:52] <burek> and configure your pulseaudio for this ffmpeg to capture mic+stereo too
[19:54] <bk76_> how to find out where is my mic connected?
[19:55] <burek> follow the cable :D
[19:55] <bk76_> I have tried hw:0,0 to hw:0,2
[19:56] <bk76_> and all the time I get ALSA buffer xrun.
[19:56] <bk76_> Application provided invalid, non monotonically increasing dts to muxer in stream 1: 2683 >= 2683
[19:56] <bk76_> av_interleaved_write_frame(): Invalid argument
[19:56] <burek> type alsamixer, switch to recording devices (press TAB) and change the input source there to find your mic
[19:56] <burek> or type arecord -l
[19:57] <bk76_> my mic is working
[19:57] <bk76_> it was short message
[19:57] <bk76_> too shor for pb
[19:57] <bk76_> ;)
[19:57] <burek> just use the pastebin
[19:57] <bk76_> short*
[19:58] <bk76_> ok, I will
[19:59] <bk76_> so my mic is working
[19:59] <bk76_> I chcecked arecord -l and -L
[20:00] <bk76_> command ffmpeg -f alsa -i default:CARD=Intel -t 30 out.mp3 is working but no sound
[20:00] <bk76_> -i hw is crashing ffmpeg after few seconds
[20:00] <burek> bk76_ http://ffmpeg.org/trac/ffmpeg/wiki/Capturing%20audio%20with%20FFmpeg%20and%20ALSA
[20:01] <burek> also, dont forget to provide a pastebin
[20:01] <bk76_> pb of arecord output?
[20:02] <burek> of the crash
[20:03] <bk76_> http://pastebin.com/7zeLCyJa
[20:03] <bk76_> ok, moment
[20:05] <bk76_> http://pastebin.com/H4m9DMTA crash
[20:08] <burek> phew :) that's not a crash
[20:08] <burek> it's just an error
[20:08] <burek> try using pulse instead of alsa if you can
[20:08] <burek> because you have such a hardware issue
[20:08] <burek> (or an old ffmpeg)
[20:08] <bk76_> it stopped to work so it looks like crash for me
[20:08] <burek> which causes your alsa to fail while grabbing
[20:09] <bk76_> I can use teamspek and skype
[20:09] <bk76_> and few mounths ago I was able to record sound from mic with ffmpeg
[20:09] <burek> yes, but grabbing your screen _together_ with capturing audio is your issue
[20:09] <burek> which doesn't happen with ts/skype right?
[20:10] <bk76_> but I was able to capture both
[20:11] <burek> when
[20:11] <bk76_> ffmpeg version 0.10.3
[20:11] <bk76_> is it old?
[20:12] <bk76_> few months ago
[20:15] <burek> you should update it if you can
[20:16] <burek> it might be a bug that has already been resolved
[20:17] <bk76_> 1.1.3 will be ok?
[20:17] <burek> i think yes
[20:18] <burek> i didnt check recently what's the latest stable
[20:18] <burek> yes 1.1.3 is the lates
[20:18] <burek> t
[20:18] <bk76_> ok
[20:18] <bk76_> it is in gentoo portage so i'll try it
[20:18] <burek> ok
[20:39] <afflicto> burek: Hey again, was afk eating dinner.
[20:40] <afflicto> burek: I uninstalled the old ffmpeg, yea.
[20:42] <burek> afflicto, so it's not picking up stereo out?
[20:42] <afflicto> burek: nope, only my mic
[20:42] <burek> if you use pulseaudio, you need to configure it there
[20:42] <burek> i personally dont use pulse so im not of a big help there :s
[20:42] <afflicto> isn't ffmpeg able to pickup 2 audio streams though?
[20:43] <relaxed> for pulse you can configure it via `pavucontrol`
[20:43] <relaxed> is there not a wiki on this topic?
[20:43] <relaxed> afflicto: yes
[20:45] <afflicto_> relaxed: ok here's my script, it worked fine when I used the other ffmpeg port: http://paste.ubuntu.com/5608714/
[20:53] <relaxed> afflicto_: https://ffmpeg.org/trac/ffmpeg/wiki/Capturing%20audio%20with%20FFmpeg%20and%20ALSA
[20:54] <afflicto_> I think I totally misunderstood the script. I thought I had two input audio streams into ffmpeg but I only have 1 and that was everything from pulse including mic and the speaker output. In which case I can't control the volume mixer that goes into ffmpeg.
[20:56] <afflicto_> relaxed: ok I'll look at that link
[20:56] <relaxed> I believe you can control all of that through `pavucontrol`.
[20:58] <relaxed> afflicto_: http://blog.devinrkennedy.com/2009/10/live-screencasting-using-ffmpeg.html
[20:58] <relaxed> look at the audio capturing section
[20:59] <afflicto_> relaxed: k
[21:04] <bk76_> I'm back. New FFmpeg installe (1.1.3) and I can record sound.
[21:05] <bk76_> but recording sound and capturing desktop does not work
[21:12] <bk76_> how to set lower resolution of output video?
[21:12] <bk76_> not that of the screen
[21:21] <afflicto_> Ok so it does actaully pick up both speaker output and mic. However speaker output is barely audible.
[21:21] <burek> afflicto_
[21:21] <burek> <afflicto_> I think I totally misunderstood the script. I thought I had two input audio streams into ffmpeg but I only have 1 and that was everything from pulse including mic and the speaker output. In which case I can't control the volume mixer that goes into ffmpeg.
[21:22] <burek> in first case, where you grab the input with ffmpeg
[21:22] <afflicto_> Is there a way to capture specific devices instead of just "-i pulse" which grabs everything? that way I can do -i themicrophone -af volume=128 -i the speakeroutput -af volume=512 ?
[21:22] <burek> you might do something like: ffmpeg -i your_mic_input -i your_stereo_out -af mix=...
[21:22] <burek> something like that
[21:22] <burek> or you can use just -i pulse which does that for you
[21:23] <burek> amix*
[21:23] <afflicto_> Can you tell me how?
[21:23] <burek> also, you don't need -av volume
[21:23] <burek> you can use alsamixer
[21:23] <burek> it's better to set the capture volume, rather than to re-encode audio
[21:23] <afflicto_> No I can't do that. that will mess up audio on skype etc
[21:24] <burek> why would it mess it up?
[21:24] <afflicto_> Because I need to talk to people on skype with the volumes I have set now.
[21:24] <bk76_> burek my problem with not working screen capture and sound was too slow cpu
[21:24] <burek> bk76_ yes
[21:25] <bk76_> burek I set 5fps and it works
[21:25] <burek> bk76_ its not always just cpu speed but usually it is
[21:25] <bk76_> burek can I
[21:25] <burek> afflicto_, it's easier to do it with pavucontrol
[21:26] <burek> because im not sure what device would you set for -i your_stereo_out
[21:26] <bk76_> burek can I increase fps somehow?
[21:26] <burek> bk76_ probably if you lower the image size
[21:26] <burek> or the compression level
[21:26] <burek> https://ffmpeg.org/trac/ffmpeg/wiki/How%20to%20grab%20the%20desktop%20(screen)%20with%20FFmpeg
[21:26] <burek> see there for lossless output
[21:27] <burek> if that can work without problem, then just increase the compression until you get errors for alsa
[21:27] <burek> if lossless cant work properly, decrease the image size until it works properly
[21:27] <burek> if that also doesn't help, then lower the frame rate
[21:30] <bk76_> ok, I will try
[21:31] <afflicto_> burek: is pavucontrol able to control the audio input TO ffmpeg without messing with the audio levels that I hear and skype hears?
[21:31] <burek> afflicto_, i dont use it
[21:32] <burek> so i dont know for sure, but the article about that (i gave you the link before) showed that it can
[21:32] <afflicto_> burek: why didn't you tell me! that's exactly what i need!
[21:32] <burek> i guess it can maintain different settings for different programs
[21:33] <afflicto_> burek: thank you so much! it works like a charm! =D
[21:33] <burek> :) :beer:
[21:36] Action: afflicto_ gives burek an imaginary beer
[21:37] <afflicto_> burek: I have another question though.. it seems the stream is kinda laggy. I guess I'm not compressing it enough.
[21:38] <afflicto_> I have set -qscale 5 atm and it's streaming out 1280x800
[21:39] <burek> hd takes time to encode
[21:39] <afflicto_> burek: Sure. I have 70mbit/10mbit on my connection though so I dno
[21:39] <burek> do your viewers have also? :)
[21:40] <afflicto_> Well, no.
[21:40] <afflicto_> BUt what do I do?
[21:40] <afflicto_> There must be a way to compress it or something
[21:40] <burek> use -preset -crf and -tune
[21:40] <burek> type x264 --help for more info
[21:41] <burek> or take a look here
[21:41] <burek> http://ffmpeg.org/trac/ffmpeg/wiki/x264EncodingGuide
[21:41] <afflicto_> k
[21:41] <burek> hm, it used to be here
[21:41] <burek> !h264
[21:41] <burek> !x264
[21:41] <burek> just ignore me
[21:42] <burek> use whichever one you like more
[21:42] <relaxed> !burek
[21:42] <burek> :)
[21:42] <afflicto_> ok so "-preset fast" for example?
[21:43] <burek> Bad command or file name.
[21:43] <burek> afflicto_, play around :) try and see :)
[21:48] <afflicto_> burek: hm it's still freezing up. perhaps it's justin.tv having problems I dno
[21:48] <afflicto_> if you want to try: http://twitch.tv/dreamvoid
[21:49] <bk76_> burek -crf 0 -preset ultrafast gives me only 1.2 fps more
[21:50] <LithosLaptop> does it have to be x264?
[21:51] <bk76_> LithosLaptop: this is to me?
[21:51] <LithosLaptop> yes
[21:52] <bk76_> LithosLaptop: it have to be fullscreen nothing else
[21:52] <burek> bk76_ then your graphics card or your cpu might be a bottle neck
[21:54] <bk76_> I have gf 560
[21:54] <bk76_> maybe cpu
[21:55] <bk76_> its underclocket right now
[21:56] <burek> try capturing to a null output
[21:56] <LithosLaptop> maybe try mpeg4 instead op libx264
[21:56] <burek> instead of output file, put: "-f null -"
[21:56] <burek> without quotes
[21:56] <burek> and see if the fps goes higher
[21:56] <bk76_> -f or -y ?
[21:56] <burek> -f
[21:56] <bk76_> ok
[21:57] <bk76_> burek nothing changed
[21:58] <bk76_> it is not disk I think
[21:58] <afflicto_> I don't understand. I'm gettng 3fps :S
[21:58] <bk76_> but cpu usege isn't 100%
[21:58] <bk76_> it is 50%
[21:58] <burek> but
[21:58] <burek> do you have dual core?
[21:58] <bk76_> 4 core
[21:59] <burek> that means one of your cores goes up to 100%
[21:59] <burek> which could explain the issue
[21:59] <burek> use -threads 0
[22:00] <bk76_> the same
[22:00] <bk76_> all cores are working
[22:00] <afflicto_> burek: help me xD
[22:02] <bk76_> http://pastebin.com/cPp7MeFN
[22:03] <burek> just a sec
[22:04] <burek> afflicto_, simplify your cmd line, try capturing the video only to see if it is faster
[22:04] <bk76_> brb, I will overclock my system a bit
[22:04] <burek> if not, lower the image size, frame rate, compression levels..
[22:08] <afflicto_> burek: ok
[22:08] <bk76_> I'm back
[22:09] <afflicto_> burek: I'm not sure how to do it though
[22:09] <burek> guys, try to test it a little bit
[22:09] <burek> use -crf -preset -tune etc
[22:09] <burek> try to change image size and stuff
[22:09] <bk76_> only 16 fps 1920x1080 with core2 quad @3600
[22:09] <burek> i cant resolve all for you
[22:10] <afflicto_> burek: ok lol :P
[22:10] <bk76_> ok, I will wait
[22:10] <burek> bk76_ capturing requires a good graphic card too
[22:10] <burek> a lot of ram (hd)
[22:10] <burek> and a quick cpu
[22:10] <burek> and if you are capturing it with the audio, then it gets even worse
[22:10] <burek> due to needed sync
[22:10] <bk76_> burek it is without audio
[22:11] <burek> ok, im just saying
[22:11] <bk76_> 4gb RAM is ok?
[22:12] <burek> so, its not ram :)
[22:12] <bk76_> I don't think is graphic card
[22:12] <burek> try setting -threads to 4
[22:12] <bk76_> http://www.geforce.com/hardware/desktop-gpus/geforce-gtx-560ti
[22:12] <bk76_> ok
[22:13] <bk76_> it's one fps less
[22:14] <bk76_> is it here I'm looking for fps: frame= 395 fps= 15 q=32766.0 Lsize=N/A time=00:00:15.80 bitrate=N/A
[22:14] <bk76_> ?
[22:15] <burek> yes
[22:15] <burek> can you pastebin your cmd and complete output
[22:16] <bk76_> sure
[22:16] <bk76_> http://pastebin.com/X1yqkH1W
[22:17] <bk76_> maybe my grphic card is not supported?
[22:18] <burek> does it say it has dropped/duplicated frames
[22:18] <burek> in that line that shows fps
[22:18] <bk76_> no
[22:18] <relaxed> bk76_: if you want fast lossless use -c:v rawvideo
[22:19] <burek> this looks like a bug
[22:19] <relaxed> then encode to h264 afterwards
[22:19] <bk76_> relaxed: I don't think my disk can handle that
[22:19] <burek> your input is: Stream #0:0: Video: rawvideo (BGR[0] / 0x524742), bgr0, 1920x1080, 1658880 kb/s, 25 tbr, 1000k tbn, 25 tbc
[22:19] <burek> output is: Stream #0:0: Video: h264, yuv444p, 1920x1080, q=-1--1, 90k tbn, 25 tbc
[22:19] <relaxed> You could use ram
[22:19] <burek> and fps shown in stats is 15 fps
[22:20] <relaxed> he probably wants yuv420p too
[22:20] <bk76_> maybe this is important: --extra-cxxflags='-march=athlon64 -O2 -pipe -msse -msse2 -msse3 -mmmx -m3dnow'
[22:20] <bk76_> ?
[22:21] Action: relaxed smells gentoo
[22:21] <bk76_> relaxed: it is gentoo
[22:23] <bk76_> I will recompile with sse and stuff
[22:26] <afflicto_> Ok so it's streaming at about 230kbps now with 18fps. ffmpeg says "please use -q:a or -q:v, -qscale is ambigous.
[22:26] <relaxed> -qscale can apply to a video and audio codec
[22:27] <relaxed> so -q:a stands for -qscale:audio to be more specific
[22:28] <relaxed> you can also target a stream, like -q:a:1 for the second audio stream
[22:29] <bk76_> ha! now it works perfect
[22:29] <bk76_> sorry for trouble
[22:36] <relaxed> burek: behind the back conversions would be frowned upon.
[22:38] <burek> i dont understand
[22:38] <burek> what did he changed that made it work
[22:38] <burek> change*
[22:38] <relaxed> maybe you should add that info to the libx264 wiki page.
[22:38] <burek> relaxed, what behind the back conv? :)
[22:39] <relaxed> changing the colorspace by default to yuv420p
[22:39] <relaxed> it also happens when the users input is yuvj420p
[22:41] <burek> i see
[22:41] <burek> so it slowed down the output that much?
[22:41] <burek> i will add it for sure
[22:42] <relaxed> I'm referring to question in -devel
[22:42] <relaxed> to your*
[22:42] <bk76_> burek thank you for your help
[22:42] <bk76_> bye all
[22:42] <burek> thank relaxed :)
[22:43] <burek> :beer: :)
[22:43] <burek> oh relaxed, ok :)
[22:43] <burek> but i didnt understand what solved his issue with low fps
[22:43] <burek> because people get this really frequently
[22:43] <burek> with ultra new and powerful machines
[22:44] <relaxed> it's because gentoo gives users the ability to botch a build
[22:46] <relaxed> One guy came in here with "-encode" as a USE flag and wondered why he couldn't encode anything.
[22:46] <burek> geez :D
[22:46] <burek> so, recompiling ffmpeg did the trick?
[22:46] <burek> should we notify gentoo maintainers about that?
[22:46] <burek> so they could fix it
[22:46] <afflicto_> burek: I have a problem. ffmpeg seems to only capture 1 audio source at a time. whichever is highest. :S
[22:47] <relaxed> burek: It's the users and the control they have over the build.
[22:47] <afflicto_> burek: whenever I change anything in the pulse audio control thing you told me to download, it resets to 150% all the time.
[22:49] <burek> relaxed, yes, but if im not wrong they have some kind of package system on gentoo that provides them with the source code, which might be changed by maintainers for some reason
[22:49] <burek> including configure options or something
[22:50] <burek> afflicto_, I'm really sorry, but I repeat I don't use pulse
[22:50] <burek> im a hard core alsa user :)
[22:50] <relaxed> burek: No offense, but I don't think you understand the gentoo build system.
[22:50] <afflicto_> burek: ok :\
[22:51] <relaxed> Try it sometime.
[22:52] <burek> none taken, im just assuming (wrong) :)
[22:52] <relaxed> For people who know what they're doing it great, but for people that don't it's possible to create a broken system, or unoptimized builds, etc...
[22:53] <burek> if i understand correctly, the guy had compiled his ffmpeg before in a wrong way, right?
[22:53] <relaxed> That's what I assume
[22:53] <burek> ok, then no worries :)
[22:57] <llogan> relaxed: any progress on the static build txt?
[22:58] <relaxed> build howto?
[22:58] <llogan> yeah
[22:58] <llogan> s/static//
[22:59] <relaxed> It needs more work.
[22:59] <llogan> i was just curious/annoying you.
[00:00] --- Wed Mar 13 2013
More information about the Ffmpeg-devel-irc
mailing list