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

burek burek021 at gmail.com
Sun Oct 15 03:05:01 EEST 2017


[00:57:36 CEST] <tony__> Hello ladies, gents. Ive been trying to crack this one for a while with no luck.
[00:57:43 CEST] <tony__> We have a screenshot (jpeg) taken from an mp4 clip, that was color-corrected using `imagemagick -modulate` (http://www.imagemagick.org/Usage/color_mods/#modulate).  We are trying to capture a 1 sec. clip in the original video starting at the time where the screenshot was taken, and we would like to apply the same color corrections to the clip.
[00:57:48 CEST] <tony__> Im having a hard time converting the imagemagick modulate values to something ffmpeg will understand. Per the IM docs. [modulate] takes three values & as a percentage such that 100 will make no change to an image.
[00:57:54 CEST] <tony__> Im using ffmpegs -filter:v hue=h=0.12:s=1.18:b=0.96" but of course I cant use the values from IMs modulate literally.
[00:57:59 CEST] <tony__> Hopefully someone can point me in the right direction here.
[01:00:16 CEST] <DocHopper> SonicTheHedgehog: Turns out my compilation isn't working.  I was just calling my old ffmpeg because it was globally referenced.
[01:00:36 CEST] <SonicTheHedgehog> DocHopper: hah. yeah, you need to call the new one ... those pesky environment variables, eh ;(
[01:00:52 CEST] <DocHopper> And when I do call the new one, nothing happens...
[01:00:57 CEST] <SonicTheHedgehog> huh.
[01:02:01 CEST] <DocHopper> Also, when I remove the environmental variable for my original ffmpeg, I can no longer call it locally.
[01:02:27 CEST] <SonicTheHedgehog> ... going into the binary directory and invoking it from there doesn't work?
[01:03:43 CEST] <DocHopper> bin?
[01:04:57 CEST] <durandal_1707> tony__: you would need to find out what im uses for calculations
[01:11:07 CEST] <tony__> @durandal_1707 Yeah, based on the docs in the above link, I can figure out the conversion for hue, but for brightness and saturation Im stumped.
[01:11:07 CEST] <tony__> e.g.
[01:11:07 CEST] <tony__> -modulate 0   <- black image
[01:11:07 CEST] <tony__> -modulate 100. <- no change
[01:11:07 CEST] <tony__> How could I translate that to ffmpegs expected values for the same
[01:11:07 CEST] <tony__> Ffmpegs docs: Specify the saturation in the [-10,10] range. It accepts an expression and defaults to 1.
[01:11:45 CEST] <durandal_1707> tony__: brightness is not saturation
[01:12:37 CEST] <tony__> oops yeah. Saturation/brighness take the same value range in ffmpeg though, so it's the same conversion.
[01:13:46 CEST] <durandal_1707> the same algo for im and ffmpeg may not be
[04:07:49 CEST] <beauty> Could jmeter test hls video stream???
[07:45:32 CEST] <ThugAim> lets try again
[07:45:55 CEST] <ThugAim> !s westworld.s01e02
[07:47:01 CEST] <ThugAim> wrong chan!!!
[07:47:05 CEST] <ThugAim> ughhh
[07:55:41 CEST] <Johnjay> lol...
[08:32:04 CEST] <dystopia_> morning all
[08:32:33 CEST] <dystopia_> im trying to capture a desktop window by following this https://trac.ffmpeg.org/wiki/Capture/Desktop
[08:33:07 CEST] <dystopia_> but it errors out saying no such source
[08:33:22 CEST] <dystopia_> [dshow @ 03337800] Could not find video device with name [screen-capture-recorder] among source devices of type video.
[08:42:13 CEST] <dystopia_> ok it's work
[08:42:18 CEST] <dystopia_> working*
[08:42:33 CEST] <dystopia_> i didn't realise it was an extra application i need to install :p
[10:16:53 CEST] <ffmpeg> hello
[10:17:11 CEST] <ffmpeg> how to stress hls nginx server?
[10:50:36 CEST] <dan3wik> Stress?
[10:50:38 CEST] <dan3wik> In what way?
[10:50:48 CEST] <dan3wik> DDoS or normal operation stress?
[11:27:12 CEST] <ffmpeg> normal operation stress
[11:27:17 CEST] <ffmpeg> DDos is ok too
[11:28:01 CEST] <ffmpeg> I want to simulate thousands of client request server
[12:52:48 CEST] <beauty> How to simulate thousands of clients request sever?
[13:07:59 CEST] <BtbN> get thousands of clients and make them hammer the server.
[13:15:41 CEST] <beauty> BtbN: that sounds great. But I only have two client machine.l
[13:37:40 CEST] <ffmpeg> Good moring,how to simulate thousands of clients request?
[13:38:34 CEST] <BtbN> The answer has not changed. You cannot simulate load.
[13:39:14 CEST] <ffmpeg> BtbN: sorry, I offline just now. Could you answer again?
[13:42:25 CEST] <ffmpeg> I have used sb_bench.
[13:42:49 CEST] <ffmpeg> But it has some disadvantages
[14:09:37 CEST] <Guest42470> Hello everybody! Could You give me a hint, please, I'm trying to embed a watermark in the video, made by videocam Panasonic (not sure about model), but after embedding, there are horizontal lines there time to time and if I scroll video, it hangs for few seconds, but I can hear the sound...
[14:09:50 CEST] <Guest42470> Could You advice me, please, what could I do wrong?
[14:12:04 CEST] <Guest42470> The command is here: ffmpeg -i 00025.MTS -i logo.png -filter_complex "[1]scale=770:183[logo], [0:v][logo]overlay=30:870" -c:v libx264 -crf 23 -c:a copy 00025-out.MTS
[14:15:12 CEST] <Guest42470> I compared the video properties and source video has "Scan type: Interlaced", but the output has "Progressive", and also source has "Frame rate: 25.000", output has "Frame rate: Variable"
[14:15:16 CEST] <iive> Guest42470: can't help with all issues, but most codecs don't like when image resolution is not multiple of 2. if interlaced, then lines should be minimum multiple of 4 .
[14:15:49 CEST] <Guest42470> Ah, so should I just resize my png-file?
[14:15:55 CEST] <ffmpeg>  Good moring,how to simulate thousands of clients request?
[14:16:00 CEST] <iive> scale is resizing
[14:16:28 CEST] <Guest42470> I mean, to do scale parameters dividable by 4?
[14:17:00 CEST] <JEEB> ffmpeg: just please stop spamming - just google "jmeter hls"
[14:17:17 CEST] <iive> the video is mostly already muliple of 4
[14:22:08 CEST] <Guest42470> But I still don't understand... If the source video is 1920x1080, already encoded, and I just "replace" particular area with a watermark... Well, I understand, that the whole frame will be re-compressed again, but how to prevent such damage?
[14:22:30 CEST] <kerio> i don't think there's a way
[14:23:14 CEST] <ffmpeg> JEEB: yeah I have installed that. But jmeter can simulate truely? After google, I found a rechargeable jmeter.
[14:23:51 CEST] <ffmpeg> I don't know if jmeter simulate truely.
[14:24:15 CEST] <BtbN> again: You cannot simulate actual load from 1000 clients, without actually having 1000 clients.
[14:24:24 CEST] <JEEB> if the plugin you will be using actually loads up playlists and downloads them
[14:24:31 CEST] <JEEB> and acts like an actual client
[14:24:40 CEST] <JEEB> then that will be quite relatively close to an actual load of a single player
[14:25:15 CEST] <BtbN> you will run out of bandwidth and resources before getting even close to 1k clients
[14:28:17 CEST] <Guest42470> Change image size and offset to dividable by 4 did not help at all :(
[14:29:16 CEST] <BtbN> is your video interlaced?
[14:29:59 CEST] <Guest42470> Source video - yes, but after processing - it's progressive
[14:30:30 CEST] <BtbN> well, there you have your issue then.
[14:31:39 CEST] <Guest42470> Should it be also interlaced after processing or should I specify some other options to fully and properly convert it to progressive?
[14:31:54 CEST] <BtbN> I doubt the overlay filter works with interlaced images
[14:31:59 CEST] <BtbN> So you'll have to deinterlace it first.
[14:32:34 CEST] <DHE> or mark the output as interlaced if you prefer
[14:33:20 CEST] <ffmpeg> BtbN: why so?
[14:33:43 CEST] <BtbN> DHE, that won't help with the overlay filter.
[14:34:25 CEST] <Guest42470> haha, it seems, I start to understand, what 1080p and 1080i means :) Thank You all, I try now :)
[14:34:33 CEST] <ffmpeg> BtbN: I know that, I could beyond network limitation.
[14:35:22 CEST] <ffmpeg> JEEB: do you mean what this website said? https://www.blazemeter.com/blog/how-load-test-http-live-media-streaming-hls-jmeter
[14:35:36 CEST] <JEEB> ffmpeg: do your own research, it's unrelated to FFmpeg
[14:35:55 CEST] <JEEB> better go ask the jmeter people if you need support
[14:36:03 CEST] <JEEB> since effectively that is what you need support with
[14:37:17 CEST] <DHE> load testing? that's not ffmpeg's job. it makes the video. for an HLS load test just use `ab` and tune your HTTP server appropriately
[14:37:49 CEST] <JEEB> or ab if ab can simulate an HLS client
[14:38:18 CEST] <JEEB> something like jmeter lets you do the full shebang if you also have an API that provides clients the playback credentials etc
[14:38:36 CEST] <JEEB> but yea, out of topic here
[14:39:15 CEST] <DHE> oh that's cool...
[14:46:06 CEST] <Guest42470> BtbN, thank You very much, it helped me to solve 80% of the problem :) Video seems to be clear :)
[14:46:53 CEST] <Guest42470> Used filter "yadif=0:-1:0" before overlaying
[14:47:52 CEST] <BtbN> you should put yadif in frame doubling mode
[14:48:23 CEST] <Guest42470> Oh, could You tell me, please, what does it mean or just how to do it? ;)
[14:49:05 CEST] <Guest42470> The documentation looks a bit poor: https://ffmpeg.org/ffmpeg-filters.html#yadif-1
[14:49:57 CEST] <BtbN> "Output one frame for each field."
[14:50:02 CEST] <BtbN> doesn't look poor to me?
[14:50:37 CEST] <JEEB> yadif=mode=send_field:deint=interlaced is what you want most likely unless your content is not signaled as interlaced, in which case you want deint=all
[14:50:40 CEST] <Guest42470> Ah, that's You mean :) Thank You, let me try :)
[14:51:01 CEST] <JEEB> (these options do become more readable when you stop just sticking numbers without their options in there)
[14:53:25 CEST] <Guest42470> Sorry, I'm not so familiar with video formats, but thank You for helping :) Just converting now, it will take a while
[14:56:24 CEST] <Guest42470> Wow, now it has 50fps... But could You explain, please, what happened? The video looks the same, but says 50 fps now...
[15:13:30 CEST] <Guest42470> So please, could You also help with the second problem? I don't know much about keyframes, but I noticed, some of the videos can be scrolled to any position, some - video will hang for a few seconds (until the next key frame as I understand)
[15:14:04 CEST] <Guest42470> So could You give me an advice, what should I take care during the conversion to avoid such problem?
[15:35:13 CEST] <Guest42470> Ok, just set "-x264opts keyint=25:min-keyint=25:scenecut=-1" - seems, it solved the problem, but now the size of the file is about 1.5x more... But as I noticed, in the source video GOP: M=3, N=12, but in the output GOP is: M=4, N=25... Is it the right direction solution or not so?
[15:42:33 CEST] <suddened_vidist> Hi there!
[15:42:45 CEST] <suddened_vidist> I found this page
[15:42:45 CEST] <suddened_vidist> https://trac.ffmpeg.org/wiki/StreamingGuide
[15:43:01 CEST] <suddened_vidist> Which seems to be outdated, cuz i wasn't able to use the "-re" flag.
[15:43:25 CEST] <c_14> -re exists
[15:43:29 CEST] <suddened_vidist> And so i'm still in need of a way to make my ffmpeg "simulate a grab device"
[15:43:31 CEST] <c_14> Your version of ffmpeg might be outdated
[15:43:50 CEST] <suddened_vidist> Ae.
[15:43:51 CEST] <suddened_vidist> Aw.
[15:44:09 CEST] <c_14> what os?
[15:44:35 CEST] <suddened_vidist> Shindoshz.
[15:44:45 CEST] <suddened_vidist> Microsoft shindoshz.
[15:45:05 CEST] <suddened_vidist> Well, yea, i was sticking the flag into a wrong place.
[15:45:17 CEST] <suddened_vidist> Thought it's supposed to come after -i sources.
[15:45:22 CEST] <c_14> nah, before
[15:52:23 CEST] <Guest42470> Could You explain, please, why should I use frame doubling mode? Is there any profit from it?
[15:57:58 CEST] <c_14> Well, the alternative is throwing away half your video data
[16:09:40 CEST] <Guest42470> Ouch... how is it?
[16:10:07 CEST] <Guest42470> Please, could You explain a bit more detailed? :)
[16:10:42 CEST] <c_14> Interlaced video uses 2 fields per frame
[16:11:00 CEST] <c_14> So a 30 frames per second video has 60 fields per second
[16:11:13 CEST] <c_14> If you deinterlace, you either throw away half the fields and make it 1 frame per field
[16:11:21 CEST] <c_14> Or you use all the fields and get 2 frames per field
[16:12:17 CEST] <Guest42470> So if after deinterlace I have 60 frames per second - is it not a problem? So is there no redundant data?
[16:13:44 CEST] <c_14> It's not a problem, no
[16:16:59 CEST] <Guest42470> For me a file size is a bit important though... so if I have with -crf 23 a file size like 1.5x bigger than source video... so can I reduce frame size back to 30 or just decrease bitrate with -crf option?
[16:17:38 CEST] <c_14> You can pick a higher crf, sure
[16:17:45 CEST] <c_14> You can also drop frames if that's more important to you
[16:17:54 CEST] <c_14> (use send_frame instead of send_field)
[16:18:14 CEST] <kerio> well, 60fps interlaced video doesn't really have 60 frames' worth of information per second
[16:18:41 CEST] <Guest42470> Yes, this is a question - is it worth to keep 60fps
[16:18:48 CEST] <kerio> interlacing is both a temporal filter and a spatial filter
[16:19:02 CEST] <kerio> Guest42470: i'd say deinterlace to 60
[16:19:11 CEST] <kerio> if the frames are similar they'll compress nicely anyway
[16:20:26 CEST] <Guest42470> Well, its about 45 Mb test file with 30fps and 56 Mb with 60 :) So there is a bit difference
[16:21:35 CEST] <Guest42470> But well, by deinterlacing, when I send frame instead of field, aren't those fields being "welded" into one frame?
[16:21:49 CEST] <Guest42470> Or mixed, how to say...
[16:25:54 CEST] <JEEB> depends on the deinterlacer
[16:26:11 CEST] <JEEB> if the images are pretty much the same without motion that is doable
[16:26:30 CEST] <JEEB> but as soon as there is motion you will have to start separating the images and building stuff
[16:27:31 CEST] <Guest42470> But is there any way to safely reduce frame rate back?
[16:28:18 CEST] <Guest42470> Or the only way to reduce file size without injure the video so much - is only increase -crf?
[16:28:28 CEST] <JEEB> "back" is incorrect anyways since you're dealing with 60 images (fields) per second, instead of 30 pictures (be it fields or frames)
[16:28:46 CEST] <JEEB> of course you can just switch the mode to 30 pictures out from 60 fields
[16:29:07 CEST] <JEEB> people just generally seem to dislike it because that way it's not as smooth as the interlaced content
[16:29:23 CEST] <kerio> and also wrong
[16:29:36 CEST] <JEEB> technically yes, if your idea is to keep every field in the output
[16:30:08 CEST] <BtbN> I really wonder why the default is to discard half the fields
[16:30:10 CEST] <kerio> what if my video alternates a full black image and a full white image at 60hz
[16:30:21 CEST] <JEEB> BtbN: hysterical raisins
[16:30:30 CEST] <Guest42470> Well, after deinterlacing with -crf 23 (as I understand, default value) the video track size was grown about 3 times... I try to put it to original size :)
[16:30:44 CEST] <JEEB> the original size really doesn't matter since you're decoding that
[16:30:51 CEST] <BtbN> lower the quality then
[16:30:53 CEST] <JEEB> basically if your source was already compressed to hell
[16:31:15 CEST] <JEEB> then doing that once again will not help the quality, and thus one should just forget trying to seek "the same size"
[16:31:57 CEST] <Guest42470> ... yeah, I think, there is no way to make better quality than it was in source video by increasing bitrate
[16:32:32 CEST] <JEEB> of course not making it better, but you are also compressing the artifacts of the original encode
[16:32:51 CEST] <JEEB> + you no longer have 1920x540 60 times a second, but instead 1920x1080 60 times a second, for example
[16:33:00 CEST] <JEEB> also if you use a short GOP length that will not help compression
[16:34:18 CEST] <Guest42470> But I'm still curious, how does it fits all that data in the source file...
[16:34:40 CEST] <BtbN> it fits less data in the original file.
[16:34:48 CEST] <BtbN> You are doubling the vertical resolution.
[16:36:17 CEST] <Guest42470> Oh, just tried to use -crf 30 - the file size became about the same, but the quality was degraded noticeable...
[16:36:33 CEST] <Guest42470> Maybe should I interlace it back after embed a watermark?
[16:37:37 CEST] <kerio> :|
[16:38:04 CEST] <JEEB> Guest42470: also your original file only had the original content as source
[16:38:10 CEST] <JEEB> not the additional compression artifacts etc
[16:38:37 CEST] <JEEB> as I said, they are not equal 1) in the vertical resolution (you're making fields into frames), and 2) in the fact that you don't have the same source to begin with
[16:38:57 CEST] <JEEB> which is why the first thing that people have to get their head around is that the initial file size Just Doesn't Matter
[16:39:12 CEST] <JEEB> you're not encoding the same source, and if you're doing filtering there's even extra stuff going on
[16:47:10 CEST] <Guest42470> "but you are also compressing the artifacts of the original encode" - what does it mean? Does it mean, that before video was encoded first time, it was quite smooth, but then by the first compression some areas were devostated due to lossy compression. And now the codec has no chance to recognize them as the identical area and compress again the same way?
[16:47:22 CEST] <JEEB> yes
[16:47:44 CEST] <JEEB> so it has gone through lossy compression once, so you not only have the content that you're trying to compress, but also the additional artifacts
[16:48:03 CEST] <JEEB> plus the fact of course that since you're doing deinterlacing all the pictures have twice the height since you've moved from fields to frames
[16:48:06 CEST] <kerio> just make a deinterlacer for h264 duh :^)
[16:48:35 CEST] <JEEB> that makes absolutely no sense since this has nothing to do with interlacism
[16:48:49 CEST] <JEEB> it's a general thing where you have already once mucked with something
[16:49:17 CEST] <JEEB> and thus you stick to not re-encoding it because that would end up with less quality or larger file size
[16:49:26 CEST] <JEEB> unless you get access to the actual source
[17:10:15 CEST] <Guest42470> Ok, thank You very much for explaining, now I will try to experiment and look, what kind of parameters are acceptable by the produced quality :)
[19:43:42 CEST] <rabbe> will rtsp give me lower latency than rtmp?
[19:43:50 CEST] <rabbe> using vlc as player
[20:40:02 CEST] <diqidoq> what would be the best h264 codec available under --codecs to use under linux/debian for converting dnxhd .mov to smaller mkv? Its full HD atm and I would like to scale it down to 720p.
[20:40:23 CEST] <JEEB> x264 gives the best bang for the buck
[20:40:43 CEST] <diqidoq> JEEB: thanks for your fast reply!
[20:41:01 CEST] <JEEB> it defaults to preset medium and CRF 23
[20:41:08 CEST] <JEEB> preset is the speed VS compression thing
[20:41:18 CEST] <diqidoq> JEEB: perfect for this approach!
[20:41:28 CEST] <JEEB> and CRF is one of the closest to "constant quality" things we have
[20:41:38 CEST] <JEEB> so I would recommend you try to encode like 2500 frames or so
[20:41:56 CEST] <diqidoq> JEEB: you rock! as always!
[20:41:58 CEST] <JEEB> with different presets and then after you've picked you can tweak the CRF if 23 looks bad
[20:42:15 CEST] <diqidoq> JEEB: thanks a million.
[20:42:17 CEST] <diqidoq> JEEB++
[20:42:25 CEST] <JEEB> you can use -ss before the input to seek to a specific position if you know that the beginning of the clip isn't good to check quality
[20:42:35 CEST] <JEEB> and then -vframes 2500 is "encode 2500 frames" :)
[20:42:43 CEST] <JEEB> or you can use something like -t 90 which is "encode 90 seconds"
[20:43:26 CEST] <diqidoq> JEEB: yeah love this tiome features!
[20:43:36 CEST] <diqidoq> s/tiome/time
[20:43:41 CEST] <JEEB> :)
[20:43:47 CEST] <diqidoq> :)
[20:43:58 CEST] <JEEB> basically the defaults for libx264 are: -c:v libx264 -crf 23 -preset medium
[20:44:07 CEST] <JEEB> do note that the CRF value's result is not the same between presets
[20:44:15 CEST] <JEEB> which is why I recommend testing with a limited clip
[20:44:18 CEST] <JEEB> and first pick the speed
[20:44:22 CEST] <diqidoq> I see
[20:44:24 CEST] <JEEB> and then the CRF value
[20:44:37 CEST] <JEEB> of course if 23 looks good enough you can just use that
[20:44:38 CEST] <JEEB> :)
[20:46:04 CEST] <diqidoq> JEEB: For me ffpmeg should be the first lesson a film editor has to learn in school!
[20:46:13 CEST] <diqidoq> :)
[20:46:28 CEST] Action: diqidoq goes trying ...
[20:47:31 CEST] Action: diqidoq encoding runs...
[20:47:48 CEST] <diqidoq> cpu runs ... :)
[20:48:38 CEST] <diqidoq> JEEB: quality is perfect. Now I have to scale down.
[20:51:12 CEST] <diqidoq> How can I prevent forcig hight to scale proportional: can I simply leave out the hight?  scale=720:
[20:51:30 CEST] <JEEB> no
[20:51:41 CEST] <JEEB> also please use the names for the parameters
[20:51:52 CEST] <JEEB> scale=w=720:h=-2 for example
[20:52:20 CEST] <JEEB> negative is "auto" according to the aspect ratio of input, and two means "make it divisible by two"
[20:53:06 CEST] <diqidoq> JEEB: got it. smart!
[20:53:53 CEST] <diqidoq> JEEB: before -c:v or after? does it matter in the convertion steps?
[20:54:14 CEST] <JEEB> only before/after input matters
[20:54:24 CEST] <diqidoq> I see ...
[20:54:31 CEST] <JEEB> (and of course if you have multiple outputs it kind of matters where options are)
[20:54:42 CEST] <diqidoq> JEEB: thank you, again, for your advices.
[21:02:59 CEST] <sonbaty> hi
[21:04:54 CEST] <sonbaty> its possible with ffmpeg adding to video invisible digital watermark and reading this watermark?
[21:14:26 CEST] Action: sonbaty 
[21:26:08 CEST] Action: sonbaty hi all
[21:26:27 CEST] Action: sonbaty its possible with ffmpeg adding to video invisible digital watermark and reading this watermark?
[21:49:56 CEST] <ArgentineUser> Hi ! ;D
[21:54:02 CEST] <sonbaty> hi
[23:15:13 CEST] <Cracki> how would I query ffmpeg for options of a specific codec? I'm thinking of h264_qsv/cuvid/nvenc
[23:15:23 CEST] <Cracki> (encoding specifically)
[23:15:49 CEST] <BtbN> -help encoder=...
[23:15:58 CEST] <Cracki> oh! thx
[23:16:04 CEST] <BtbN> or codec= not 100% sure
[23:16:18 CEST] <Cracki> first one
[23:17:00 CEST] <Cracki> decoder/encoder/demuxer/muxer/filter
[23:17:12 CEST] <Cracki> awesome thx
[00:00:00 CEST] --- Sun Oct 15 2017


More information about the Ffmpeg-devel-irc mailing list