[Ffmpeg-devel-irc] ffmpeg.log.20180320
burek
burek021 at gmail.com
Wed Mar 21 03:05:02 EET 2018
[00:13:23 CET] <furq> http://vpaste.net/kZnj7
[00:13:27 CET] <furq> wtf is youtube-dl doing here
[00:13:51 CET] <Caelum> FF_MIN_BUFFER_SIZE is gone in git, where can I read more about that
[00:14:23 CET] <JEEB> that was in 2015
[00:14:23 CET] <JEEB> http://git.videolan.org/?p=ffmpeg.git;a=blob;f=doc/APIchanges;h=4c0ee7147a15ae54e1141b59ae6a419885f6426f;hb=HEAD#l676
[00:14:31 CET] <JEEB> FF_ prefixed thins are generally internal
[00:14:39 CET] <JEEB> so it was renamed to AV_
[00:16:14 CET] <Caelum> looks like I should use AV_INPUT_BUFFER_MIN_SIZE instead does that sound right?
[00:16:44 CET] <Caelum> yeah I see it in the changelog, thank you
[00:16:45 CET] <JEEB> that sounds right according to that APIchanges entry
[00:30:27 CET] <furq> oh wtf why do i have libav installed
[00:30:34 CET] <furq> and also why does youtube-dl prefer that if both are installed
[08:26:46 CET] <poutine> Is there any sort of JSON mapping to ffmpeg command line arguments?
[08:29:05 CET] <a-l-e> eh eh poutine... this is also something i was wondering yesterday evening...
[08:30:35 CET] <poutine> did your wonder lead to any discoveries?
[08:31:19 CET] <poutine> I'm sure it's rather difficult to do with the ordering involved
[08:31:40 CET] <a-l-e> on my side... i thought that i somehow was grocking it, but this morning i'm back at a "[AVFilterGraph @ 0x55fb70dbb080] No such filter: '4'" ...
[08:31:47 CET] <a-l-e> but my command does not have a filter 4...
[08:31:50 CET] <a-l-e> https://paste.opensuse.org/5234104
[08:31:54 CET] <a-l-e> any idea?
[09:45:40 CET] <KarboniteKream> Hello! I wish to capture a 5 second video from 4 cameras. The issue (at least on Linux) is that when I run bash commands in background, the cameras don't start at the same time, but there is about 500ms delay. When using dshow on Windows, this issue doesn't appear. This was done on a laptop, so maybe the issue is the lack of USB buses (but it's interesting that it's working on Windows). I am yet to try this on a computer with multiple USB buses.
[09:45:41 CET] <KarboniteKream> How would you approach solving this synchronization issue? Is there a way for ffmpeg to save a timestamp, when a video has started recording, and then use this later for synchronization?
[12:03:23 CET] <keglevich> ffmpeg -re -i 1.divx -c:v mpeg2video -vf scale=720:576 -pix_fmt yuv420p -me_method epzs -threads 0 -r 25 -g 50 -b:v 5000k -refs 1 -bf 0 -c:a mp2 -ac 2 -b:a 192k -ar 48000 -minrate 5000k -maxrate 5000k -bufsize 700k -muxrate 5450k -async 1 -pcr_period 30 -f mpegts udp://239.5.5.5:5000?ttl=64&pkt_size=1316
[12:04:34 CET] <keglevich> that's the command-line I have and it works perfectly with UDP multicast.... can someone please modify it so it would be in "1920x1080" and about 15k bitrate? I need perfect stream, without any visible artifacts, and I'm unable to modify it myself...whatever I do, I'm getting visible issues... That's all I need
[13:39:04 CET] <FindHao> Hi,
[13:39:26 CET] <FindHao> Any body here?
[13:40:14 CET] <durandal_1707> FindHao: I'm
[13:40:22 CET] <FindHao> I found that ffmpeg can encode and decode HEVC videos by Nvidia GPU
[13:40:41 CET] <durandal_1707> good
[13:41:04 CET] <FindHao> But does it fit the standard of HEVC?
[13:41:46 CET] <durandal_1707> i dunno, i do not work for Nvidia
[13:42:25 CET] <FindHao> And how does ffmpeg works? Use Nvidia hardware accelerter or just change the code to CUDA code?
[13:48:35 CET] <atomnuker> former
[13:49:15 CET] <keglevich> ffmpeg -re -i 1.divx -c:v mpeg2video -vf scale=720:576 -pix_fmt yuv420p -me_method epzs -threads 0 -r 25 -g 50 -b:v 5000k -refs 1 -bf 0 -c:a mp2 -ac 2 -b:a 192k -ar 48000 -minrate 5000k -maxrate 5000k -bufsize 700k -muxrate 5450k -async 1 -pcr_period 30 -f mpegts udp://239.5.5.5:5000?ttl=64&pkt_size=1316
[13:49:22 CET] <keglevich> that's the command-line I have and it works perfectly with UDP multicast.... can someone please modify it so it would be in "1920x1080" and about 15k bitrate? I need perfect stream, without any visible artifacts, and I'm unable to modify it myself...whatever I do, I'm getting visible issues... That's all I need
[14:40:25 CET] <keglevich> is there an option to get somewhere precompiled windows ffmpeg binaries with NDI support?
[14:40:36 CET] <pmjdebru1jn> NDI?
[14:41:50 CET] <keglevich> newtek ndi...
[14:42:05 CET] <JEEB> whatever that is, check if the configure option has a requirement for enable-nonfree
[14:42:08 CET] <JEEB> if it has
[14:42:14 CET] <JEEB> you can't distribute binaries and have to build the thing yourself
[14:43:09 CET] <keglevich> is there an easy option to build it in windows?
[14:43:29 CET] <JEEB> WSL on windows 10, a *nix VM or msys2 + mingw-w64 toolchain
[14:43:49 CET] <JEEB> I would have moved msys2 higher on that list but unfortunately native windows right now has configuration script run times longer than the compilation run times :P
[14:44:09 CET] <JEEB> so it actually makes sense to run linux with a mingw-w64 cross-compiler either in WSL or a VM
[14:44:22 CET] <keglevich> what is wsl?
[14:44:29 CET] <JEEB> Windows Subsystem for Linux
[14:44:32 CET] <JEEB> a windows 10 component
[14:44:34 CET] <keglevich> ah ok
[14:44:53 CET] <keglevich> so, no option to directly build these on windows?
[14:44:59 CET] <keglevich> without linux support
[14:45:07 CET] <JEEB> there is, it can just take up to 30min to *configure* the build
[14:45:17 CET] <JEEB> while it takes a minute or so max on *nix
[14:45:34 CET] <keglevich> is it possible to build windows binaries in linux as well?
[14:45:51 CET] <JEEB> yes
[14:45:53 CET] <JEEB> I do that nowadays :P
[14:46:08 CET] <JEEB> since I stopped building on native windows after the configure script went over the 10 min mark
[14:46:11 CET] <JEEB> lol
[14:46:35 CET] <keglevich> would you be able to compile one ffmpeg with --enable-libndi_newtek
[14:46:53 CET] <keglevich> and upload it somewhere, so I could download and test it
[14:46:58 CET] <JEEB> no
[14:50:14 CET] <Lyberta> hi, I want to capture game footage at 2560x1440 at 60 fps, what parameters do you suggest?
[14:50:34 CET] <Lyberta> I have AMD FX-8350 and 8 GiB of RAM
[14:53:45 CET] <Lyberta> I've tried h264 on ultrafasy preset but it consumes 60% of all my core, is there a faster format?
[14:54:03 CET] <durandal_1707> only hardware
[14:54:35 CET] <Lyberta> rawvideo consumes about 30% of all cores but eats all RAM
[14:55:52 CET] <durandal_1707> Lyberta: tried utvideo/huffyuv/ffvhuff?
[14:57:01 CET] <Lyberta> durandal_1707, which container to use with them and what bitrate you suggest if it is applicable, I'm using SimpleScreenRecorder and it always has these options in GUI
[15:03:49 CET] <roxlu> Hi! I want to extract one second from a video but instead 4 seconds are extract. I'm using this command: https://gist.github.com/roxlu/4c273d7302d01933d88ec132f7885dc1 Am I maybe doing something wrong?
[15:04:13 CET] <durandal_1707> Lyberta: avi/mkv/nut
[15:13:45 CET] <dl2s40> roxlu, try ffmpeg -i input -ss 00:00:05 -t 1 -c copy output
[15:23:13 CET] <roxlu> dl2s40: hmm when I create an temporary file where I use -force_key_frames then it seems to work
[15:23:49 CET] <furq> you can only cut on keyframes
[15:24:39 CET] <roxlu> furq: ah yeah I was just thinking about my -vcodec copy option. I guess it might work when I reencode the video
[15:25:50 CET] <furq> right
[16:46:53 CET] <keglevich> hey all...is there an option I could get somewhere online a precompiled ffmpeg version with NDI support? I tried to compile it, but there's no right directions how to do it, and it's too much complicated anyway
[16:47:19 CET] <JEEB> pretty sure the trac had some ways of building a base FFmpeg
[16:47:39 CET] <JEEB> and after that you just need to get whatever is required from the NDI side and enable that module in FFmpeg :P
[16:48:15 CET] <JEEB> and if it requires enable-nonfree you will not get a binary for it as enable-nonfree means that the binary is non-distributable
[16:48:40 CET] <keglevich> I've read on the forums it should be free, but it should be recompiled somehow
[16:48:50 CET] <keglevich> I tried it on ubuntu, failed miserably
[16:49:06 CET] <JEEB> free in cash doesn't mean it's compatible with certain open source licenses
[16:49:18 CET] <JEEB> and did you even check if it requires enable-nonfree?
[16:49:34 CET] <keglevich> where can I check that?
[16:49:35 CET] <JEEB> I'm just saying in the case it does (which many closed source SDKs do)
[16:50:07 CET] <keglevich> --enable-libndi_newtek --extra-cflags="-I/home/user/ffmpeg_build/ndi/include" --extra-ldflags="L/home/user/ffmpeg_build/ndi/include"
[16:50:22 CET] <keglevich> that's the only line I got somewhere online...and I have no clue what to do with it
[16:50:35 CET] <pmjdebru1jn> keglevich: ./configure --....
[16:50:59 CET] <JEEB> keglevich: you basically search if it's under the `EXTERNAL_LIBRARY_NONFREE_LIST`
[16:51:01 CET] <pmjdebru1jn> and do you have the relevant files
[16:51:02 CET] <JEEB> which it appears under
[16:51:13 CET] <pmjdebru1jn> keglevich: do you have -I/home/user/ffmpeg_build/ndi/include on your system? and libndi_newtek ?
[16:51:25 CET] <keglevich> not really
[16:51:31 CET] <keglevich> where do I get these?
[16:51:37 CET] <pmjdebru1jn> then how do you expect this to work?
[16:51:49 CET] <keglevich> but again...why does it has to be so complicated? I'm sure that's something that was done 1000 times before...
[16:51:58 CET] <pmjdebru1jn> keglevich: if you have the hardware, I would presume you'd be vaguely familiar with the vendor?
[16:51:59 CET] <keglevich> isn't there an option to get the binary somewhere?
[16:52:30 CET] <pmjdebru1jn> keglevich: this is nonGPL code, so presumably it can be distributed that way
[16:52:45 CET] <pmjdebru1jn> oh wait ffmpeg is LGPL
[16:53:01 CET] <JEEB> it has GPL components, most of which are 3rd party library wrappers
[16:53:01 CET] <pmjdebru1jn> so maybe it could
[16:53:07 CET] <JEEB> in LGPL mode it would probably be OK
[16:53:15 CET] <JEEB> but most people want GPL components such as x264
[16:53:25 CET] <pmjdebru1jn> keglevich: also keep in mind that 99.9% of users really don't care about NDI
[16:53:28 CET] <pmjdebru1jn> it's an extreme cornercase
[16:53:38 CET] <keglevich> on forums I read everything is GPL free and it could be compiled whatever people want...but for some reason developers didn't do this...don't ask me
[16:53:43 CET] <pmjdebru1jn> and libndi isn't open source, so it would be bizarre to redistribute it
[16:54:08 CET] <keglevich> pmj: you think NDI isn' good?
[16:54:32 CET] <keglevich> I'd like to use it as a replacement for multicast which I'm using from OBS and can't get it to work without artifacts
[16:54:49 CET] <keglevich> I tested NDI over LAN with two computers and it works really nice
[16:54:52 CET] <JEEB> this whole discussion is unrelated to whether or not something is good
[16:55:03 CET] <pmjdebru1jn> keglevich: how on earth do you read that I would think NDI isn't good
[16:55:07 CET] <keglevich> so I thought I could use OBS's NDI output as an input for ffmpeg
[16:55:22 CET] <JEEB> most people distribute binaries which link against GPL libraries, and thus enable-nonfree is a definite no-no there
[16:55:33 CET] <JEEB> also I have no idea if the closed source NDI SDK is OK to redistribute
[16:55:34 CET] <keglevich> pmj: you said people don't care about NDI, so I thought it's not that good at all
[16:55:44 CET] <pmjdebru1jn> I meant they have no use for it
[16:55:52 CET] <keglevich> ah ok
[16:55:54 CET] <JEEB> also NDI is a rather niche thing primarily utilized by some corporations
[16:55:54 CET] <pmjdebru1jn> so almost body misses it
[16:56:43 CET] <JEEB> so if it is OK to distribute the SDK with your binaries then in LGPL mode FFmpeg could possibly be distributed with it enabled
[16:56:55 CET] <JEEB> unfortunately you generally want /something/ that is GPL
[16:57:01 CET] <JEEB> be it x264
[16:57:04 CET] <JEEB> or something else
[16:57:26 CET] <keglevich> I really don't know if I want one thing or another...Id' just like to get a ffmpeg witn NDI support, that's more or less it :)
[16:57:38 CET] <keglevich> and when I have it, I really don't care if it's xGPL or not :)
[16:58:02 CET] <pmjdebru1jn> keglevich: it doesn't matter whether you care
[16:58:16 CET] <pmjdebru1jn> keglevich: the best thing you can do it simply get libndi and the associated sdk
[16:58:20 CET] <pmjdebru1jn> and build your own ffmpeg
[16:58:33 CET] <JEEB> keglevich: do you just want to take the NDI input and that's it. no transcoding etc?
[16:58:40 CET] <pmjdebru1jn> you want something that's a relative cornercase, there's going to be work involved :)
[16:59:03 CET] <keglevich> JEEB: I'd like to take NDI input to ffmpeg and transcode it to mpegts UDP multicast
[16:59:08 CET] <keglevich> that's the whole idea
[16:59:24 CET] <JEEB> and there you hit the problem
[16:59:32 CET] <keglevich> I have the approppriate command-line to do that...I just don't have ffmpeg with NDI support
[16:59:32 CET] <JEEB> the primary H.264 encoder available thorugh FFmpeg is GPL
[16:59:45 CET] <JEEB> thus nobody can just give you a binary of NDI+that
[16:59:53 CET] <JEEB> because nonfree + GPL = non-distributable
[17:00:03 CET] <keglevich> but it works?
[17:00:12 CET] <JEEB> if you build it yourself, yes
[17:00:27 CET] <JEEB> nobody can give you a binary because you cannot give NDI under the GPL as you don't have the sources to it
[17:00:52 CET] <keglevich> ok, I guess I'm on my own then...I'll try...if I don't know how to do it, I'll come back and ask for more information if you'd be willing to help
[17:00:53 CET] <JEEB> GPL is a viral license, if you use GPL code in a thing it has to (also) be available under the GPL
[17:01:13 CET] <JEEB> that is completely impossible with closed source SDKs
[17:01:20 CET] <JEEB> the exception are OS APIs
[17:01:40 CET] <JEEB> which is why you can have GPL software binaries for Windows :P
[17:02:13 CET] <JEEB> keglevich: also note that just building FFmpeg is not enough if you need libx264 (the H.264 encoder) for example, you also need to get that and build it as well
[17:02:26 CET] <keglevich> ok...now I finished with compiling the ffmpeg in ubuntu...it compiled without any issues, so I guess I'm good to take one step forward
[17:02:35 CET] <keglevich> how would I be able now to add ndi support?
[17:03:01 CET] <keglevich> I used the ubuntu ffmpeg tutorial...all these codecs should be implemented
[17:03:02 CET] <JEEB> get the SDK, find the enable-XXX for it in configure and set the extra ld and c flags
[17:03:24 CET] <keglevich> these extra flags are already as line in the script...should I add additional ones?
[17:03:49 CET] <keglevich> I'll put together a script and paste it somewhere so you can check it if you are so kind
[17:04:24 CET] <pmjdebru1jn> keglevich: just make sure the referenced paths are correct
[17:04:36 CET] <keglevich> https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu
[17:04:41 CET] <JEEB> and then look at the failure point at the end of ffbuild/config.log :P
[17:04:53 CET] <keglevich> that's the tutorial I used...I followed it step by step...compiled everything from first to last...all ok for now
[17:04:54 CET] <JEEB> or if you don't understand it, post the config.log on a pastebin site or gist
[17:05:05 CET] <JEEB> (fully)
[17:05:31 CET] <JEEB> and link here
[17:10:02 CET] <keglevich> NDI SDK doesn't need compiling?
[17:10:16 CET] <keglevich> just put the approppriate files to their folders?
[17:10:43 CET] <keglevich> I run the .Install script and it just created NDI home folder with everything inside
[17:11:45 CET] <JEEB> if it's closed source you just get a black box from them :P
[17:11:52 CET] <JEEB> the source is just magical pixie dust
[17:12:01 CET] <JEEB> and the only way to debug is your magical girlfriend IDA
[17:17:02 CET] <keglevich> https://pastebin.com/cRe17mBT
[17:17:22 CET] <keglevich> ok that's what I cooked for now....is this script ok to be run? I also put ndi folder in approppriate place
[17:17:41 CET] <keglevich> ndi/include I mean
[17:17:55 CET] <JEEB> lol
[17:18:04 CET] <JEEB> > ldflags > /include
[17:18:10 CET] <JEEB> I think you meant /lib there
[17:18:22 CET] <JEEB> since -L is "search for libraries here"
[17:18:31 CET] <JEEB> unless the NDI vendor is even more stupid than I thought
[17:19:19 CET] <JEEB> also I laughed my arse off seeing "royalty free" while the thing is not open source
[17:19:25 CET] <keglevich> that's what I found online...the only line I found is this: --enable-libndi_newtek --extra-cflags="-I/home/user/ffmpeg_build/ndi/include" --extra-ldflags="L/home/user/ffmpeg_build/ndi/include"
[17:19:47 CET] <JEEB> if you have a lib directory under that ndi directory then use it
[17:19:51 CET] <JEEB> for the -L
[17:19:54 CET] <keglevich> I also read on forums (their newtek forums) that ffmpeg developer should freely distribute and compile it
[17:20:16 CET] <JEEB> with LGPL only you probably could
[17:20:24 CET] <JEEB> with GPL components - nope
[17:20:44 CET] <JEEB> unless they make their shit open source and with a license compatible with the GPL
[17:20:47 CET] <JEEB> which they probably don't want
[17:21:12 CET] <JEEB> they have their 'royalty free' """standard""" which has a closed source implementation that you can only get from them
[17:21:50 CET] <keglevich> hmm... I have only ndi/include ... no lib directory there
[17:22:57 CET] <JEEB> ok, then they're retarded
[17:22:57 CET] <keglevich> but yes...under the NDI main directory there is also lib..I'll just copy everything into ndi/
[17:23:11 CET] <JEEB> ok, if there is "lib/" directory then add -L to that
[17:24:42 CET] <keglevich> another line to script?
[17:26:04 CET] <keglevich> there are many folder inside /ndi (lib, include, bin, ndi, share)
[17:27:25 CET] <JEEB> no, you already had ldflag for NDI in there
[17:27:28 CET] <JEEB> just change /include to /lib there :P
[17:28:03 CET] <keglevich> libndi_newtek is incompatible with the gpl and --enable-nonfree is not specified.
[17:28:07 CET] <keglevich> that's what I get...
[17:28:23 CET] <keglevich> but --enable-nonfree is specified?
[17:28:45 CET] <keglevich> or should I enter enable-ndi after enable-nonfree?
[17:31:14 CET] <keglevich> ah ok now I understand you... I flag is for include and L for lib ?
[17:31:24 CET] <keglevich> so they both should be set approppriatery
[17:31:39 CET] <keglevich> I'm just not sure why the people online set both flags to ndi/include then...
[17:38:43 CET] <JEEB> the position of enable-nonfree and the other thing shouldn't matter
[17:47:55 CET] <sfan5> keglevich: you're missing a \ after the --enable-libndi_newtek
[17:48:49 CET] <keglevich> sfan5: I added it as I got the error thank you and it's not compiling...waiting for result
[17:49:26 CET] <keglevich> sfan5: should I leave the I and L flags as they are os set them as JEEB told me?
[17:49:39 CET] <keglevich> as online in these few manuals they all point to ndi/include
[17:49:54 CET] <JEEB> unless NDI people are retards libraries are under lib/
[17:50:17 CET] <JEEB> so if there is ndi/lib use it for -L
[17:50:42 CET] <keglevich> under ndi/lib there are a few folders (arm-linux, arm-... i686, ...)
[17:51:06 CET] <keglevich> arm-linux-gnueabi arm-linux-gnueabihf i686-linux-gnu x86_64-linux-gnu
[17:51:17 CET] <keglevich> these are all under ndi/lib
[17:56:38 CET] <keglevich> huh it failed with an error, as I was expected actually...pasted the error here: https://pastebin.com/0Bub92wj
[17:57:11 CET] <sfan5> yeah it didn't find the library
[17:57:35 CET] <sfan5> most likely you want --extra-ldflags="L$HOME/ffmpeg_build/ndi/lib/x86_64-linux-gnu"
[17:58:45 CET] <keglevich> ok, I changed it...it's running again
[17:58:55 CET] <The-Present> Hi FFMPEG - I need some information regarding on of our failed cases using ffmpeg
[17:59:16 CET] <keglevich> btw...I would need windows binaries, I see now the first round compiled only linux bin's...howa can I make win bin's as well?
[18:01:25 CET] <The-Present> We are running 20 parallel streams to an rtmp server. 17 were successful and 3 failed with error "error writing trailer of rtmp"
[18:02:07 CET] <The-Present> Can any body tell us some options to pass (like adjusting bitrate if we are sending too fast) to remove this error and make our streams successful. We have 1 GBps line.
[18:09:17 CET] <The-Present> anyone?
[18:14:16 CET] <keglevich> sfan5: is there an option to build windows binaries on ubuntu linux as well? If not, everything I'm trying to achieve now is pointless...
[18:18:45 CET] <JEEB> keglevich: yes, using a mingw-w64 cross-compiler
[18:19:50 CET] <keglevich> uf, that's another huge issue to setup I guess?
[18:20:41 CET] <keglevich> that's really bad...all I need is a working ffmpeg-ndi.exe and I'll spend a whole day for it, and probably even won't get what I need :/
[18:23:03 CET] <JEEB> most distros package toolchains and there's plenty of scripts to build one
[18:23:19 CET] <JEEB> so that part should not be the problem :p
[18:24:19 CET] <The-Present> JEEB, Hi, can you help me in my query as well?
[18:47:20 CET] <keglevich> JEEB, sfan5: you won't believe it, but the script eventually finished without any errors
[18:47:40 CET] <keglevich> now I just have to figure it out how to cross-compile that bloody thing for w64
[18:48:33 CET] <furq> if you're on a recent ubuntu then just apt-get install mingw-w64 will get you halfway there
[18:49:02 CET] <furq> and ./configure --cross-prefix=x86_64-w64-mingw32- --target-os=mingw32
[18:49:11 CET] <furq> that bit is easy, the annoying bit is compiling any dependencies you need
[18:49:13 CET] <keglevich> ./ffmpeg: error while loading shared libraries: libndi.so.3: cannot open shared object file: No such file or directory
[18:49:23 CET] <keglevich> that's the current error I get if I try to run ./ffmpeg
[18:49:32 CET] <pos> furq, ping
[18:49:35 CET] <furq> where's libndi.so
[18:49:36 CET] <furq> pos: hi
[18:49:38 CET] <pos> oh, sorry, you're there :)
[18:49:52 CET] <furq> i have to leave shortly so i might not be much help
[18:51:05 CET] <keglevich> furq: I'm on 16.04.4 and I'm installing it as you suggested
[18:51:07 CET] <Kam_> keglevich: make sure that libndi.so.3 is in your LD_LIBRARY_PATH env var
[18:51:25 CET] <furq> right
[18:51:30 CET] <keglevich> Kam_: how can I setup that path?
[18:51:36 CET] <pos> furq, you spotted me this excellent setup the other day, work splendidly
[18:51:37 CET] <pos> https://pastebin.mozilla.org/9080466
[18:51:44 CET] <furq> LD_LIBRARY_PATH=/the/path ffmpeg ...
[18:51:47 CET] <pos> any way to work in some borders?
[18:51:48 CET] <Kam_> export LD_LIBRARY_PATH=/path/to/your/ndi/lib
[18:52:43 CET] <furq> pos: scale to slightly less and add ,pad= after scale
[18:52:45 CET] <pos> looked at https://stackoverflow.com/questions/36268431/video-grid-with-vstack-and-hstack but i can't figure a way to integrate it
[18:52:54 CET] <pos> right
[18:52:56 CET] <furq> !filter pad @pos
[18:52:56 CET] <nfobot> pos: http://ffmpeg.org/ffmpeg-filters.html#pad-1
[18:53:02 CET] <furq> anyway i have to go now bye
[18:53:08 CET] <pos> can i specify border color?
[18:53:09 CET] <Kam_> keglevich, or what furq suggested in one line with your ffmpeg command prepending it
[18:53:10 CET] <pos> quick :)
[18:53:15 CET] <keglevich> Kam & furq: great thanks it works
[18:54:15 CET] <pos> right
[18:55:42 CET] <keglevich> Must specify target arch (--arch) and OS (--target-os) when cross-compiling
[18:55:44 CET] <Kam_> keglevich, cross compiling unix to windows usually easy once you found out how to native compile it on unix.
[18:55:50 CET] <keglevich> I need it for windows10 x64
[18:56:12 CET] <keglevich> I'm missing one argument I guess
[18:56:23 CET] <Kam_> keglevich, put --arch=x86 and --target-os=mingw32
[18:56:58 CET] <kepstin> hmm. You know, I should just make a filter to build video grids. making them out of other filters is a pain, particularly if you want videos to join in or drop out over time.
[18:57:03 CET] Action: kepstin puts that on his todo list.
[18:57:04 CET] <Kam_> and add --enable-cross-compile
[18:58:11 CET] <Kam_> keglevich: this should be enough for cross compiling: --target-os=mingw32 --cross-prefix=x86_64-w64-mingw32- --enable-cross-compile --arch=x86
[18:58:45 CET] <keglevich> ok, thank you so much...I'll try it now!
[18:58:58 CET] <Kam_> make sure that x86_64-w64-mingw32-gcc is in your PATH, e.g. 'x86_64-w64-mingw32-gcc --version' prints out something on your console
[18:59:16 CET] <keglevich> ERROR: libass not found using pkg-config
[19:01:09 CET] <kepstin> keglevich: you either have to first crosscompile also all the libs you need, or disable features in ffmpeg.
[19:01:14 CET] <Kam_> keglevich, I'd suggest to start building without external libraries first, a small version of ffmpeg, to see that everything works. add it later if you need it.
[19:01:50 CET] <kepstin> keglevich: (once you have the external libs available, you'll have to do some pkg-config stuff to get them to be picked up)
[19:04:06 CET] <Kam_> for pkg-config you need to set PKG_CONFIG_LIBDIR=/path/to/library/lib/pkgconfig and --pkg-config=pkg-config on the ffmpeg configure
[19:43:50 CET] <Guest_DuckZ> hi, in my code I'm calling av_frame_alloc(), I set the resulting non-null pointer's format, width and height to AV_PIX_FMT_YUV420P, 1024 and 512 respectively, and last I call av_frame_get_buffer(my_frame, 0)
[19:44:17 CET] <Guest_DuckZ> the problem is that my_frame->data = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}
[19:44:35 CET] <Guest_DuckZ> but none of the functions I call return an error code or anything
[19:48:44 CET] <The-Present> what is "error writing trailer"?
[19:52:59 CET] <The-Present> ??
[19:53:06 CET] <Guest_DuckZ> me?
[19:54:58 CET] <JEEB> The-Present: the actual error is generally before that
[19:55:12 CET] <JEEB> also add verbosity, in many cases -v verbose already helps :P
[19:57:38 CET] <JEEB> "write trailer" is a function in libavformat that writes any trailer into a file format if it has such. it just means that the function finished with a failure :P
[19:58:02 CET] <JEEB> and since the process ended up getting to that point, it means that there was an end happening before that already
[20:12:33 CET] <The-Present> JEEB, thank you for information. We were streaming 20 parallel videos to an rtmp server. 17 went through 3 failed with this error. What do you think the cause could be in such case?
[20:12:46 CET] <JEEB> not the slightest idea
[20:13:02 CET] <JEEB> all I know is that the reason why the error you quoted happened was before that
[20:13:11 CET] <JEEB> that is the result, not the reason
[20:15:38 CET] <Guest_DuckZ> anyone who can help with my issue please?
[20:16:29 CET] <JEEB> not sure if nullptrs for images are invalid? or what are you asking
[20:18:02 CET] <Guest_DuckZ> I'm going to pass frame->data to sws_scale, as I want to fill my frame with data
[20:18:25 CET] <Guest_DuckZ> I'm asserting that data[0] is not null so I didn't try if sws_scale() actually crashes
[20:18:38 CET] <JEEB> if you go avframe in, avframe out then better to use avfilter
[20:18:45 CET] <JEEB> instead of raw swscale
[20:19:04 CET] <JEEB> since someone has already written the buffer-into-avframe boring stuff for you in that case
[20:19:35 CET] <Guest_DuckZ> I've got custom yuv/rgb buffer in, yuv frame out
[20:21:00 CET] <Guest_DuckZ> a-ha, I'm trying calling av_frame_make_writable(my_frame) right after av_frame_get_buffer(), and it fails with -22
[20:21:07 CET] <Guest_DuckZ> is there some error table somewhere?
[20:21:19 CET] <JEEB> yes
[20:21:35 CET] <JEEB> av_err2str
[20:21:44 CET] <Guest_DuckZ> ah thanks
[20:21:47 CET] <JEEB> that's for usage in printing of errors
[20:24:03 CET] <Guest_DuckZ> "Invalid argument"
[20:24:06 CET] <Guest_DuckZ> uhm...
[20:24:11 CET] <Guest_DuckZ> :(
[20:24:43 CET] <JEEB> I recommend you check out something like vf_scale for an example of swscale usage
[20:24:50 CET] <JEEB> (with AVFrame output)
[20:25:35 CET] <Guest_DuckZ> JEEB: that stuff happens later on in the code tho, it fails to even create the destination frame
[20:26:21 CET] <Guest_DuckZ> https://paste.debian.net/1015746/
[20:26:31 CET] <JEEB> also I think you can nowadays generate a black image of size X and some pix_fmt
[20:26:37 CET] <JEEB> and you could just re-use those buffers?
[20:29:26 CET] <JEEB> https://ffmpeg.org/doxygen/trunk/group__lavu__frame.html#gac700017c5270c79c1e1befdeeb008b2f
[20:29:41 CET] <JEEB> ok, it sounds like you just need av_frame_alloc and av_frame_get_buffer
[20:30:25 CET] <JEEB> since I think av_frame_make_writable doesn't really make sense when you're just pushing data into the buffer anyways :P
[20:30:36 CET] <JEEB> (you've just created it and its buffers)
[20:30:55 CET] <Guest_DuckZ> ok, I'm getting rid of it then
[20:31:29 CET] <JEEB> it's more about getting the AVFrame and its buffers from somewhere else and seeing if anyone else has a reference on it
[20:31:58 CET] <Guest_DuckZ> ok
[20:32:36 CET] <Guest_DuckZ> so, I'm back to the problem where data = {0} after line 18
[20:34:00 CET] <JEEB> I think you might want to tell it that the AVFrame is video
[20:35:40 CET] <JEEB> ok, no. seems like there's no media type in AVFrame
[20:36:15 CET] <JEEB> https://ffmpeg.org/doxygen/trunk/frame_8c_source.html#l00322
[20:36:21 CET] <JEEB> thankfully the function is rather short
[20:37:02 CET] <JEEB> so you need format >= 0, width/height >0
[20:37:39 CET] <JEEB> and then for video frames https://ffmpeg.org/doxygen/trunk/frame_8c_source.html#l00211
[20:37:50 CET] <JEEB> that's the sausage inside
[20:38:12 CET] <JEEB> or it can't find the pix_fmt
[20:38:28 CET] <JEEB> yea, the only way to get EINVAL out of that
[20:38:35 CET] <Guest_DuckZ> ok, I'm in gdb now, I see p picture->format $23 = 0, p picture->width $21 = 1024, p picture->height $24 = 512
[20:38:46 CET] <Guest_DuckZ> and the best part is
[20:39:02 CET] <Guest_DuckZ> p ret_get_buff $25 = 0
[20:39:04 CET] <Guest_DuckZ> :(
[20:39:44 CET] <JEEB> and zero should be YUV420P aka 4:2:0 planar YCbCr
[20:39:59 CET] <JEEB> so that zero makes sense
[20:40:03 CET] <Guest_DuckZ> https://paste.debian.net/1015750/ that's the latest iteration of my code btw
[20:40:42 CET] <Guest_DuckZ> indeed, p pix_fmt $26 = AV_PIX_FMT_YUV420P
[20:41:19 CET] <Guest_DuckZ> my breakpoint is on line 19
[20:42:03 CET] <Guest_DuckZ> wrong ffmpeg initialization? could it be anything of that sort? bad version? library compiled the wrong way?
[20:43:21 CET] <JEEB> does ffmpeg.c from the same FFmpeg compilation work? there's quite a few functions using av_frame_buffer_get after all
[20:43:28 CET] <JEEB> https://ffmpeg.org/doxygen/trunk/group__lavu__frame.html#ga6b1acbfa82c79bf7fd78d868572f0ceb
[20:43:35 CET] <JEEB> get_buffer I meant of course
[20:44:43 CET] <Guest_DuckZ> unfortunately I don't know, we have such a convoluted build system in place I'm not sure where I could find the source code, I'd have to ask to someone tomorrow
[20:44:58 CET] <JEEB> rip
[20:45:16 CET] <JEEB> better test your code with a normal FFmpeg first and make sure it works on your workstation
[20:45:34 CET] <JEEB> just ./configure --prefix=/home/some/dir
[20:45:52 CET] <JEEB> then use linker flags received from PKG_CONFIG_PATH=/home/some/dir/lib/pkgconfig
[20:46:04 CET] <JEEB> pkg-config --libs libavutil for example
[20:47:48 CET] <JEEB> (cflags for include flags etc
[20:52:25 CET] <The-Present> JEEB, thank you, i will try to get more output information. But I don't understand as If how 17/20 videos goes through without this error. I would have assume a higher ratio, but its a different case.
[20:52:37 CET] <The-Present> I will come with some debug info soon.
[20:55:25 CET] <Guest_DuckZ> I'm testing it inside junest (so same machine, but archlinux packages) - I made sure the build uses pkg-config as you suggested and it does, through cmake, at the same point I have data = {0x7fffe80af040 "", 0x7fffe802f040 "", 0x7fffe7faf040 "", 0x0, 0x0, 0x0, 0x0, 0x0}
[20:55:34 CET] <Guest_DuckZ> which looks way more sane
[20:56:15 CET] <Guest_DuckZ> so yeah, w/e they did to the "standard" build environment, it's probably that, the cause of my issue
[20:56:20 CET] <JEEB> :D
[20:56:25 CET] <JEEB> oh well, at least you got forward
[20:57:00 CET] <Guest_DuckZ> yeah, not really... me using junest is kind of unofficial, it's just me trying to get a sane environment to develop on, but no one really knows
[20:57:17 CET] <JEEB> well getting some code to chooch
[20:57:21 CET] <JEEB> is always a step forward
[20:57:26 CET] <JEEB> even if it's not exactly what you wanted
[20:57:51 CET] <Guest_DuckZ> hm that's true I guess
[20:58:34 CET] <JEEB> not sure what junest is anyways, I just took it like you're talking about something embedded or whatever that might be weird, and thus "just making it build and chooch locally" is always a good first step
[21:00:34 CET] <Guest_DuckZ> JEEB: we're using centos, because The Company wants it, but then we have a crazy packaging system in place because centos doesn't really work, so we have all sort of packages built manually
[21:00:54 CET] <Guest_DuckZ> and that's where the non-working ffmpeg comes from
[21:01:26 CET] <Guest_DuckZ> junest https://github.com/fsquillace/junest is archlinux running in a chroot, and that's where the working ffmpeg comes from
[21:01:39 CET] <JEEB> rightr
[21:04:49 CET] <Guest_DuckZ> yeah, I'm trying to run my program exactly the same way, with the same input and stuff, it just works
[21:05:03 CET] <stuck_help> I have a script which uses FFMPEG to extract closed captioning into an SRT file. works perfectly fine, except when the filename has a quote mark in it. It is derived from a DVR, so I can't predict if there will be a quote. it is passed as a variable
[21:05:21 CET] <JEEB> that shouldn't matter, though?
[21:05:25 CET] <Guest_DuckZ> screw their crazy packages, that's the problem - sorry for all this JEEB, and thanks for helping!
[21:05:47 CET] <JEEB> unless you're not escaping your strings properly
[21:05:53 CET] <JEEB> but that's not an FFmpeg problem
[21:05:54 CET] <stuck_help> ffmpeg -hide_banner -nostdin -f lavfi -i file:"$outdir/$trimmedname.$fileext"[out+subcc] -an -vn -map s -c:s srt "$subfile"
[21:05:56 CET] <JEEB> but a scripting problem :P
[21:06:11 CET] <JEEB> oh right
[21:06:11 CET] <stuck_help> it works peffectly in my script, and works perfect when there is no quote in the file name
[21:06:13 CET] <JEEB> -f lavfi
[21:06:19 CET] <stuck_help> for example
[21:06:20 CET] <JEEB> you will need to add quoting then
[21:06:27 CET] <JEEB> or well, not quoting
[21:06:31 CET] <JEEB> escaping
[21:06:34 CET] <JEEB> \,
[21:06:42 CET] <stuck_help> but how can i do that in a variable?
[21:06:52 CET] <JEEB> pretty sure you can do that with most scripting languages
[21:07:02 CET] <stuck_help> seems to not like the escaping..i tried it with just the string
[21:07:06 CET] <stuck_help> in bash, sorry for nto clarifying
[21:07:14 CET] <pos> how do i loop a gif as part of a comlex filtergraph?
[21:08:33 CET] <JEEB> stuck_help: use single quotes for the whole file:... filter chain 2) pre-emptively muck around the string in the script 3) if it feels hard, time to move to some language that can handle strings better
[21:08:51 CET] <JEEB> I espeically like languages that let you give the arguments to a command as separate things
[21:08:59 CET] <JEEB> instead of having to play with shell rules
[21:09:54 CET] <stuck_help> it works perfectly fine otherwise
[22:00:39 CET] <alexpigment> hey guys, i've got a weird one
[22:01:53 CET] <alexpigment> i have a VC-1 encoded video in a WMV container; it was created in Windows Media Encoder a few years back (at least, as I recall)
[22:02:40 CET] <alexpigment> MediaInfo detects the video's frame rate as 59940/1000
[22:02:48 CET] <alexpigment> and the length as 3s69ms
[22:03:38 CET] <alexpigment> when I try to do a copy to any format in ffmpeg (e.g. MKV, WMV, ASF), the framerate changes to ~60.496fps and the length is now 2.970s
[22:04:39 CET] <alexpigment> is there some way to force original timestamps and frame rate during a stream copy?
[22:05:17 CET] <kepstin> you could play around with the -copyts or -vsync options
[22:05:41 CET] <kepstin> (also -copytb)
[22:14:04 CET] <alexpigment> hmmm, nope :(
[22:14:18 CET] <alexpigment> thanks though
[22:15:07 CET] <JEEB> -vsync -passthrough -copyts -copytb I think?
[22:15:26 CET] <JEEB> and not -passthrough but just passthrough
[22:15:43 CET] <JEEB> although ffmpeg.c has so many places it could just poke your timestamp :P
[22:15:53 CET] <JEEB> (and then there's muxers thinking they'll be "helpful"
[22:16:48 CET] <alexpigment> still all the same thing
[22:17:02 CET] <alexpigment> i presume it should be copytb 1 ?
[22:17:11 CET] <alexpigment> it's complaining about expecting a number, so i gave it a 1
[22:17:19 CET] <JEEB> also use -debug_ts
[22:17:29 CET] <JEEB> it will show the timestamps at various parts of the show
[22:17:35 CET] <alexpigment> these are all before the input, just to be clear
[22:17:36 CET] <alexpigment> right?
[22:17:53 CET] <JEEB> some yes, like -vsync passthrough -copyts at least
[22:18:06 CET] <alexpigment> and copytb?
[22:18:09 CET] <alexpigment> that's a new one on me
[22:18:18 CET] <JEEB> supposed to also copy the time base around
[22:18:55 CET] <JEEB> anyways, -debug_ts starts logging timestamps at various spots in the chain so you can start debugging
[22:19:02 CET] <alexpigment> ok, i'll do that
[22:19:24 CET] <JEEB> of course the real question additionally is "what does mediainfo actually read to get its readings"
[22:19:27 CET] Action: alexpigment puts on timestamp translator glasses and tries to look cool
[22:19:37 CET] <JEEB> and "does the thing play the same in WMV"
[22:19:43 CET] <JEEB> umm, I mean WMP
[22:19:48 CET] <alexpigment> JEEB: it's a good question, but mediainfo reflects the actual new time i'm seeing in other players
[22:19:58 CET] <JEEB> since WMP is the de facto "reference" about ASF/WMV
[22:20:05 CET] <alexpigment> right
[22:22:51 CET] <JEEB> I wonder if there's any tools for ASF/WMV like L-SMASH's boxdumper
[22:22:59 CET] <alexpigment> not sure
[22:24:01 CET] <jafa> quick q - what is the filter string term for simple blend deinterlacing?
[22:24:34 CET] <alexpigment> you definitely want blend?
[22:24:45 CET] <jafa> blend is terrible, but yeah
[22:24:53 CET] <alexpigment> i think that's what happens by default
[22:24:58 CET] <jafa> if the cpu has the hp I use yadif
[22:25:10 CET] <jafa> if the cpu can't do yadif and it is HD I field drop
[22:25:33 CET] <jafa> trying to do something for low CPU + SD playback
[22:25:41 CET] <jafa> default is no deinterlacing
[22:25:55 CET] <jafa> (using the API, not the cli tools)
[22:25:59 CET] <alexpigment> oh gotcha
[22:26:04 CET] <alexpigment> not sure
[22:26:33 CET] <alexpigment> i just know if you don't explicitly say your output is interlaced, it encodes to progressive, and the two fields are shown as a single fraqme
[22:26:34 CET] <alexpigment> *frame
[22:26:54 CET] <jafa> yeah, exactly
[22:27:05 CET] <alexpigment> is that not blend?
[22:27:05 CET] <jafa> it then needs to be deinterlaced
[22:27:08 CET] <jafa> no
[22:27:19 CET] <jafa> that is just dumping the two fields into one frame
[22:27:41 CET] <jafa> (which is what comes out of the codec)
[22:27:49 CET] <alexpigment> oh, blend is when you average the two
[22:27:59 CET] <jafa> that is my understanding
[22:28:00 CET] <alexpigment> no clue about your question
[22:28:14 CET] <alexpigment> i've never even thought about using that method, so i've never used it
[22:28:19 CET] <jafa> it isn't really deinterlacing but it helps make it look less-worse for some types of content
[22:29:14 CET] <jafa> is there documentation on the filter string options? (seems to differ a bit from the command line options)
[22:29:45 CET] <alexpigment> https://ffmpeg.org/ffmpeg-filters.html#toc-pp
[22:30:03 CET] <alexpigment> rather
[22:30:04 CET] <alexpigment> https://ffmpeg.org/ffmpeg-filters.html#pp
[22:30:20 CET] <alexpigment> there's an option called "linblenddeint"
[22:30:23 CET] <alexpigment> not sure if that's what you need
[22:30:58 CET] <jafa> ah, I don't have GPL filters enabled
[22:31:04 CET] <jafa> strictly LGPL
[22:31:09 CET] <alexpigment> others here may know how to blend
[22:31:18 CET] <alexpigment> there are blend filters for frames
[22:31:31 CET] <alexpigment> and if you can deint fields to frames, you can blend
[22:31:37 CET] <alexpigment> but that defeats the whole purpose
[22:32:06 CET] <alexpigment> is yadif 0 really that prohibitibe in your case?
[22:34:54 CET] <jafa> 480i60 -> yadif = 480p30 burns more CPU than 720p60 -> framestep -> 720p30
[22:35:16 CET] <jafa> not by much, but may be an issue
[22:36:36 CET] <alexpigment> gotcha
[22:37:00 CET] <alexpigment> well, i've exhausted my knowledge :) someone else here knows much more about the filter options
[22:37:51 CET] <alexpigment> oh, i guess one last thing
[22:37:55 CET] <alexpigment> have you tried yadif 2 ?
[22:38:16 CET] <alexpigment> it skips the spacial interlacing check; not sure if that takes the CPU load down much or not
[22:40:18 CET] <jafa> oooh, testing...
[22:40:33 CET] <kepstin> hmm, kerndeint is gpl, isn't it.
[22:40:36 CET] <alexpigment> there's also mcdeint, which has a "fast" mode, fwiw
[22:40:51 CET] <kepstin> don't use mcdeint, it's not good for this use case
[22:40:59 CET] <alexpigment> yeah, i've never used it
[22:41:05 CET] <alexpigment> i was just looking at other options
[22:41:08 CET] <kepstin> (also the "fast" mode is just a way to get a slightly less slow preview)
[22:59:07 CET] <jafa> ok yadif mode2 of 480i60 is pretty much the same cpu load as 720p60 framestep to 720p30
[22:59:18 CET] <jafa> I am good with that
[22:59:24 CET] <alexpigment> cool
[22:59:41 CET] <jafa> for HD I will stick with field drop deinterlacing
[22:59:42 CET] <alexpigment> i still have a feeling it looks better than blend, even if it's throwing away half vertical resolution
[23:00:02 CET] <alexpigment> although that depends on the source content obviously
[23:00:08 CET] <jafa> yeah, blend is always wrong
[23:00:34 CET] <alexpigment> anyway, good to hear yadif 2 worked
[23:01:53 CET] <jafa> my classic example was a frame from a basketball game... camera tracking the ball pretty well across the crowd. The logo in the corner is perfect, the ball has jagged edges, and everyone in the crowd was repeated twice (shifted by h and v)
[23:02:32 CET] <jafa> figure field drop works, and motion compensation works
[23:03:15 CET] <jafa> yadif is a reasonable hack for improving real time viewing when it has to be done on the CPU
[00:00:00 CET] --- Wed Mar 21 2018
More information about the Ffmpeg-devel-irc
mailing list