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

burek burek at teamnet.rs
Sat Oct 26 03:05:06 EEST 2019


[00:00:20 CEST] <kepstin> hmm? a widescreen dvd should be either 854 or 872 by 480 for ntsc, or 1024 or either 1048 by 576 for pal
[00:01:08 CEST] <kepstin> the 854/872 or 1024/1048 depends on whether the video had the areas past the edge of the clean picture cropped off or not
[00:02:46 CEST] <void09> kepstin: yeah it's a rip of a dvd, was probably cropped
[00:03:04 CEST] <void09> but no matter, the -vf 'setsar=2,scale=w=trunc(if(gte(sar\,1)\,iw*sar\,iw)/ohsub)*ohsub:h=trunc(if(gte(sar\,1)\,ih\,ih/sar)/ovsub)*ovsub,setsar=1' - is wrong
[00:03:22 CEST] <void09> tested it in command line, you can test it too
[00:04:07 CEST] <kepstin> I've confirmed that it works correctly in my testing.
[00:04:18 CEST] <kepstin> er, wait, error there
[00:04:19 CEST] <void09> also takes about 15 seconds to process
[00:04:24 CEST] <kepstin> remove the setsar=2 from the start :)
[00:04:30 CEST] <kepstin> that was from when i was testing it
[00:04:31 CEST] <void09> yeah i thought it might be that
[00:05:03 CEST] <void09> before:     Stream #0:0: Video: png, rgb24, 3840x1080 [SAR 1:1 DAR 32:9], q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc (default)
[00:05:11 CEST] <void09> after:     Stream #0:0: Video: png, rgb24, 1920x1440 [SAR 1:1 DAR 4:3], q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc (default)
[00:05:33 CEST] <kepstin> that setsar does exactly like it says, ignores the input sar and sets it to 2
[00:05:38 CEST] <kepstin> (dar gets recalculated)
[00:05:47 CEST] <realies> is there any linux binaries available compiled with --enable-lv2?
[00:05:56 CEST] <void09> still takes a bit long to process
[00:05:59 CEST] <kepstin> the setsar=1 at the end is to fix rounding errors
[00:09:45 CEST] <void09> yeay it works
[00:10:23 CEST] <void09> submit edit doc request :)
[00:14:38 CEST] <kingsley> How would you add the options "-row-mt 1" and "-threads" to speed up the following ffmpeg command?
[00:14:49 CEST] <kingsley> $ ffmpeg  -f lavfi -i mandelbrot=s=1920x1080  -frames 10 -f null -
[00:15:54 CEST] <BtbN> Using all available CPU threads is the default.
[00:17:46 CEST] <kingsley> BtbN: Yes, but, I wonder if ffmpeg recently implemented a new and faster algorithm for using all CPU threads: row multi threading, and if it needs to be manually specified.
[00:18:19 CEST] <void09> anyone know where you can get free cpu cores for encoding ?
[00:18:45 CEST] <kingsley> FWIW, the closest I get to using -row-mt 1 is
[00:18:59 CEST] <BtbN> Isn't row-mt a libvpx thing?
[00:19:13 CEST] <kingsley> $ ffmpeg -threads 1 -f lavfi -i mandelbrot=s=1920x1080 -row-mt 1 -frames 10 -f null -
[00:19:23 CEST] <kingsley> but ffmpeg complains with
[00:19:29 CEST] <BtbN> yeah, libvpx and libaom.
[00:19:38 CEST] <BtbN> Since you're not encoding, the option does not apply.
[00:19:40 CEST] <kingsley> Codec AVOption row-mt (Row based multi-threading) specified for output file #0 (pipe:) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream
[00:20:25 CEST] <kingsley> BtbN: I'll try writing to a file other than null.
[00:20:39 CEST] <BtbN> It's an option for libvpx...
[00:20:48 CEST] <BtbN> so unless you use libvpx, it doesn't make any sense.
[00:22:27 CEST] <kingsley> BtbN: Thank you very much for your astute observation that -row-mt 1 would not apply because I wasn't writing to a file.
[00:22:35 CEST] <kingsley> I'm happy to report
[00:22:44 CEST] <BtbN> It has nothing to do with writing to a file or not...
[00:22:49 CEST] <kingsley> $ ffmpeg -threads 1 -f lavfi -i mandelbrot=s=1920x1080 -row-mt 1 -frames 10  /tmp/cores.webm
[00:22:51 CEST] <BtbN> it's an option for libvpx/aom
[00:22:59 CEST] <kingsley> didn't complain.
[00:23:14 CEST] <BtbN> Because webm probably defaults to VP8 or 9 which defaults to libvpx.
[00:24:01 CEST] <kingsley> BtbN: Yes, your theory of .webm->libvpx seems plausible to me.
[00:33:11 CEST] <realies> aand got stuck at ffmpeg: error while loading shared libraries: libavdevice.so.58: cannot open shared object file: No such file or directory
[00:33:29 CEST] <realies> following https://seanthegeek.net/455/how-to-compile-and-install-ffmpeg-4-0-on-debian-ubuntu/amp/ on ubuntu 18.04
[00:36:16 CEST] <realies> guess no other way to get lv2 without recompiling from source
[00:51:20 CEST] <kingsley> Feel free to benchmark how well "-row-mt 1" and "-threads 1" allow rendering .webm format video to scale with various numbers of cores and let us know what happens.
[00:51:30 CEST] <kingsley> I humbly suggest trying
[00:51:51 CEST] <kingsley> $ ffmpeg -y -f lavfi -i mandelbrot=s=1920x1080 -threads 1 -row-mt 1 -frames 50 -c:v libvpx /tmp/bench.webm
[00:52:12 CEST] <kingsley> and letting us know how many cores you have.
[00:53:10 CEST] <kingsley> Bonus: If you want to see in more detail how well libvpx scales with cores, try running it with my humble script at
[00:53:29 CEST] <kingsley> http://loaner.com/how_fast_do_various_numbers_of_cores_run
[00:54:17 CEST] <kingsley> to bench mark ffmpeg with a variety of core counts.
[00:54:30 CEST] <kingsley> The syntax is
[00:54:46 CEST] <kingsley> $ how_fast_do_various_numbers_of_cores_run "ffmpeg -y -f lavfi -i mandelbrot=s=1920x1080 -threads 1 -row-mt 1 -frames 50 -c:v libvpx /tmp/bench.webm"
[04:19:42 CEST] <realies> can't compile ffmpeg with lv2 on ubuntu nor macos...
[04:20:14 CEST] <realies> macos gives me Segmentation fault: 11 and ubuntu ffmpeg: error while loading shared libraries: libavdevice.so.58: cannot open shared object file: No such file or directory
[04:27:50 CEST] <ponyrider> realies: apt-get install libavdevice58?
[08:56:15 CEST] <th3_v0ice> How to handle different number of samples between input and output when using swr_convert?
[14:42:59 CEST] <Jendrej> Hello. Could someone explain to me how is "adjusting the volume" different from "setting the volume"? ( https://trac.ffmpeg.org/wiki/AudioVolume )
[14:43:57 CEST] <DHE> a fixed adjust adjustment vs a fixed target peak/average
[14:44:20 CEST] <Jendrej> i need a more simple explanation
[14:44:38 CEST] <DHE> doing the latter usually requires doing a measurement of the input first to calculate the needed adjustment. or you can just yolo it and set the adjustment and go
[14:45:22 CEST] <Jendrej> oh i think i get it, setting lets me set in decibels, right?
[14:45:32 CEST] <Jendrej> and adjust is just %?
[14:46:00 CEST] <Jendrej> thanks
[14:46:23 CEST] <DHE> so ffmpeg provides a volume filter to apply the adjustment, and volumedetect to do the measurements...
[14:47:18 CEST] <Jendrej> nah, I think I'll just do it by trial and error
[14:47:25 CEST] <Jendrej> it doesn't need to be super precise
[14:49:51 CEST] <furq> you should definitely use volumedetect if you're increasing the volume unless you like clipping
[14:49:54 CEST] <furq> if you're reducing it then do whatever
[14:52:14 CEST] <Jendrej> why would that happen?
[14:53:29 CEST] <durandal_1707> google for audio clipping
[14:54:07 CEST] <DHE> you know that awful sound people make when they yell into their PC Microphone?
[14:54:17 CEST] <DHE> when they max out their micophone?
[14:54:28 CEST] <Jendrej> but why would it clip with one of these options vs not with the other
[14:55:02 CEST] <DHE> you can't max the sample range out by turning the volume down
[14:55:48 CEST] <Jendrej> I mean I want to turn the volume up. Why would it clip when I don't use when I do the settings
[14:55:51 CEST] <Jendrej> setting*
[14:56:01 CEST] <furq> if you have one sample at -5dB and one sample at -10dB, and you increase the volume by 10dB, you now have two samples at 0dB
[14:56:55 CEST] <furq> volumedetect will print the peak volume, which is as much as you can increase the volume by without any clipping
[14:56:55 CEST] <Jendrej> sorry i don't even know how minus decibels work :E
[14:57:14 CEST] <furq> https://en.wikipedia.org/wiki/DBFS
[14:57:25 CEST] <furq> in short, 0 is the maximum
[14:58:24 CEST] <Jendrej> oh
[14:58:49 CEST] <Martchus> Is the SSL support via --enable-openssl and --enable-gnutls equivalent? Using OpenSSL instead of GnuTLS would ease creating a static build for Windows because p11-kit required by gnutls can not be built as static library.
[14:59:15 CEST] <furq> Martchus: they should have equivalent functionality, but the licensing will be different
[14:59:35 CEST] <furq> openssl is listed as nonfree so you wouldn't be able to distribute the binaries
[15:00:46 CEST] <Jendrej> what does "-f null /dev/null" do and can i use it on windows?
[15:00:49 CEST] <Martchus> furq: Thanks for the quick answer. I suppose the nonfree classification of OpenSSL is still a problem when my own application is actually using GPL?
[15:01:00 CEST] <furq> well ffmpeg is lgpl so it's already a problem
[15:01:29 CEST] <furq> Jendrej: it means to output nothing and send it to /dev/null, which isn't really necessary because you're outputting nothing
[15:01:34 CEST] <furq> you can just do -f null -
[15:01:36 CEST] <furq> to send it to stdout
[15:01:58 CEST] <Martchus> furq: But if my own code is GPL I should be able to use the LGPL ffmpeg.
[15:02:09 CEST] <furq> sure, but probably not with openssl
[15:03:12 CEST] <Martchus> Mh... other projects such as Qt (which is GPL/LGPL) also use OpenSSL.
[15:03:17 CEST] <furq> yeah i don't really know how the whole dual licensing thing works with openssl
[15:03:20 CEST] <furq> i just know ffmpeg has it listed as nonfree
[15:03:33 CEST] <furq> openssl and/or libressl which has even more confusing licensing iirc
[15:06:38 CEST] <Jendrej> thank you for the help
[15:06:46 CEST] <Martchus> So the OpenSSL license is at least LGPL compatible: https://unix.stackexchange.com/questions/523188/ffmpeg-claims-openssl-is-not-compatible-with-gpl-v3
[15:07:37 CEST] <furq> openssl isn't actually under apache v2 yet
[15:07:45 CEST] <furq> the latest release is still under the old dual license
[15:07:53 CEST] <Martchus> I know, the link states it.
[15:08:35 CEST] <Martchus> I was referring to "The Fraunhofer FDK AAC and OpenSSL libraries are under licenses which are incompatible with the GPLv2 and v3. To the best of our knowledge, they are compatible with the LGPL.".
[15:32:44 CEST] <kepstin> i've seen people who write gpl applications add an additional permissions grant to the license that allows linking with openssl
[15:32:55 CEST] <kepstin> as your lawyer for details :)
[15:45:19 CEST] <DHE> yeah but it can be hard with a massive collaboration project like ffmpeg to make licensing changes
[15:57:19 CEST] <realies> ponyrider, ubuntu 18.04 does not have it
[16:52:04 CEST] <wildefyr> hi, using ffmpeg with -f pulse to record my microphone through my audio interface works nicely, however, my mic is a mono input and the audio interface only outputs on the left channel. I want to remux the left channel to just be a mono source and output on both l&r channels, is this possible when initially recording?
[17:36:32 CEST] <kepstin> wildefyr: the "-channels 1" input option will probably do the trick (it defaults to 2). There's also the -map_channel option or filters that can probably fix it
[17:37:05 CEST] <kepstin> wildefyr: on my audio interface which has the same problem, I load some channel remapping config into pulseaudio to make it act like two mono inputs instead of one 2-channel input
[17:41:12 CEST] <kepstin> wildefyr: something like `pacmd load-module module-remap-source master=alsa_input.usb.YourAudioInterface.analog-stereo master_channel_map=front-left channel_map=mono source_properties=device.description='"YourAudioInterface\ Input\ 01"'` (changing the device name with yours), then you record from the "alsa_input.usb.YourAudioInterface.analog-stereo.remapped" device.
[17:41:43 CEST] <kepstin> i do that since it makes it work with other software, like webrtc in browsers and stuff :)
[17:43:39 CEST] <realies> how should I debug this? https://dpaste.de/ztfX/raw
[17:44:29 CEST] <cehoyos> You could update to current FFmpeg and run with valgrind
[17:45:10 CEST] <cehoyos> Does the crash happen with any input file (possibly /dev/zero) or only with a specific file?
[17:46:11 CEST] <realies> cehoyos, not really sure, can I test the lv2 plugin on its own somehow?
[17:46:28 CEST] <cehoyos> You could use another input file
[17:46:44 CEST] <realies> will try /dev/zero
[17:46:52 CEST] <cehoyos> or "-f f32le -i /dev/zero"
[17:47:41 CEST] <realies> https://dpaste.de/y7Af/raw :(
[17:48:29 CEST] <cehoyos> :-) <- it is reproducible without having access to your sample
[17:48:39 CEST] <cehoyos> Try current FFmpeg git head and run with valgrind
[17:49:55 CEST] <realies> I think I'm trying current ffmpeg
[17:50:14 CEST] <realies> actually https://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2
[17:50:44 CEST] <realies> should be current?
[17:50:57 CEST] <realies> followed https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu and added -enable-lv2
[17:51:10 CEST] <realies> I need to see how to work with valgrind
[17:52:25 CEST] <cehoyos> No, it is old and unsupported
[17:53:49 CEST] <realies> but ffmpeg-snapshot.tar.bz2                  2019-10-24 19:23
[17:53:59 CEST] <realies> that seems like yesterday
[17:55:10 CEST] <cehoyos> [lv2 @ 0x1185000] Plugin <https://github.com/lucianodato/noise-repellent> not found
[17:55:12 CEST] <cehoyos> This is what I get
[17:55:44 CEST] <cehoyos> It's six months old but why do you ask here if you no better than I do?
[17:55:52 CEST] <cehoyos> know
[17:57:54 CEST] <wildefyr> kepstin: okay thanks!!
[17:59:29 CEST] <realies> cehoyos, not having a real strategy to debug it other than attaching a debugger to it
[17:59:43 CEST] <cehoyos> Did you try valgrind?
[18:00:11 CEST] <cehoyos> But as long as you are not testing a current snapshot I agree it has limited relevance
[18:26:09 CEST] <realies> cehoyos assumed the timestamp from yesterday would be a recent snapshot, will try with tarballs from the releases section on the website later
[18:26:57 CEST] <cehoyos> The link is horribly broken which you cannot know
[18:27:17 CEST] <cehoyos> It leads to a version for which you get no support here and you cannot use it for bug reports
[18:27:27 CEST] <cehoyos> https://ffmpeg.org/releases/ffmpeg-snapshot-git.tar.bz2
[18:27:30 CEST] <cehoyos> This should work
[18:29:00 CEST] <cehoyos> Sorry, let me try again:
[18:29:19 CEST] <cehoyos> The version for which you posted console output on dpaste is six months old
[18:29:45 CEST] <cehoyos> The version for which you showed a link above - https://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2 - is current FFmpeg as you correctly claimed.
[18:29:53 CEST] <cehoyos> The link I gave is the same version but with git information.
[18:30:40 CEST] <realies> ohhh I thought you refer to the plugin being 6+ months old
[18:30:58 CEST] <realies> will be right on it when I get back to my computer, thanks
[18:31:01 CEST] <cehoyos> I don't know the plugin and I am not sure the console output shows the age
[18:32:19 CEST] <realies> I probably need to test it separately somehow but not sure they've brought up that UI that can be seen on the demo
[19:04:54 CEST] <jemius> I have a ripped DVD which is partly broken. I can watch the ripped stream if I skip the broken part of the video. Are there alternatives to -ignore_unknown to repair such a video?
[22:26:28 CEST] <realies> cehoyos, using the git snapshot made it work ^^
[22:27:43 CEST] <realies> not seeing any processing effects with ./ffmpeg -i ~/test.mp3 -af "lv2=p=https\\\\://github.com/lucianodato/noise-repellent:c=reduction=48.0" ~/test-processed.mp3 when the plugin props are http://ix.io/1ZQi
[22:29:47 CEST] <realies> do the input and output have to be engaged in any way?
[22:32:49 CEST] <durandal_1707> you picked worst lv2 plugin
[22:36:11 CEST] <realies> why?
[22:36:29 CEST] <realies> seems to do alright https://www.youtube.com/watch?v=iNVxCvgcnig
[22:39:12 CEST] <realies> -af "lv2=p=https\\\\://github.com/lucianodato/noise-repellent:c=reduction=22.656|offset=-0.544|whitening=100" also does not change the input file :(
[22:41:23 CEST] Action: realies has got a feel there is some routing missing 
[22:42:54 CEST] <durandal_1707> realies: nope
[22:43:14 CEST] <durandal_1707> add adaptive_noise_learn=1 option
[22:52:52 CEST] <kingsley> I'm considering buying a new computer with more CPU cores to render video faster in to the .webm format. I wonder if passing the unusual options "-threads 1" and "-row-mt 1" to ffmpeg speeds it up by more than the 3X of one CPU core I'm told is otherwise possible. If you happen to share my curiousity, and already have a computer with more CPU cores than me (2), feel free to bench mark the following command on various numbers of CPU cores
[22:52:52 CEST] <kingsley>  and post your results!
[22:53:15 CEST] <kingsley> $ ffmpeg -y -f lavfi -i mandelbrot=s=1920x1080 -threads 1 -row-mt 1 -frames 50 -c:v libvpx /tmp/bench.webm
[22:54:47 CEST] <kingsley> For your convenience, I posted a script that automates bench marking pretty much any command you want on 1 of your CPU cores, 2 cores, 3, etc... all the way up to how many you have.
[22:54:52 CEST] <kingsley> It's at
[22:54:55 CEST] <kingsley> http://loaner.com/how_fast_do_various_numbers_of_cores_run
[22:55:44 CEST] <kingsley> For example, to bench mark how well libvpx's "-threads 1" and "-row-mt 1" options speed up ffmpeg, you could do
[22:55:52 CEST] <kingsley> $ how_fast_do_various_numbers_of_cores_run "ffmpeg -y -f lavfi -i mandelbrot=s=1920x1080 -threads 1 -row-mt 1 -frames 50 -c:v libvpx /tmp/bench.webm"
[22:59:05 CEST] <realies> durandal_1707, that made it work, seems that video demonstrates a lot better results than what I can get
[22:59:32 CEST] <realies> perhaps the plugin has been calibrated to the background noise beforehand
[22:59:33 CEST] <durandal_1707> realies: you need to carefully pick options
[22:59:47 CEST] <durandal_1707> also what is your input?
[23:00:13 CEST] <realies> a voice mp3 with minimal background noise
[23:00:41 CEST] <realies> why?
[23:02:18 CEST] <durandal_1707> sample rate?
[23:03:36 CEST] <realies> 44100
[23:08:54 CEST] <durandal_1707> what kind of noise? white noise?
[00:00:00 CEST] --- Sat Oct 26 2019


More information about the Ffmpeg-devel-irc mailing list