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

burek burek021 at gmail.com
Tue May 14 03:05:02 EEST 2019


[06:13:36 CEST] <aiena> I hve a command like this `ffmpeg -framerate 1/2 -i "pg-%d.jpg" foo.mp4` this works to create a video with 1 image showing every 2 seconds. But the video os not seekable any seek operation crashes the video player.
[06:14:24 CEST] <aiena> I think this is because of the extremely low framerate. How do I make the output video seekable with a framerate of 25fps. SOmeone had suggested -g but I dont know how to use it.
[06:21:40 CEST] <pzich> aiena: I think you're going to need the right combination of -framerate -fps and -r, but I'm a bit rusty on the right way to put them together
[06:21:43 CEST] <pzich> https://trac.ffmpeg.org/wiki/ChangingFrameRate
[06:22:16 CEST] <aiena> pzich: what is teh difference between -r and -framerate
[06:22:44 CEST] <pzich> not sure frankly, they might be synonymous
[06:23:39 CEST] <pzich> well there you have it https://pastebin.com/Q76AE6BS
[06:27:40 CEST] <furq> aiena: -r 30
[06:27:52 CEST] <furq> after the input filename
[06:28:43 CEST] <furq> if you want to be able to seek to the start of every picture and the pictures are two seconds long then use -g 60 as well
[06:28:50 CEST] <furq> otherwise don't bother setting it
[06:30:32 CEST] <aiena> furq: is -r a shortform of -framerate?
[06:30:36 CEST] <aiena> like -c for codec
[06:30:45 CEST] <furq> -framerate is an input option
[06:33:06 CEST] <furq> https://ffmpeg.org/ffmpeg-all.html#Video-Options
[07:18:48 CEST] <fling> How to only keep subs marked as 'title           : FORCED' in the metadata and drop the rest?
[07:18:53 CEST] <fling> Should this be scripted?
[07:58:56 CEST] <fling> scripted!
[09:27:40 CEST] <Gigabitten> hmm. so I'm trying to make a slideshow out of a bunch of images and I've got almost everything working perfectly, except - some images are getting squished... is there a way to get it to preserve the aspect ratio of each image while still using up as much of the frame as it can?
[09:29:25 CEST] <Gigabitten> I mean, the absolute worst case scenario is that I start putting together a way to pad all of these images with whitespace, but that sounds more annoying than asking an IRC for an option that presumably exists.
[09:30:27 CEST] <furq> you would need to pad them for that to work
[09:31:25 CEST] <Gigabitten> damn
[09:31:30 CEST] <Gigabitten> that's pretty annoying
[09:32:32 CEST] <Gigabitten> Thanks though. I'll figure something out. No doubt such a tool exists.
[09:33:29 CEST] <furq> you can do it with ffmpeg
[09:33:36 CEST] <Gigabitten> oh what really?
[09:33:39 CEST] <Gigabitten> how?
[09:34:51 CEST] <Gigabitten> And as I mentioned, I'm looking at resolutions all over the board here. What I really want is a way to make them all the same aspect ratio, but if I have to engage in shenanigans I will.
[09:35:52 CEST] <Gigabitten> (for instance, I can't just pad every image to a bunch by a bunch, that would be a disaster, small images would end up tiny)
[09:36:26 CEST] <furq> -vf "scale=w=if(gt(dar\,16/9)\,1920\,-2):h=if(gt(dar\,16/9)\,-2\,1080):eval=frame,pad=w=1920:h=1080:x=(1920-iw)/2:y=(1080-ih)/2:eval=frame"
[09:36:29 CEST] <furq> something like that
[09:36:31 CEST] <Gigabitten> oh christ
[09:36:57 CEST] <Gigabitten> how on earth does this work
[09:37:19 CEST] <furq> it scales to either 1920 width or 1080 height at the original ar and then pads to 1080p
[09:37:36 CEST] <furq> replace the dimensions and 16/9 with whatever you're using
[09:37:41 CEST] <Gigabitten> reasonable enough
[09:41:00 CEST] <Gigabitten> guess it just looks intimidating
[09:46:15 CEST] <Gigabitten> wow, huh, that worked really well
[09:46:17 CEST] <Gigabitten> thanks a ton
[10:10:33 CEST] <Gigabitten> hmm
[10:10:40 CEST] <Gigabitten> what about if the image is too big though
[10:10:52 CEST] <Gigabitten> it's giving errors that seem related to that
[10:11:12 CEST] <Gigabitten> idk why, it seemed fine earlier
[11:49:02 CEST] <molokjo> Hey, ffmpeg gives me the following log: [dash @ 0x7f6e6c000b80] DTS 2517000 < 2520000 out of orderB f=0/0
[11:50:04 CEST] <molokjo> It is concerning a dash file, am I correct that the error concerns an out of order synchnorization of the segments between 2517000 < 2520000?
[11:50:36 CEST] <molokjo> If not, would anyone be kind to explain the true meaning please? Thanks
[15:33:05 CEST] <snooky> how can I get the sound to the same volume with ffmpeg? most of the time, voices are quiet and effects loud. how do you get all on a level?
[15:35:04 CEST] <DHE> I suspect you want https://ffmpeg.org/ffmpeg-filters.html#dynaudnorm
[17:00:20 CEST] <SixEcho> i'm currently using "-vcodec h264_videotoolbox" to re-encode a video& however is this just doing encoding?  docs say enabling hardware decoding may not be any faster b/c it has to copy decoded frames from GPU to system memory  however if the GPU is doing the encoding  should it be faster to decode/encode all in the GPU?  how might i set that up?
[18:12:28 CEST] <sloth> https://www.youtube.com/watch?v=S0ximxe4XtU
[19:29:02 CEST] <SixEcho> i'm currently using "-vcodec h264_videotoolbox" to re-encode a video& however is this just doing encoding?  docs say enabling hardware decoding may not be any faster b/c it has to copy decoded frames from GPU to system memory  however if the GPU is doing the encoding  should it be faster to decode/encode all in the GPU?  know how that would be activated?  (currently ffmpeg still seems CPU bound with GPU encoding on)
[20:44:26 CEST] <_hollow_> Hi, I'm trying to cut a piece from a video file without reencoding. It's a h264 Hi10P video and cutting results in artefacts. Reencoding works. Any idea how to cut Hi10P videos without reencode? My command is ffmpeg -ss 00:10 -i input.mkv -t 10 -c copy cut.mkv
[20:52:16 CEST] <SixEcho> _hollow_: works for me, might need to copy/paste the video stream info here
[20:52:29 CEST] <_hollow_> Thanks, will do now
[20:52:54 CEST] <_hollow_> Stream #0:0: Video: h264 (High 4:4:4 Predictive), yuv444p10le(tv, bt709/unknown/unknown, progressive), 1280x720, SAR 1:1 DAR 16:9, 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
[20:53:48 CEST] <JEEB> _hollow_: check if the cut is keeping the x264 headers (strings FILE |grep x264)
[20:53:57 CEST] <JEEB> the SEI message that contains that info
[20:54:15 CEST] <JEEB> because if it doesn't, and your lossless file is encoded with an older buggy version of x264
[20:54:30 CEST] <JEEB> then decoders cannot figure if they need to be compatible with the bug or not
[20:55:46 CEST] <JEEB> oh wait, that's probably not lossless :P but anyways, I think one of the bugs could be relevant :P
[20:56:16 CEST] <_hollow_> JEEB: no x264 string in the cut
[20:56:26 CEST] <JEEB> and the original?
[20:57:08 CEST] <_hollow_> original has
[20:57:19 CEST] <JEEB> right, so you're hitting a case where that is needed
[20:59:20 CEST] <JEEB> not sure how to make ffmpeg.c keep that one. you can create a new SEI user data thing with the h264_metadata bit stream filteräs sei_user_data option
[20:59:30 CEST] <JEEB> but probably simpler to just cut with mkvtoolnix's mkvmerge(gui)?
[21:00:10 CEST] <_hollow_> will try now, although there are lots of anime episodes which are encoded so :-)
[21:06:09 CEST] <_hollow_> JEEB, it's the same result
[21:11:09 CEST] <JEEB> _hollow_: and the mkvmerge'd cut file also misses the SEI message I guess? :)
[21:11:30 CEST] <JEEB> I think that makes sense then and you'll just have to figure out how to keep that SEI there
[21:12:26 CEST] <_hollow_> yes, it misses
[21:12:33 CEST] <JEEB> in the worst case, try re-creating the SEI with https://www.ffmpeg.org/ffmpeg-all.html#h264_005fmetadata
[21:12:46 CEST] <JEEB> you'd have to figure out the UUID the x264 SEI uses
[21:12:49 CEST] <_hollow_> ok, i see there is a bitstream filter
[21:13:49 CEST] <JEEB> -bsf:v "h264_metadata=sei_user_data=UUID+TEXT"
[21:13:52 CEST] <JEEB> something like that
[21:14:03 CEST] <JEEB> the text is what you find with the strings look-up
[21:14:04 CEST] <_hollow_> yes, reading x264 code now to figure out UUID as you suggested
[21:14:05 CEST] <JEEB> the UUID is...
[21:14:57 CEST] <JEEB> http://up-cat.net/p/48d4ec39
[21:15:15 CEST] <JEEB> that's within x264_sei_version_write
[21:16:03 CEST] <_hollow_> thanks, will convert to string and try now
[21:27:31 CEST] <_hollow_> JEEB, it worked like a charm! Thanks a lot, do you know how to get the current SEI data without using strings? Does ffprobe have such feature?
[21:30:00 CEST] <JEEB> cool. not sure
[21:30:37 CEST] <JEEB> I know you get have a bit stream filter parse all your packets, buut not sure if it's as simple as ffprobe'ing trying to parse that
[21:31:40 CEST] <JEEB> although since the SEI is always in the beginning of the stream, if the header dumping bit stream filter shows it nicely, you could just dump the first video frame and it should be there
[21:31:51 CEST] <JEEB> https://www.ffmpeg.org/ffmpeg-all.html#trace_005fheaders
[21:31:56 CEST] <JEEB> is the relevant bsf
[21:33:00 CEST] <JEEB> ok, doesn't seem too nice :P
[21:33:26 CEST] <JEEB> user_data_payload_byte[546]\n01110010 = 114
[21:34:38 CEST] <_hollow_> ok, i hoped there was similar h264_metadata kind of flag, but manually setting shouldn't be a problem for now
[21:34:41 CEST] <_hollow_> Thanks again
[21:34:56 CEST] <JEEB> http://up-cat.net/p/e5edc9de
[21:35:00 CEST] <JEEB> example of using the tracing thing
[21:35:38 CEST] <JEEB> and there might be an option I'm just not in the know of
[21:41:11 CEST] <_hollow_> thanks, will look further, in my processing pipeline it seems i'll need to read that metadata before copying
[21:41:28 CEST] <JEEB> yea
[22:28:41 CEST] <TechBill> test
[22:29:29 CEST] <JEEB> uh-huh
[22:29:59 CEST] <TechBill> is there a good guide on setting -maxrate?
[22:34:21 CEST] <JEEB> it is the maximum VBV/HRD rate over your bufsize
[22:34:36 CEST] <JEEB> depending on the encoder is it kept better or worse
[22:34:42 CEST] <JEEB> (x264 f.ex. is pretty good at it)
[22:35:51 CEST] <TechBill> it the x264 one
[22:36:55 CEST] <TechBill> we are setting up a premium Clipbucket which we paid for to use as our private media hub to share eduction videos but it seem the default setting is a lesser quality than what we wanted
[22:37:39 CEST] <TechBill> at first it was -crf 29 so we lowered it to 20 and raise it to 22 but the bitrate is pretty low still
[22:38:25 CEST] <JEEB> ugh, -crf 29. I mean, in some resolutions that might be OK, but the default starts at 23. and you're supposed to utilize short clips to test what's the highest number that still looks good to you :P
[22:38:38 CEST] <JEEB> like, start at 23 and go down if it looks bad. go up if it looks good
[22:39:27 CEST] <TechBill> It's what I am doing now .. I like 20-22 but the bitrate is pretty high
[22:40:07 CEST] <TechBill> It streaming at 4Mbits data rate
[22:40:10 CEST] <JEEB> squeeze the preset? although you'll probably have to tweak the crf while at it
[22:40:49 CEST] <TechBill> preset is at veryslow
[22:40:55 CEST] <TechBill> should I increase it?
[22:41:12 CEST] <JEEB> anything else you're setting that might be limiting the encoder?
[22:41:21 CEST] <JEEB> like GOP length or something else like that?
[22:41:58 CEST] <TechBill> it was at GOP -60 .. I took it out
[22:42:04 CEST] <TechBill> this what I am trying now - ffmpeg -i Malta_Learning_Globally-source.mp4 -vcodec libx264 -preset veryslow -maxrate 20000k  -bufsize 40000k -crf 20 test-rate.mp4
[22:42:25 CEST] <TechBill> i mean -g 60
[22:42:27 CEST] <TechBill> sorry
[22:43:24 CEST] <JEEB> so effectively you're at the maxrate having a ~2s buffer
[22:43:36 CEST] <JEEB> and 20mbps maxrate?
[22:44:21 CEST] <TechBill> oh I meant to set it at 2mpbs
[22:44:26 CEST] <TechBill> let me knock off a zero
[22:48:07 CEST] <TechBill> changed the preset to medium .  seem a bit better  ffmpeg -i Malta_Learning_Globally-source.mp4 -vcodec libx264 -preset medium -maxrate 2000k  -bufsize 4000k -crf 20 test-rate.mp4
[22:48:44 CEST] <TechBill> if I take out the maxrate and bufsize then run it veryfast preset .. would be better?
[22:49:32 CEST] <JEEB> it will get /faster/, and you will not be restraining bit rate if you take the maxrate+bufsize out, so in that case if you just tweak the CRF value you will get the quality you want
[22:49:43 CEST] <JEEB> just maybe not at the bit rate that you'd get with a slower preset :P
[22:51:02 CEST] <TechBill> ok thank you JEEB
[22:51:08 CEST] <TechBill> I will experiment a bit ..
[22:55:10 CEST] <TechBill> should I use -g flag at all?
[22:56:33 CEST] <JEEB> if you have no requirements on quick seeking to exact points then no. and heck, depending on your frame rate and stuff you might even gain by setting it to longer than 250
[22:56:39 CEST] <JEEB> (the default in x264 is 250)
[00:00:00 CEST] --- Tue May 14 2019


More information about the Ffmpeg-devel-irc mailing list