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

burek burek at teamnet.rs
Fri Nov 15 03:05:02 EET 2019


[00:00:08 CET] <DHE> also I don't use windows, is single-quotes okay here?
[00:00:14 CET] <furq> should be
[00:01:06 CET] <Bugz000> ffmpeg -pattern_type glob -i 'C:/path/to/images/*.png' -c:v libx264 -pix_fmt yuv420p -framerate 30 out.mp4
[00:01:19 CET] <Bugz000> where would the resolution be?
[00:01:29 CET] <Bugz000> yuv420p
[00:01:55 CET] <Bugz000> also i see arguments online between using a "filter", or -r 30, or -framerate 30
[00:02:26 CET] <DHE> depends how you want to do the framerate
[00:02:46 CET] <DHE> assuming you want every image included exactly once, "-framerate 30" or whatever before the -i parameter
[00:03:00 CET] <Bugz000> oooohhh
[00:03:14 CET] <Bugz000> yes definitely, but whats the others do
[00:03:36 CET] <DHE> ffmpeg is incredibly flexible. you can do shenanigans like drop every other frame with: ffmpeg [...] -framerate 60 -i "*.jpg" -r 30 [..]
[00:03:52 CET] <DHE> reads at 60fps, but outputs at 30fps which drops every other frame
[00:04:10 CET] <Bugz000> source and output
[00:04:12 CET] <Bugz000> interesting
[00:04:13 CET] <DHE> (it also uselessly decodes every frame, so it's a bit inefficient)
[00:04:33 CET] <DHE> actually it's a position thing. before -i means it applies to the input. before the output filename means it applies to the output
[00:04:46 CET] <DHE> -framerate is a specific option to the image decoder to make it fake a video with the requested framerate
[00:05:01 CET] <Bugz000> so you can input at 5fps and output at 50fps and get each frame repeated 10 times
[00:05:02 CET] <Bugz000> rofl
[00:05:14 CET] <DHE> well, yes, but...
[00:07:41 CET] <Bugz000> so how do i set output resolution? or ideally just the same resolution that the input images are
[00:07:48 CET] <Bugz000> 1080p in this case
[00:08:03 CET] <Bugz000> or was i right in thinking it's the YUV420p
[00:10:11 CET] <DHE> yuv420 is the colour space. it's needed because most h264 decoders only support that (especially the hardware ones like built-in TV media players)
[00:10:29 CET] <DHE> the resolution will be whatever comes out of the images. if you want to rescale it, "-s 1920x1080" or whatever before the output filename
[00:10:46 CET] <DHE> yuv420 in particular will demand both numbers be even though
[00:10:55 CET] <Bugz000> ah fantastic
[00:15:21 CET] <Bugz000> [image2 @ 000001a0c5e28cc0] Pattern type 'glob' was selected but globbing is not supported by this libavformat build
[00:15:40 CET] <Bugz000> uhhhh i recall seeing something about this
[00:16:28 CET] <Bugz000> oh, seems to be some builds have it and others dont, i guess the windows build is missing it D:
[00:17:41 CET] <Bugz000> >glob is defined in the POSIX standard and it's not available on Windows by default.
[00:17:53 CET] <Bugz000> >Create/rename your files using sequential file naming image###.jpg then use sequence wildcards like -i image%03d.jpg as input.
[00:18:00 CET] <Bugz000> -facedesk-
[00:18:08 CET] <DHE> disappointment
[00:18:11 CET] <Bugz000> ikr
[00:18:12 CET] <Bugz000> :(
[00:18:28 CET] <Bugz000> well, i guess i'll go back to my original idea, can i pass in a hard list of images? rofl
[00:19:02 CET] <Bugz000> i mean i can format the list MUCH easier using my utility than trying to use ffmpeg wildcards
[00:20:23 CET] <Bugz000> i guess ffmpeg assumes the images were created with the intention of being a timelapse which is great but not all have that foresight :p hahaha
[00:20:56 CET] <DHE> can you use this utility to then feed in some hardlink, copy or rename commands to convert the files into such a list?
[00:22:24 CET] <Bugz000> well yah, i guess that's what i'm trying to do by passing in a list of them generated by my utility haha
[00:23:05 CET] <Bugz000> i could go through rename them automatically "1.png" "2.png" shouldn't be too hard but just taxing for the sake of it
[00:23:39 CET] <Bugz000> but i think it's just taxing the system for no reason*
[00:23:40 CET] <Bugz000> hahaha
[00:24:26 CET] <Bugz000> that's either file duplication, or 20,000 file renames within 600ms or so, ew
[00:26:38 CET] <Bugz000> certainly an option, absolutely possible, but i was hoping for something a little more "leave the gigabytes of data alone" kinda thing
[00:26:46 CET] <Bugz000> hahah
[00:27:54 CET] <DHE> linux machine with a network share
[00:28:03 CET] <DHE> half-joking...
[00:28:15 CET] <Bugz000> its funny because that's exactly where these images come from
[00:28:26 CET] <Bugz000> hahahhah
[00:28:30 CET] <furq> why not just run ffmpeg on there
[00:28:37 CET] <DHE> that was the obvious next question
[00:29:34 CET] <Bugz000> LOL because its an absolutely ancient laptop that's already half-dieng re-encoding a RTSP stream to HLS/H264
[00:30:14 CET] <furq> failing that: i=1 for f in *; do ln -s "$f" "$i.jpg"; i=$((i+1)); done
[00:30:16 CET] <Bugz000> at 5fps 720p, 80% cpu usage... it's really not up to the task of doing anything else
[00:30:21 CET] <furq> missing a ; there but you get the idea
[00:30:25 CET] <Bugz000> blesshoo
[00:32:21 CET] <Bugz000> where tf does that go
[00:33:41 CET] <Bugz000> i mean the cmd will be hidden (memory CLi)
[00:34:09 CET] <Bugz000> so even if all 20k image paths are within the ffmpeg command, i couldn't care less, so long as it works LOL
[00:34:30 CET] <Bugz000> i'm not sure the memory CLi would say the same but meh
[01:29:22 CET] <bluejaypop> Hi ppl, I'm looking for some good use case or manual for live streaming. I'm reading about containers, codecs for video stream and audio stream, but i want to use ffmpeg to live stream.
[01:38:20 CET] <DHE> ultimately ffmpeg can feed some kind of content server, but does not handle hundreds/thousands of users connecting to it directly. figure out what service you're going to use for that, then seek out instructions on having ffmpeg feed it
[02:08:18 CET] <montana> what does it mean if i can only seek 1 min mark of a video?   such as  1:00min 2:00min 3:00min
[02:08:29 CET] <montana> cannot seek to 1:30 min
[02:13:32 CET] <DHE> that you have 1 keyframe per minute
[02:50:18 CET] <montana> DHE what is default keyframe per minute
[03:04:15 CET] <DHE> depends on the codec, framerate, and whether or not it was changed from the default
[03:44:56 CET] <Atlenohen> Does GOP size of 1 mean all frames will be keyframes ?
[03:45:09 CET] <Atlenohen> Set in the AVCodecContext
[03:45:43 CET] <Atlenohen> Without touching keyframe flags
[04:04:58 CET] <montana> why doesn't ffmpeg's aac support HE-aac
[04:05:05 CET] <montana> he is better than lc
[04:05:49 CET] <DHE> if it matters that much to you, use fdk
[04:05:56 CET] <DHE> Atlenohen: basically yes
[04:07:27 CET] <montana> DHE then i have to use ffmpeg version 2.6.2
[04:07:44 CET] <montana> that's really old
[04:29:57 CET] <Atlenohen> How come AVCodecContext only has bit_rate? What about average and maximum ?
[04:30:17 CET] <Atlenohen> Probably it's codec specific, so accessed elsewhere?
[05:14:43 CET] <Atlenohen> Or does that mean AVG bitrate?
[06:59:06 CET] <ryzenda> Oh, btw, if anyone noticed my messages from days earlier, I am still trying to figure out why 1,080,000 frames at 30fps does not result in a 10:00:00 hour video, and instead results in a 10:04:17 video
[07:00:32 CET] <ryzenda> DHE, ah, it is a webm file
[07:01:24 CET] <ryzenda> I'll look into that, maybe it is specific to webm encoding. I was using Kdenlive
[07:03:17 CET] <ryzenda> Might be related: https://bugzilla.mozilla.org/show_bug.cgi?id=1065207
[07:04:58 CET] <ryzenda> I suppose I can try to figure out a way to crop off the extra minutes to make the video exactly 10 hours without worrying about the frame count. I'll look into that too.
[10:05:40 CET] <odinsbane> I'm trying to encode a webm file, and the quality is very poor. Are there some settings I can use to improve it? I've tried -v:b 20M and that made a larger file, but not better video.
[11:11:38 CET] <kadiro> hello, just wondering if 'band' option from delogo filter is no longer used, If so, what is the replacement? I got this error when using it: [Parsed_delogo_0 @ 0x7f71b8269840] Option 'band' not found
[11:38:37 CET] <durandal_1707> kadiro: i think i never worked properly
[11:39:01 CET] <durandal_1707> *it
[11:39:10 CET] <kadiro> ah
[11:39:29 CET] <kadiro> durandal_1707, It was working before though
[11:41:25 CET] <kadiro> durandal_1707, any replacement for it?
[11:45:56 CET] <Atlenohen> When the program uses swscale to conver the pixel format, it also uses BICUBIC, is this needed?
[11:46:40 CET] <Atlenohen> I don't want to touch the frames, as minimal as possible
[11:47:41 CET] <pink_mist> I have no real clue, but to my way of thinking the software scaler has to use some form of scaling algorithm ... bicubic is a scaling algorithm, but you can probably use a different one
[11:51:02 CET] <Atlenohen> This is quite weird, if the pixel format conversion is like from RGBA to RGB0
[11:51:36 CET] <Atlenohen> Shouldn't even have to use sws scale for that!
[11:51:58 CET] <Atlenohen> Perhaps there is a way and this is an old implementation which still uses swscale?
[12:02:00 CET] <durandal_1707> kadiro: why you used it? and what it did?
[12:03:09 CET] <durandal_1707> Atlenohen: swscale uses SIMD for RGBA to RGB0, to makes things significantly faster, thats why swscale is useful even in this case
[12:07:07 CET] <pk08> hi
[12:07:38 CET] <pk08> is there anyway to find caption type 608 or 708 in video stream of mpegts?
[12:07:47 CET] <pk08> using ffprobe
[12:08:57 CET] <pk08> in -show_frames, it shows sidedata but doesnt show its 608 or 708
[12:09:23 CET] <kadiro> durandal_1707, to hide logo, when watching some satellite channels
[12:22:40 CET] <durandal_1707> kadiro: delogo works like that already, so  your description is vague
[12:23:42 CET] <kadiro> durandal_1707, I know but wondering about the 'band' option, without it the result is not good as it was with it
[12:52:27 CET] <durandal_1707> kadiro: than your paramters to delogo filter are wrong
[12:52:49 CET] <Atlenohen> Right, but could I just use "0" for scaling?
[12:52:54 CET] <durandal_1707> make sure that x/y/w/h are correct
[12:53:23 CET] <Atlenohen> Don't want any scaling.
[12:53:31 CET] <kadiro> durandal_1707, they are, this is what I used before and worked: -vf "delogo=x=600:y=28:w=58:h=64:band=10"
[12:53:42 CET] <durandal_1707> Atlenohen: your input does not make any sense, swscale does not do scaling if it only does format conversion
[12:53:56 CET] <kadiro> now to make it work I have to remove band= like this: -vf "delogo=x=600:y=28:w=58:h=64"
[12:54:17 CET] <kadiro> but the result is not good
[12:54:22 CET] <durandal_1707> kadiro: if logo really in that spot you set?
[12:54:41 CET] <durandal_1707> "not good" is too vague for providing any useful help
[12:54:59 CET] <durandal_1707> provide input file with logo
[12:55:37 CET] <kadiro> durandal_1707, My english is not good to explain but I mean the delogo rectangle is not smooth as it was before with band option
[12:56:53 CET] <durandal_1707> still not enough
[12:57:02 CET] <kadiro> ok
[12:57:12 CET] <kadiro> thanks anyway
[12:57:40 CET] <pink_mist> kadiro: showing screenshots of how it looked before and how it looks now might help
[12:58:15 CET] <kadiro> pink_mist, how i can make it work again if the band option no longer works
[12:58:28 CET] <pink_mist> use an old version where it did work
[12:58:39 CET] <kadiro> It is just say: [Parsed_delogo_0 @ 0x7f71b8269840] Option 'band' not found
[12:59:03 CET] <furq> maybe make the rectangle a bit bigger
[12:59:13 CET] <furq> if the logo has a hard border or something then that should help
[12:59:57 CET] <Atlenohen> durandal_1707: s_sws_context = sws_getCachedContext(s_sws_context, width, height, s_av_source_pix_fmt, s_frame_width, s_frame_height, s_av_codec_context->pix_fmt, SWS_BICUBIC, nullptr, nullptr, nullptr);
[13:00:37 CET] <Atlenohen> I guess this isn't exactly the swsscale line, but this gets input into it, that line is just below this one.
[13:01:00 CET] <furq> it doesn't matter what flags you set if you're not actually scaling
[13:01:58 CET] <Atlenohen> Yeah it's not suppose to scale, the width/height imo should be the same, but if they aren't then it's some other feature which I didn't realize, in that case bicubic is probably ok.
[13:02:04 CET] <Atlenohen> Great then. Thanks
[13:02:58 CET] <furq> you can set SWS_LANCZOS if it makes you feel better
[13:03:53 CET] <Atlenohen> Oh right, I read about some of that stuff and that one's better I guess, ok
[13:21:15 CET] <kadiro> furq, https://termbin.com/bww5 both link of pictures are inside this link
[13:21:37 CET] <kadiro> pink_mist, ^
[13:24:57 CET] <durandal_1707> kadiro: please provide original image, one without delogo applied
[13:26:14 CET] <kadiro> durandal_1707, https://imgur.com/Tbcg5jMl.png
[14:31:20 CET] <n000g> I have a video that is 16:9 but incorrectly tagged as being 4:3 it seems. Can I correct the aspec ratio on the fly and then apply my crop?
[14:38:42 CET] <n000g> I can't do it via -c copy for some reason. Nice.
[14:39:01 CET] <kadiro> I use ffplay for testing
[14:39:04 CET] <n000g> As in, just the aspect ratio correction, without cropping.
[14:41:07 CET] <kadiro> maybe mixing aspect with pad
[14:41:26 CET] <kadiro> s/aspect/scale
[14:49:19 CET] <barhom> is fdk-aac still faster than ffmpegs own aac encoder ? (in terms of cpu power, I do not really care about quality for what I am doing)
[14:51:26 CET] <DHE> no, ffmpeg's is a bit faster. I timed fdk as ~55x realtime while ffmpeg got ~85x realtime speeds on my CPU
[14:52:21 CET] <n000g> kadiro, I can transcode it via scale=720:576, but when I crop it right after, the output is still distorted.
[14:52:27 CET] <n000g> Weird.
[14:52:57 CET] <barhom> DHE: Doing some NVENC live transcodes and unfortunately I am hitting the CPU limit on audio transcodes before I come close to maxing out the GPU nvenc. Need to shave off as much CPU as possible on aac
[14:53:11 CET] <barhom> DHE: I will try to switch to aac and see if I see any difference
[14:55:21 CET] <n000g> barhom, might it be worth to handle audio and video in seperate commands? Do the video, then do the audio later and merge again?
[14:56:07 CET] <barhom> n000g, live transcodes producing HLS output so cant really do that
[14:57:34 CET] <DHE> this isn't a crazy powerful CPU. it's a core i7 4790 clocked at 3.6 GHz and this is a single-threaded job...
[15:02:39 CET] <n000g> barhom, oh. Just curious: why the need to do it as fast as possible? Isn't realtime enough if it's live?
[15:03:04 CET] <barhom> n000g: Sure, but what if you wanna do 50 live transcodes
[15:03:21 CET] <n000g> kadiro, I managed to fix it. setdar=dar=16/9,crop=720:436:0:70 works. I had an additional -aspect before that I forgot to remove, d'oh.
[15:03:36 CET] <n000g> barhom, ah, I see.
[15:04:36 CET] <DHE> well nvenc is limited to 2 streams unless you bought a $1000+ Quadro card or better...
[15:04:53 CET] <JEEB> (or patched the driver)
[15:05:06 CET] <JEEB> (which of course removes your support and other things)
[15:05:47 CET] <barhom> size=    5105kB time=00:10:34.21 bitrate=  65.9kbits/s speed= 107x (aac)
[15:05:54 CET] <DHE> well that's obviously the excption to the rule...
[15:05:54 CET] <barhom> size=    5073kB time=00:10:34.21 bitrate=  65.5kbits/s speed=71.7x (fdk)
[15:06:10 CET] <barhom> So yes, DHE, it is a bit faster, thanks. I didnt think about even trying this
[15:06:10 CET] <DHE> also, if you're running 50 encode jobs then at least you have the advantage of multi-core CPUs on your side
[15:08:36 CET] <barhom> Trying to get the most of the P2000 with SD transcodes (mpeg2 -> nvenc h264) seems to require at least a dual-cpu setup with E5v2
[15:08:59 CET] <furq> barhom: are you doing multi-bitrate hls
[15:09:00 CET] <barhom> E3-1270v2 gets CPU bottlenecked on aac before the quadro card is full
[15:09:07 CET] <barhom> furq: not right now
[15:09:18 CET] <BeerLover> I am getting the following error: "Stream specifier '' in filtergraph description [0]split=1[s0] matches no streams." when running: https://0x0.st/z6sk.txt
[15:09:24 CET] <n000g> Speaking of NVENC, is there a "goto" set of options for minimum bitrate for a given quality rate factor? Basically, like libx264's -crf 18 -preset veryslow?
[15:09:41 CET] <furq> well obviously you can just share the same encoded audio stream between all of them if you do that
[15:09:50 CET] <furq> so that'll reduce the load a lot
[15:10:37 CET] <barhom> furq: When I setup my multibitrate-hls I tried to do that a lot. The command got so complicated that I failed
[15:10:50 CET] <barhom> I ended up transcoding aac several times (atsame bitrate) for each video bitrate
[15:11:06 CET] <DHE> BeerLover: use 0:a as the input stream
[15:11:51 CET] <DHE> for my multi-variant HLS I ended up making my own transcode application from the API...
[15:12:04 CET] <BeerLover> DHE wherE?
[15:12:09 CET] <furq> it's normally simple with the tee muxer
[15:12:15 CET] <furq> but with hls that probably gets complicated quick
[15:12:38 CET] <DHE> yeah you have to select the input video stream multiple times for each quality variant, then have `tee` mux them all
[15:13:52 CET] <furq> you can also encode the audio in one ffmpeg and pipe it to another ffmpeg
[15:14:41 CET] <DHE> you'll need to set timestamp preservation options, but it can work..
[15:14:54 CET] <DHE> actually not even that. copy the source video in the first instance...
[15:15:00 CET] <furq> yeah
[15:16:44 CET] <furq> ffmpeg -i foo -c:a aac -c:v copy -f nut - | ffmpeg -i - -c:v libx264 -c:a copy 1.m3u8 -c:v libx264 -vf scale=1280:720 -c:a copy 2.m3u8
[15:16:47 CET] <furq> something like that
[15:18:06 CET] <bencoh> 59
[15:19:14 CET] <DHE> furq: when I tried that, there was no guarantee that the last audio frame in 1-segment1.ts would be the same frame in 2-segment1.ts etc
[15:20:13 CET] <DHE> I was thinking more like:  [..] | ffmpeg -i - -map 0:a -map 0:v -map -:v -c:v:0 libx264 -c:v:1 libx264 -vf:1 scale=1280x720 -f tee '[tee-args]'
[15:20:21 CET] <DHE> I don't know that this is the correct syntax at all...
[17:16:30 CET] <gp> is it possible to compile ffmpeg WITHOUT support for a particular format? Say FLV or MP4?  And same question for codecs?  Without any support for say h.264.  But which ones not important - trying to end up with a binary that I can reliably test against
[17:17:02 CET] <DHE> ./configure --disable-demuers=mp4 --disable-decoders=h264   # etc
[17:17:13 CET] <DHE> there's also ./configure --list-demuxers etc to help produce the list
[17:17:16 CET] <gp> DHE: thank you!
[17:17:20 CET] <DHE> I've made typos but you should be able to figure your way out from that
[17:17:25 CET] <gp> yep =)
[17:18:24 CET] <DHE> you can also do: --disable-muxers --enable-muxers=pcm*,mp4   # support only these
[17:18:33 CET] <DHE> ugh, I keep putting plural "muxers" where I shoudln't
[17:18:48 CET] <gp> slick - that is much nicer
[17:19:05 CET] <DHE> yeah I have a "smallish" build that's about half the ffmpeg.exe binary size for a static link
[20:20:46 CET] <kadiro> Following this guide https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu , compiling was success, indeed the band option from delogo filter is no longer exist
[00:00:00 CET] --- Fri Nov 15 2019


More information about the Ffmpeg-devel-irc mailing list