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

burek burek021 at gmail.com
Mon Nov 28 03:05:02 EET 2016


[01:02:12 CET] <Hello71> how do I make showspectrum go faster
[01:18:49 CET] <ffmpeg529> hi, i want to record my voice for long so that whenever I talk it record my voice and whenever I stoped talking it get pause , I searched but couldn't find a good method plz help me
[01:20:39 CET] <klaxa> https://ffmpeg.org/ffmpeg-filters.html#silenceremove ?
[01:23:02 CET] <ffmpeg529> can u say how to use it by a simple example ?
[01:23:55 CET] <ffmpeg529> is it possible to use it while i'm recording audio ?
[01:25:06 CET] <klaxa> maybe? give it a try, to process a recording i would think: ffmpeg -i input.ogg -filter_complex "silenceremove=0:0:0:-1:1:-90dB" output.ogg
[01:25:23 CET] <klaxa> taken from the example section below
[01:26:26 CET] <ffmpeg529> ok thank you klaxa :)
[02:22:00 CET] <Kadigan_KSB> ffmpeg529: what you want is a feature called voice activity detection. I'm seeing libspeexenc (Speex) having some features related to that - VAD and DTX. The first simply lowers bitrate to almost nonexistent when recording background noise. The second attempts to write only one frame when no voice activity is detected. It needs the external Speex library to encode, however.
[02:22:16 CET] <Kadigan_KSB> Oh, he's gone.
[03:58:53 CET] <fling> Is not lossless H.264 crop possible?
[04:00:35 CET] <klaxa> not lossless? so lossy?
[04:01:45 CET] <c_14> fling: not with ffmpeg
[04:02:02 CET] <fling> What is so special about avchd?
[04:03:48 CET] <fling> Which app will you suggest for cropping?
[04:04:53 CET] <fling> How to reencode to the same codec with all the same parameters like colorspace and everything?
[04:10:09 CET] <DHE> there's no guaranteed way to get the exact same settings. matching the profile and bitrate are your best hopes.
[04:10:23 CET] <DHE> x264 does put encoding options metadata into streams which you might be able to pull
[04:37:49 CET] <Kadigan_KSB> fling: you should generally get the same colorspace and bitness coming out as going in, unless a) the selected codec requires a change (of which you may be informed), or b) you specify a different color space outright
[04:38:10 CET] <Kadigan_KSB> IIRC ffmpeg preserves as much of the original as it can, and that includes keeping the parameters unless otherwise noted/changed
[04:44:17 CET] <Etienne> Hey guys, where can I find detailed specifications for the FFM live stream format?
[05:39:13 CET] <mozzarella> hello
[06:12:37 CET] <snacks> hey, I have some questions about looping videos: If I have a video that's the exact same thing repeated over and over, how much extra filesize does each loop take up? Also, what if the video and audio are both looped, but not synced with eachother?
[06:13:46 CET] <fling> snacks: each loop takes slightly less space than the first one (depending on codec)
[06:14:13 CET] <fling> snacks: works the same for video and audio.
[06:15:09 CET] <snacks> what I mean is e.g. the video is a 5-second loop and the audio is a 7-second loop
[06:15:52 CET] <snacks> so if the audio and video are stored together, they can't be considered a "loop" per se
[06:16:14 CET] <snacks> not until the 35-second mark at least
[06:20:24 CET] <snacks> also, is there a way to use `-stream_loop -1` to make both the 5-second video and 7-second audio loop on their own loops?
[06:20:31 CET] <snacks> or some equivalent
[06:20:41 CET] <snacks> tbh the documentation is kind of conflicting and lacking
[06:21:28 CET] <furq> you probably want the loop/aloop filters
[06:30:10 CET] <fling> snacks: or you could just loop your inputs
[06:34:10 CET] <snacks> fling: I'm considering it, but the problem is that I want to seamlessly loop an e.g. 20 second gif and an e.g. 3m17s song, which could triple++ the filesize
[06:34:34 CET] <snacks> idk though, maybe I'm just optimising prematurely
[06:35:39 CET] <fling> snacks: are you about to use gif video in the output file?
[06:36:32 CET] <fling> snacks: or is gif your input?
[06:36:44 CET] <fling> snacks: tell me what the output actually is.
[06:43:44 CET] <snacks> fling: basically, take a link like https://gifsound.com/?gif=file-9gag-lol.9cache.com/file/28ekK318Q8/ezgif-3056121738.gif&v=OBQE_TNI7zw&s=7 , wget the gif, youtube-dl the sound, then put it into a looping video like on the webpage.
[06:44:05 CET] <snacks> except without the "gif and youtube video load/play at different rates" problem
[06:44:36 CET] <snacks> because obviously, a .webm will play at the speed a .webm will play, it won't generally desync the audio and video
[06:45:10 CET] <snacks> also, it means I don't have to worry about youtube videos being DMCA'd and losing the gifsound as a result
[06:46:32 CET] <fling> snacks: so what is your output?
[06:46:46 CET] <snacks> fling: A video?
[06:46:58 CET] <snacks> fling: I'm not sure what question you're asking.
[06:46:59 CET] <fling> snacks: a video file? Which codec? gif or not?
[06:47:48 CET] <snacks> fling: I'm not particularly picky on the codec, although webm would be nice. As long as it has both the video and audio and it loops, it's good.
[06:49:10 CET] <snacks> fling: I'm assuming webm is a codec.
[06:49:31 CET] <fling> snacks: define it loops
[06:49:37 CET] <klaxa> not quite, it's a container format, vp8 or vp9 are the codecs webm can hold
[06:50:00 CET] <fling> Let me explain what I understood from your messages
[06:50:30 CET] <fling> Two inputs: 1. gif video: 2. an unknown codec audio
[06:50:59 CET] <fling> One output: webm with vp8/9 video and audio copied as-is
[06:51:12 CET] <fling> snacks: does this look correct to you? ^
[06:51:34 CET] <fling> snacks: the note is that the gif input should be looped prior encoding, right?
[06:51:39 CET] <fling> snacks: is this what you want? :D
[06:54:18 CET] <snacks> fling: Sort of. I want it so that if the video is run with 'mpv --loop=inf videoname', both the audio and video loop perfectly.
[06:55:03 CET] <snacks> but
[06:55:49 CET] <snacks> if I can't get that, then I guess I'd go with them both being looped for a few minutes and then one of them being cut off.
[06:56:36 CET] <snacks> I pretty much want it to be just like the website I linked before, except, y'know, not on the website.
[06:57:17 CET] <fling> snacks: I'm not using sites much.
[06:57:23 CET] <fling> snacks: are you going to loop the audio too?
[06:58:44 CET] <snacks> fling: ideally, yeah.
[06:59:48 CET] <c_14> how long do you want the video to be?
[07:00:28 CET] <snacks> well, other than filesize problems it doesn't really matter how long it is, if it's going to be looped anyway.
[07:00:47 CET] <fling> ffmpeg -f concat -safe 0 -i <(for i in {1..9001};do printf "file '%s'\n" /tmp/test/girl.gif;done) -i 09\ =B@>.mp3 -c:v vp9 -c:a opus -t 10 test.webm
[07:01:14 CET] <fling> snacks: ^ this one loops /tmp/test/girl.gif 9001 times , adds 09\ =B@>.mp3 audio and encodes 10 seconds from it to test.webm
[07:01:24 CET] <fling> snacks: you could also loop the audio the same way
[07:01:30 CET] <c_14> snacks: ffmpeg -loop 1 -i gif -i audio -c:a copy -c:v libvpx-vp9 -shortest out.webm <- probably better
[07:01:37 CET] <fling> snacks: you could set how much seconds you need to encode with -t
[07:01:41 CET] <c_14> If you want to loop the audio you'll have to do that like fling wrote
[07:01:53 CET] <fling> snacks: listen to c_14 , good luck! :>
[07:02:01 CET] <c_14> -shortest stops after the first stream ends
[07:02:05 CET] <c_14> so it'll only loop one of them
[07:02:15 CET] <c_14> if you want both to loop you'll have to calculate a duration and use -t
[07:02:24 CET] <snacks> wait, is that actually looping the audio and video, or is it just concatenating it with itself a bunch before merging audio and video?
[07:02:47 CET] <c_14> well, concating a video a bunch of times with itself is the same as looping it
[07:02:49 CET] <fling> snacks: there is no _looping_
[07:03:08 CET] <fling> snacks: imaginary looping is a magical thing.
[07:03:52 CET] <snacks> fling: You know how zip bombs work? I figured video formats might have something like that.
[07:04:14 CET] <fling> snacks: they might have but not really. You need to research which codec is capable of doing so.
[07:04:23 CET] <snacks> then again, maybe they don't because if they had zip-bomb-like stuff, then they would have *zip-bomb* like stuff.
[07:04:59 CET] <fling> snacks: no, they don't because they are using motion detect like algos intead of zip bomb algo :P
[07:05:37 CET] <snacks> motion detect-like algorithms?
[07:05:59 CET] <snacks> isn't the entire point of the various video formats essentially just compression?
[07:06:11 CET] <fling> snacks: btw -> 4,0M girl.gif ; 119K test.webm
[07:06:31 CET] <fling> snacks: girl.gif is 2 seconds and no audio but test.webm is 10 seconds and has audio
[07:06:46 CET] <fling> snacks: you could lower the bitrate to get desired bombing effect
[07:07:06 CET] <snacks> fling: 'desired bombing effect'?
[07:07:33 CET] <fling> snacks: you want the video to appear as a zip bomb which means it should use really low bitrate.
[07:08:47 CET] <fling> snacks: so the decoded video from a small file will be really huge in comparison.
[07:09:07 CET] <fling> snacks: I hope you got your answer! :P
[07:09:16 CET] <snacks> fling: what I mean by 'zip bomb' is that there are .zip files that can store, like, 1000TB (!!) of 'data' in a 2KB file. They can do this because essentially the zip format uses pointers internally, so they can make it repeat the same data a HUGE number of times without any real gain in filesize of the zip
[07:09:57 CET] <snacks> pointers and some recursion-oriented Fun, iirc
[07:10:18 CET] <fling> snacks: then you should find a codec capable doing this fun.
[07:10:45 CET] <fling> snacks: x264 is good for the situation when your dupes are going one aftear another.
[07:10:56 CET] <fling> snacks: but ffv1 is not for example
[07:11:16 CET] <furq> x264 probably won't make much difference
[07:11:18 CET] <fling> snacks: I don't know which codec is good for dupes in loops
[07:11:19 CET] <snacks> is there some sort of codec database?
[07:11:34 CET] <snacks> or wiki
[07:11:35 CET] <fling> snacks: ffmpeg -codecs
[07:12:01 CET] <furq> regardless, if you want this to play in browsers your realistic choices are x264 and vp9
[07:12:17 CET] <fling> snacks: also `man ffmpeg-codecs`
[07:12:18 CET] <snacks> furq: I don't want to play it in a browser
[07:12:26 CET] <furq> why else would you use webm
[07:12:34 CET] <fling> lunchtime!
[07:12:36 CET] Action: fling disappears
[07:12:59 CET] <snacks> furq: because IIRC mp4 is patented or something?
[07:13:09 CET] <furq> sure, but who cares
[07:13:23 CET] <furq> if you're not distributing the files for money it doesn't matter
[07:14:19 CET] <snacks> idk, it just seems useful, it's more of a vague preference than actually caring
[07:14:33 CET] <snacks> avi et al are fine
[07:14:59 CET] <snacks> like I said, I'm not informed enough to have any hard preferences
[07:15:02 CET] <snacks> other than gif
[07:15:15 CET] <snacks> ...obviously, I mean
[07:15:25 CET] <snacks> AFAIK gif doesnt support sound anyway
[07:15:40 CET] <furq> it doesn't and also it's generally pretty terrible
[07:15:44 CET] <snacks> exactly
[07:16:40 CET] <snacks> I want to avoid gif because duh, and I would much prefer something that isn't ridiculously obscure, but other than that I'm not picky
[07:18:15 CET] <furq> just use x264
[07:18:49 CET] <snacks> okay, x264 it is. Why x264?
[07:19:07 CET] <furq> it's efficient, widely used and fast
[07:21:03 CET] <furq> ffmpeg -ignore_loop 0 -i src.gif -i src.m4a -c:v libx264 -c:a copy -shortest dest.mp4
[10:53:08 CET] <chang> is there a way to show at which date my ffmpeg executable was compiled?
[11:11:51 CET] <furq> chang: https://api.github.com/repos/FFmpeg/FFmpeg/commits/46aae84
[11:12:11 CET] <furq> not quite the same but that'll show you how old your git build is
[11:18:34 CET] <chang> furq: ffmpeg doesn't really seem to like "m" as a bitrate multiplier? If I juse "50m" instead of "50000k" it kinda does it's own thing with ~11000k - but it doesn't print out any warnings or errors. Is that just a bug or does m mean something different?
[11:19:07 CET] <furq> which codec
[11:26:26 CET] <chang> furq: libx264
[11:29:21 CET] <furq> does the status bar say "q=0.0"
[11:29:33 CET] <furq> if so then the quality is effectively maxed out
[11:47:42 CET] <chang> furq: Nope http://pastebin.com/s5S4EFiM
[11:49:16 CET] <chang> damn pastebin destroyed the output but oh well, you can see it's about q 26
[14:57:25 CET] <DHE> chang: 'm' means milli (1/1000), 'M' means mega (1000000)
[15:04:21 CET] <chang> DHE: hmmm that explains a lot. Although it doesn't explain why ffmpeg doesn't complain about 50 millibits per second
[15:04:42 CET] <kerio> ^-^
[15:16:27 CET] <DHE> I don't have an answer to that...
[15:33:17 CET] <fling> How to install on trisquel?
[16:00:01 CET] <furq> chang: evidently libx264 just ignores -b:v 50m
[16:00:10 CET] <furq> so it uses the default, which is crf 23
[16:01:48 CET] <BtbN> it will probably be rounded to 0
[16:01:54 CET] <BtbN> and 0 is the default value
[16:01:58 CET] <furq> yeah that could be it
[16:02:02 CET] <BtbN> At least I think it is
[16:02:05 CET] <furq> -b:v 1 throws an actual error
[16:02:18 CET] <JEEB> libx264 takes bit rate in kilobits per second after all
[16:02:28 CET] <JEEB> while libavcodec lets you set it on bits per second level
[16:02:39 CET] <furq> yeah that'll be it
[16:02:53 CET] <furq> -b:v 0.5 gets ignored, -b:v 0.500001 throws an error
[16:03:48 CET] <JEEB> yeah, not sure how libavcodec deals with <1
[16:04:02 CET] <JEEB> that's a whole separate can of worms :3
[16:04:06 CET] <furq> is there any point having m be milli
[16:04:19 CET] <furq> i assume it's for consistency with other options but idk which
[16:04:25 CET] <JEEB> for timestuff probably
[16:04:34 CET] <JEEB> it's probably a generic option parsing thing
[16:04:46 CET] <JEEB> although to be fully honest I have NFI
[16:04:59 CET] <furq> yeah i can't think of any options where that would make sense
[16:05:22 CET] <furq> the only other option i can think of which takes prefixes is -ar
[16:05:53 CET] <JEEB> suffixes you mean?
[16:06:13 CET] <JEEB> k and M are the two I usually use anyways
[16:06:13 CET] <furq> well milli- is the prefix
[16:06:24 CET] <JEEB> but it's not mXXX in the parameter?
[16:06:30 CET] <furq> but it's suffixed to the value
[16:06:32 CET] <furq> so i guess either works
[16:07:11 CET] <furq> https://en.wikipedia.org/wiki/Metric_prefix#List_of_SI_prefixes
[16:07:19 CET] <JEEB> yeah, in language it's a prefix
[16:07:26 CET] <JEEB> in the options it's suffixes
[16:08:06 CET] <JEEB> so when we're talking of libav* options it's probably better to talk of suffixes, at least that's what I'm doing
[16:09:00 CET] <furq> suffixed prefixes
[16:11:24 CET] <furq> looks like you can't use them in duration specs anyway
[16:34:11 CET] <DHE> furq: I'm guessing it rounds the bitrate to 0 which means unset/default
[16:34:47 CET] <furq> deja vu
[16:35:02 CET] <DHE> there's a bit of option parsing that interprets SI units, and Mi if you want 1M == 1048576
[16:35:06 CET] <DHE> err, 1Mi
[16:35:19 CET] <DHE> so, yeah, consistency at its finest. I guess
[16:35:32 CET] <furq> yeah i just don't know why you would bother parsing m as milli
[16:35:54 CET] <furq> i didn't know you could use Mi though
[16:36:31 CET] <Kadigan> furq: it might happen, I mean - k and g have one meaning, but m has several...
[16:36:40 CET] <furq> well yeah it does happen
[16:36:46 CET] <Kadigan> I can see it treating m vs M differently.
[16:36:49 CET] <furq> it does
[16:36:53 CET] <furq> this is what we've been discussing
[16:37:00 CET] <furq> i just don't know what option that makes sense for
[16:37:15 CET] <Kadigan> I don't see the point of 'm' when it comes to things like bitrate though...
[16:37:24 CET] <furq> the only options i know of which take m don't accept values <1 anyway
[16:37:39 CET] <Kadigan> Yeah. You know what?
[16:37:53 CET] <Kadigan> That sounds like someone wrote the SI parsing and was very happy with themselves.
[16:37:54 CET] <Kadigan> :D
[16:38:03 CET] <furq> i think we might have a winner
[16:38:19 CET] <furq> i absolutely have code which exists for that reason
[16:38:59 CET] <Kadigan> Isn't most personal code more or less "because I can"?
[16:39:07 CET] <Kadigan> Private projects, I mean.
[16:39:21 CET] <furq> yeah granted i don't have a team of other devs asking me what the fuck i'm shitting up the ui for
[16:39:31 CET] <furq> i assume that's the calibre of language they'd use
[16:40:13 CET] <Kadigan> Well, I wouldn't normally see that sort of thing as problematic, but then I assume the person who wrote it had common sense enough to not include milli.
[16:40:13 CET] <Kadigan> :D
[17:36:40 CET] <ehsanv> Hi, showspectrum is available in my ffmpeg, but showspectrumpic is not! why? i'm using ffmpeg for windows.
[18:03:04 CET] <AssPirate> s/(d.*?y)/1/
[18:03:16 CET] <AssPirate> nvm that
[18:22:47 CET] <durandal_1707> ehsanv: old ffmpeg version?
[20:17:35 CET] <superware> hello, this defect https://trac.ffmpeg.org/ticket/5615 is quite old, although it's very easy to reproduce, any idea why it wasn't touched at all? :|
[22:14:16 CET] <soulshok> is it possible to use timestamp from input stream, to name files with the strftime using the timestamp from the input stream when writing to -segment format?
[22:15:10 CET] <SouLShocK> i.e. name files output_2016_11_27_22_14_00.ts when input stream is at 22:14:00
[22:15:24 CET] <SouLShocK> instead of using local clock
[00:00:00 CET] --- Mon Nov 28 2016


More information about the Ffmpeg-devel-irc mailing list