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

burek burek021 at gmail.com
Fri Jul 21 03:05:02 EEST 2017


[00:03:06 CEST] <lungaro> Hmmm.. kepstin could -auth and username/password be used?
[00:04:25 CEST] <kepstin> Just putting a username and password in the URL might be enough to get plain auth working
[00:04:50 CEST] <kepstin> The -auth option won't work tho.
[00:05:02 CEST] <lungaro> i meant -auth_type basic -- but yeah, URL is last resort
[00:10:27 CEST] <rmbeer> hello
[00:10:39 CEST] <rmbeer> how to fuse the audio and video with minimum time limit?
[00:13:08 CEST] <rmbeer> i can't found in the internet...
[00:13:52 CEST] <rmbeer> i need take the minimum time limit or from total time of a specific input
[00:32:52 CEST] <cryptodechange> kepstin, furq - my mistake, I did in fact mean tune
[00:33:43 CEST] <cryptodechange> on a slightly unrelated note, is there a way I can obtain the unique volume key on a bluray? flashing the optical drive firmware perhaps?
[00:55:01 CEST] <Tatsh> cryptodechange, wrong channel
[01:03:19 CEST] <jcarpenter2> i'm trying to modify this example https://github.com/FFmpeg/FFmpeg/blob/master/doc/examples/decode_audio.c to decode wma files, but after changing AV_CODEC_ID_MP2 to AV_CODEC_ID_WMAV2 i get the error "Parser not found"
[01:04:11 CEST] <c_14> get rid of the av_parser_init probably (if wma doesn't have one) or your codec id is wrong?
[01:05:41 CEST] <jcarpenter2> the codec id is right, i used avformat_find_stream_info earlier to find out which one to use
[01:07:43 CEST] <jcarpenter2> if i remove the parser, should i instead copy the data directly from the file to the packet?
[01:08:32 CEST] <c_14> I think you av_read_packet?
[01:08:50 CEST] <c_14> probably check decode_packet in https://github.com/FFmpeg/FFmpeg/blob/master/doc/examples/demuxing_decoding.c
[01:10:03 CEST] <jcarpenter2> alright, i'm on it
[01:21:53 CEST] <SolarAquarion> what could go wrong if i disable the building of avdevice?
[01:22:57 CEST] <JEEB> SolarAquarion: there's a fix for your build problem on the ML already
[01:23:14 CEST] <JEEB> https://patchwork.ffmpeg.org/patch/4372/
[01:25:06 CEST] <SolarAquarion> JEEB, so decklink was causing the failure
[01:25:46 CEST] <JEEB> a change to decklink which started requiring a symbol of a type which aren't really nicely exported in shared libs
[03:06:05 CEST] <SolarAquarion> JEEB, it works amazingly
[05:05:35 CEST] <dviola> [41:57:0719/221548.495482:ERROR:render_media_log.cc(30)] MediaEvent: MEDIA_ERROR_LOG_ENTRY {"error":"FFmpegDemuxer: open context failed"}
[05:05:37 CEST] <dviola> [41:41:0719/221548.673303:ERROR:render_media_log.cc(30)] MediaEvent: PIPELINE_ERROR DEMUXER_ERROR_COULD_NOT_OPEN
[05:05:41 CEST] <dviola> I'm getting this from an application (chromium)
[05:05:52 CEST] <dviola> does it means it needs to be rebuilt?
[05:06:16 CEST] <dviola> I'm trying to use my webcam from chromium and it's not working, but all other programs can use it, I'm not sure if this is the right channel, sorry
[05:11:33 CEST] <dviola> nvm
[05:33:35 CEST] <jcarpenter2> hey, i'm trying to decode a wma file; i'm using avformat_open_input to get an AVFormatContext followed by avformat_find_stream_info; then to find the "best" stream i'm using av_find_best_stream, and getting a decoder and a decoder context using avcodec_find_decoder and avcodec_allex_context3, and then calling avcodec_parameters_to_context to move parameters from the stream to the context.  Problem is, the number of channels in
[05:33:35 CEST] <jcarpenter2> the file is 2 but the ->channels property of the decoder context is 1.  Any help?
[05:40:26 CEST] <jcarpenter2> the code i'm running is actually this example https://github.com/FFmpeg/FFmpeg/blob/master/doc/examples/demuxing_decoding.c - i'm getting the "Warning: the sample format the decoder produced is planar..." output message when i run it with my 2-channel file
[12:48:31 CEST] <requesting_ffmpe> Hello, I have a question my dear friend Google refuses to answer, and my ever so close comparde StackOverflow feigns ignorance to. Is anyone awake enough to consider a question related to a recently implemented feature which would otherwise be straight forward for the bash scripter at heart?
[12:50:07 CEST] <JEEB> metaquestions don't help you ;)
[12:50:13 CEST] <JEEB> ask n' wait
[12:50:19 CEST] <requesting_ffmpe> paletteuse may use 'new', stats_mode=single; a new feature I can't make head from tails.
[12:50:47 CEST] <requesting_ffmpe> Dear JEEBus, are you the Saviour I've descended here today in search of?
[12:51:38 CEST] <JEEB> probably not, I'm still at work and I've not used any module called paletteuse ;)
[12:51:40 CEST] <requesting_ffmpe> As you can guess, I am damned, unable to make use of these two features in my quest. Long Live the Everlooping Gif. May mp4 have its place.
[12:52:03 CEST] <JEEB> there's an example of its usage @ https://www.ffmpeg.org/ffmpeg-all.html#paletteuse tho
[12:52:22 CEST] <requesting_ffmpe> Ah, for starters, I would use those features in generating an individual color pallet for a gif, and use those gifs in a composition, an animated gif.
[12:52:45 CEST] <requesting_ffmpe> Ah yes, there's source code too, dear Stranger.
[12:53:14 CEST] <requesting_ffmpe> But the reference given and the source might as well be written in Greek.
[12:53:44 CEST] <requesting_ffmpe> you see, no google search turns up those characters --> "stats_mode=single"
[12:54:02 CEST] <requesting_ffmpe> no search speaks of this secret sumati.
[12:54:09 CEST] <JEEB> that's for the palettegen video filter
[12:54:12 CEST] <JEEB> https://www.ffmpeg.org/ffmpeg-all.html#palettegen
[12:54:22 CEST] <JEEB> which is mentioned next to the example
[12:54:59 CEST] <requesting_ffmpe> Aye, that it is. But you see, the making of this is a blog which has yet been written. Once may choose to create a pallet, but this pallet can be based off all frames, or a diff from frame to frame
[12:55:14 CEST] <requesting_ffmpe> this new feature, this prize so close, isn't made an example of
[12:55:37 CEST] <requesting_ffmpe> The legened is that it creates a pallet for every frame, reguardless of the frame before it, or after it.
[12:55:56 CEST] <JEEB> well the first line of the explanation of palettegen
[12:56:02 CEST] <JEEB> "Generate one palette for a whole video stream. "
[12:56:29 CEST] <requesting_ffmpe> You see, Like Google, You damn me into a cycle. Yes, yes, the whole video, option 'full'
[12:56:36 CEST] <requesting_ffmpe> the frame before it, option 'diff'
[12:56:45 CEST] <JEEB> no
[12:56:54 CEST] <JEEB> those options too are explained in the doc I linked
[12:57:42 CEST] <JEEB> anyways, for getting a palette done the palettegen example should work as-is
[12:57:52 CEST] <JEEB> and then paletteuse example can be used afterwards
[12:57:59 CEST] <JEEB> additional options are there only for tweaking
[12:58:41 CEST] <requesting_ffmpe> and so, the two lines of code which pull together 5 frames and make use of both 'new' and 'single', what say you? The prize is in the use of those cryptic options, the prize my lad is in a pallet for every image in the string of the animated gif.
[13:00:49 CEST] <requesting_ffmpe> Every frame, it's own 250 something pallet of color. Am I really missing something here? There has to be a way to take a smaller sized jpeg and preserve the color without dithering. I've convinced myself these keys, 'new' and 'single' are the way. Can you tell me how I'm wrong, at the very least teach me.
[13:01:21 CEST] <JEEB> no, the stats_mode shit has nothing to do with what you think most likely
[13:01:46 CEST] <JEEB> so stop wasting my time and just use those two examples. run your input clip through palettegen, create you palette
[13:02:02 CEST] <JEEB> then use the paletteuse example to generate your gif with that palette from the same source
[13:02:17 CEST] <requesting_ffmpe> So, what do those options do?
[13:02:31 CEST] <JEEB> have you tried reading https://www.ffmpeg.org/ffmpeg-all.html#palettegen
[13:02:37 CEST] <JEEB> scroll a bit to stats_mode
[13:02:49 CEST] <JEEB> it gives you a clear explanation of how it calculates the histogram of used colors
[13:03:10 CEST] <JEEB> anyways, I've wasted enough of my time on you
[13:04:01 CEST] <requesting_ffmpe> Yes, I've read them JEEB. But, we've back to square one where my understanding is that the histogram is created by looking at all the gifs in an animation or from part which have moved, and the there is only one pallet used for the whole animation. Am I wrong in my thinking?
[13:06:36 CEST] <requesting_ffmpe> Anyone else? The question is the use and example in utilizing palletuse, 'new' and palletge's stats_mode as 'single'. Would anyone spare a moment to share insite to these newly released features, please?
[15:04:42 CEST] <Dark-knight> hey
[15:04:59 CEST] <Dark-knight> I forgot how to determine the quality of a video
[15:05:17 CEST] <Dark-knight> https://pastebin.com/RS3i4G01
[15:05:38 CEST] <Dark-knight> the website said this video was 1080p
[15:05:49 CEST] <Dark-knight> how do I confirm that?
[15:06:08 CEST] <Dark-knight> do I look at the height or bitrate?
[15:06:14 CEST] <Threads> Height                                   : 692 pixels
[15:06:21 CEST] <Threads> :P 720p not 1080p
[15:06:44 CEST] <Dark-knight> but I don't see the number 720 anywhere?
[15:07:02 CEST] <Dark-knight> it says the bit rate is 1080
[15:07:08 CEST] <c_14> cropping due to black bars probably
[15:07:12 CEST] <furq> Width                                    : 1 280 pixels
[15:07:17 CEST] <furq> 1280*720
[15:07:30 CEST] <Dark-knight> oh ok
[15:07:43 CEST] <Dark-knight> so the quality is determined by the height?
[15:07:57 CEST] <c_14> No, but the amount of pixels is
[15:08:26 CEST] <Dark-knight> where do you see the pixel amount?
[15:08:34 CEST] <c_14> The "quality" of a video is determined by the quality of the input, the amount of pixels and the bitrate (and the stupidity of the encoder)
[15:08:45 CEST] <c_14> widthxheight = number of pixels
[15:08:55 CEST] <Dark-knight> ok
[15:09:04 CEST] <Dark-knight> how does the bitrate factor into this?
[15:09:08 CEST] <Dark-knight> it says 1080
[15:09:25 CEST] <c_14> the more bitrate you feed the encoder the better it can encode details into the video (in general)
[15:10:05 CEST] <Dark-knight> so if it has a bit rate of 1080, why is it only 720p?
[15:10:12 CEST] <c_14> that's unrelated
[15:10:27 CEST] <c_14> I can give you a 360p video with a bitrate of 10M if I _really_ feel like it
[15:10:56 CEST] <kerio> i can give you a song with a bitrate of 3303kbps
[15:10:56 CEST] <Dark-knight> so what is the bitrate then?
[15:11:12 CEST] <kerio> the rate of bits
[15:11:13 CEST] <Dark-knight> I mean, what *is* it?
[15:11:23 CEST] <kerio> quite literally
[15:11:23 CEST] <c_14> in general file size / duration
[15:11:44 CEST] <Dark-knight> hmm
[15:11:45 CEST] <kerio> how many bits per second your video takes
[15:11:49 CEST] <Dark-knight> alright
[15:12:06 CEST] <Dark-knight> so does that mean, this video has been compressed?
[15:12:18 CEST] <dl2s4> a 720p video with 1000 kb/s bitrate, cant believe this has anything to do with "quality" at all. could be wrong idk the content.
[15:12:19 CEST] <c_14> All video is compressed (usually)
[15:12:20 CEST] <kerio> all video is compressed
[15:12:38 CEST] <kerio> lossless video takes way too much space
[15:12:59 CEST] <furq> Dark-knight: https://www.google.co.uk/search?q=(788%20MiB%20%2F%201%20hour%2041%20minutes)%20in%20kibps
[15:13:10 CEST] <Dark-knight> would the quality suffere if I upscaled it to 1080p?
[15:13:15 CEST] <Dark-knight> suffer*
[15:13:19 CEST] <furq> yes
[15:13:55 CEST] <Dark-knight> how can I tell if a video has been upscaled?
[15:14:09 CEST] <JEEB> kerio: should I kick you for meaning uncompressed when you said "lossless?
[15:14:21 CEST] <kerio> pls no :c
[15:15:01 CEST] <JEEB> because while enterprise folk only use raw video (Except it seems like EU wants to stardize *gasp* a lossless format for archival), there's plenty of compressors letting you do lossless compression
[15:15:05 CEST] <JEEB> :P
[15:15:16 CEST] <furq> but do any of them support gray16
[15:15:27 CEST] <kepstin> Dark-knight: difficult to tell if a video has been upscaled in general, but there's a few waysto tell, like general blurriness or "stair-stepping" on diagonal lines.
[15:15:51 CEST] <c_14> and depending on the upscaler ringing etc
[15:15:53 CEST] <furq> stairstepping is usually an artifact of bad deinterlacing
[15:16:02 CEST] <furq> e.g. most deinterlacing
[15:16:38 CEST] <JEEB> there was a tool that came with the debilinear filter IIRC, you could feed it raw RGB and it would try to approximate what the resolution would be before upscaling. but for that you need to already have a suspicion that it was upscaled from some lower res :P
[15:16:56 CEST] <Dark-knight> hmm
[15:16:58 CEST] <JEEB> and it's far from perfect
[15:17:07 CEST] <furq> why do you suspect this has been upscaled
[15:17:29 CEST] <furq> the website saying that this is 1080p is just them being bad liars or idiots
[15:17:50 CEST] <Dark-knight> I guess, but I got it from a torrent
[15:18:15 CEST] <durandal_1707> i should kick you for that
[15:18:22 CEST] <Dark-knight> its usually the quality it says it is
[15:18:29 CEST] <Dark-knight> but this time it looked like crap
[15:18:32 CEST] <JEEB> resolution is not quality
[15:18:43 CEST] <JEEB> I can encode you something in 2160p and it will look like crap
[15:18:50 CEST] <Dark-knight> torrents aren't illegal
[15:18:54 CEST] <Dark-knight> why kick?
[15:19:07 CEST] <JEEB> anyways, often when you get something it's already been put into a format by the authors/mastering on their side. like when you're running a broadcaster
[15:19:15 CEST] <JEEB> you often get standardized 1080i or 1080p in
[15:19:29 CEST] <JEEB> what the actual source authoring resolution is, is something different
[15:19:33 CEST] <JEEB> it can be higher, it can be lower
[15:20:31 CEST] <Dark-knight> alright. I think im a little less confused
[15:21:19 CEST] <Dark-knight> why is it, some 720p videos I watch, looked better than other 720p videos?
[15:21:32 CEST] <Dark-knight> is it that bit rate thing?
[15:21:35 CEST] <kepstin> Dark-knight: because video size is not video quality
[15:21:56 CEST] <Dark-knight> alright I'm lost again
[15:22:05 CEST] <dl2s4> torrents arent illegal, but 720p videos with 1000 kb/s bitrate should be ;) yeah qualiyt is mostly a bit rate thing.. it was told some line above already
[15:22:17 CEST] <Dark-knight> how do I determine quality?
[15:22:26 CEST] <Dark-knight> what number do I look at?
[15:22:28 CEST] <kepstin> Dark-knight: by looking at the video
[15:22:42 CEST] <Dark-knight> but you just said, size isn't quality
[15:23:02 CEST] <c_14> there's no "number" that specifies quality
[15:23:07 CEST] <c_14> you have to actually watch it to find out
[15:23:16 CEST] <dl2s4> open the video in a mediaplayer and judge the quality by your eyes
[15:23:43 CEST] <Dark-knight> lol, I can't wait for the day someone makes a program that can automate that
[15:23:56 CEST] <c_14> (or theoretically compare it to a "perfect" source algorithmically, but those algorithms don't accurately represent visual quality loss)
[15:24:15 CEST] <kepstin> Dark-knight: well, there are some attempts, like https://github.com/Netflix/vmaf
[15:24:34 CEST] <rmbeer> hello
[15:24:42 CEST] <durandal_1707> bye
[15:24:53 CEST] <rmbeer> how to fix a video that is break during the save screen?
[15:25:36 CEST] Action: kepstin puts on his mind reading hat
[15:26:02 CEST] <kepstin> let me guess, you were recording your screen to an mp4 file, something crashed, and now the file's unplayable?
[15:26:30 CEST] <Dark-knight> ok, so to recap. having a higher bitrate doesn't increase the smoothness (look) of a video?
[15:27:04 CEST] <rmbeer> i recorded the 22mb of video and go to 0mb of the disk and break the video save...
[15:27:13 CEST] <rmbeer> and now ffmpeg can't read.
[15:27:39 CEST] <kepstin> Dark-knight: for two encodes of the same source video made with the same encoder settings, a higher bitrate will usually mean higher quality, up to a point.
[15:27:49 CEST] <Dark-knight> got it
[15:27:51 CEST] <Dark-knight> thanks
[15:28:51 CEST] <dl2s4> i would say a rough rule of thumb could be bit rate 5000 kbps for a AVC 720p video then you have somewhat whatchable good quality. this is just my personal opinion and does not fit for every 720p AVC video.. i mean if you really want to go by numbers.
[15:29:05 CEST] <JEEB> you don't want to go by numbers
[15:29:11 CEST] <JEEB> because numbers are not exact
[15:29:17 CEST] <dl2s4> right
[15:29:19 CEST] <JEEB> I can find you a 720p sample that will look fine at 250kbps
[15:29:27 CEST] <JEEB> and I can find you one that doesn't look fine at 20mbps
[15:29:27 CEST] <rmbeer> [mov,mp4,m4a,3gp,3g2,mj2 @ 0xXXXX] moov atom not found
[15:29:32 CEST] <rmbeer> out.mp4: Invalid data found when processing input
[15:29:37 CEST] <JEEB> rmbeer: my condolences, the index didn't get written :P
[15:29:43 CEST] <JEEB> you should have used fragmenting
[15:29:48 CEST] <JEEB> (or a container without an index)
[15:29:59 CEST] <dl2s4> yeah that is why a said "rough rule of thumb"
[15:30:00 CEST] <JEEB> the index can only be written when the encode has finished
[15:30:13 CEST] <JEEB> dl2s4: even so trying to make a newbie feel safe like that IMHO is bad
[15:30:17 CEST] <kepstin> well, the index isn't the problem, the problem is that the mp4 format stores some info requred for playback along with the index.
[15:30:18 CEST] <JEEB> because the further you're from the source
[15:30:23 CEST] <JEEB> kepstin: well, yea
[15:30:33 CEST] <JEEB> the initialization data is there
[15:30:49 CEST] <rmbeer> JEEB, then i can't recover nothing? not have any method??
[15:30:57 CEST] <dl2s4> JEEB, ok, i apologize then
[15:30:59 CEST] <JEEB> rmbeer: not easily
[15:31:01 CEST] <Dark-knight> thanks for your help guys
[15:31:06 CEST] <kepstin> i seem to recall that there are some recovery tools that can copy a moov from another file
[15:31:07 CEST] <Dark-knight> you too c_14
[15:31:10 CEST] <JEEB> because the further you're from the source the less easily you can find out where along the chain your clip has been f'd
[15:31:11 CEST] <dl2s4> it is my rule of thumb anyway
[15:31:44 CEST] <kepstin> rmbeer: if you encoded it, then make a new (short) file with the *same encoder settings*, then see if there's a moov fixing tool that can use that to correct the other file
[15:32:01 CEST] <kepstin> rmbeer: and in the future, don't use plain mp4 for saving screen captures :)
[15:32:21 CEST] <c_14> rmbeer: https://github.com/ponchio/untrunc (may or may not work)
[15:34:14 CEST] <furq> wait
[15:34:21 CEST] <furq> why did he thank "guys" and then c_14 separately
[15:35:02 CEST] <furq> this is going to haunt me to my grave if he doesn't come back
[15:36:27 CEST] <defanor> i'd like to implement multicast streaming with ffmpeg (i.e., multiple clients per single input); would using the avformat_alloc_context/avio_open_dyn_buf/avio_close_dyn_buf functions be the right way to get the output that can later be sent to clients, or is there something else suitable for such a task?
[15:39:20 CEST] <rmbeer> error: avcodec_alloc_frame no se declaró en este ámbito
[15:39:38 CEST] <rmbeer> track.cpp:204:20:
[15:58:48 CEST] <Mavrik> defanor, just outputting to a multicast address is usually enough
[15:59:02 CEST] <Mavrik> e.g. ffmpeg -i .... params .... udp://224.0.0.1
[16:03:46 CEST] <rmbeer> cc1: error: libavcodec/mpegvideo_enc.c: Error de entrada/salida
[16:03:46 CEST] <rmbeer>  no understand...
[16:03:48 CEST] <defanor> Mavrik: i'll need some wrapping around it (HTTP headers, and to handle authorization before that -- so on an existing socket should be used). though could hack around it with proxying, but it wouldn't be that nice
[16:03:56 CEST] <defanor> s/on an/an/
[16:04:05 CEST] <Mavrik> Em.
[16:04:11 CEST] <rmbeer> i can't compiling the libav for untruck
[16:04:28 CEST] <Mavrik> defanor, then you're not really doing multicast are you?
[16:04:33 CEST] <Mavrik> HTTP isn't a multicast protocol.
[16:04:49 CEST] <defanor> Mavrik: yeah, a wrong word. just tried to pick a brief description for "multiple clients"
[16:05:31 CEST] <Mavrik> Ahh
[16:05:38 CEST] <Mavrik> defanor, you'll need a streaming server then
[16:06:03 CEST] <Mavrik> [ encoder / ffmpeg ] ===> [streaming server - auth, etc.] == (multiple) ==> clients
[16:06:21 CEST] <defanor> Mavrik: i think of writing one, since haven't found anything usable for mp4 live streams. have set it that way before with icecast, but it only worked for ogg and webm
[16:06:30 CEST] <Mavrik> ohhh, don't do that
[16:06:33 CEST] <Mavrik> it's harder than it sounds :P
[16:06:50 CEST] <Mavrik> for free solutions, nginx-rtmp module is good and supports enough formats
[16:06:53 CEST] <defanor> Mavrik: well, i've spent a few weeks trying to find existing servers. any ideas what i could check?
[16:07:06 CEST] <Mavrik> wowza is pretty good when it comes to commercial solutions
[16:07:27 CEST] <Mavrik> But https://github.com/arut/nginx-rtmp-module should be quite enough for some HLS/DASH streaming to browsers
[16:07:35 CEST] <defanor> Mavrik: hrm, i've tried it, and only found hls to be working for live streams that way, but then it'd still require hacking authentication into it
[16:07:40 CEST] <rmbeer> Dx
[16:07:56 CEST] <Mavrik> defanor, HLS and/or DASH
[16:08:01 CEST] <Mavrik> is how you get live streaming into browser
[16:08:30 CEST] <Mavrik> There are modules that add auth to nginx-rtmp-module
[16:08:41 CEST] <Mavrik> But obviously if you have something home-cooked, you'll need to home-cook auth in nginx as well :)
[16:08:53 CEST] <rmbeer> i hate opera! is a fucking worm! why need 200mb of disk for each action???
[16:09:13 CEST] <defanor> Mavrik: perhaps i'll check it again then, thanks. don't you happen to know whether it can also be used to only read input streams when there are clients? i had to use some hacks with icecast for that
[16:09:32 CEST] <Mavrik> That's VoD then, not live streaming
[16:09:35 CEST] <Mavrik> Look at that part of guide
[16:09:50 CEST] <defanor> Mavrik: basic http auth doesn't seem to work for embedded videos with chromium -- because of client side
[16:09:54 CEST] <Mavrik> But most solutions expect you to have a live source running at all times
[16:10:06 CEST] <defanor> Mavrik: well, i need it on demand, but also live from IP cams
[16:10:14 CEST] <Mavrik> What can I say :P
[16:12:50 CEST] <rmbeer> anyone helpme with libav, i surrender. remove the video. :(
[16:13:16 CEST] <Guest24723> ohai. I've got some problem with ffprobe/ffmpeg. I try to get the framerate but the framerate is read in the metadata like 23440/1193. which results in 23,9936[...] fps
[16:13:28 CEST] <Mavrik> Sounds about right :)
[16:14:07 CEST] <Mavrik> Guest24723, what's the issue?
[16:14:08 CEST] <Guest24723> but if I divide the frames ffmpeg counted by the framerate, the duration is like 3s to short
[16:14:54 CEST] <Guest24723> Mavrik: I need matching values for: frames, framerate, duration
[16:15:07 CEST] <Mavrik> What's the actual format you have?
[16:15:13 CEST] <Guest24723> Mavrik: the output of ffprobe does not work out
[16:15:18 CEST] <Guest24723> Mavrik: different
[16:15:46 CEST] <Guest24723> mp4, mkv containers with x642, x265, theora n'stuff
[16:15:54 CEST] <Mavrik> *shrug*
[16:15:59 CEST] <Mavrik> Nothing strange there :)
[16:16:02 CEST] <Guest24723> o.O
[16:16:25 CEST] <Mavrik> File metadata sadly doesn't have to be always correct.
[16:16:31 CEST] <Guest24723> I would really appreciate to get reliable information out of ffprobe
[16:16:32 CEST] <Mavrik> Also there are files like VFR
[16:16:43 CEST] <Guest24723> *sigh*
[16:16:46 CEST] <Mavrik> Where "framerate" is a meaningless thing.
[16:16:53 CEST] <Mavrik> Hence why I asked you what do you have...
[16:17:11 CEST] <Mavrik> If you have *anything*... then there's no such thing as *reliable* metadata :/
[16:17:30 CEST] <Mavrik> You could try to use mediainfo which can be a bit better at guessing things.
[16:17:40 CEST] <Guest24723> I have to work with all possible (which ffmpeg can decode) formats, I can't rely on mp4 x264 sadly
[16:17:50 CEST] <Guest24723> mediainfo?
[16:18:38 CEST] <Mavrik> Well then you need to be prepared to handle the case where people give you iPhone recorded video which has no stable framerate :)
[16:19:33 CEST] <Guest24723> well the thing is: I dissolve the videos into single frames antway, so in the end I can get the lengtg of my frame list
[16:20:34 CEST] <Guest24723> but for estimating the remaining time, progress and stuff, it would be really awesome to know how many frames are left or in the video before the end
[16:23:35 CEST] <Mavrik> -count_frames is reliable if you count video frames
[16:23:44 CEST] <Mavrik> but it'll of course require csanning the file from side of ffprobe
[16:27:39 CEST] <Guest24723> Mavrik: is there a way that I get only the frame count?
[16:28:07 CEST] <Guest24723> Mavrik: if I do ffprobe -count_frames it outputs some dozen lines
[16:28:23 CEST] <Mavrik> You'll process it anyway right?
[16:28:31 CEST] <Mavrik> Use JSON or whatever output and grab only that output
[16:28:37 CEST] <Mavrik> -show_streams will probably limit it
[16:28:53 CEST] <Mavrik> Look up the formatting options and don't parse text ffs -_-
[16:29:09 CEST] <Guest24723> Mavrik: thank you
[16:29:15 CEST] <Guest24723> Mavrik: I'll try a bit
[16:36:02 CEST] <defanor> oh, noticed it before, but forgot about it: nginx-rtmp-module's vod appears to work for http sources, but i have rtsp here. and they are dynamic (new streams can be added anytime, not that handy to use a configuration file), too. so my above question stands, apparently. though if i'm missing something about nginx-rtmp-module, some pointers on that would also be appreciated; it indeed feels wrong to write a new streaming server
[16:38:12 CEST] <Guest24723> Mavrik: my command is "ffprobe -v quiet -i <filename> -show_format -print_format json -show_streams
[16:38:15 CEST] <Guest24723> "
[16:40:28 CEST] <Guest24723> Mavrik: if I now grep in the json output for NUMBER_OF_FRAMES I get: 34771, 62459, 285, 274, 34652, 62236, 334, 296, 333
[16:40:41 CEST] <Guest24723> I need something like 34764
[16:40:48 CEST] <furq> Guest24723: -count_frames -select_streams v:0 -show_entries stream=nb_read_frames -of default=nk=1:nw=1
[16:44:18 CEST] <Guest24723> furq: does it quit? or does the process stays open?
[16:49:04 CEST] <kepstin> Guest24723: if your media source is infinitely long, it'll stay open.
[16:49:15 CEST] <kepstin> so don't run it on a webcam or live stream?
[16:49:30 CEST] <Guest24723> kepstin: its a 20minute TV series file
[16:49:48 CEST] <Guest24723> but it stayed open for like 5 minutes
[16:50:16 CEST] <kepstin> Guest24723: it should be mostly limited based on disk io as it reads through the file to count the frames
[16:57:47 CEST] <Guest24723> thanks for you help
[16:58:05 CEST] <Guest24723> I have to look on that problem again later
[16:58:13 CEST] <Guest24723> have to go
[16:58:16 CEST] <Guest24723> thanks :)
[18:44:31 CEST] <FishPencil> Assuming only software players will be used to decode, is x265 10-bit going to provide the best compression and best quality?
[18:52:12 CEST] <leif> Does anyone know why some builds of ffmpeg have the Buffersink Parameters and some don't? (As described here: https://www.ffmpeg.org/doxygen/trunk/group__lavfi__buffersink__accessors.html)
[18:52:37 CEST] <leif> Namely, the `master` github branch does. As well as the archives you can download from the ffmpeg website.
[18:52:56 CEST] <leif> But say, tag: `n3.3.2` doesn't seem to have any of them.
[18:53:09 CEST] <leif> (Such as say: av_buffersink_get_w)
[18:56:14 CEST] <relaxed> leif: what do you mean by archives?
[18:57:18 CEST] <leif> relaxed: The ones from here: http://ffmpeg.org/download.html
[18:57:50 CEST] <leif> Like, if I download version 3.3.2 on the website, those accessors (such as av_buffersink_get_w) are included in libavfilter/buffersink.h
[18:58:23 CEST] <leif> But, if I download the git repo, and checkout the n3.3.2 tag, there is no buffersink accessors.
[19:07:36 CEST] <leif> relaxed: Actually, maybe it would make more sense to ask this on #ffmpeg-devel?
[19:07:48 CEST] <leif> (Since it involves the git repo itself)
[19:09:00 CEST] <relaxed> both git master and n3.3.2 have av_buffersink_get_w, so I don't know what's going on
[19:09:43 CEST] <leif> Hmm...that's very strange.
[19:10:50 CEST] <relaxed> maybe it's your git foo
[19:11:05 CEST] <leif> perhaps
[19:11:07 CEST] <leif> https://gist.github.com/LeifAndersen/146fbf6dae9cfa0232efa6b863799d6f
[19:11:40 CEST] <jkqxz> http://git.videolan.org/?p=ffmpeg.git;a=blob;f=libavfilter/buffersink.h;h=f51fa7c1dd14ec1a9235f14cf27dccfd7ba2f1e0;hb=6d7192bcb7bbab17dc194e8dbb56c208bced0a92#l114
[19:12:11 CEST] <jkqxz> You've checked out 3.2.2 there, not 3.3.2.
[19:13:00 CEST] <leif> jkqxz: oh...facepalm.
[19:13:02 CEST] <leif> Thank you. :)
[19:13:08 CEST] <leif> That absolutely fixed it.
[19:13:58 CEST] <leif> I take it that av_buffersink_get_w was a recent addition to libavfilter?
[19:15:10 CEST] <relaxed> I think you found that out the hard way, right? :P
[19:34:16 CEST] <leif> relaxed: Ya...I did.
[19:34:41 CEST] <leif> Fortunately it was only a wrong version...and not that I was accidentally using something that wasn't part of the public API/ABI...
[20:08:46 CEST] <ChocolateArmpits> How are debug builds different to normal builds?
[20:10:07 CEST] <Blubberbub> they contain debug symbols that can be used by gdb/valgrind or similar tools *guess*
[20:12:33 CEST] <furq> good guess
[20:12:36 CEST] <furq> also -O0 obviously
[20:36:51 CEST] <DHE> isn't ffmpeg already built with debug symbols? ffmpeg_g is built with them...
[20:37:20 CEST] <Blubberbub> from looking at the build log ffmpeg is created by removing said debug symbols from ffmpeg_g
[20:38:04 CEST] <Blubberbub> at least thats what it looked like when i did make
[20:38:07 CEST] <DHE> from the configure script it passes some extra options for asm debugging and disables some inline assembly
[20:39:55 CEST] <DHE> gcc has an option -Og for debug-friendly optimizations so it's not a total -O0 build..
[20:40:15 CEST] <DHE> dunno if it's available in only certain versions though. gcc's changed a lot in the last few years
[21:02:12 CEST] <c7j8d9> how do you get the equivalent hevc 10bit hdr with vp9?
[21:05:02 CEST] <alexpigment> I noticed a change in speed when encoding Blu-ray recently compared to using an older version of ffmpeg. It looks like the defaults for open_gop and lookahead_threads
[21:05:18 CEST] <alexpigment> But I don't recall how to explicitly set lookahead threads
[21:05:56 CEST] <alexpigment> i guess it's -x264params lookahead_threads=1 ?
[21:07:06 CEST] <alexpigment> answered my own question there. nm :)
[21:07:34 CEST] <DHE> I don't see a distinct option for it, so yes that's what you'd do
[21:07:51 CEST] <alexpigment> yeah, i was thinking there was an ffmpeg generic option for it, but I guess not
[21:08:21 CEST] <alexpigment> does it make sense to you that lookahead_threads 2 would encode slower than lookahead_threads 1?
[21:08:35 CEST] <alexpigment> i don't know enough about how it works under-the-hood to know for sure
[21:09:03 CEST] <DHE> iirc the lookahead threads run at low priority. so more lookahead threads running at low priority might be problematic
[21:09:17 CEST] <DHE> but don't quote me on that
[21:09:21 CEST] <alexpigment> interesting. well I'll do some more benchmarking on this then
[21:09:43 CEST] <alexpigment> there's also the change in open_gop, which is weird because I was explicitly setting open_gop before - it just wasn't accepting it at the time I guess
[21:10:23 CEST] <alexpigment> i don't know what sort of speed difference that would cause, but I'll chime back in when I know something (if anyone cares to know for their own purposes)
[21:10:51 CEST] <DHE> opengop is usually a bitrate/quality advantage
[21:11:11 CEST] <alexpigment> right
[21:11:20 CEST] <alexpigment> i've just never known if it changes encoder speed
[21:12:30 CEST] <alexpigment> for blu-ray at high bitrates, speed often is a bigger benefit in my book. it's easy to be above bitrate saturation for a standard-length video
[21:13:07 CEST] <alexpigment> unlike dvd where you're fighting to squeeze every bit of quality you can out of your limited bitrate
[21:13:38 CEST] <furq> c7j8d9: build libvpx with --enable-vp9-highbitdepth
[21:14:13 CEST] <c7j8d9> awesome furq thanks
[21:14:24 CEST] <alexpigment> furq: for my own info, is vp9 like x265 where you have to have two separate copies for 8-bit and 10-bit?
[21:14:36 CEST] <furq> x264, and i don't think so
[21:15:48 CEST] <c7j8d9> a 10bit x265 can play in 8bit on a device that only does 8bit?
[21:16:12 CEST] <furq> no
[21:16:15 CEST] <kepstin> c7j8d9: if the device doesn't support the H.265 profile used, then it won't decode
[21:17:17 CEST] <kepstin> many pc players, for example, support decoding 10bit h265 then convert to 8bit (dithering, etc) for display
[21:17:42 CEST] <c7j8d9> okay...was confused on alexpigment 's question. must be an encoding question
[21:18:41 CEST] <furq> c7j8d9: with x264 you need to have two separate copies of libx264 to encode 8-bit or 10-bit
[21:18:47 CEST] <kepstin> alexpigment: for x265 you can do a funky build thing that merges the 8, 10, and 12 bit builds into a single .so file
[21:18:49 CEST] <furq> due to some deficiency in the library design
[21:19:04 CEST] <c7j8d9> got it
[21:21:22 CEST] <kepstin> I think the x264 devs have done some of the work towards a solution similar to what x265 does, but I have no idea what the plans or timeline for that are.
[21:22:44 CEST] <kepstin> In gstreamer they gave up waiting, and added a wrapper loader of their own that tries to find both 8 and 10 bit x264 via a configurable path search.
[21:23:18 CEST] <kepstin> (loading it at runtime rather than linking at compilation time)
[21:24:43 CEST] <furq> it doesn't really matter at this point
[21:24:48 CEST] <furq> nothing supports hi10p anyway
[21:25:10 CEST] <furq> main10 is actually widely supported so it would be a real pain if x265 couldn't do it in one build
[21:25:25 CEST] <furq> but only mega nerds are encoding hi10p and they can deal with LD_LIBRARY_PATH
[21:25:41 CEST] <kepstin> well, not in hardware, yeah. pretty sure that h264 hi10p is mostly used by anime pirates nowadays.
[21:25:46 CEST] <furq> yup
[21:26:06 CEST] <furq> like that guy with the straw hat and the rubber arms
[21:26:10 CEST] <furq> he loves hi10p
[21:28:40 CEST] <kepstin> hmm, I was thinking more of the lanky guy with the gun-sword and space sailboat thing, but sure.
[21:36:52 CEST] <akw> Hi, I have a ffmpeg question. Anyone here to help?
[21:36:52 CEST] <alexpigment> furq: are you sure? I know this wasn't true on Windows FFMPEG builds with x265 as recently as 2 months ago
[21:37:06 CEST] <furq> ?
[21:37:28 CEST] <alexpigment> i know we've talked about it several times, but within FFMPEG (at least on Windows), you can't encode both 8-bit and 10-bit x265
[21:37:46 CEST] <furq> 20:18:47 ( kepstin) alexpigment: for x265 you can do a funky build thing that merges the 8, 10, and 12 bit builds into a single .so file
[21:37:49 CEST] <furq> i was referring to this
[21:37:54 CEST] <furq> idk if you can do that on windows
[21:38:02 CEST] <furq> and i assume that doesn't ever work with static builds
[21:38:03 CEST] <alexpigment> yeah, I think we came to the conclusion that you can't
[21:38:21 CEST] <alexpigment> either way, just throwing that out there in case it was relevant to whoever was reading above :)
[21:41:27 CEST] <akw> Anyone here, who can help me with a coding problem? I would like to decode a frame with AV_CODEC_ID_HEVC and want the decoder to scale the AVFrame while decoding. I don't want to scale afterwards (with swscale or something). A scale factor with the power of 2 would be sufficient.
[21:41:51 CEST] <akw> Is it possible to tell the AVCodecContext a scale factor or something?
[21:42:36 CEST] <akw> See also https://stackoverflow.com/questions/45223758 for reference..
[21:44:10 CEST] <JEEB> no
[21:44:13 CEST] <JEEB> avcodec just decodes
[21:45:06 CEST] <JEEB> some formats might have had possibilities for lower res decoding (JPEG2000 has it in theory and mpeg-1/2/4 IIRC in theory could be lowres decoded), but modern formats don't accomodate for that
[21:46:08 CEST] <JEEB> if you need to scale, use a scaler. either swscale (scale filter) or zimg (zscale filter) or something else
[21:48:19 CEST] <akw> Oh, this is sad.. I thought, if it is possible with libjpeg (jpeg_decompress_struct.scale_num and scale_denom), it should be possible with H.265 too..
[21:49:56 CEST] <JEEB> nope
[21:51:52 CEST] <akw> The background is, I have written some code to decode HEIF images. For decoding the actual HVC1 boxes I use ffmpeg, which works fine. An image taken with an iPhone 7 and iOS11 is stored as an HEIF picture. It is a grid containing 48 512x512 pixel frames, which have to be composed.
[21:53:01 CEST] <akw> There is a low-res thumbnail (320x240) in the HEIF file, but this is too low-res.. If I want to have a little higher resolution, I have to decode all the 8x6 (48) 512x512 pixel frames.
[21:54:49 CEST] <kepstin> yeah, modern video codecs have substantially fancier stuff, like intra block prediction, which means that you can't really decode at anything other than native resolution.
[21:55:22 CEST] <kepstin> I mean, if it was a consideration when designing the codec, it maybe could have been added, but, yeah.
[21:55:46 CEST] <furq> lol HEIF
[21:55:53 CEST] <furq> i knew it wouldn't be long before it was causing shitshows
[21:55:54 CEST] <JEEB> don't laugh, apple went in for it
[21:56:04 CEST] <furq> that is precisely why i get to laugh at it
[21:59:20 CEST] <furq> i'm using this brief window of opportunity before i can only cry about it
[21:59:29 CEST] <akw> I mean, it's nice, it reduces memory consumption and the 512x512 pixel tiles allow neat multi-processing. This might work well for the iPhone, but not for my target platform. It is a pity that there is no better way than decoding all the stuff and then scaling.
[22:00:02 CEST] <JEEB> /3/
[22:02:12 CEST] <Mavrik> Oh man.
[22:02:34 CEST] <Mavrik> Incoming 8548943 posts about how stuff sucks for not supporting HEIF.
[22:06:25 CEST] <kepstin> hmm, there's svc extensions for hevc, aren't there?
[22:06:40 CEST] <kepstin> I assume you're not allowed to use them in heif of course :)
[22:10:52 CEST] <JEEB> lol scalable coding
[22:11:22 CEST] <JEEB> I think I've only heard of some cisco thing using it for AVC back in the day
[22:11:27 CEST] <JEEB> for teleconferences
[22:11:37 CEST] <kepstin> but unlike e.g. jpeg progressive encoding, i'd expect most svc mechanisms hurt efficiency rather than help
[22:19:31 CEST] <akw> hmm
[22:19:33 CEST] <akw> okay
[23:17:33 CEST] <slug> Hey, I want to create a 3x2 tile covering the duration of a movie ( I have the duration )  how do I do this
[23:18:05 CEST] <c_14> split the video into 6 equal parts and then use the tile filter?
[23:18:22 CEST] <slug> am after a 1 liner
[23:18:53 CEST] <slug> something like thi s but to cover the whole movie -frames 1 -vf "select=not(mod(n\,185)),scale=800:600,tile=2x3" -y
[23:20:26 CEST] <c_14> -filter_complex [0:v]trim=s=0:d=x[v1];[0:v]trim=s=x:d=x[v2];[0:v]trim=s=2*x:d=x[v3];...;[v1][v2][v3][v4][v5][v6]tile=3x2[vout] -map [vout]
[23:20:45 CEST] <c_14> needs escaping, replacing of x and filling of ellipses and the input and output
[23:21:48 CEST] <slug> wow ok
[23:21:51 CEST] <slug> that looks mad
[23:22:10 CEST] <slug> so each x would be my $DURATION ?
[23:22:19 CEST] <c_14> duration/6
[23:22:41 CEST] <slug> ok, what do you mean by filling of ellipses
[23:22:58 CEST] <c_14> those ... in the middle there
[23:23:04 CEST] <c_14> needs 3 more of those things before it
[23:23:07 CEST] <c_14> for v4 through v6
[23:24:01 CEST] <slug> right ok , I'll give this a shot
[23:34:59 CEST] <XHFHX> Hi there. Is there a chance I can write some kind of C/C++ script that manipulates where ffmpeg/x264 creates an I frame?
[23:35:22 CEST] <c_14> "script"
[23:35:27 CEST] <c_14> ffmpeg has the force_key_frames option
[23:35:44 CEST] <c_14> you can probably also do the same thing using the libraries
[23:36:48 CEST] <XHFHX> I know I can manipulate it with -g, i can force there that only every x frames there is an i frame
[23:37:27 CEST] <Threads> https://ffmpeg.org/ffmpeg.html#Advanced-Video-options
[23:41:13 CEST] <XHFHX> thx
[23:41:33 CEST] <XHFHX> i think force_key_frames could be the saviour
[23:42:58 CEST] <JEEB> for x264 there's a libx264 parameter called scenecut
[23:43:03 CEST] <JEEB> if you really, really need static GOPs
[23:43:10 CEST] <JEEB> you set -x264-params scenecut=0
[23:43:27 CEST] <JEEB> and x264-params is an option through the API as well for libx264
[23:43:41 CEST] <JEEB> (it passes key=value pairs straight to libx264)
[23:44:16 CEST] <JEEB> not sure what force_key_frames does, but at least for fully static GOPs disabling scenecut is the x264-recommended way of doing it
[23:48:55 CEST] <XHFHX> i actually want to mash the video by dropping some I frames and continuing with some P frames from another scene
[23:56:18 CEST] <JEEB> good luck matching parameter sets
[00:00:00 CEST] --- Fri Jul 21 2017



More information about the Ffmpeg-devel-irc mailing list