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

burek burek021 at gmail.com
Mon Feb 4 03:05:02 EET 2019


[01:34:32 CET] <seanrdev> I tried http://ffmpeg.pastebin.com/ and yet it's not returning a result so I just pasted in pastebin.com
[01:34:36 CET] <seanrdev> https://pastebin.com/LZ5yQPb6
[01:36:19 CET] <seanrdev> There seems to be an error with my formatting of the output file name. If I name a simple file name in the absolute directory everything works great however when attempting to add dates and times things start to get crazy with incorrect codec params.
[01:50:51 CET] <iive> seanrdev, after reading `man ffmpeg-formats` it seems that you need 'strftime' option in order to use its formatting for the filename
[01:59:06 CET] <seanrdev> iive: use_localtime 1 gives the same result.
[01:59:35 CET] <utack> what would be the correct "map" command to drop all this mjpeg mkv attachment nonsense? "  Stream #0:7 (mjpeg) -> libvmaf:reference
[01:59:35 CET] <utack> "
[01:59:50 CET] <utack> i have tried a few, but can't figure out how to drop these entirely
[02:00:50 CET] <utack> shouldn't "-map 0:0" pick the stream 0 from file 0 and drop all others?
[02:01:25 CET] <seanrdev> Oh wait... I see there is an actual option -strftime when using that I start to get a different error so I guess maybe that is solved.
[02:04:02 CET] <utack> "-map 0:V" also does not help
[02:14:52 CET] <seanrdev> I can't seem to get this down. Now the save works but I'm having encoder errors now. Why would I start to have encoder errors when I start adding local time? https://pastebin.com/Yg3UF5MQ
[13:11:44 CET] <lightbulb6> how can i extract a frame from an anamorphic video and encode it to png with correct sar?
[13:12:39 CET] <lightbulb6> i'd like the resulting png file to look exactly as what ffplay shows when playing the input file, but i get a stretched out picture instead
[13:13:28 CET] <lightbulb6> the command i use is as follows: ffmpeg -i in.mkv -frames 1 out.png
[13:18:54 CET] <lightbulb6> a sample video can be created like so: ffmpeg -f lavfi -i "testsrc=s=256x256" -filter "scale=w=3*iw:h=ih,setsar=1/3" -frames 1 sample.mkv
[13:20:40 CET] <lightbulb6> now, if i do "ffplay sample.mkv", i can see a square frame (which is what i want), but if i do "ffmpeg -i sample.mkv -frames 1 out.png", the resulting png is stretched out
[15:36:30 CET] <GuiToris> hey, why is vp9 so weird? I've created a 1:50 long video with 2-pass encoding, and crf 40, 125mb and crf 43 resulted a 101mb file
[15:36:37 CET] <GuiToris> aren't these files way to big?
[15:36:57 CET] <GuiToris> they are 1920x1080p files
[15:45:52 CET] <JEEB> ot
[15:46:03 CET] <JEEB> it is not CRF and really, "crf" depends on the encoder and even options
[15:46:22 CET] <JEEB> you will have to iterate over your test clip to find your preferred value in any VBR rate control
[15:49:22 CET] <GuiToris> JEEB, what I used is: ffmpeg -y -i 0FULLRC.mkv -c:v libvpx-vp9 -pix_fmt yuv420p -b:v 0 -crf 43 -pass 2 -an -threads 1 -speed 0 43.webm
[15:49:34 CET] <GuiToris> and this is still over 100mb
[15:51:09 CET] <GuiToris> I was trying to raise the crf value but I didn't see much difference
[15:51:12 CET] <iive> i'm not familiar with vp9 encoding, but... -b:v 0 -speed 0 ... did you get these from vp9 encoding example?
[15:51:32 CET] <GuiToris> yes, hold on, I'll try to find the source
[15:51:43 CET] <furq> -b:v 0 is required for -crf to actually do anything
[15:51:53 CET] <furq> and -speed is the equivalent of -preset
[15:52:19 CET] <GuiToris> but is this scale really light compared to x265?
[15:52:28 CET] <JEEB> forget any other encoder's scale
[15:52:30 CET] <furq> they have no relation to each other really
[15:52:43 CET] <furq> and also it sounds like you have a pathologically bad input clip
[15:52:48 CET] <JEEB> also I'm still kind of sore that libvpx's CQ mode was mapped to CRF :P
[15:52:56 CET] <JEEB> since they are different
[15:53:04 CET] <BtbN> 100MB for a high quality 2 minute clip does not seem that unreasonable.
[15:53:13 CET] <JEEB> although heck, as I already said - crf is totally different between x264 and x265
[15:53:22 CET] <furq> well one wouldn't expect -crf 43 to still be "high quality"
[15:53:26 CET] <JEEB> and even between presets in a single encoder
[15:53:26 CET] <furq> but yeah it's vp9, who knows
[15:53:32 CET] <BtbN> Does libvpx even care about crf?
[15:53:38 CET] <BtbN> Isn't that a x2645 thing?
[15:53:39 CET] <JEEB> BtbN: it's mapped to its CQ mode
[15:53:43 CET] <GuiToris> if that matters, the source is a 20gb ffv1 nut file
[15:53:46 CET] <JEEB> which is why I said I'm kind of sore about it :P
[15:53:58 CET] <JEEB> "let's make this easy to use and map it to CRF"
[15:54:06 CET] <JEEB> which I kind of understand buuut
[15:54:14 CET] <furq> GuiToris: it depends on the contents, not the encoding
[15:54:55 CET] <furq> at a glance that looks like a very high bitrate for ffv1
[15:55:00 CET] <furq> so i'm guessing the input clip is pretty complex
[15:55:20 CET] <GuiToris> the problem with vp9 is it took about 14 hours to encode the second pass and I don't know if I should redo it
[15:55:28 CET] <GuiToris> would 50mb too low in quality?
[15:55:40 CET] <furq> that's not something anyone but you can answer
[15:55:56 CET] <BtbN> 14 hours for a 2 minute clip? What?
[15:56:13 CET] <furq> that sounds plausible with no multithreading and -speed 0
[15:56:13 CET] <GuiToris> BtbN, vp9 with speed 0 is rather slow
[15:57:39 CET] <GuiToris> all I need is a clear picture, which is perfect now, but I find the file size a little bit big
[15:58:18 CET] <GuiToris> do you use vp9? how far should I go with crf?
[15:58:35 CET] <GuiToris> the manual says about 31 is the right value
[15:58:42 CET] <JEEB> there is no "right value"
[15:58:43 CET] <GuiToris> I've tried it and it was about 250mb
[15:59:04 CET] <JEEB> you have a relatively short clip that should let you experiment with that sort of content
[15:59:17 CET] <JEEB> (otherwise -ss and -t to make the clip around 1200-2500 frames or so is a good way)
[15:59:18 CET] <furq> well not if it takes 14 hours to encode
[15:59:28 CET] <JEEB> libvpx VP9 wasn't that slow last I checked
[15:59:29 CET] <furq> you should probably enable row-mt
[15:59:33 CET] <JEEB> even on my 8core atom
[15:59:35 CET] <furq> or any multithreading at all really
[15:59:52 CET] <GuiToris> I have an i3-2350m processor
[16:00:11 CET] <furq> that's a 35W part
[16:00:13 CET] <furq> that shouldn't be that slow
[16:01:09 CET] <furq> i'm sure i've asked this before but how come ffmpeg has -speed and -cpu-used with different ranges
[16:01:13 CET] <furq> i thought those were the same option
[16:02:45 CET] <GuiToris> furq, they are both 0-4, aren't they?
[16:03:05 CET] <GuiToris> I've used this page: http://wiki.webmproject.org/ffmpeg/vp9-encoding-guide
[16:03:18 CET] <furq>   -cpu-used          <int>        E..V..... Quality/Speed ratio modifier (from -8 to 8) (default 1)
[16:03:21 CET] <furq>   -speed             <int>        E..V.....  (from -16 to 16) (default 1)
[16:04:04 CET] <GuiToris> no way, it could be even slower than this?!
[16:04:34 CET] <JEEB> furq: speed seems to be a "legacy option" looking at the source
[16:04:47 CET] <JEEB> also the range probably is historic and just documeneted at some point
[16:04:54 CET] <furq> i was about to say "it better not be a legacy thing for vp9"
[16:04:56 CET] <furq> but i knew better
[16:05:05 CET] <JEEB> remember, libvpxenc is used for all formats ever supported by that lib
[16:05:11 CET] <JEEB> (during the age of the wrapper)
[16:05:11 CET] <furq> true
[16:06:05 CET] <GuiToris> how can I specify frames, I only used seconds with -ss and -t
[16:06:25 CET] <GuiToris> I'll take a look whether it's worth increasing the crf number
[16:06:49 CET] <furq> GuiToris: is there some reason you're not using multithreading
[16:07:35 CET] <GuiToris> yes, because the wiki.webmproject.org doesn't use it either, beside that no
[16:07:50 CET] <GuiToris> I just didn't want to mess up, and I used no multithreading
[16:08:01 CET] <GuiToris> does it impact the quality?
[16:08:13 CET] <furq> i don't know if row-mt does
[16:08:29 CET] <furq> the old sliced threading stuff did but not much
[16:08:54 CET] <furq> i think nowadays just -threads 4 -row-mt 1 should work
[16:11:34 CET] <GuiToris> this is crf40 https://ptpb.pw/5iYS and 43: https://ptpb.pw/SO3_
[16:11:53 CET] <Cracki> you requested my presence
[16:12:09 CET] <GuiToris> yes thank you Cracki
[16:12:34 CET] <GuiToris> I was wondering if I share two images with you can you tell me the right homography values?
[16:13:10 CET] <Cracki> I can point you to code you can run that does it
[16:13:45 CET] <GuiToris> you did it once and turned out I should you windows or it was difficult or something like that
[16:14:01 CET] <GuiToris> s/you/use
[16:14:13 CET] <Cracki> uh, not really. opencv runs just fine headless on any linux.
[16:14:36 CET] <GuiToris> alright, let's give it a shot
[16:14:50 CET] <Cracki> anyway, samples/python/find_obj.py
[16:15:01 CET] <Cracki> or simply post the images and let everyone have a go at it
[16:16:38 CET] <GuiToris> Cracki, https://github.com/opencv/opencv/blob/master/samples/python/find_obj.py
[16:17:01 CET] <GuiToris> is this what I need?
[16:17:24 CET] <Cracki> pretty much
[16:17:35 CET] <GuiToris> thanks I'll try it
[16:18:08 CET] <GuiToris> furq, do you see any major difference between https://ptpb.pw/5iYS and https://ptpb.pw/SO3_
[16:18:24 CET] <GuiToris> do you agree that I should still increase the crf value?
[16:18:53 CET] <GuiToris> the first one is crf40, this sample is ~15 mb
[16:19:08 CET] <GuiToris> and the second one is 43 and 12mb
[16:19:28 CET] <Cracki> for comparing videos: http://www.compression.ru/video/quality_measure/vqmt_download.html
[16:21:01 CET] <GuiToris> Cracki, is vqmt the name of the program?
[16:21:31 CET] <GuiToris> if so, at least it's in a repo
[16:23:05 CET] <GuiToris> what I usually do is : for f in *.webm; do ffmpeg -y -ss 19 -i "$f" -frames 1 "{f%.*}.png" ; done
[16:23:30 CET] <GuiToris> then I only need to compare still frames
[16:39:46 CET] <GuiToris> Cracki, what prerequisites do I need before using find_obj.py
[16:39:56 CET] <GuiToris> it's not just a python script, is it?
[16:40:13 CET] <Cracki> of course not. you need opencv.
[16:40:34 CET] <Cracki> and in particular the python bindings (included in opencv)
[16:40:42 CET] <Cracki> just install opencv with pip
[16:40:55 CET] <Cracki> https://pypi.org/project/opencv-python/
[16:42:44 CET] <GuiToris> thanks
[16:47:38 CET] <GuiToris> Cracki, my Chinese is not perfect, is this what you were refering to? https://youtu.be/AUL96YQv1bs?t=205
[16:47:52 CET] <GuiToris> this is a command line tool, right
[16:48:36 CET] <GuiToris> do you think I would be better off using Windows now?
[16:48:55 CET] <Cracki> makes zero diff
[16:49:08 CET] <GuiToris> isn't it easier to install opencv there?
[16:49:14 CET] <Cracki> but you will want to edit that script or run it with "python -i" to get the matrix
[16:49:32 CET] <Cracki> what could be easier than "pip install ..."
[16:50:50 CET] <GuiToris> if that's all, I'll open up an Ubuntu then
[16:52:19 CET] <GuiToris> I just don't use anything else but pacman on my host machine
[16:54:08 CET] <Cracki> if you have pacman on your host, that's either some arch or whatever, or msys2
[16:54:20 CET] <Cracki> anyway, "pip" is a python thing, so you must have python
[16:55:48 CET] <GuiToris> Cracki, I'm afraid if I install something with pip I won't be able to remove it with pacman
[16:56:10 CET] <GuiToris> but it's not a big deal if I need to use Ubuntu now
[16:56:23 CET] <Cracki> use pacman then, if your unnamed distribution has an opencv package with python bindings
[16:56:34 CET] <GuiToris> arch
[16:56:36 CET] <Cracki> pip can remove things again, so no big deal
[16:57:31 CET] <GuiToris> I also tried using the measurement tool
[16:57:35 CET] <GuiToris> it won't work
[16:57:51 CET] <GuiToris> HDTV resolution only works in PRO version
[16:58:06 CET] <GuiToris> I'm also not sure if vp9 is supported
[16:58:12 CET] <GuiToris> but thank you for your suggestion :)
[16:59:08 CET] <Cracki> use the "demo"
[16:59:18 CET] <Cracki> I think it uses ffmpeg
[17:01:12 CET] <GuiToris> I'll take a look
[17:03:32 CET] <GuiToris> something is happening now
[17:04:03 CET] <GuiToris> I got a graph
[17:04:50 CET] <GuiToris> I'll share this with you
[17:07:11 CET] <GuiToris> Cracki, https://ptpb.pw/iSUI
[17:07:15 CET] <GuiToris> what do we see here?
[17:07:38 CET] <Cracki> red has better SNR
[17:07:58 CET] <Cracki> also I'd say the GOP length is rather short
[17:08:06 CET] <GuiToris> this is not going to be easy, I don't see colors
[17:08:18 CET] <GuiToris> can you refer to 40 and 43, please?
[17:08:30 CET] <Cracki> and, intra frames are markedly better than P/B frames
[17:08:51 CET] <Cracki> awesome. anyway, the "red" is 40, green is 43
[17:09:19 CET] <Cracki> and 43 has consistently lower SNR
[17:09:51 CET] <Cracki> lowest I can eyeball is ~30, so that's all quite decent
[17:10:19 CET] <GuiToris> do you think I should still lower the quality?
[17:10:29 CET] <GuiToris> the main problem is that the filesize is large
[17:10:43 CET] <GuiToris> 40 is ~120 and 43 is 100mb
[17:10:44 CET] <Cracki> pick a target
[17:11:08 CET] <Cracki> 100 mb for... 300 frames?
[17:11:13 CET] <Cracki> that's a lot
[17:11:36 CET] <GuiToris> I didn't say 300frames, did I?!
[17:11:36 CET] <Cracki> what's "mb" to you? megabytes? megabits?
[17:11:42 CET] <Cracki> the plot says 300 frames
[17:12:01 CET] <GuiToris> it must be the demo version
[17:12:36 CET] <GuiToris> it's a 110second long video
[17:12:44 CET] <GuiToris> 29.97 frames per second
[17:13:30 CET] <GuiToris> it must be about 3300 frames
[17:13:52 CET] <Cracki> 800 megabit / 110 seconds is 7.2 Mbit/s
[17:15:10 CET] <GuiToris> according to my filemanager 40 is 9Mb/s and 43 is 8
[17:16:03 CET] <GuiToris> I'm not sure if you have seen my samples but I personally don't see huge differencies and I was thinking of lowering the filesize and quality
[17:16:14 CET] <GuiToris> the only problem is it takes about 14hours
[17:16:21 CET] <GuiToris> so I should plan this
[17:16:46 CET] <Cracki> probably
[17:17:58 CET] <GuiToris> is 8Mb/s still a lot?
[17:18:37 CET] <Cracki> ¯\_(Ä)_/¯ depends on so many things
[17:19:17 CET] <GuiToris> I'll try to create small sections
[17:21:46 CET] <GuiToris> thank you for your help Cracki
[19:08:26 CET] <mfwitten> I'd like to zoom in on an area of interest with `crop=<maintain aspect ratio>...,scale=<original size>', but how do I remember `<original size>'? For simple computations, you can just use the inverse calculations, but that doesn't seem like a solid solution; surely there is a way to inject into `scale' the desired `in_h' and `in_w' from `crop' (`sendcmd'?)
[19:14:19 CET] <mfwitten> Of course, maybe I could just use `zoompan', but I'd still be interested in knowing whether there is a way to communicate information from one filter to another (e.g., supply the `in_h' and `in_w' of `crop' to a later `scale').
[19:15:37 CET] <DHE> I think you're supposed to examine the input ahead of time (ffprobe or such), then build your commandline intelligently
[19:15:52 CET] <mfwitten> DHE: Yeah. That's what I was afraid of.
[19:15:58 CET] <furq> there's no generic way of doing that afai
[19:15:58 CET] <furq> k
[19:16:08 CET] <furq> some filters can communicate through frame metadata but that's generally listed in the docs
[19:16:17 CET] <mfwitten> DHE, furq: OK. Thanks.
[20:27:00 CET] <GuiToris> does the math work here? if a 5second long video is 2.5M then a 110second long video is going to be 55M?
[20:27:08 CET] <GuiToris> I'm afraid not
[21:20:33 CET] <calamari> I have 720x480 VFR NTSC interlaced video with live action parts a telecine 3:2 pulldown (I can see the duplicated fields with -vf field=top) and CGI parts are standard interlacing. I bet there are some bad splices in there too where field order changes or a pulldown is interrupted. I'd like to convert this to 60p. I'm assuming I'll need some combo of fieldmatch/pullup/yadif and then minterpolate (maybe a dejudder is needed in
[21:20:33 CET] <calamari> there somewhere too, not sure). Any tips on how to put this all together?
[21:21:52 CET] <furq> i would probably use vapoursynth for that
[21:22:00 CET] <furq> not so much for the capability but because then you can use vsedit
[21:22:04 CET] <JEEB> yea
[21:22:12 CET] <JEEB> you could I think do that in lavfi just fine
[21:22:24 CET] <JEEB> but not being able to preview frame accurately really hurts
[21:22:49 CET] <JEEB> while vs with vapoursynth editor makes it relatively simple to write vs python scripts
[21:22:52 CET] <JEEB> and preview them
[21:23:18 CET] <JEEB> and then you can utilize vspipe etc to pass the vs output through a pipe to ffmpeg.c or any other encoder
[21:26:21 CET] <calamari> I'll take a look at vaporsynth, thanks
[21:27:06 CET] <durandal_1707> i will kick you all
[21:27:37 CET] <JEEB> I think we've mentioned it specifically that it is not a problem in the functionality of lavfi specifically :P
[21:28:00 CET] <JEEB> just that - unfortunately - the usability of it is less than vs + vs editor
[21:28:10 CET] <JEEB> stop taking it as an attack at lavfi
[21:28:11 CET] <JEEB> please
[21:28:17 CET] <durandal_1707> i will kick you all
[21:28:42 CET] <JEEB> suit yourself
[21:32:41 CET] <calamari> can lavfi do the motion interpolation?
[21:33:00 CET] <furq> it can do all of that stuff
[21:33:24 CET] <calamari> cool. I might check that first, since it's intergrated into the tool already
[21:41:40 CET] <calamari> huh, I guess I don't get it. it seems like -lavfi doesn't really apply to my situation, since it's only one video stream? what am I missing?
[21:42:36 CET] <trfl> iirc you'll get way better performance doing motion interpolation with vs and mvtools, but assuming it's just for deinterlacing you should be fine with lavfi yeah
[21:43:23 CET] <furq> calamari: lavfi meaning libavfilter
[21:43:28 CET] <furq> not the option
[21:45:31 CET] <calamari> trfl: I'm hoping I can have it pullup/yadif the interlaced video, then using the timing of the resulting progressive frames it should then interpolate the 60p frames from those (it might end up not even using any pure frames, depending on the timing)
[22:43:09 CET] <calamari> found this, but it's definitely not right yet, as it's doing pullup in the CGI real interlaced sections (also tried minterpolate instead of fps, but that was making me sick): pullup,dejudder,idet,yadif=mode=1:deint=interlaced,fps=60000/1001
[23:07:25 CET] <_bluez> Hello everyone! I am a college student and I am interested in contributing to ffmpeg... how should I proceed? Also, I am familiar with github and have made some contributions to other projects, but the concept of "sending patches in mailing lists" is new to me... so how should I start?
[23:08:36 CET] <mfwitten> DHE, furq: Looks like I'm a dummy, anyway. For `crop', `w' and `h' are calculated only once (when initialized), so `crop' cannot be used to implement zooming.
[23:13:21 CET] <mfwitten> DHE, furq: For the sake of completness, I'll mention that it looks like `scale' can be configured to evaluate its expressions on each frame, and thus zooming could be achieved by scaling and then cropping, rather than cropping and then scaling. I also found `scale2ref', which might obviate the need to `ffprobe' inputs for dimensions
[00:00:00 CET] --- Mon Feb  4 2019


More information about the Ffmpeg-devel-irc mailing list