[Ffmpeg-devel-irc] ffmpeg.log.20130202

burek burek021 at gmail.com
Sun Feb 3 02:05:01 CET 2013


[00:24] <llogan> nilsge: using jack1 or jack2?
[00:25] <nilsge> llogan: jack1
[00:26] <nilsge> ffmpeg -f x11grab -s 1920x1080 -r 60 -i :0.0 -f jack -i default -ac 2 -c:v libx264 -preset fast -pix_fmt yuv420p -s 1280x960 -c:a libmp3lame -ab 128k -ar 44100 -threads 0 -f flv "rtmp://live.twitch.tv/app/live_**********************"
[00:26] <nilsge> it makes no difference what a/v values I'm using. I went down to 320x240 and -ab 48k -ar 22050
[00:36] <teratorn> if im generating synthetic audio/video frames for testing, what timestamp-related invariants/constraints should I adhere to in order to keep the muxer happy interleaving the packets?
[00:48] <nilsge> llogan: I tested it with jack2, it is the same.
[00:56] <llogan> you can cut out the repeated messages
[00:58] <llogan> are you using realtime scheduling?
[00:58] <nilsge> yes
[00:59] <nilsge> I am running a pro-audio system with recording chain and super soundcard etc. it is not my system itself
[00:59] <nilsge> http://pastebin.com/xuZp8HMZ
[01:00] <nilsge> also those xruns do not show up in jack itself (e.g. qjackctl display)
[01:00] <nilsge> in this example there was no sound at all. just silence
[01:00] <nilsge> the jack ports weren't even connected
[01:00] <nilsge> system was idle, except ffmpeg
[01:01] <nilsge> The web is full of cry for helps with  xruns but no solution.
[01:01] <nilsge> xruns in ffmpeg I mean
[01:06] <llogan> is the output still ok?
[01:07] <nilsge> llogan: absolutely not. You can't listen to it.
[01:07] <nilsge> llogan: with the audio hiccpus there also comes a video speed issue.
[01:07] <nilsge> I have read in the web that using audio alone with jack seems to work, and video alone also. It is the combination.
[01:07] <nilsge> so it might be a sync issue, but I don't know much about these things
[01:12] <llogan> i haven't used jack in years, but maybe i'll try to duplicate the issue since i'm going to be using hydrogen for a drumtrack over the weekend
[01:14] <llogan> nilsge: maybe you can get an answer at ffmpeg-user mailing list
[01:14] <llogan> or linux-audio-user
[01:15] <nilsge> lau does know nothing. I am well connected there. It is a known issue with the answer "avoid doing it, don't do live screencasts and use recordmydesktop for the rest"
[01:16] <nilsge> (as a sidenote: libav behaves exactly the same)
[01:16] <llogan> i guess that's their way of saying "i don't know"
[01:16] <llogan> if you think it is a bug you can always search/submit a bug report.
[01:17] <nilsge> I don't know if it is a bug. It sounds like not knowing JACK.
[01:44] <burek> nilsge
[01:44] <nilsge> burek: yes
[01:45] <burek> try this: ffmpeg -f x11grab -s 1920x1080 -r 60 -i :0.0 -f jack -i default -c copy -f null -
[01:45] <burek> does it still throw xruns?
[01:45] <burek> octe, did you solve your issue
[01:46] <nilsge> burek: no xruns
[01:46] <nilsge> and my system is under heavy load right now, I am compiling
[01:46] <burek> that's good
[01:46] <nilsge> plus I am actually sending audio to the default input
[01:46] <burek> that means your card can capture at that rate without problems
[01:46] <nilsge> so, what does it mean?
[01:47] <nilsge> yes, I thought so.
[01:47] <nilsge> RME Hammerfall
[01:47] <burek> now, we need to see if your bus/cpu is also good enough to sustain the load when both capturing and encoding
[01:47] <burek> ffmpeg -f x11grab -s 1920x1080 -r 60 -i :0.0 -f jack -i default output.mpg
[01:47] <burek> or
[01:48] <burek> ffmpeg -f x11grab -s 1920x1080 -r 60 -i :0.0 -f jack -i default -c:v libx264 -crf 0 -c:a pcm_s16le output.flv
[01:48] <nilsge> that generates xruns on mass. I'll abort the compilation first.
[01:48] <burek> ok
[01:48] <nilsge> still xruns
[01:49] <nilsge> too many.
[01:49] <burek> yes i see
[01:49] <burek> the problem is (i guess)
[01:49] <burek> that your audio card is sending the data at such rate that your machine can't quite respect
[01:49] <nilsge> the second command does not work since it does not set a sample rate. I am on 48k which is not in flv
[01:49] <burek> since it wastes time on encoding, it can't capture audio properly
[01:50] <burek> what kind of cpu do you have
[01:50] <burek> (try mp4 or mkv)
[01:50] <JEEB> <nilsge> the second command does not work since it does not set a sample rate. I am on 48k which is not in flv <- actually it is
[01:50] <JEEB> at least for AAC
[01:50] <JEEB> page 71 of the current version of the FLV specification
[01:50] <nilsge> yes, I have not read this
[01:50] <burek> i wanted to avoid any kind of compression
[01:50] <nilsge> [flv @ 0x27bd9c0] FLV does not support sample rate 48000, choose from (44100, 22050, 11025)
[01:51] <nilsge> anyway
[01:51] <JEEB> nilsge, you should file that as a bug
[01:51] <JEEB> as it is one
[01:51] <JEEB> if you used AAC
[01:51] <burek> nilsge, which version of ffmpeg are you using
[01:51] <JEEB> anyways, yeah -- no compression for testing at first is a good idea
[01:51] <nilsge> burek: git from 15 minutes ago
[01:51] <JEEB> possibly even using a separate wav file as output, otherwise mkv should be fine
[01:52] <nilsge> burek: the latest stable in the archlinux repositories was build without jack
[01:52] <nilsge> burek: Intel(R) Core(TM)2 Quad CPU    Q6600  @ 2.40GHz
[01:52] <burek> oh ok
[01:52] <burek> sorry
[01:52] <nilsge> (00:59) ( nilsge) http://pastebin.com/xuZp8HMZ
[01:52] <JEEB> I think libav's flvenc.c didn't have that limitation as I poked them about it lately, so I wonder if and why ffmpeg would still have the 44kHz limitation with flv + aac (if it still has such)
[01:52] <burek> ok :)
[01:53] <JEEB> since ffmpeg merges libav's stuff
[01:53] <JEEB> (At least most of it)
[01:53] Action: JEEB goes check ffmpeg's flvenc.c
[01:53] <burek> oh, you probably have hit an alsa issue
[01:54] <burek> try: ffmpeg -f x11grab -s 1920x1080 -r 60 -i :0.0 -f alsa -i hw:0 output.mpg
[01:54] <burek> it should still show those xruns
[01:54] <JEEB> hmm...
[01:54] <JEEB> ffmpeg's flvenc.c seems similar
[01:54] <nilsge> that does not work since jack is active. well.. I could deactivate it for now.. one moment
[01:54] <JEEB> (unsurprisingly)
[01:54] <JEEB> so I guess he wasn't using aac
[01:55] <JEEB> because it shouldn't go into that one switch statement in that case
[01:56] <nilsge> burek: I can't start this. my hw:0 returns Input/output error.  cannot set access type (Invalid argument)
[01:56] <nilsge> hw:0,0 the same
[01:57] <nilsge> which is indeed my main device
[01:58] <burek> did you check with arecord -l
[01:58] <nilsge> yes
[01:58] <nilsge> and cat /proc/asound/cards
[01:59] <nilsge> but I have a loopback device, that works
[01:59] <tlp> now that ffmpeg supports encoding 24-bit flac, is there any way to tell it to go back to producing 16-bit?
[01:59] <nilsge> produces xruns. not so many
[02:00] <nilsge> burek: that looks stable enough so far
[02:01] <JEEB> tlp, if this was raw audio I'd say "look at -formats | grep "pcm" and pick a similar 16 one instead of the 24 one, but since your output format will be flac (probably in some container, too) you'd have to call libavresample out in some other way :)
[02:01] <JEEB> s/libavresmaple/libswresample/
[02:01] <nilsge> burek: after ctrl+c there were a lot buffer underflow i=0 bufi=235019 size=265650 packet too large, ignoring buffer limits to mux it
[02:02] <tlp> hmm
[02:02] Action: JEEB wonders if it's -precision
[02:02] <JEEB> oh, for soxr only
[02:03] <JEEB> oh found
[02:03] <JEEB> http://ffmpeg.org/ffmpeg-filters.html#aconvert
[02:03] <JEEB> this I'd guess?
[02:03] <burek> hmh
[02:04] <nilsge> burek: as additional information: all the web search showed me that people who used pulseaudio instead, or sometimes alsa directly, got away with it.
[02:04] <nilsge> but pulse is not suitable for a realtime audio system so I would rather not use that.
[02:04] <burek> nilsge i wonder if something like this would work: ffmpeg -f x11grab -s 1920x1080 -r 60 -i :0.0 -f jack -i default -c copy -f SOME_FORMAT_I_DONT_QUITE_KNOW - | ffmpeg -f THAT_SAME_FORMAT -i - -c:v libx264 ... output.flv
[02:05] <burek> now, that format could be something like mpegts or nut
[02:05] <burek> or im not sure which one is the most suitable for that
[02:05] <burek> but the idea is to separate capturing from encoding
[02:06] <burek> to see if the encoder spends "too much" time in encoding process, making alsa have to wait with its data, which fails
[02:06] <burek> also, as a quick hope, try putting audio input first
[02:06] <burek> it worked for me sometimes
[02:07] <burek> ffmpeg -f jack -i default -f x11grab -s 1920x1080 -r 60 -i :0.0 output.mpg
[02:07] <nilsge> what format shall I use for the first command?
[02:09] <nilsge> burek: the second one produces the usual xruns
[02:13] <burek> nilsge, try ffmpeg -formats
[02:13] <burek> try with -f nut
[02:13] <nilsge> the 3 dots...?
[02:14] <burek> -c:v libx264 -crf 0 -c:a pcm_s16le
[02:15] <nilsge> I have to add -ar 44100
[02:15] <nilsge> xruns
[02:15] <nilsge> usual amount
[02:17] <nilsge> burek: what kind of computer is needed to encode and record at the same time?
[02:18] <nilsge> now that it is mentioned, I remember with recordmydesktop I can't use on the fly encoding. I get sync problems, the video runs too fast, audio hiccups etc.
[02:19] <burek> well it could be that alsa issue then
[02:19] <burek> the point is (as i understood it that way) that alsa doesnt buffer enough data
[02:20] <burek> and when encoder doesn't pick it up quickly enough, the issue happens
[02:20] <burek> usually the data is being dropped, encoder then asks for the dropped data and alsa says please wait while i acquire more data for you
[02:20] <burek> something like that
[02:21] <burek> anyway, you could see if there is any chance to increase that buffer size
[02:21] <burek> in alsa directly (or it was in ffmpeg's source code, not sure now)
[02:21] <burek> or you might use your own kind of buffering
[02:21] <nilsge> some posts said to increase it in ffmpegs source code
[02:21] <nilsge> but with no difference, apparently
[02:21] <burek> well, one thing that comes to my mind
[02:22] <burek> since our very first test didn't produce any errors
[02:22] <burek> we could send that output to a localhost/udp port
[02:22] <burek> and with another ffmpeg pick it up
[02:22] <nilsge> sounds interesting
[02:23] <burek> that way udp proto handler in ffmpeg would buffer the data
[02:23] <burek> and you might solve your issue
[02:23] <nilsge> ok, I want to try that
[02:23] <burek> of course, its a dummy workaround, but worth trying if you are in a rush to finish something
[02:24] <nilsge> it has become more of a technical quest by now
[02:24] <burek> ok, then try for the 1st ffmpeg: ffmpeg -f x11grab -s 1920x1080 -r 60 -i :0.0 -f jack -i default -c copy -f SOME_FORMAT_I_DONT_QUITE_KNOW udp://localhost:1234
[02:24] <burek> and for the 2nd: ffmpeg -f THAT_SAME_FORMAT -i udp://@:1234 -c:v libx264 ... output.flv
[02:25] <burek> usually mpegts format should work, but i cant guarantee
[02:25] <nilsge>  nut again?
[02:25] <nilsge> ah
[02:25] <nilsge> mpegts
[02:26] <burek> try both
[02:26] <burek> mpegts had some issues too recently (at least in my test cases) :)
[02:26] <nilsge> the first runs. produces xruns already without the second even started
[02:26] <burek> so if nut works better, then great
[02:26] <burek> oh sweet
[02:26] <nilsge> they stopped...?
[02:26] <burek> wait
[02:26] <burek> try this
[02:27] <burek> ffmpeg -f x11grab -s 1920x1080 -r 60 -i :0.0 -f jack -i default -c copy output.mkv
[02:27] <nilsge> looks stable after 3 initial xruns. The command before that went stable after a few seconds as well, it seems
[02:27] <nilsge> but this is better
[02:28] <nilsge> now the second...
[02:28] <burek> hmh
[02:28] <burek> so it appears to not be even fast enough for just capturing
[02:28] <burek> how much ram memory do you have
[02:28] <nilsge> (02:17) ( nilsge) burek: what kind of computer is needed to encode and record at the same time?
[02:28] <nilsge> 4 GB
[02:28] <nilsge> 64bit system
[02:28] <burek> that obviously shouldn't be an issue
[02:29] <nilsge> nothing of the ram is in use. minimal linux with i3 window manager, no bling
[02:29] <burek> it depends on your encoding/capturing parameters
[02:29] <burek> try for a test, to lower the frame size to 640x360
[02:29] <burek> (in the last command)
[02:30] <nilsge> one moment, now that the xruns have stopped I want to try the current one with the 2nd command first. I had not started it yet
[02:31] <burek> well, there's no point in it
[02:31] <burek> since i've changed udp output to file output
[02:31] <nilsge> that is strange. If I do nothing at all after starting the first (with nut format) it runs ok. Only when I start typing on my keyboard the xruns start as well
[02:31] <nilsge> no I meant the udp version
[02:31] <burek> yes, that's the same issue i had
[02:32] <burek> somehow ffmpeg process doesn't get enough of either cpu time, bus access time or ram memory
[02:32] <nilsge> I don't understand it. I started the first command alone again, just ctrl+c, up-arrow, enter
[02:32] <nilsge> now zero xruns
[02:32] <burek> and the worst thing is, the issue could never be successfuly reproduced at developers' machines.. :(
[02:33] <burek> :)
[02:33] <burek> you have to admit that it's not boring at least :D
[02:33] <nilsge> Such things should not be possible with computers
[02:33] <burek> it always throws something new at you :)
[02:33] <nilsge> I have done it again to be sure, still everything ok
[02:34] <nilsge> now, finally the 2nd command
[02:34] <burek> what linux/kernel are you using?
[02:34] <nilsge> archlinux 64bit, 3.7.5
[02:35] <burek> you just dont give me any reason to hold on to :)
[02:35] <nilsge> there was a series of runs right now again but they stopped. so strange
[02:35] <burek> probably those xruns happen when you move the mouse over your desktop or something cpu "intensive" :D
[02:35] <nilsge> burek: I am no newbie with all that stuff. I know most details of my system, background processes etc.
[02:36] <nilsge> burek: I tried that before I reported "zero xruns". Tried to generate some cpu noise
[02:36] <nilsge> I also have an audio player running in the background, the whole time. seems to do nothing
[02:37] <nilsge> they start/stop not at random. something I do with the programs/UI triggers it, but I don't know what yet
[02:37] <burek> hmh.. did you try asking around in alsa community for some clues maybe?
[02:37] <burek> just to make sure it's not (so far) a known issue?
[02:37] <nilsge> I am afraid there is no alsa community
[02:38] <burek> #alsa ?
[02:38] <nilsge> from time to time some user comes to "us" in the #lad (linux audio developer) channel and asks for alsa help. We tell him #alsa and they usually report they send them to #lad in the first place
[02:38] <burek> :D
[02:38] <burek> that sounds great :)
[02:39] <nilsge>  Circular buffer overrun. To avoid, increase fifo_size URL option. To survive in such case, use overrun_nonfatal option
[02:39] <nilsge> that is the second command
[02:39] <burek> yes, that's the same issue i had
[02:39] <burek> but that's for udp
[02:39] <burek> it's not quite related to alsa issue
[02:39] <burek> or it might be
[02:39] <nilsge> oh wait, I made a typo
[02:40] <nilsge> no, that was nothing. same result
[02:41] <burek> :/
[02:42] <nilsge> it is strange
[02:42] <burek> take a look at this issue: https://ffmpeg.org/trac/ffmpeg/ticket/615
[02:42] <burek> it's using usb webcam input instead of x11
[02:42] <burek> and alsa
[02:43] <burek> and try to increment that buffer size
[02:43] <burek> i hope it will work for you
[02:43] <nilsge> ah yes, I have read that report earlier today
[02:44] <nilsge> ok, lets see...
[02:47] <nilsge> why again is this alsa related when using jack?
[02:49] <nilsge> If I were using ffado (firewire soundcards)...
[02:49] <burek> well, iiuc, jack is the wrapper around alsa lib, right?
[02:50] <nilsge> not exactly. You don't need alsa. It runs with ffado, a null driver, over network without any soundcard information at all
[02:50] <nilsge> (windows, bsd, osx)
[02:51] <nilsge> but I'll try it with alsa buffer size first. If all goes wrong I can attempt to use alsa directly
[02:56] <nilsge> burek: ok, compiled and installed
[02:57] <nilsge> burek: 1st command is running, one xrun at the start, but that is quite normal for all programs here.
[02:58] <nilsge> second does not run. I'm trying my original one.
[02:59] <burek> if you compiled that increased buffer size thing, then try your own commands
[02:59] <nilsge> doing it right now. I get xruns. too many I fear
[02:59] <burek> :(
[02:59] <nilsge> but that was with jack, not alsa directly
[02:59] <burek> and with alsa?
[03:00] <burek> btw, maybe there is the same thing for jack in ffmpeg
[03:00] <burek> so if it works for alsa
[03:00] <burek> you could try to fix the buffer size for jack too, i guess
[03:01] <nilsge> burek: I had a quick look in the jack audio source file but I think it is not there.
[03:01] <nilsge> which is quite correct. Jack buffer size is regulated by the daemon, and I have set it quite high to rule that out
[03:02] <nilsge> well, maybe I could set it to a ridicoulous value...
[03:03] <burek> :D
[03:04] <nilsge> set it to 4096 which generates 186ms latency on 44100 Hz ( I set this to 44.1 on my hardware site as well so I can drop the resampling in ffmpeg)
[03:05] <nilsge> nope
[03:05] <nilsge> still bad
[03:09] <burek> :S
[03:09] <nilsge> burek: with alsa only... better still a few, but so far apart that you can listen to it
[03:10] <nilsge> now I have to find out how to stream my sound to that alsa device :|
[03:10] <burek> well, you just have to make sure if that really helped or the errors just turned out to become less frequent out of the blue
[03:10] <burek> it's really difficult to debug such a thing
[03:10] <burek> when you don't have a constant (expected) errors each time you run your tests
[03:13] <nilsge> burek: so far they are less frequent. much less
[03:14] <burek> sounds good :)
[03:14] <burek> try double-increasing it again :)
[03:14] <nilsge> I still have not found out how to use that device
[03:24] <nilsge> burek: the video is working fine and no xruns
[03:24] <nilsge> but no sound also :) but that should be only a settings problem
[03:28] <burek> really?
[03:28] <burek> what did you do to make it work?
[03:28] <nilsge> the buffer size I think
[03:29] <nilsge> the only problem is that I don't know how and which alsa device I have to specify to actually hear my sound
[03:30] <nilsge> there is not much choice, though. I have 4 devices, but 3 of them can be ruled out (Webcam, Hdmi, Onboard Intel chip)
[03:30] <nilsge> hw0 is my actual card, which is blocked by jack, and hw1 is my loopback device that I use to forward alsa-only sound to jack.
[03:31] <nilsge> AND I thought the loopback works backwards as well so I can send jack back to an virtual alsa soundcard, e.g. to use with ffmpeg. But there is nothing coming out when I do that
[03:31] <burek> oh i see
[03:31] <burek> arecord -l
[03:31] <burek> should help
[03:31] <burek> also
[03:31] <burek> arecord -L
[03:32] <burek> probably ffmpeg -f alsa -i hw:X would be enough
[03:32] <nilsge> -L is new to me
[03:32] <nilsge> that is what I'm trying. hw:1 or hw:1,0  or hw:1,1
[03:32] <burek> but, sometimes you need to use -i hw:X,Y to specify a device Y on the card X
[03:32] <nilsge> nothing
[03:32] <burek> also, alsamixer might help
[03:33] <nilsge> like I said, this sound stuff with alsa and jack is not new too me
[03:33] <burek> just run it, press F6 and choose the card
[03:33] <burek> then press <tab> to see only recording devices
[03:33] <burek> ok
[03:33] <burek> :)
[03:33] <burek> im just saying it might be something trivial
[03:33] <nilsge> I still hope that as well :)
[03:34] <nilsge> alsamixer is of no use here. hw0 is RME, it has its own mixer. and hw1 is a virtual device, has no faders at all
[03:36] <nilsge> maybe my loop_in device is wrong
[03:37] <burek> well, im not sure
[03:37] <burek> usually alsa is just enough to me
[03:37] <burek> so i didnt experiment too much with other tools
[03:38] <nilsge> the situation is a bit more complicated because JACK is running. But that should only be a slight disturbance
[03:38] <nilsge> I think the main issue is solved
[03:38] <nilsge> so thank you very much for that, burek!
[03:38] <burek> well, im glad if we did solve something :)
[03:38] <burek> :beer: :)
[03:39] <nilsge> I have to check with a few basic tools if I'm getting any signal I think
[03:49] <pietro10> Is it possible to have ffmpeg produce the same data on two output sources? I want to stream something over the internet at the same time as I save the stream to a file on my computer. Thanks.
[04:31] <nilsge> burek: no luck. I think I give up for now
[04:33] <burek> pietro10 check our wiki
[04:34] <burek> nilsge :(
[04:34] <nilsge> burek: wait! just now I tried arecord --v -fdat foo.wav for the first time and it shows me level
[04:34] <burek> i told you, fun never ends with alsa :)))
[04:35] <pietro10> ok thanks
[04:36] <nilsge> aaargh, I don't understand it. The alsa device clearly receives data. why don't I hear it in ffmpeg
[04:36] <pietro10> so just to check
[04:36] <pietro10> ffmpeg <output1flags> <output1name> <output2flags> <output2name> ?
[04:37] <nilsge> burek: http://de.twitch.tv/nilsge  do you hear something?
[04:37] <nilsge> or anybody
[04:37] <pietro10> ok yes that is it thanks
[04:38] <burek> im on a headless server atm without audio card :)
[04:39] <burek> try using vlc
[04:39] <burek> see if there are any spectrum changes
[04:39] <burek> in visualizer
[04:45] <nilsge> this is the final mystery: if I just do arecord -vv -fdat foo.wav   I can see the VU Meter is going up, I connected my webcam to it, works. Total control. THere is sound coming to my alsa device
[04:46] <nilsge> but if I use -D to specify the device is stays 0%. I don't know which device it captures if I don't give one.
[04:55] <nilsge> according to this (arecord -vv -fdat foo.wav) http://pastebin.com/qW9NF1f1 it should be hw:Loopback,1  (or hw:1,1) but it is not. The device is silent when used with -D
[04:55] <nilsge> burek: I joined #alsa to try it out myself. Maybe I never even get an answer :)
[04:59] <burek> :)
[04:59] <nilsge> can't I do the same in ffmpeg? Just omitting the device?
[05:00] <burek> wait
[05:00] <nilsge> somewhere it seems to exist, but not in the hw:x,y terminology
[05:00] <burek> oh i see
[05:00] <burek> try -f alsa -i dsnoop
[05:01] <nilsge> that reads promising
[05:01] <nilsge>  cannot open audio device dnsoop (No such file or directory)
[05:02] <burek> can you pastebin your arecord -L
[05:03] <nilsge> http://pastebin.com/pLhc4i11
[05:03] <nilsge> U0x46d0x81d is my webcam
[05:06] <burek> and you need to get the input from which device
[05:06] <nilsge> http://pastebin.com/Ncbpt9ta
[05:06] <nilsge> this is aplay -l and cat /proc/asound/cards
[05:06] <nilsge> I am not sure, that is the point
[05:06] <nilsge> I would guess it is 1,1
[05:06] <burek> your mic?
[05:06] <burek> your cam?
[05:06] <burek> what
[05:07] <nilsge> it should be Loopback,1
[05:07] <burek> i mean logically from which device you would want to get your input :)
[05:07] <nilsge> yes, Loopback. I am sending audio over jack to this
[05:07] <burek> wait, what do you use to send your audio to jack
[05:08] <nilsge> jack apps. music players etc.
[05:08] <burek> what is the source of your audio :)
[05:08] <nilsge> the point is, with arecord --vv -fdat foo.wav I actually see the signal when I connect anything to the jack end of the loopback device
[05:08] <burek> your voice? your line in? your camera mic? pre-recorded audio file? what?
[05:08] <nilsge> moc, the music player
[05:08] <burek> oh
[05:09] <burek> so "what I hear"
[05:09] <burek> right?
[05:09] <nilsge> kind of, yes.
[05:09] <burek> well yes, you need dsnoop
[05:09] <burek> so, try this: ffmpeg -f alsa -i dsnoop output.wav
[05:09] <nilsge> cannot open audio device dsnoop (Device or resource busy)
[05:09] <nilsge> dsnoop: Input/output error
[05:09] <burek> wait let me check
[05:11] <burek> i see.. can you try just for test to shut down jack
[05:11] <burek> and see if the device gets ready
[05:11] <nilsge> which device?
[05:11] <burek> dsnoop
[05:12] <nilsge> I can shut down jack, but I have no way to test it/send audio in
[05:14] <burek> no need to
[05:14] <burek> i just want to know if jack is blocking that device
[05:15] <nilsge> no, it is not
[05:15] <nilsge> arecord says when a device is blocked
[05:15] <nilsge> hw:0 is completely blocked. that is my main card and used by Jack
[05:15] <burek> well, the point is
[05:15] <nilsge> hw:1 is the free loopback.   The rest should be uninteresting
[05:15] <burek> if the jack has blocked dsnoop for its own purpose
[05:15] <burek> you then must use -f jack -i ..
[05:16] <burek> cant workaround it
[05:16] <nilsge> maybe, but I don't think that is the case. How does arecord receive the audio? It can't use blocked devices
[05:16] <burek> good point
[05:17] <nilsge> the key is that arecord without -D receives the audio, exactly as I want including the manual jack connection only to that loopback device, and when I use -D with anything it does not work anymore
[05:17] <nilsge> and I need -D(evice) to find out what to give to ffmpeg
[05:17] <nilsge> so most likely I missed something or there is more syntax than "hw:x(,y)"
[05:20] <burek> maybe
[05:20] <burek> -i hw:1,0,1
[05:21] <nilsge> I tried that before with an error message in arecord
[05:21] <nilsge> ah, that was only a format error, not a device.
[05:21] <nilsge> lets see ffmpeg...
[05:23] <nilsge> all right! I got it in arecord at least. ffmpeg does not like the format as well
[05:24] <burek> what format
[05:24] <nilsge> float 32 bit is supported
[05:24] <burek> pastebin :)
[05:24] <nilsge> FLOAT_LE
[05:25] <nilsge> just one line: cannot set sample format 0x10000 2 (Invalid argument)
[05:29] <nilsge> burek: PCM 32-bit floating-point little-endian is needed. f32le
[05:29] <burek> cant say without pastebin
[05:29] <nilsge> pastebin of ffmpeg?
[05:30] <burek> yes, show me the log to see what exactly ffmpeg is complaining about
[05:30] <nilsge> http://pastebin.com/tG1UT9A7
[05:33] <burek> try using only ffmpeg -f alsa -i ... -f null -
[05:33] <burek> remove all the video stuff
[05:33] <nilsge> k
[05:33] <burek> because when you set -r
[05:33] <burek> it may apply to audio too
[05:33] <burek> if you don't set -r:v and -r:a
[05:34] <burek> maybe -r is not mutual option for a/v but you get the point
[05:34] <burek> also, -ac 2 is after -i
[05:34] <burek> which means that you are not requesting a 2 channel audio from your card
[05:34] <nilsge> http://pastebin.com/Bc0AWjnD
[05:35] <burek> but you actually are resampling it after you got the audio (in who knows what format) from your audio card
[05:35] <burek> ok, now try
[05:37] <burek> ffmpeg -f alsa -ac 2 -i hw:1,0,1 -f null -
[05:37] <nilsge> the same
[05:39] <nilsge> got it
[05:39] <nilsge> burek:  ffmpeg -f alsa -acodec pcm_f32le -ac 2 -i hw:1,0,1 -f null -
[05:39] <burek> yes
[05:39] <burek> i was looking to see what is the proper string :)
[05:39] <nilsge> http://ffmpeg.org/trac/ffmpeg/wiki/audio%20types here
[05:40] <burek> yes, the same you can get with ffmpeg -sample_fmts i think
[05:40] <burek> or -formats
[05:40] <burek> anyway, try joining all that now
[05:41] <burek> see if it works, and if there are xruns again any more
[05:42] <nilsge> http://de.twitch.tv/nilsge
[05:42] <nilsge> burek: !
[05:43] <burek> it works ? :)
[05:43] <nilsge> ah yes, you have no sound
[05:43] <nilsge> it works
[05:44] <nilsge> it seems the sound is 10s or so behind
[05:45] <burek> buffering i guess
[05:45] <burek> but is there any xrun?
[05:45] <nilsge> but at least something is coming through
[05:45] <nilsge> no, not one
[05:45] <burek> oh great
[05:45] <burek> it would be lovely if you could just check with the reverted version
[05:45] <burek> if that buffer size was really an issue
[05:45] <burek> so we can close it once and for good
[05:45] <nilsge> the alsa buffer size should be a runtime value
[05:45] <burek> i agree
[05:46] <nilsge> ok, I'm installing the release version of ffmpeg again
[05:46] <burek> thank you
[05:46] <burek> im asking that because it is not very easy to reproduce the issue...
[05:46] <nilsge> I can do that now since I don't need jack for that anymore
[05:46] <nilsge> I found it rather easy. In 999 of 1 cases it did not work :|
[05:48] <burek> yes, but you know Murphy...
[05:48] <burek> if there is a chance it wont be present at developers' machines, it won't be present :)
[05:49] <nilsge> there were a few xruns and the video/audio was not continous anymore
[05:49] <nilsge> but not as bad as with jack
[05:50] <nilsge> but the audio was still 15 seconds behind my host (and the video 4-5 seconds)
[05:50] <nilsge> so +10s for audio
[05:51] <burek> so the buffer might not be the only cause for that issue.. :s
[05:52] <nilsge> I have to play around with the values a bit to see if that has any influence
[05:52] <nilsge> at least I know that my jack bridge only adds ~20ms to that latency
[05:53] <nilsge> for example the audio stream was uncompressed right now
[05:55] <nilsge> burek: ah! with mp3 and 128k it suddenly gets down to ~5 seconds as well
[05:55] <burek> geez
[05:55] <nilsge> I have to see how stable it is because now the xruns become audible again
[05:55] <nilsge> maybe revert to the buffer version of ffmpeg again
[05:55] <burek> :S
[05:56] <nilsge> since the delay was the same anyway
[05:56] <nilsge> maybe I get no xruns AND proper sync
[05:56] <burek> well play around and see what you get.. i lost a lot of time trying to resolve that issue
[05:56] <nilsge> yes, thank you very much
[05:57] <nilsge> I didn't expect it to be this long
[05:57] <burek> :beer: :)
[05:57] <burek> you see, it's never boring here :)
[05:59] <nilsge> burek: and at last I can confirm that the sync is still as good as before (I don't know how much that is if I stream games with real action sfx sync) and no xruns through the buffersize
[05:59] <burek> that's why games should dup their display to some udp port or something
[05:59] <burek> so that we don't have to grab the screen
[06:00] <nilsge> you still need audiosync then
[06:00] <nilsge> the graphiccard and soundcard should internaly be able to generate a video stream
[06:00] <nilsge> well, actually that is what a hardware recorder does :)
[06:00] <burek> :)
[06:01] <nilsge> that must be the most reliable solution. Just dvi through and analog audio through
[06:02] <nilsge> if you know the youtube channel Angry Video Nerd this is what he does, playing retro games. Never emulator and screen captures, he just records the output of the consoles directly to a DVD recorder. May sound a bit inconvenient and ancient but it is rock solid
[06:03] <nilsge> burek: good night. I should have been in bed 7 hours ago :|
[06:03] <nilsge> but a good solution is worth 7 hours of sleep
[06:04] <burek> :)
[06:04] <burek> good night and take care :)
[09:15] <Crosma> Yo. I'm just doing -vcodec copy -acodec copy on an mov to mp4 and it says, "multiple edit list entries, a/v desync might occur, patch welcome" when I try to play the mp4. The mkv only has one audio and one video stream.
[10:54] <kode54> http://pastie.org/6028534
[10:54] <kode54> that's the readme for the source package that is available for building ffmpeg 1.0.1 for foobar2000
[10:55] <kode54> is there something about that process which would make it inherently incompatible with any other build of same version numbered av*.dll
[10:55] <kode54> avcodec-54.dll etc
[10:55] <kode54> same numbers
[10:55] <kode54> it's not so much a problem with users building ffmpeg to replace it, which nobody has reported attempting
[10:56] <kode54> so much as some random piece of crap Windows software appearing which forcibly loads itself into every process in the system, and auto loads its own copies of the same named but ABI incompatible ffmpeg
[10:56] <kode54> which I know is not standard ffmpeg practice
[10:56] <kode54> but apparently it's not compatible with some other stock builds of av*.dll either
[11:55] <DEATH> Hi
[11:56] <DEATH> I'm trying to build FFmpeg DLLs with different file names (as specified in http://www.ffmpeg.org/legal.html - add own suffix to the file names to prevent a clash with certain other software using FFmpeg).
[11:56] <DEATH> Is there a ./configure option to do that? I cannot just rename the DLLs because that will break references between avcodec/avutil and so on
[11:57] <DEATH> Must have other DLLs reference each DLL by the new name
[11:57] <DEATH> In fact avcodec and avutil are all I care about
[12:17] <dentex> HI everyone!
[12:18] <dentex> I have a question about crosscompiling FFmpeg for Android.
[12:21] <dentex> it works with a standard set of flags. But when I add '--enable-libmp3lame' don't
[12:23] <dentex> I have also compiled liblame for android, but I don't know where to put the libs for the ffmpeg compiler to find them; or what to change to point there.
[12:24] <dentex> I have the error 'libmp3lame not found'
[12:34] <klaxa> dentex: did you add -lmp3lame -L/path/to/libmp3lame to ./configure?
[12:35] <dentex> no... let me try
[12:35] <dentex> thanks
[12:36] <dentex> just one thing:
[12:36] <dentex> from another project to build lame for android, I have now the structure
[12:36] <dentex> ./libs/armeabi/liblame.so
[12:37] <dentex> do you know if this is the missing library?
[12:45] <nilsge> hello. what does the parameter -bufsize do?
[12:53] <dentex> -lmp3lame is unknown...
[12:54] <Nano> hi, i get the following error trying to use --enable-libmp3lame
[12:54] <Nano> ERROR: libmp3lame >= 3.98.3 not found
[12:54] <Nano> this is my configure call:
[12:54] <Nano> ./configure --arch=x86 --target-os=mingw32 --disable-asm --disable-doc --disable-ffplay --disable-ffserver --disable-ffprobe --disable-everything --enable-libmp3lame --extra-cflags=-I/usr/local/include --extra-ldflags=-L/usr/local/lib
[12:55] <Nano> lame/lame.h exist in /usr/local/include. why does the configure script fail ?
[12:56] <klaxa> dentex: ah probably is just -llame
[12:57] <klaxa> Nano: are you sure the version is >= 3.98.3?
[12:57] <dentex> klaxa: ok.
[12:57] <dentex> trying
[12:59] <Nano> klaxa: yes it's 3.99.5
[13:02] <klaxa> it also exists as liblame.so in /usr/local/lib then i assume... hmm that should actually work though i think... i'm not too sure though
[13:02] <Nano> where is the configure script command check_lib defined ? i'd like to check where it looks for the sources...
[13:03] <Nano> or is there a kind of verbose mode ?
[13:03] <klaxa> you can check config.log i guess
[13:03] <klaxa> not sure whether or not that will help a lot though :X
[13:04] <dentex> klaxa: with "did you add -lmp3lame -L/path/to/libmp3lame to ./configure?" you mean an flag when calling ./configure or somewhere inside the file?
[13:04] <dentex> *as
[13:04] <klaxa> flag when calling ./configure
[13:04] <dentex> ok both unknown
[13:05] <klaxa> :S
[13:05] <dentex> [OT]are those from Mplayer?[/OT]
[13:05] <klaxa> i'm not too familiar with compiling ffmpeg although i compile it myself every now and then, but cross-compiling is something different again
[13:05] <Nano> the config.log says that it found the lame.h file but there seems to be a reference to the original lame configure location, which doesn't exist any longer....
[13:07] <dentex> klaxa: I know, thanks. And I'm not an expert.
[13:07] <Nano> dentex: what you're tryin todo ?
[13:07] <dentex> HI: same as you. But crosscompiling for android
[13:07] <Nano> :-)
[13:08] <Nano> and what's youre problem ?
[13:08] <dentex> I cannot make the build script find the lame libs
[13:08] <dentex> 5sec
[13:08] <dentex> ...
[13:08] <Nano> did you configure/make/make install lame ?
[13:08] <dentex> it works with a standard set of flags. But when I add '--enable-libmp3lame' don't
[13:08] <dentex> <dentex> I have also compiled liblame for android, but I don't know where to put the libs for the ffmpeg compiler to find them; or what to change to point there.
[13:09] <dentex> it installs for the host system, but useless for the android build. Anyway I tried
[13:09] <dentex> libs not found
[13:09] <dentex> same error as for you
[13:10] <dentex> do you have any hint?
[13:10] <Nano> the make install copiesthe libs to /usr/local/lib
[13:10] <dentex> right
[13:10] <Nano> see if you have libmp3lame.a in there
[13:11] <Nano> for me copying the lame/lame.h failed
[13:11] <dentex> 1) no
[13:11] <dentex> 2) same
[13:11] <Nano> so i created a folder lame in /usr/local/include and copied the lame.h in it.
[13:13] <Nano> and then i added  the --extra-cflags=-I/usr/local/include to the "./configure --enable-libmp3lame" call
[13:13] <Nano> cause the configure script is looking for lame/lame.h file
[13:13] <dentex> Nano: did you try adding '--extra-ldflags=-L/usr/local' ?
[13:14] <Nano> i've added --extra-ldflags=-L/usr/local/lib
[13:16] <dentex> yes, with /lib
[13:18] <Nano> ok, the config.log seems to be helpful now.
[13:18] <Nano> there i get: error: undefined reference to '_fpgetmask'
[13:18] <Nano> /usr/local/lib/libmp3lame.a: error: undefined reference to '_fpsetmask'
[13:18] <Nano> collect2: ld returned 1 exit status
[13:18] <Nano> ERROR: libmp3lame >= 3.98.3 not found
[13:19] <Nano> so both files (header and lib) has been found. but theres a build error in lame.
[13:20] <Nano> dentex: check your config.log
[13:21] <Nano> if you need help put the output in pastebin
[13:21] <dentex> Nano: ok thanks
[13:35] <blight> hi
[13:36] <blight> can someone tell me what kind of subtitle support ffmpeg has and how to use the API?
[13:37] <nilsge> yesterday I searched and tried for hours how to get proper sound for live streaming (together with burek). It is now stable and the quality is good, but I still have a 4 second delay. Video is first, audio is behind. I tried reducing the quality of the audio, but to no audible effect. I searched the web now for an hour again, without luck. So:
[13:37] <nilsge> do you know any parameters or tricks to make sure a+v are in sync?
[13:38] <nilsge> my current ffmpeg commandline is: ffmpeg -f x11grab -s 640x480 -r 30 -i :1.0 -f alsa -ac 2 -acodec pcm_f32le -i hw:Loopback,0,1 -c:v libx264 -preset fast -pix_fmt yuv420p -s 640x480 -c:a libfaac -ab 128k -threads 0 -f flv "rtmp://live.twitch.tv/app/*********************" &
[13:40] <dentex> Nano: http://pastebin.com/K0hfymDF
[13:47] <nilsge> additional info to the sync problem: if I record instead of streaming everything looks fine. So I guess it isn't really my fault?
[13:48] <rascal999> i have nice --20 ffmpeg -y -f alsa -ac 2 -ar 48000 -i hw:0,0 -f x11grab -r 30 -s 960x540 -i :0.0 -acodec pcm_s16le output.wav -an -vcodec libx264 -preset ultrafast -crf 0 output.mp4 -- which generates and audio and video output, is it possible to create one file with audio and video in it?
[13:53] <XATRIX> Hi guys, is it possible to say ffmpeg to encode my mp3 with fraunhofer instead of lame ?
[13:57] <JEEB> XATRIX, I don't think fraunhofer's mp3 encoder is available as open source
[13:57] <JEEB> unlike their AAC encoder
[13:57] <XATRIX> Currently i'm using such a string to catenate multiple files into the one big mp3 file
[13:58] <XATRIX>  /usr/bin/ffmpeg -i "concat:temp790-1.mp3|temp790-2.mp3|...." -acodec copy output.mp3
[13:58] <XATRIX> But i have a strange issue
[13:58] <Nano> dentex: this is the problem i've mentioned
[13:58] <XATRIX> Sometimes the output mp3 is not readable  by the JS players via web
[13:59] <XATRIX> Or it doesn't play the whole mp3 ifles
[13:59] <XATRIX> Or some mp3 files missing inside the big one
[13:59] <Nano> dentex: call './configure --enable-static --disable-shared --disable-rpath --disable-frontend --disable-gtktest' in lame-3.xx.x folder
[14:00] <Nano> dentex: then 'make', then 'make install'
[14:00] <Nano> dentex: then copy the lame-3.xx.x/include/lame.h to /usr/local/include/lame
[14:01] <JEEB> hmm, shouldn't it copy the header automagically/
[14:01] <JEEB> ?
[14:01] <JEEB> during 'make install'
[14:11] <XATRIX> how can i list available codecs that i can use to encode my audio ?
[14:12] <dentex> Nano: Ok I'm trying
[14:12] <dentex> thanks
[14:13] <JEEB> XATRIX, I'm not sure if there's a way to only output the audio ones, but ffmpeg -codecs lists all codecs in that ffmpeg
[14:13] <XATRIX> yea, thanks
[14:13] <dentex> Nano:I'm just not sure that using a toolchain ./configure will look there
[14:13] <JEEB> I guess you could use grep or something after -codecs
[14:14] <JEEB> because third symbol would be 'A'
[14:14] <JEEB> for audio
[14:17] <dentex> NAno
[14:18] <dentex> Nano: I can't 'make' and then 'make install' in the  lame-3.xx.x folder because I already have the libs built for android
[14:18] <dentex> Nano: I don't need the libs built for the host system in /usr...
[14:18] <dentex> sorry
[14:19] <dentex> I just don't know how to make the build script know where they are.
[14:20] <makara> any idea why this fails: avconv -i Track\ 1.m4a -acodec copy -f aac track1.aac
[14:21] <dentex> makara: did you tried 'avconv -i Track\ 1.m4a -vn -acodec copy track1.aac' ?
[14:21] <JEEB> does it tell you that you need a bit stream filter?
[14:21] <JEEB> to ADTS
[14:21] <dentex> makara: should work
[14:22] <makara> dentex, does, but I need to build a script to go through multiple directories, so I want to leave out the output filename and force format type
[14:22] <makara> says: Requested output format 'aac' is not a suitable output format
[14:23] <makara> but 'ffmpeg -formats' includes aac
[14:25] <dentex> makara: is Track\ 1.m4a a video file?
[14:26] <makara> no, it works fine with the line you gave me
[14:26] <makara> but why it says aac not acceptable format?
[14:26] <dentex> :S
[14:27] <dentex> but you can leave out '-vn'
[14:28] <dentex> makara so you always need .aac output format? from different input types?
[14:28] <dentex> all audio input?
[14:32] <makara> i'm trying to convert all my m4a's into straight aac's so that I can distinguish between the alac's I'm getting, which also - gag me with a spoon - come as m4a's.
[14:34] <relaxed> why don't you ffprobe to see instead of demuxing everything?
[14:34] <relaxed> You're probably losing the metadata with that method.
[14:37] <dentex> then why don't you simply do it with '-i track.m4a track1.aac'
[14:38] <dentex> it will force .aac from the extension
[14:48] <makara> no re-encoding, and as relaxed pointed out I'd like to keep metadata
[14:51] <makara> relaxed, metadata is preserved conversion
[14:58] <XATRIX> guys, can you support me a bit ? I'm totally in a trouble. Can you tell me was the ecoding OK ? Or there was problem ecnountered ? http://fpaste.org/f1Bv/
[14:58] <makara> ok, I see now. can demux but not mux aac
[15:01] <makara> raw aac
[15:06] <XATRIX> ?
[15:07] <Fjorgynn> ?
[15:08] <XATRIX> http://fpaste.org/f1Bv - is it ok ? Oh some troubles detected ?
[15:09] <XATRIX> s/Oh/Or
[15:30] <XATRIX> Guys, any idea how to control "pitch" while encoding ?
[15:30] <XATRIX> The trouble is i have a few files to concat
[15:30] <XATRIX> It has mixed, mp3 en/ru voice
[15:31] <XATRIX> And, after i finally get result mp3, it has en voice ok, but the ru voice is changed, it become like a robo-voice
[15:31] <XATRIX> a lower pitch rate
[15:33] <XATRIX> Just for example this is the initial ru voice, http://devel.rf.ua/1359732328_118_1.mp3 . This is the file catenated with en.mp3 + ru.mp3 + en.mp3 http://devel.rf.ua/output1.mp3
[15:33] <XATRIX> I do encoding with #ffmpeg -i "concat:ru1359813352_0.mp3|1359732328_118_1.mp3|1359732328_118_2.mp3|ru1359813352_0.mp3" -acodec libmp3lame /mnt/www/rf.ua/output1.mp3
[15:34] <XATRIX> I'm totally screwed up with it :(
[15:34] <XATRIX> I have no idea what's the trouble it has while encoding
[15:35] <klaxa> shouldn't you use -f for concat?
[15:36] <Keshl> Different bitrates, oÉo? Dunno, not an expert here.
[15:41] <relaxed> XATRIX: -acodec copy
[15:47] <XATRIX> relaxed: the same crap it does
[15:47] <XATRIX> Keshl: the bitrates are the same
[18:35] <pietro10> I have ffmpeg from https://launchpad.net/~jon-severinsson/+archive/ffmpeg with all the -extra packages and it's complaining that there is no vcodec libx264 when I have libx264 installed on mys ystem. What am I doing wrong? Thanks.
[18:38] <pietro10> er unknown decoder libx264
[18:39] <pietro10> http://pastie.org/6030257 here is what I am trying to do
[18:39] <pietro10> following the -c copy instructions http://ffmpeg.org/trac/ffmpeg/wiki/Creating multiple outputs
[18:46] <pietro10> if I take out the decoder from the second part of the pipeline (just have -f flv), ffmpeg complains with
[18:46] <pietro10> pipe:: could not find codec parameters
[18:55] <sgfgdf> hello, guys! i have a video with the following audio properties: "Audio: ac3, 48000 Hz, 5.1(side), fltp, 384 kb/s (default)". now i want to convert it to stereo AAC audio. i use this arguments -- "-c:a libfaac -ar 48000 -ab 384k -ac 2" and the output has the following audio properties: "Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 165 kb/s". so the bitrate is not the same. why is this happening?
[18:56] <pietro10> am I going to hae to do a parallel encoding?
[19:38] <pietro10> removing -f flv and just leaving -i - and -c copy gives me "pipe:: Invalid data found when processing input
[19:38] <pietro10> "
[19:45] <pietro10> am I going to have to repeat the options?
[20:21] <Youka> What's the common way to get the frame number from decoded AVFrame?
[20:28] <Mavrik> Youka: what do you mean by frame number?
[20:29] <Youka> The frame index.
[20:30] <Youka> I want it from AVFrame, not counting manually be decoding.
[20:30] <Youka> *by
[20:32] <Mavrik> Youka: you have frame_number field on your decoder context
[20:32] <Mavrik> there are also picture_number fields on AVFrame itself, but I don't see them being set on decoding
[20:37] <Youka> frame_number of codec is what's already decoded, so av_seek_frame isn't usable.
[20:39] <Mavrik> av_seek_frame takes timestamp not frame number.
[20:44] <Youka> thx, i will use coded_picture_number, this seems to solve my problem. frames are not always aligned, so i have to look forward sometimes, but when i have the number of frames i wanted, i can stop
[20:45] <Mavrik> um
[20:45] <Mavrik> you did hear me that av_seek_frame doesn't take the frame count, but timestamp right?
[20:45] <Youka> right
[20:58] <mantas322> Hi guys
[20:59] <Mavrik> hey
[20:59] <mantas322> I'm trying to convert from a .MOV video type to a avi or mpg
[20:59] <mantas322> however when i do I lose colors
[20:59] <mantas322> twindows says the "Type" is QuickTime Movie
[21:00] <Mavrik> mantas322: can you please paste your command line and full output of then command to pastebin?
[21:00] <Mavrik> alot easier to help you that way? :)
[21:00] <Mavrik> also, what is your goal? where are you trying to play the output file?
[21:00] <mantas322> i've tried all sorts of different combinations
[21:00] <mantas322> my goal is I want tthe same quality
[21:00] <mantas322> and dont want to lose any colors
[21:01] <mantas322> ffmpeg -i C:\ffmpeg\bin\1.mov C:\ffmpeg\bin\OUT1.avi
[21:01] <mantas322> -i C:\ffmpeg\bin\1.mov -f avi -vcodec mpeg4 -qscale 4 -g 300 -vtag DIVX -acodec libmp3lame -ab 192k -ar 44100 -ac 2 -y output.avi
[21:02] <mantas322> I would assume that a simple "ffmpeg -i C:\ffmpeg\bin\1.mov -qscale 0 C:\ffmpeg\bin\OUT1.avi"   should get me the same type of video
[21:03] <mantas322> anyways I think im being too picky
[21:03] <mantas322> its really not that big of a deal.
[21:04] <LithosLaptop> mantas322: does this work? ffmpeg -i C:\ffmpeg\bin\1.mov -f avi -vcodec copy -acodec copy -y C:\ffmpeg\bin\OUT1.avi
[21:04] <mantas322> lemme try
[21:04] <Mavrik> mantas322: .avi can contain a lot of different video  and audio formats
[21:05] <Mavrik> if you don't pass them ffmpeg will choose a default
[21:05] <Mavrik> if you do a copy you'll get another one
[21:05] <mantas322> LithosLaptop, no I lose video
[21:05] <mantas322> sound only
[21:05] <Mavrik> that's why I asked you "What are you trying to achieve?"
[21:05] <LithosLaptop> oh ok
[21:05] <Mavrik> so we know which format you're trying to create
[21:05] <Mavrik> also you still didn't paste full command output so we still don't know what your input file is.
[21:05] <mantas322> it doesnt have to be avi
[21:05] <mantas322> it could be mpg mpeg
[21:05] <Mavrik> "avi" is a format.
[21:06] <Mavrik> not video codec, not audio codec
[21:06] <Mavrik> what codecs do you need on the output?
[21:06] <mantas322> 1.MOV  QuickTime Movie from a s100 cannon camera
[21:06] <Mavrik> what device are you trying to play the output on?
[21:06] <mantas322> whatever codecs achieve the original video quality
[21:06] <mantas322> windows movie maker
[21:07] <mantas322> I'm trying to make a cute kitten video for youtube
[21:07] <Mavrik> ah I see
[21:07] <LithosLaptop> oh do you want to be able to use your video in windows movie maker?
[21:07] <mantas322> yes.
[21:07] <mantas322> but it doesnt except .mov
[21:08] <Mavrik> mhm
[21:08] <Mavrik> mantas322: can you please do a "ffprobe" on your .mov file and paste output to a pastebin?
[21:09] <mantas322> okay
[21:09] <Mavrik> it's easier to tell you what to do when we know what resolutoin, quality and pixel format your video is in ;)
[21:09] <mantas322> http://imgur.com/Q2qaTLq
[21:10] <LithosLaptop> h.264
[21:10] <LithosLaptop> hmm
[21:11] <Mavrik> yeah, not supported in  movie maker
[21:11] <mantas322> is there a free alternative to windows movie maker?
[21:11] <Mavrik> mantas322: ffmpeg -i "1.MOV" -vcodec mpeg2video -vb 20000k -acodec mp2 -ab 128k output.mp2
[21:12] <Mavrik> should work
[21:12] <Mavrik> without significant loss of quality
[21:12] <Mavrik> if I see correctly movie maker will take mp2 files
[21:13] <mantas322> 200mb to 700kb
[21:13] <mantas322> sound only
[21:13] <mantas322> didnt work, but thanks anyways.
[21:13] <LithosLaptop> or maybe uncompressed
[21:14] <LithosLaptop> what -vcodec is uncompressed?
[21:14] <Mavrik> LithosLaptop: none recognised by movie  maker :\
[21:14] <Mavrik> plain yuv output
[21:14] <Mavrik> mantas322: what?
[21:14] <mantas322> your command didnt work, it makes a 700kb mp2 file
[21:15] <mantas322> form a 200mb mov file
[21:15] <mantas322> "ffmpeg -i "1.MOV" -vcodec mpeg2video -vb 20000k -acodec mp2 -ab 128k output.mp2"
[21:16] <LithosLaptop> somebody had the same problem: http://forum.doom9.org/archive/index.php/t-152345.html
[21:16] <LithosLaptop> looks like windows movie maker is a bit picky
[21:17] <mantas322> oh well
[21:17] <Mavrik> mantas322: a 20Mbit/s video can't be 700kb -_-
[21:18] <mantas322> no i was discribing what happened when i ran your command
[21:18] <mantas322> input file was 200mb and it created an mp2 output file with sound only 700kb
[21:57] <sgfgdf> guys, is it possible to use QuickTime AAC codec to encode audio with ffmpeg?
[22:00] <pietro10> is it possible to have alsa record the speaker output or the sound from a specific program, not my mic?
[22:00] <pietro10> right now I have         -f alsa -ac 2 -i pulse \
[22:08] <LithosLaptop> sgfgdf: don't think so. the best AAC output you would be able to get from ffmpeg is with fdkaac
[22:15] <sgfgdf> LithosLaptop, i don't know if my message got delivered? i got disconnected.
[22:15] <LithosLaptop> didn't receive any messages
[22:16] <JEEB> fdk-aac with -afterburner 1 is the best you get with ffmpeg
[22:16] <JEEB> which should actually be pretty good
[22:16] <JEEB> regarding AAC encoder
[22:16] <JEEB> *encoding
[22:16] <sgfgdf> LithosLaptop, is the fdkaac and libfaac the same thing?
[22:17] <LithosLaptop> nope
[22:17] <JEEB> faac is quite worse
[22:17] <LithosLaptop> libfaac is old and inferior quality encoder
[22:18] <JEEB> it's one of the reference code based encoders, not to mention it was improperly licensed (the reference code wasn't GPL-compatible although the creator tried to pass faac as GPL IIRC)
[22:18] <JEEB> the other reference code encoder, vo-aacenc is even worse than the internal libavcodec aac encoder, which is quite hard to achieve to be honest :D
[22:19] <sgfgdf> so if i install fdk-aac how should i tell ffmpeg to use it as audio ancoder? -c:a libfdk-aac?
[22:19] <JEEB> libfdk_aacenc
[22:19] <JEEB> you have to enable it naturally in ffmpeg as well
[22:19] <JEEB> when compiling it
[22:20] <JEEB> compile fdk-aac -> compile ffmpeg with --enable-libfdk_aacenc (I think it was like this?) -> see it with ffmpeg -codecs |grep "aac"
[22:20] <sgfgdf> JEEB, where can i check the references like fdk-aac -> libfdk_aacenc and other libraries matching?
[22:22] <JEEB> ./configure --help
[22:22] <JEEB> see the External library support: aprt
[22:22] <JEEB> *part
[22:28] <sgfgdf> JEEB, does people encode their video using ffmpeg and then use external audio encoder such as QuickTime to encode the audio if they want the QuickTime AAC audio? is this popular practice?
[22:29] <Mavrik> nah, too much work
[22:29] <JEEB> with ffmpeg usage not really, but I've seen that kind of usage with people who use avisynth + x264 and so forth more manually for encoding. Might have been more popular before, but now with fdk-aac I think most people are OK with that quality.
[22:29] <JEEB> To be honest, most people were OK with faac, which wasn't that great to begin with, so :D
[22:29] <JEEB> fdk-aac is fraunhofer's
[22:30] <JEEB> and with -afterburner 1 it should be pretty damn good :3
[22:30] <sgfgdf> JEEB, what does this option do?
[22:30] <JEEB> enables fdk-aac's mode with the same name
[22:31] <JEEB> seems to enable slower algorithms for better quality
[22:34] <sgfgdf> JEEB, where can we put the Nero AAC and the default aac which comes with ffmpeg (which i don't know how to name it)? so far -- 1. QuickTime AAC; 2. fdk-aac; 3. faac; 4. vo-aacenc; if i understood you correctly.
[22:35] <JEEB> I wouldn't necessarily put QT's AAC on top
[22:35] <JEEB> I remember fraunhofer's other versions doing rather well on tests
[22:35] <JEEB> @ hydrogenaudio
[22:37] <LithosLaptop> Nero AAC is alot better than FAAC
[22:37] <sgfgdf> JEEB, is Nero AAC somewhere near QT AAC and fdk-aac?
[22:38] <LithosLaptop> Nero AAC/QT AAC/fdk-aac are very close to each other. hard to judge
[22:38] <sgfgdf> JEEB, i mean the three above to be almost equal?
[22:38] <sgfgdf> ah okay
[22:38] <JEEB> QT | nero | fdk-aac > faac > ffaac (internal) > vo-aacenc
[22:38] <sgfgdf> and about ffmpeg's aac (how should i call it?)?
[22:40] <sgfgdf> are all of the codecs free for personal use?
[22:41] <sgfgdf> and which of the codecs will charge you if you use them for commercial purposes?
[22:41] <JEEB> I have no idea about the licensing of nero or QT's encoder for any commercial purpose
[22:43] <JEEB> all the others have a license that you can read (Except for faac, that one tries to be GPL, but it isn't because it uses non-GPL reference encoder code)
[22:43] <JEEB> and then there's the whole thing about taking an AAC license from VIA licensing
[22:44] <JEEB> if you are going to do business it's better to ask a lawyer if you don't want to license AAC
[22:45] <sgfgdf> JEEB, no, i was just curious.
[22:45] <JEEB> I think I had someone try license nero for their encoding chain
[22:45] <JEEB> they didn't get an answer
[22:45] <JEEB> not sure if you can license QT either *shrug*
[22:47] <JEEB> vo-aacenc is Apache2, ffaac is LGPL, faac is an invalid mish-mash of supposedly GPL code and one of the reference encoders, fdk-aac has a custom license from fraunhofer that is not (L)GPL compatible
[22:47] <JEEB> most of these software licenses only apply towards distributing binaries
[22:47] <JEEB> and the rules you have to take in case you distribute builds of them, or use the libraries somewhere
[22:48] <JEEB> I think fdk-aac's license told you you had to license AAC (via VIA licensing methinks) to distribute it
[22:48] <JEEB> (binaries)
[22:48] <sgfgdf> btw i forgot to ask about aacplus, but we talked with a guy here about it. it appears to achieve a good quality in very low bitrate.
[22:49] <JEEB> that's HE-AACv2 specific methinks, fdk-aac can do it too
[22:49] <JEEB> HE-AAC(v2) is a version of AAC that cuts more information out
[22:49] <JEEB> it's specifically meant for use cases of 64kbps or less
[22:49] <JEEB> aka "it probably sounds close enough for the bit rate"
[22:50] <sgfgdf> JEEB, is it normal to use it for encoding a movie audio?
[22:50] <JEEB> if your primary need is to lower the bit rate
[22:51] <JEEB> if you want keep quality, higher bit rate and LC-AAC cuts less information out
[22:54] <sgfgdf> JEEB, if i lower the bit rate i will get smaller file, right? so i think i can't distinguish a difference while using 64kb/s aacplus encoded audio and 192kb/s AAC audio (which i don't know the encoder of).
[22:54] <LithosLaptop> you won't expect to see HE-AAC on normal/high bitrate 720p or 1080p videos. LC-AAC more suitable
[22:55] <JEEB> sgfgdf, yes -- so if you're encoding for very low bit rate scenarios, HE-AACv2 is very useful
[22:55] <JEEB> as you can push the audio down to 48kbps or so while still kind of feeling similar
[22:55] <sgfgdf> JEEB, what can be a such scenario?
[22:56] <sgfgdf> i mean if i had to choose i will choose smaller filesize.
[22:56] <sgfgdf> but you said that it is very unlikely to see it in HD videos.
[22:57] <LithosLaptop> the reason is HE-AAC can't acheive transparency
[22:57] <JEEB> yes, because in such scenarios generally the video bit rate is already so high that 48kbps becoming 192kbps for better audio quality doesn't really cost you much at all
[22:57] <JEEB> and yes, HE-AAC(v2) in general cuts more information out
[22:59] <sgfgdf> LithosLaptop, what should i understand under transparency?
[22:59] <LithosLaptop> sound just like the original source
[23:01] <sgfgdf> LithosLaptop, but isn't it just like the original if i can't distinguish a difference between a video and then the same video re-encoded with HE-AAC(v2)?
[23:01] <LithosLaptop> 64Kbps HE-AAC sounds pleasant(not annoying like 64Kbps LC-AAC would), but not transparent. in other words it won't sound like the original
[23:02] <sgfgdf> probably it's just me and other people will notice it. i don't know.
[23:02] <LithosLaptop> If you can't distinguish then it is transparent to you, but I find it hard to beleive. Are you using headphones?
[23:09] <sgfgdf> LithosLaptop, yes, but i'm pretty bad at such things, so probably it is just me. everytime i try to do such a comparison i find myself really struggling.
[23:11] <sgfgdf> JEEB, LithosLaptop, thank you a lot for the help guys!
[23:11] <LithosLaptop> no prob
[00:00] --- Sun Feb  3 2013


More information about the Ffmpeg-devel-irc mailing list