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

burek burek021 at gmail.com
Sun Jan 27 03:05:02 EET 2019


[00:06:55 CET] <SpeakerToMeat> Is there any way I can crop a piece of a video in ffmpeg, shift it down and overlay it on the same video?
[07:46:43 CET] <rnmhdn> how can I make the iframes of a video file regular?
[07:47:08 CET] <rnmhdn> so that I have an iframe every say 3 seconds
[07:48:34 CET] <furq> depends on the codec
[07:49:36 CET] <furq> -g will either set a fixed keyframe interval or the maximum keyframe interval, but then you might also need to disable scenecut or something like that, which is encoder-specific
[09:00:43 CET] <rnmhdn> I want to create a dash stream with fixed intervals
[09:00:54 CET] <rnmhdn> the problems is my video has fixed intervals but not my audio
[20:06:46 CET] <illuminated> if you're going to pass the -y option for overwrite.. do you pass it in before -i?
[20:06:59 CET] <illuminated> or does it matter where it is?
[20:20:46 CET] <johnjay> ffmpeg source is scary. is there some simpler source i could look at first to understand image processing?
[20:24:10 CET] <JEEB> you probably want to know some specifics, FFmpeg just does a whole crapload of things :P
[21:00:35 CET] <deltasquared> why do I always get into fights with kmsgrab... I've previously had kmsgrab working with a filter chain that looks like this: "hwmap,scale_vaapi=format=nv12,hwdownload" which was then encoded to MP4. Now when trying instead to save output to one png per frame as an experiment, I get "invalid output format monob ...".
[21:01:43 CET] <deltasquared> Out of curiosity I tried seeing if the scale_vaapi filter could take other formats; I tried "rgb8" (I just made it up, not read it anywhere) and evidently that didn't work... so my first question, can I get ffmpeg to tell me what the vaapi device's supported pixel formats are?
[21:03:14 CET] <cluelessperson> do you know where I can find a list of the file extensions that ffmpeg supports?
[21:05:16 CET] <Mavrik> ffmpeg -formats ? :)
[21:05:29 CET] <deltasquared> cluelessperson: I don't know about file extensions per se, but my understanding is that "man ffmpeg-formats" describes which containers are supported (for instance, "mp4" which is what it sounds like - but one must also consider codecs as well, e.g. the mp4 container doesn't support every codec under the sun like say mkv does)
[21:06:05 CET] <deltasquared> that said, I'd be surprised to come across a container format that ffmpeg doesn't understand
[21:06:08 CET] <cluelessperson> Mavrik: that's not a list of file extensions
[21:06:24 CET] <cluelessperson> the goal is to programmatically control what files are displayed in a media thing
[21:07:15 CET] <deltasquared> cluelessperson: extensions used by container formats are sometimes just convention; they aren't a hard and fast indication of encodings etc.
[21:07:48 CET] <cluelessperson> then what's the point
[21:07:50 CET] <deltasquared> hence I don't see how asking ffmpeg's supported "file extensions" (which I don't think it really cares about mostly) would help
[21:08:25 CET] <deltasquared> the only time ffmpeg really cares about file extensions is when you just give it an output file and it tries to guess what you want
[21:08:32 CET] <deltasquared> err output filename rather
[21:10:16 CET] <deltasquared> cluelessperson: in any case when you say programmatically control files that are shown... how so
[21:10:50 CET] <deltasquared> brb... there's a rodent loose in the house
[21:11:25 CET] <cluelessperson> deltasquared: for example, I'm obviously not going to playback pdf files
[21:21:22 CET] <deltasquared> cluelessperson: the thing is though, some media formats have rather generic extensions - some edge cases would be .bin, .dat and so on. that said, seeing as ffmpeg is fairly versatile, you could just get a list somewhere of known extensions that are unique to media files - if it's in such a list there's a good chance ffmpeg would handle it (and anything using it's libraries... mpv comes to mind)
[21:21:30 CET] <deltasquared> as to where you'd find such a list, search me.
[21:22:14 CET] <Mavrik> I'm guessing you could parse them out of libavformat source :)
[21:22:32 CET] <Mavrik> But TBH I see no reason why you wouldn't just attempt to play a PDF file and fail if it's not readable :)
[21:24:00 CET] <deltasquared> does ffmpeg have different exit codes for that situation? e.g. "I don't recognise this" vs "this was corrupt" or "your sound card caught fire"
[21:24:36 CET] <Mavrik> I'm not sure a meaningful difference can be made
[21:24:52 CET] <Mavrik> There are some error codes but for a lot of cases there's no difference between corrupt and wrong file
[21:25:25 CET] <deltasquared> Mavrik: I would have thought a malformed header somewhere in the middle would be easy to tell apart from simply being unable to find any matching magic numbers, for instance
[21:25:39 CET] <deltasquared> sure, it's not 100% black and white, but it'd be a good enough guess most of the time
[21:25:48 CET] <tdr> it should know if theres bad magic bits
[21:27:21 CET] <Mavrik> deltasquared, mhm, no idea if the ffmpeg binary does that, if you use the API then of course you know what failed
[21:27:23 CET] <Mavrik> https://github.com/FFmpeg/FFmpeg/search?q=.extensions&unscoped_q=.extensions
[21:27:33 CET] <Mavrik> This seems like a reasonable list of extensions ffmpeg knows tho :)
[21:28:14 CET] <tdr> or can
[21:31:22 CET] <deltasquared> Mavrik: you mean libavformat/rawenc.c?
[21:32:29 CET] <deltasquared> or rather everything in that list defining an AVInputFormat... that'd be painful to comb through though >_>
[21:33:31 CET] <Mavrik> deltasquared, a simple grep over ".extensions" in all "*dec.c" should give you the most.
[21:33:41 CET] <Mavrik> Over everything in avformat if you want it to be complete
[21:34:52 CET] <deltasquared> Mavrik: it occurs that it may still need some filtering... I would hope nothing would be daft enough to try and claim something as generic as .bin say, but I'd personally want to watch out for those sort of overloaded file extensions anyway
[21:37:30 CET] <deltasquared> anyway, re: my kmsgrab thing earlier, the script invoking ffmpeg is https://ptpb.pw/sQRv.txt and the output I got back is https://ptpb.pw/IhOw (warning, terminal colour escape sequences in the latter)
[21:38:26 CET] <deltasquared> I guess just curl the latter one in a terminal. then you can see the colours too ;)
[22:18:01 CET] <deltasquared> aha, format=bgr0 seems to do the trick... but I only discovered that from a random internet search finding a bug ticket, which is less than ideal
[00:00:00 CET] --- Sun Jan 27 2019


More information about the Ffmpeg-devel-irc mailing list