[Ffmpeg-devel-irc] ffmpeg.log.20190529
burek
burek021 at gmail.com
Thu May 30 03:05:03 EEST 2019
[00:06:52 CEST] <bencc> TheAMM: this is just crop
[00:06:58 CEST] <bencc> can I remove background?
[00:07:04 CEST] <bencc> not sure what you mean by rips
[00:08:21 CEST] <TheAMM> Hm, your description sounded like you had one of those videos where they add a border and place the actual video inside it to avoid copyright detection, downloaded from youtube
[00:09:42 CEST] <bencc> I'm not violating anything
[00:10:09 CEST] <TheAMM> If the background is a static color, https://ffmpeg.org/ffmpeg-filters.html#chromakey
[00:11:33 CEST] <TheAMM> Otherwise your best bet is to take the first frame (or one you've edited yourself from the frames to have only the background), compare it to all the others and generate a mask from that
[00:13:01 CEST] <bencc> I think I need to remove only 4 colors
[00:13:22 CEST] <bencc> it's animated gif over a website screenshot
[00:13:39 CEST] <bencc> but using chromakey will probably remove also part of the cartoon
[00:13:53 CEST] <bencc> how can I tell which color to use with the chromakey filter?
[00:14:17 CEST] <BtbN> That most definitely will also damage the actual video
[00:14:28 CEST] <BtbN> There is no trivial way to remove a background picture
[00:14:37 CEST] <bencc> ok
[00:14:48 CEST] <bencc> I'll ask the animator to give me a better video
[00:15:01 CEST] <bencc> he placed the cartoon over a background to make it look real
[00:15:14 CEST] <bencc> but I need it without the background and thought there is a way to do it
[00:16:11 CEST] <Bruc3Wayn3> easiest way is for him to give it to you
[00:16:28 CEST] <bencc> sure. thanks
[00:16:53 CEST] <bencc> I want to try the chromakey anyway
[00:16:58 CEST] <bencc> how to detect the color?
[00:17:05 CEST] <bencc> take a screenshot of the video and use gimp?
[00:17:11 CEST] <BtbN> Pretty much, yes
[00:17:25 CEST] <BtbN> keep in mind it operates on YUV, not RGB
[00:19:04 CEST] <bencc> ok
[00:43:31 CEST] <Montana> ffmpeg is very stable but ffmpeg on OBS-studio is very unstable. why is that?
[00:45:09 CEST] <BtbN> "On OBS-Studio"?
[00:46:54 CEST] <Montana> btbn yup, popular program that uses ffmpeg
[00:47:20 CEST] <BtbN> I know what it is, I just don't understand that statement.
[00:47:42 CEST] <Montana> ffmpeg is very stable but ffmpeg that is used in OBS-studio is very unstable. why is that?
[00:48:16 CEST] <Montana> is that better?
[00:48:30 CEST] <BtbN> So, what doesn't work?
[00:48:46 CEST] <Montana> audio only recording
[00:48:55 CEST] <Montana> using vp9 codec doesn't work
[00:49:20 CEST] <BtbN> What container?
[00:49:25 CEST] <Montana> webm
[00:49:31 CEST] <Montana> mkv
[00:49:34 CEST] <Montana> tried both
[00:49:49 CEST] <BtbN> well, those are effectively the same, and not what's stopping it
[00:49:50 CEST] <Montana> btbn do you use obs-studio?
[00:50:02 CEST] <BtbN> I'd guess their ffmpeg libs are just built without a vp9 encoder?
[00:50:05 CEST] <Montana> btbn it crashes using vp9
[00:50:26 CEST] <Montana> no it has vp9 encoder lib
[00:50:48 CEST] <Montana> because it creates vp9 files but crashes
[00:52:27 CEST] <BtbN> You should report that to them, not ffmpeg
[00:53:08 CEST] <BtbN> There is no ffmpeg command line, it's a 3rd party program usinb lavc
[00:53:43 CEST] <BtbN> Probably API-Misuse on their end or something
[00:53:55 CEST] <another> i aassumed there would be some setting for an ffmpeg cmdline
[00:54:15 CEST] <Montana> okay let me check the command line that it excutes
[00:54:18 CEST] <BtbN> It does not invoke a cli tool, that would be horribly inefficient
[00:54:39 CEST] Action: another *shrugs*
[00:54:41 CEST] <Montana> btbn it doesn't? i don't see why that would be inefficient
[00:54:56 CEST] <BtbN> How would it gets the raw frames into it?
[00:55:08 CEST] <BtbN> It just uses the API, like it should. But apparently incorrectly.
[00:55:26 CEST] <Montana> btbn you seem to be expert in OBS
[00:55:37 CEST] <BtbN> This has nothing to do with a specific program
[00:56:52 CEST] <BtbN> Open a bug with them, give them a crashlog. It's most definitely not an ffmpeg issue
[00:57:26 CEST] <Montana> exactly ffmpeg build from ffmpeg site is super stable
[00:57:28 CEST] <Montana> it never crashes
[00:57:35 CEST] <BtbN> ...
[00:58:09 CEST] <BtbN> First, there are no ffmpeg builds on the ffmpeg site. Second, OBS is using the API, not the cli tools.
[00:58:32 CEST] <Trel> Not sure if I should be asking this here or in -devel, but I'm trying to compile ffmpeg, and I have a library in a non-standard location. I'm not sure how to get it to find it for compiling, as well as work in the resulting binary, which shows it as not-found when I do use ldd.
[00:58:57 CEST] <BtbN> Trel, make sure pkg-config finds it, then configure will most likely find it.
[00:59:57 CEST] <Trel> I was able to get configure to find it, and it compiles, but it's the binary that seems to not work as it claims its missing.
[01:00:55 CEST] <Trel> I used --extra-cflags and --extra-ldflags on configure to that effect
[01:01:17 CEST] <SixEcho> is there a way to represent "ffmpeg -f concat -safe 0 -i concat.txt" as a complex filter? first attempt using the complex filter am getting 30fps vs 1600+
[01:01:18 CEST] <tdr> Trel, on linux?
[01:01:23 CEST] <Trel> Yes
[01:01:39 CEST] <BtbN> SixEcho, there is a concat filter, but it works at a very different level
[01:01:49 CEST] <BtbN> And forces a reencode
[01:02:04 CEST] <tdr> Trel, add the path to your /etc/ld.so.conf or a file inside of /etc/ld.so.conf.d then run ldconfig
[01:02:21 CEST] <Trel> tdr: need to do this as non-root only
[01:02:40 CEST] <tdr> then play with your shell environment library paths
[01:02:42 CEST] <Trel> That's where 99% of my headaches with this stem from
[01:03:07 CEST] <tdr> i think the headaches are form odd locations for things ;)
[01:03:24 CEST] <inna> hey
[01:03:40 CEST] <BtbN> You can also do -Wl,-rpath,\$ORIGIN during linking and then just put the library next to the binary
[01:03:49 CEST] <inna> should i expect issues having my whole source and bin directory ntfs compressed?
[01:04:25 CEST] <tdr> BtbN, that's a workaround though. better to fix the environment or make the library global.
[01:04:47 CEST] <BtbN> Can't really make a library global if you're not root. And generally not a good idea to do that for custom build stuff as well
[01:05:11 CEST] <tdr> thats the purpose of /usr/local tho .. its commonly done
[01:05:19 CEST] <BtbN> And it commonly makes a mess
[01:05:22 CEST] <tdr> "global" but local to the system
[01:05:36 CEST] <tdr> not if the lib doesn't over-lap one already provided by something else
[01:06:03 CEST] <BtbN> Until it at some point in the future does, and headers/libs get mixed, and you end up with weird crashes
[01:06:26 CEST] <BtbN> Everything outside your homedir is better done by a package manager
[01:06:48 CEST] <tdr> /usr/local is mostly never touched by a package manager
[01:06:59 CEST] <BtbN> So?
[01:07:06 CEST] <BtbN> It can just stay empty
[01:07:52 CEST] <tdr> keeping it in $HOME and trying to share it can be awkward tho too
[01:08:02 CEST] <Montana> btbn does your obs crash too when you use vp9 ?
[01:08:05 CEST] <BtbN> Yes
[01:08:15 CEST] <Montana> btbn is that Yes to me?
[01:08:16 CEST] <BtbN> But the file it recorded works fine at least
[01:08:27 CEST] <BtbN> It only crashes on stop
[01:08:34 CEST] <Montana> btbn yes same here
[01:08:50 CEST] <BtbN> It's most likely misusing the API, like I said. File a bug with them.
[01:09:11 CEST] <BtbN> Looking at the backtrace, it looks like it kept feeding frames to the encoder after it closed it.
[01:09:26 CEST] <Montana> btbn thanks for testing that
[01:11:09 CEST] <Montana> btbn also try audio-only recording
[01:11:41 CEST] <BtbN> I'm going to bed now, so not before tomorrow.
[01:25:49 CEST] <Trel> tdr: that's what I said, I think I need to set some of this with the LDFLAGS envar, I'm trying that currently. I'm fairly certain rpath is the one I need to get set correctly.
[01:26:40 CEST] <Trel> BtbN: I'm doing something similar, I set rpath with the LDFLAGS envar, but I set it to where I know the .so file it can't find should be, I'd like to avoid having the binaries and libraries mixing
[01:31:30 CEST] <Trel> BtbN and tdr: setting LDFLAGS='-Wl,-rpath,/nonstandard/path/to/libs' ./configure <the rest>, did the trick
[01:31:41 CEST] <Trel> Thanks for the assist
[02:02:33 CEST] <Montana> does ffmpeg allow pausing while encoding?
[02:04:14 CEST] <DHE> you can always SIGSTOP it or whatever. I'll assume it's not realtime work involved...
[02:08:32 CEST] <Montana> is SIGSTOP stopping or pausing?
[02:14:12 CEST] <c_14> SIGSTOP pauses, SIGCONT resumes
[02:37:58 CEST] <causa-sui> I have been using ffmpeg to make short clips out of larger video files. With one, I want to make an "eternal loop" i.e. play the clip, then seamlessly play the clip in reverse back to the beginning. Would anyone be kind enough to help me figure out how?
[03:13:58 CEST] <DHE> causa-sui: reverse is tricky. you'll probably want to turn the movie into individual frames (png, jpegs, whatever), reverse the filenames, and then re-encode a backwards video movie from that
[03:14:12 CEST] <DHE> (or something to that effect)
[03:36:22 CEST] <Atlenohen> kepstin: So I'd just need an utility which can output all the pkt_duration_time values from all frames, ... yeah something I wanted to type yesterday but fallen asleep
[03:37:02 CEST] <Atlenohen> So yeah people, good evening, how would I possibly output just those values from FFPROBE, some kind of grepping in linux ?
[03:37:27 CEST] <Atlenohen> I have MSYS2 maybe I could try that, and remove all the other putput ffprobe deoes when showing frames
[03:55:57 CEST] <furq> Atlenohen: -show_entries frame=pkt_duration_time
[04:00:29 CEST] <xochilpili> hello everyone
[04:02:35 CEST] <xochilpili> im working in a personal project for iptv, now, i have found several information about hls, hsv. Then, i found several servers with live streaming using m3u8 file, now, how can i determine the name of the channel using ffmpeg or ffprobe or i just cant?
[04:03:34 CEST] <xochilpili> if i cant using ffmpeg or ffprobe, then how can i determine the channel name ?
[04:12:52 CEST] <DHE> ffprobe will show it if available, usually labeled "Service name" or such
[04:19:48 CEST] <friendofafriend> After a few days of watching an MPEG-TS outputted from ffmpeg, the lag adds up to a few minutes. I can restart the viewer and it goes away. Is there some way to mitigate that?
[11:36:24 CEST] <Pihamies> i got an ERROR: libx264 not found when trying to compile ffmpeg?
[11:37:22 CEST] <Pihamies> i installed x264 with git clone https://code.videolan.org/videolan/x264.git;make;make install but still the same error
[11:37:50 CEST] <BtbN> Use your distributions packages instead
[11:38:37 CEST] <Pihamies> i did
[11:38:51 CEST] <BtbN> You just described how you didn't.
[11:38:55 CEST] <Pihamies> slackware's slackbuilds
[11:39:05 CEST] <Pihamies> it compiles
[11:39:37 CEST] <BtbN> If you do that manually, it still won't be in the proper paths, and not tracked by the package manager.
[11:39:40 CEST] <Pihamies> slackbuild script uses ff 4.1.3 version
[11:39:52 CEST] <BtbN> Make sure you also have the -dev package installed.
[11:40:42 CEST] <Pihamies> where should i install x264, it now is in /usr/local/bin
[11:41:34 CEST] <BtbN> You should use your distributions package for it, which will properly install it.
[11:41:45 CEST] <Pihamies> where do i get the -dev package?
[11:42:08 CEST] <BtbN> I have no idea about Slackware, but you get it from your distribution.
[11:42:21 CEST] <Pihamies> i alrady have ffmpeg 4.1.3 installed, i was just trying to add x264 into it
[11:42:33 CEST] <BtbN> That's not how that works
[11:42:52 CEST] <Pihamies> it does with slackbuilds
[11:42:55 CEST] <BtbN> ffmpeg needs to be compiled with support for libx264
[11:43:00 CEST] <BtbN> you can't add it in after the fact
[11:43:10 CEST] <Pihamies> there is a conf option for x264
[11:43:20 CEST] <BtbN> Yes, at compile time
[11:43:21 CEST] <Pihamies> it compiles it again
[11:43:34 CEST] <Pihamies> then i upgrade the package
[11:43:42 CEST] <BtbN> So Slackware has a Gentoo-Like build system package manager? But does not pull in dependencies on its own?
[11:43:54 CEST] <Pihamies> right
[11:44:25 CEST] <Pihamies> https://slackbuilds.org/repository/14.2/multimedia/ffmpeg4/
[11:45:03 CEST] <BtbN> That sounds horribly broken
[11:45:54 CEST] <Pihamies> well it build 4.1.3 perfectly
[11:46:09 CEST] <BtbN> With support for no external libraries, yes.
[11:46:33 CEST] <BtbN> You can switch them on with env vars acording to that page, but it does not automatically pull in dependencies it seems, which is 100% broken imo
[11:47:09 CEST] <BtbN> Only thing it actually seems to depend on is libass
[11:47:31 CEST] <Pihamies> i set lib3blame in config and it built that just fine, only not x264
[11:47:50 CEST] <Pihamies> that's external lib too?
[11:48:10 CEST] <BtbN> Of course it is
[11:48:25 CEST] <Pihamies> i suspect it just doesn't find where the x264 is?
[11:48:36 CEST] <BtbN> It should find its own dependency
[11:48:46 CEST] <Pihamies> should i install x264 inti /usr?
[11:48:48 CEST] <BtbN> You should complain to the Distribution
[11:49:03 CEST] <BtbN> And you should install the libx264 system package, don't install stuff manually
[11:49:20 CEST] <Pihamies> there wasnt' it
[11:49:36 CEST] <Pihamies> so i had to use git
[11:49:51 CEST] <BtbN> There is a x264 package if I go one patch up from that ffmpeg link...
[11:49:54 CEST] <BtbN> *path
[11:51:02 CEST] <Pihamies> right, good find
[11:51:15 CEST] <Pihamies> how do i uninstall git x264?
[11:51:39 CEST] <Pihamies> i havent used git much
[11:51:58 CEST] <BtbN> try make uninstall. If it doesn't have that target, manually find all files it installed into the system and remove them
[11:52:25 CEST] <Pihamies> yeah, i did, it removed it
[11:52:34 CEST] <Pihamies> lemme install sb x264
[11:53:15 CEST] <BtbN> But what the hell is wrong with slackwares packages and dependencies? That seems horribly broken
[11:54:17 CEST] <Pihamies> it doesn't do dependencies
[11:54:38 CEST] <Pihamies> u have to install all one by one
[11:54:51 CEST] <BtbN> That's horrible.
[11:55:19 CEST] <Pihamies> yes, but luckily there ain't too many programs that have many
[11:55:44 CEST] <BtbN> If I think about desktop envs and the like, that easily is a dependency tree with 100+ packages
[11:55:48 CEST] <Pihamies> videolan has lots, that's why i rather use mplayer
[11:56:04 CEST] <BtbN> mplayer and vlc both depend on ffmpeg, which depends on all the stuff
[11:56:29 CEST] <BtbN> Also, mplayer is pretty dead, use mpv.
[11:57:25 CEST] <Pihamies> not ffmpeg as u see in sb page there are no requirements other than libass
[11:57:42 CEST] <Pihamies> i'm used to mplayer
[11:58:03 CEST] <Pihamies> it doesn't do .vtt i just noticed few days ago
[11:58:11 CEST] <BtbN> mpv is a maintained mplayer fork...
[11:58:29 CEST] <Pihamies> ic, i give it a try
[11:59:43 CEST] <Pihamies> looks like ffmpeg is now compiling with correct x264 ;)
[12:01:00 CEST] <Pihamies> hmm i did seacrh first x264 from sb but i searched libx264 which it doesn't find
[12:02:22 CEST] <Pihamies> btw, do u know what are good option to convert dvd into videofile with ffmpeg, thats why i'm installing x264 for
[12:03:48 CEST] <BtbN> There's probably a wiki page about that somewhere on trac
[12:04:13 CEST] <BtbN> DVDs are a mess though
[12:06:07 CEST] <Pihamies> yes, i'm trying to convert it as good quality as possible
[12:06:44 CEST] <Pihamies> just ffmpeg -i input.vob out.mp4 compresses it
[12:07:14 CEST] <Pihamies> i tried .ts format too, but not much better
[12:07:31 CEST] <Pihamies> which format does not compress or change quality?
[12:09:03 CEST] <furq> use -c copy
[12:09:19 CEST] <furq> also if you want to remux a set of vobs then use something like tccat from transcode
[12:10:55 CEST] <Pihamies> i grabbed the .vobs with cat *.VOB into input.vob
[12:11:35 CEST] <Pihamies> well it compiled and installed ffmpeg 4.1.3, how do i check it now has libx264 support?
[12:12:24 CEST] <Pihamies> so is it ffmpeg -i input.vob -c copy out.mp4?
[12:13:21 CEST] <Pihamies> got it, it's there
[12:13:33 CEST] <furq> 11:10:55 ( Pihamies) i grabbed the .vobs with cat *.VOB into input.vob
[12:13:43 CEST] <furq> this is the bit that you should ideally use a proper demuxer for
[12:13:53 CEST] <furq> but if you're happy that input.vob actually contains exactly what you want then no need
[12:14:51 CEST] <Pihamies> yes, it has whole video, but the output.mp4 is not good quality
[12:15:42 CEST] <Pihamies> okay that -c copy did the trick ;)
[12:15:54 CEST] <Pihamies> identical copy
[12:16:44 CEST] <Pihamies> hmm, i guess i don't need that x264 into this after all ;)
[12:17:05 CEST] <furq> not for just remuxing
[12:17:39 CEST] <Pihamies> one guide on net mentioned it, i wish i knew this -c copy before ;)
[12:24:06 CEST] <Atlenohen> I'm reading now that the FPS and Timecodes aren't exactly dependent on each other, interesting
[12:25:05 CEST] <Atlenohen> But what if the FPS changes in the middle of a video, would that be achieved by just timings and still be as a CFR video or would it make it a VFR ?
[12:25:40 CEST] <Atlenohen> Well, technically it not be CFR, ... technically matters tho.
[12:25:50 CEST] <furq> well the framerate would be variable
[12:26:42 CEST] <Atlenohen> Oh sorry, I wanted to say, that the constant FPS changes, let's say from 30 to 60
[12:26:47 CEST] <furq> yeah i get that
[12:27:01 CEST] <BtbN> If that happens in the middle of a stream, it's clearly not CFR
[12:27:16 CEST] <Atlenohen> It wouldn't make a difference right, yeah, just double checking.
[12:27:32 CEST] <furq> the definition is helpfully encapsulated in the name
[12:38:19 CEST] <Pihamies> this mpv is indeed better than mplayer, thanks BtbN
[12:39:04 CEST] <TheAMM> Who'd've'thunk'd'it!
[12:48:54 CEST] <an3k> Hello. I tried to solve it by myself but after hours of googling, thinking and trying I can't find a solution. I want to split this command into multiple ones because the filters are horribly slow. ffmpeg.exe -hide_banner -y -c:v hevc_cuvid -i "D:\Encode\input.mkv" -vf zscale=t=linear:npl=100,format=gbrpf32le,zscale=p=bt709,tonemap=tonemap=hable:desat=0,zscale=t=bt709:m=bt709:r=tv,format=yuv4
[12:48:54 CEST] <an3k> 20p,scale=1920:1080,crop=1920:1080:140:140 -c:v libx264 -profile:v high -level:v 4.1 -crf:v 22 -tune:v film -preset:v veryslow output.264
[12:51:22 CEST] <furq> i'm not sure i understand the question
[12:52:16 CEST] <an3k> That command encodes with 2 fps on a 12-core 2.8 GHz Xeon; only one core is utilized. I read that the filter(s) are single-threaded. Since it's ffmpeg I assume I can use a single filter per ffmpeg process and pipe to another ffmpeg process so I get "multi-threading"?
[12:52:45 CEST] <furq> you could but you'd still be bottlenecked by the slowest filter
[12:53:25 CEST] <pink_mist> furq: sure, but the slowest filter would get a full core just for itself, rather than having to share it with all the other filters too
[12:53:44 CEST] <furq> that still seems like it would give a worse speedup than just splitting the file into 12 and encoding them separately
[12:53:52 CEST] <furq> and would also be more complicated
[12:53:56 CEST] <an3k> I tried but I always get an error. I tried it with -f rawvideo, -f hevc and so on but nothing works
[12:54:26 CEST] <TheAMM> Not literally split the source file
[12:54:32 CEST] <an3k> Well, If I use AviSynth with the same filters and open that with ffmpeg and pipe the yuv240 output to x264 I encode with more than 30 fps
[12:54:33 CEST] <TheAMM> But seek and read only a part of it
[12:54:51 CEST] <an3k> Don't tell me AviSynth is more advanced than ffmpeg :)
[12:55:06 CEST] <furq> i'm not really sure which of those filters is slow
[12:55:49 CEST] <furq> why not just use avisynth though
[12:56:40 CEST] <an3k> The plugins are Windows only :(
[12:56:53 CEST] <furq> vapoursynth?
[12:57:07 CEST] <furq> if you're using regular non-MT avs then i assume the reason is that one of those filters is badly optimised in ffmpeg
[12:57:16 CEST] <furq> or badly optimised for the particular code path you're hitting, at least
[12:57:50 CEST] <furq> i assume it's tonemap
[12:58:49 CEST] <furq> vapoursynth has tonemapping stuff so it might be worth trying that out first
[12:59:03 CEST] <an3k> I just tried with only -vf zscale=t=linear:npl=100,scale=1920:1080,crop=1920:1080:140:140 and that 8 fps (only one core utilized)
[12:59:10 CEST] <furq> also obviously make sure your ffmpeg is up to date
[12:59:42 CEST] <furq> you know zscale does scaling, right
[12:59:58 CEST] <furq> and you should probably do that before running expensive filters
[13:00:32 CEST] <an3k> in this case zscale does nothing but HDR -> SDR tonemapping
[13:01:06 CEST] <furq> yeah i'm saying you should use it for scaling as well
[13:01:39 CEST] <furq> going zscale,zscale,zscale,scale is a weird thing to do
[13:01:57 CEST] <an3k> oh, right. I haven't fixed the actual resolution scaling filter yet, just added a simple one so x264 accepts it
[13:02:13 CEST] <furq> how big is the source
[13:02:19 CEST] <durandal_1707> easy - split input with segment muxer - filter and encode each component in paraller - WIN WIN!
[13:02:45 CEST] <an3k> 51 GB
[13:02:48 CEST] <furq> i meant resolution
[13:02:50 CEST] <furq> i assume it's 4k
[13:02:53 CEST] <an3k> 2160p
[13:03:05 CEST] <furq> if it's 4k then scaling to 1080p before running anything else will make it about 4x quicker
[13:03:15 CEST] <furq> you might get some minor quality loss obviously
[13:05:14 CEST] <an3k> 6 fps now
[13:05:35 CEST] <durandal_1707> tonemap got slice threading recently
[13:05:51 CEST] <furq> do you need zscale,format,zscale
[13:05:56 CEST] <furq> seems like you could merge those two zscales together
[13:06:16 CEST] <an3k> Yes, otherwise tonemapping doesn't work
[13:06:36 CEST] <furq> that's weird but i've never used tonemap so i'll assume it's true
[13:07:04 CEST] <an3k> https://forum.doom9.org/showthread.php?p=1827930#post1827930
[13:07:13 CEST] <an3k> That one explains each filter
[13:07:26 CEST] <durandal_1707> zscale=t=linear:npl=100:p=bt709,format=gbrpf32le,tonemap=tonemap=hable:desat=0,zscale=t=bt709:m=bt709:r=tv,format=yuv4 ?
[13:08:33 CEST] <an3k> Then color information will be cut off. gbrpf32le has to come before bt709
[13:09:21 CEST] <an3k> If I could split the command and pipe ffmpeg into ffmpeg I could live with that. How should I do that?
[13:09:57 CEST] <furq> it'd be a lot easier and probably faster to just split the input
[13:10:09 CEST] <durandal_1707> see segment muxer and concat demuxer documentation
[13:10:40 CEST] <furq> also yeah make sure your ffmpeg is up to date
[13:11:18 CEST] <durandal_1707> nobody wants to pay me to improve zscale scalability so its soo slow
[13:11:26 CEST] <furq> i guess you want git head because tonemap isn't threaded in 4.1.3
[13:11:27 CEST] <an3k> If I use ffmpeg.exe -hide_banner -c:v hevc_cuvid -i "D:\Encode\input.mkv" -vf zscale=w=1920:h=1080:t=linear:npl=100 -f rawvideo - | ffmpeg.exe -hide_banner -y -i - -vf format=gbrpf32le,zscale=p=bt709,tonemap=tonemap=hable:desat=0,zscale=t=bt709:m=bt709:r=tv,format=yuv420p -c:v libx264 -profile:v high -level:v 4.1 -crf:v 22 -tune:v film -preset:v veryslow output.264 or other formats like hevc,
[13:11:27 CEST] <an3k> etc. I constantly get errors
[13:11:51 CEST] <furq> you can't just pipe rawvideo like that
[13:11:57 CEST] <furq> rawvideo doesn't have any headers indicating dimensions, pixel format etc
[13:12:23 CEST] <furq> so you either need to specify those on the right hand side of the pipe, or do -f nut -c:v rawvideo on the left hand side
[13:12:29 CEST] <furq> (do the second one)
[13:12:32 CEST] <an3k> so put it in eg. mpegts before piping?
[13:12:43 CEST] <an3k> oh
[13:13:23 CEST] <furq> also you probably want to set a scaler for zscale
[13:13:26 CEST] <furq> it defaults to bilinear iirc
[13:13:34 CEST] <furq> probably :f=lanczos
[13:14:36 CEST] <an3k> Now I get "Impossible to convert between the formats supported by the filter 'graph 0 input from stream 0:0' and the filter 'auto_scaler_0'"
[13:15:38 CEST] <furq> remember when i said it'd be simpler to just split the input
[13:15:42 CEST] <furq> well this isn't what i meant but i'll take it
[13:16:38 CEST] <furq> i guess you need to move format=gbrpf32le into the first command
[13:16:45 CEST] <an3k> Yeah but splitting the files isn't going to work. Encoding has to be done "on the fly"
[13:16:50 CEST] <furq> oh
[13:17:34 CEST] <an3k> code 3074: invalid colorspace definition \ Error while filtering: Generic error in an external library \ Failed to inject frame into filter network: Generic error in an external library
[13:18:15 CEST] <furq> hell yeah incomprehensible zscale errors
[13:18:42 CEST] <furq> going to take a wild stab in the dark and guess you need to move zscale=p=bt709 into the first command as well
[13:18:43 CEST] <an3k> "format=gbrpf32le to turn it all into floating-point RGB"
[13:19:19 CEST] <durandal_1707> zscale can use slice threading, i once again kindly ask for sponsorship
[13:19:22 CEST] <furq> the important thing to remember about zscale errors is that at they're not segfaults
[13:19:26 CEST] <furq> at least
[13:20:08 CEST] <an3k> ok, put the 2nd zscale into the first part. Now I get "Impossible to convert between the formats supported by the filter 'graph 0 input from stream 0:0' and the filter 'auto_scaler_0' \ Error reinitializing filters! \ Failed to inject frame into filter network: Function not implemented"
[13:20:47 CEST] <an3k> @durandal_1707 That is going to be expensive, isn
[13:20:51 CEST] <an3k> 't it? :)
[13:21:41 CEST] <furq> an3k: what ffmpeg version is this
[13:22:12 CEST] <an3k> ffmpeg version 4.1 Copyright (c) 2000-2018 the FFmpeg developers
[13:22:42 CEST] <furq> 12:05:35 (@durandal_1707) tonemap got slice threading recently
[13:22:54 CEST] <furq> you should probably try git head and see if this helps you out
[13:23:03 CEST] <furq> the latest git version on zeranoe has it
[13:24:21 CEST] <furq> there are also community static builds of git head for linux if this needs to be portable
[13:24:47 CEST] <furq> portable without having to build it yourself, i should say
[13:25:45 CEST] <an3k> Just tried it with "ffmpeg version N-93944-gd903c09d9a Copyright (c) 2000-2019 the FFmpeg developers"
[13:26:25 CEST] <an3k> same error
[13:26:31 CEST] <furq> i meant the non-split command
[13:26:47 CEST] <furq> it should hopefully run quicker
[13:27:28 CEST] <an3k> wow, 12 fps
[13:37:24 CEST] <durandal_1707> an3k: it can be very cheap
[13:39:58 CEST] <an3k> Thank you furq for your help so far :)
[13:40:30 CEST] <an3k> It totally depends on what "very cheap" means but generally I'd be very interested @ durandal_1707
[14:14:54 CEST] <inna> https://i.imgur.com/3GNH4Qm.jpg
[14:15:01 CEST] <inna> this is how you do it, bebeh.
[15:39:08 CEST] <tuxx> hey guys.. i'm reading from stdin (a camera stream with h264 encoded video) into ffmpeg and would like to stream it to rtmp but i am getting a fairly high delay...
[15:39:20 CEST] <tuxx> i pressume ffmpeg needs to read some initial frames to detect the stream settings properly which in itself causes some of the delay
[15:39:36 CEST] <tuxx> raspivid -t 0 -w 960 -h 540 -fps 10 -b 500000 -hf -vf -o - | ffmpeg -i - -s 960x540 -r 25 -pix_fmt yuv420p -vcodec copy -an -f flv -metadata streamName=myStream "rtmp://live-fra.twitch.tv/app/live_237180984_imcSkvuBnkwZCWGJTxaKFG5aLMIHgY"
[15:39:43 CEST] <tuxx> are there any options that i cld possibly specify in order to reduce latency?
[15:40:06 CEST] <tuxx> it takes roughly 10-15 seconds for ffmpeg to start streaming, and i'm not sure if that initial lag is dropped eventually or if it propagates forever as an offset
[15:56:51 CEST] <skunkworks> Hello - I have an old sony cam corder that I was able to hookup firewire to a PC. I used vlc and recorded the stream. I have an avi file but am having problems converting it.
[15:58:11 CEST] <skunkworks> Duration: 00:13:48.72, start: 0.000000, bitrate: 30311 kb/s
[15:58:11 CEST] <skunkworks> Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, stereo, s16, 1536 kb/s
[15:58:14 CEST] <skunkworks> Stream #0:1: Video: none (dv / 0x20207664), none, 720x480, 28765 kb/s, 29.96 fps, 29.96 tbr, 29.96 tbn, 29.96 tbc
[15:58:17 CEST] <skunkworks> No decoder for stream #0:1, filtering impossible
[15:58:19 CEST] <skunkworks> Error opening filters!
[16:03:31 CEST] <skunkworks> vlc plays it..
[16:21:09 CEST] <skunkworks> This is what I tried ffmpeg -analyzeduration 2147483647 -probesize 2147483647 -i vlc-record-2019-05-28-17h01m56s-dshow___-.avi youroutput.mp4
[16:29:03 CEST] <termos> if I capture from my webcamera and stream is as DASH with `streaming 1` i'm getting the expected behaviour in chrome network tab where each 6s segment takes around 5.8s to download so it's streamed. If I use another input like some rtmp with h264 then chrome is showing each segment being fetched in ~2s. I don't understand how the input can affect this...
[16:30:16 CEST] <termos> I tried to use an rtmp h264 input with only I-frames to make it similar to my camera input which only has reference frames, but it was still 2s to fetch one 6s segment. so it's no longer streaming the full segment, it just starts streaming after some time
[17:44:39 CEST] <th3_v0ice> Can I safely change this flag #define AV_PTS_WRAP_IGNORE, to 1? Will this mess up some muxers or demuxers?
[19:31:53 CEST] <causa-sui> DHE: sorry for repeating myself, I just don't know how to do that either... :(
[20:40:08 CEST] <SixEcho> i am interested in adding some guages over video& open to using any technology per-se. any recommendations what base technology to use that are easy to integrate with ffmpeg? i'm already using several complex filters and overlaying multiple videos in my existing process. videos can be lengthy (hours), so not interested in generating 100k's of transparent overlay PNG's or somesuch.
[20:50:58 CEST] <DHE> real-time generation of videos?
[20:51:54 CEST] <DHE> a second overlay video may be easiest, and you can generate it using any method you like. maybe just a named pipe in RGBA format or something.
[20:58:31 CEST] <bencc> I'm trying to crop mp4 and extract the first image:
[20:58:32 CEST] <bencc> ffmpeg -i test.mp4 -vf "crop=620:680:300:20, select=eq(n\,0)" -q:v 1 test.png
[20:59:33 CEST] <bencc> sorry. was missing a parameter
[21:12:06 CEST] <SixEcho> DHE: yeah RGBA probably the simplest&
[21:12:35 CEST] <SixEcho> no, not real-time videos
[21:27:43 CEST] <kepstin> bencc: best way to output only one frame is to use the "-vframes 1" option, no need for select there.
[22:19:38 CEST] <bencc> kepstin: thanks
[22:20:05 CEST] <bencc> how can I replace white backgorund in a video with transparency?
[22:22:13 CEST] <bencc> tried:
[22:22:14 CEST] <bencc> ffmpeg -i test.mp4 -vf chromakey=white test.gif
[22:22:21 CEST] <bencc> but it still has white background
[22:24:06 CEST] <durandal_1707> why gif?
[22:24:50 CEST] <bencc> I need it in powerpoint
[22:24:56 CEST] <bencc> a video won't work in this case
[22:31:53 CEST] <SixEcho> bencc: try increasing the similarity N with -vf chromakey=white:N to see if you can get a result&
[22:32:19 CEST] <SixEcho> 0.01 to 1.0& try 0.1
[22:32:59 CEST] <bencc> trying
[22:34:11 CEST] <bencc> I don't see any difference. I'm probably doing something wrong
[22:34:58 CEST] <kepstin> i don't think the ffmpeg gif encoder supports transparency
[22:35:20 CEST] <bencc> I see this in the terminal: No accelerated colorspace conversion found from yuva420p to bgr8.
[22:35:25 CEST] <bencc> not sure if it's related
[22:35:40 CEST] <bencc> maybe I need to set the chromakey color in yuv?
[22:35:47 CEST] <bencc> kepstin: ok. thanks
[22:36:55 CEST] <kepstin> bencc: actually it looks like it can, as long as you do a two-step encode with the 'palettegen' and 'paletteuse' filters to do the colourspace conversion to pal8 before encoding to gif
[22:37:16 CEST] <durandal_1707> use filters for gif
[22:37:16 CEST] <bencc> kepstin: don't know how to use it :)
[22:38:08 CEST] <bencc> durandal_1707: what filters?
[22:40:29 CEST] <durandal_1707> google mentioned filters
[22:41:40 CEST] <TheAMM> bencc: https://ffmpeg.org/ffmpeg-filters.html#palettegen https://ffmpeg.org/ffmpeg-filters.html#paletteuse
[22:41:47 CEST] <TheAMM> gosh, manuals!
[23:07:28 CEST] <upgreydd> is there an option to set some decoder specific things like "log2_max_frame_num_minus4" in SPS header of h264?
[23:08:50 CEST] <upgreydd> https://yumichan.net/video-processing/video-compression/explanation-of-descriptors-in-itu-t-publication-on-h-264-coding-standardrecommendation-with-example/ found some info here but I have no idea what to do xD
[23:11:37 CEST] <SixEcho> bencc: use this -filter_complex "[0:v] chromakey=white:0.05:0, split [a][b]; [a] palettegen=reserve_transparent=on:transparency_color=white [p]; [b][p] paletteuse"
[23:12:01 CEST] <SixEcho> you may not need the 0.05& but just see if you get a result
[00:00:00 CEST] --- Thu May 30 2019
More information about the Ffmpeg-devel-irc
mailing list