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

burek burek021 at gmail.com
Fri Jun 30 03:05:01 EEST 2017

[00:01:09 CEST] <JEEB> nicolas17: often that ends up being simpler than you'd think
[00:03:13 CEST] <nicolas17> JEEB: I want to encode a bunch of JPEG images into mp4/x264 (or losslessly mux them into mkv so I can do the actual transcoding with ffmpeg later), but altering the PTS with custom logic
[00:04:34 CEST] <nicolas17> and I don't have audio to deal with, so yeah, I'll give it a try
[00:05:35 CEST] <Tatsh> lossy to lossy = bad
[00:05:36 CEST] <Tatsh> :P
[00:09:33 CEST] <nicolas17> Tatsh: hm?
[00:10:55 CEST] <nicolas17> Tatsh: transcoding JPEG to x264 is bad? I'll post this 29GB video online then :P
[00:11:22 CEST] <alphabitctiy> I'm trying to transcode a live RTSP stream and am seeing some A/V desync in the output. Anyone have any tips or flags I can try? Thank you!
[00:32:45 CEST] <JodaZ> alphabitctiy, tried the async option?
[00:35:07 CEST] <JodaZ> alphabitctiy, check the manual for that option, around it there are a few other things in the manual that might help
[00:36:03 CEST] <alphabitctiy> JodaZ: Thanks! yes, we just tried aresample, which apparently is replacing async .. and it seems to be working great
[01:03:32 CEST] <classsic> hi
[01:03:57 CEST] <classsic> is correct ffmpeg generate greater bitrate than input when use "crf 0" ???
[01:04:48 CEST] <klaxa> usually yes
[01:04:55 CEST] <klaxa> it's lossless
[01:22:25 CEST] <classsic> ok, thanks.
[01:35:16 CEST] <nicolas17> how do I read a sequence of images (as in -f image2) using the API?
[01:35:34 CEST] <nicolas17> am I supposed to pass the wildcard as the url in avformat_open_input?
[01:35:39 CEST] <nicolas17> also should I be asking in -devel? :)
[01:35:42 CEST] <JEEB> no
[01:35:45 CEST] <DHE> you can still treat it as ffmpeg handles it and let image2 do the heavy lifting.
[01:35:46 CEST] <JEEB> -devel is for internals
[01:41:29 CEST] <nicolas17> yeah looks like I need something fancier here :P avformat_open_input(ctx, "*.jpg", av_find_input_format("image2"), NULL) is not enough
[02:39:58 CEST] <nicolas17> ughhhh I figured it out
[02:40:26 CEST] <nicolas17> of course it fails, it would fail in ffmpeg too
[02:40:34 CEST] <nicolas17> I'm passing -pattern_type glob to ffmpeg, I need to do the same in the API
[02:42:59 CEST] <nicolas17> works now \o/
[02:44:52 CEST] <nicolas17> well, avformat_open_input doesn't throw an error
[06:19:03 CEST] <Aprel> Does hevc_nvenc (hardware encoding with nVidia gfx) have configuration options? I'm trying different ffmpeg flags but the video file output is the same size. Is there a config setting for hevc_nvenc for "same quality"?
[09:40:03 CEST] <albb> Hi all someone can help me with this error using ffmpeg?  Unrecognized option 'x264opts'. Error splitting the argument list: Option not found
[09:42:38 CEST] <bencoh> first ffmpeg -codecs | grep x264 to see whether your ffmpeg has support for libx264
[09:43:21 CEST] <albb> ffmpeg version N-86654-gd2ef9e6 Copyright (c) 2000-2017 the FFmpeg developers   built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.3)   configuration: --disable-x86asm   libavutil      55. 67.100 / 55. 67.100   libavcodec     57.100.102 / 57.100.102   libavformat    57. 75.100 / 57. 75.100   libavdevice    57.  7.100 / 57.  7.100   libavfilter     6. 94.100 /  6. 94.100   libswscale      4.  7.101 /  4.  7.101   libswresample   2.  8.100 
[09:44:22 CEST] <albb> there is not libx264, but iif I go in the ffmpeg directory (in Home), there I see the x264 executable and others..
[09:45:26 CEST] <albb> I followed the step by step  compiling guide of ffmpeg.org here https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu
[09:52:47 CEST] <albb> This is the pastebin complete issue
[09:52:48 CEST] <albb> https://pastebin.com/PXcakdHA
[10:27:25 CEST] <termos> is there a way to artificially add delay to the output of FFmpeg?
[10:27:46 CEST] <squ> operating system priorities
[10:27:51 CEST] <squ> shell suspend
[10:28:46 CEST] <termos> looking to do it only for certain outputs, hoping there would be some way to introduce the delay in the muxing step
[10:29:47 CEST] <squ> I would wrap it in a perl script which parses the output to send suspend signal to running ffmpeg process
[10:32:27 CEST] <albb> squ, can you help me with my issue?
[10:33:10 CEST] <squ> haven't read it, too much text, sorry
[10:33:36 CEST] <squ> could read a 255 character question if you make one
[10:35:32 CEST] <memphisw> Hi, i want to use ffmpeg in my cpp program. And what i found in the Internet is all about using command line tool. where can i get tutor about how to use ffmpeg by lib? or is't recommended using command line tool ?
[10:36:46 CEST] <albb>    https://pastebin.com/pHJME3AG
[10:37:08 CEST] <albb> squ, this is the problem, I have put all the commands on the bash and the relative output to see what is missing
[10:37:46 CEST] <termos> memphisw: I would look at the examples in the doc folder, this is what I base most of my implementations on: https://github.com/FFmpeg/FFmpeg/tree/master/doc/examples
[10:37:46 CEST] <memphisw> i search cmdutils.c, hoping to find out how ffmpeg command line tool using libs, but it's so compicated and needs alot of work to learn.
[10:39:28 CEST] <dystopia_> albb
[10:39:34 CEST] <dystopia_> 1 - load a scaler
[10:40:03 CEST] <albb> dystopia what scaler?
[10:40:06 CEST] <dystopia_> 2 - -x264-params is wrong, use "-c:v libx264 YOUR PARAMS HERE"
[10:40:15 CEST] <dystopia_> any you want
[10:40:17 CEST] <memphisw> termos: ok, i should take a look, i hope it wont take a long time.
[10:40:17 CEST] <dystopia_> i use spline
[10:40:35 CEST] <albb> I'm a newbie I have not understood
[10:40:36 CEST] <squ> memphisw: http://www.videolan.org/developers/x264.html
[10:40:36 CEST] <dystopia_> -sws_flags spline -s 704x396
[10:40:53 CEST] <albb> Should I use a different command?
[10:41:37 CEST] <dystopia_> just remove -x264-params
[10:42:08 CEST] <albb> ok and then?
[10:42:13 CEST] <dystopia_> and change "-vf "scale=426:240" to "-sws_flags spline -s 426:240"
[10:42:15 CEST] <dystopia_> and try again
[10:42:26 CEST] <albb> Ok wait
[10:43:26 CEST] <Ixantir> hey
[10:44:12 CEST] <Ixantir> using ShareX it just grabbed this app, is there a video tutorial on how to set up sharex specifically for gifs?
[10:44:37 CEST] <albb> [NULL @ 0xa3969c0] Unable to find a suitable output format for 'keyint=60:min-keyint=60:no-scenecut' keyint=60:min-keyint=60:no-scenecut: Invalid argument
[10:45:16 CEST] <squ> dystopia_: why -vf scale to be replaced with sws ?
[10:45:46 CEST] <squ> this is something new I didn't know about
[10:46:10 CEST] <albb> ffmpeg -hide_banner -i Helicopter.mp4 -threads 0 -sws_flags spline -s 426:240 -c:v libx264 -preset slow -profile:v main -level 4 -g 60 -keyint_min 60 "keyint=60:min-keyint=60:no-scenecut" -b:v 300k -maxrate 300k -bufsize 600k -r:v 30 -an -y -f mp4 Helicopter_240p_300.mp4
[10:46:21 CEST] <albb> This is what I did, and that's the error
[10:47:37 CEST] <dystopia_> no idea then albb :|
[10:48:50 CEST] <squ> text in a string is treated as output file
[10:49:17 CEST] <memphisw> squ: im not just play video, i want to edit some frame of it. maybe vlc is not what i want?
[10:49:19 CEST] <Ixantir> urk and messed the ffmpeg path up
[10:49:47 CEST] <squ> memphisw: what that link has to do with vlc
[10:52:58 CEST] <memphisw> squ: oh i thought that is a vlc page, so i can use x264 to edit mp4?
[10:53:18 CEST] <squ> how about reading
[10:53:44 CEST] <memphisw> sorry i'm new in this field, lack lots of knownlage
[10:53:53 CEST] <squ> you can start by reading
[10:53:54 CEST] <Ixantir> pretty much the same
[10:58:17 CEST] <Ixantir> all i'm seeing are flv and mkv notes
[11:00:30 CEST] <Ixantir> so it wants to take mp4 rather than .gif
[11:00:46 CEST] <Ixantir> and all the notes on gif from the wiki are about crashes rather than anything condusive
[11:37:43 CEST] <jkqxz> zalaare:  <https://github.com/01org/intel-vaapi-driver/pull/214>
[12:16:21 CEST] <ciripi> morning guys
[12:16:26 CEST] <ciripi> i need some help please
[12:16:33 CEST] <ciripi> if anyone is available
[12:17:20 CEST] <JEEB> you note your thing and then stay put
[12:17:34 CEST] <JEEB> if you ever want to get helped
[12:18:33 CEST] <ciripi> yes
[12:18:52 CEST] <ciripi> i have multiple streams and i want to trancode them to facebook live
[12:19:26 CEST] <ciripi> ffmpeg -re -i "http://domain/x/x/input.m3u8" -acodec libmp3lame -ar 44100 -b:a 128k -pix_fmt yuv420p -profile:v baseline -s 426x240 -bufsize 6000k -vb 400k -maxrate 1500k -deinterlace -vcodec libx264 -preset veryfast -g 30 -r 30 -f flv "rtmp://rtmp-api.facebook.com:80/rtmp/111111111111111?ds=1&a=XXXXXXXXXXXXXXXXX"
[12:19:36 CEST] <ciripi> but with this command seems i can run only one instance
[13:21:09 CEST] <chris_99> hey, has anyone seen an error like this before https://gist.github.com/anfractuosity/17aa7310665ea936cd817e6a328530f5 'av_interleaved_write_frame(): Broken pipe'
[13:21:16 CEST] <chris_99> using 'ffmpeg version N-86575-g04aa09c Copyright (c) 2000-2017 the FFmpeg developers'
[13:21:35 CEST] <chris_99> i can give my full command i used if that helps too
[13:21:59 CEST] <squ> yes
[13:22:12 CEST] <squ> I mean yes paste the command line
[13:22:41 CEST] <chris_99> ok, if you refresh that gist you'll see it
[13:22:42 CEST] <chris_99> cheers
[13:23:10 CEST] <squ> -i /dev/zero
[13:23:13 CEST] <squ> ?
[13:23:42 CEST] <squ> making a null sound?
[13:23:53 CEST] <chris_99> yeah
[13:24:08 CEST] <chris_99> so the error only happens after a while, it streams fine for a while
[13:24:20 CEST] <squ> -f is the file format, like mp4
[13:24:38 CEST] <squ> -f h264  -f flv
[13:24:38 CEST] <chris_99> yeah it uses flv encapsulation
[13:24:55 CEST] <chris_99> the first one is to specify the input format
[13:24:56 CEST] <squ> is it ok to have two -f
[13:25:01 CEST] <squ> I see
[13:25:22 CEST] <chris_99> i can't tell if the issue is with ffmpeg atm
[13:25:25 CEST] <chris_99> or with raspivid
[13:25:29 CEST] <chris_99> it's hard for me to tell
[13:25:59 CEST] <squ> let's try encoding just file without pipe
[13:26:43 CEST] <chris_99> the thing is, the issue happens after a long while, like after hours, so it's hard to know why it happens, normally it's fine
[13:27:19 CEST] <squ> right, I see it now: Broken pipek time=02:18:08.45
[13:29:05 CEST] <chris_99> if you refresh, i also added a message from the pi's videocore, but that is beyond me
[13:33:01 CEST] <squ> googling EINVAL shows socket is closed?
[13:35:03 CEST] <squ> is that all or something else above that einval?
[13:38:51 CEST] <chris_99> hmm, squ, do you think that means the rtmp socket, it's confusing to me, which pipe is closed
[13:39:21 CEST] <squ> first one
[13:39:37 CEST] <chris_99> you mean the raspivid --> ffmpeg one?
[13:39:44 CEST] <squ> that which gives einval
[13:40:01 CEST] <squ> ffmpeg replies with broken pipe
[13:40:35 CEST] <chris_99> could it not be ffmpeg ---> youtube though? because 'av_interleaved_write_frame(): Broken pipe' wouldn't that be sending frames to youtube normally
[13:41:04 CEST] <squ> no its that one with EINVAL
[13:41:20 CEST] <squ> it should also say why it errors
[13:41:54 CEST] <squ> redirect error output to two different files
[13:43:13 CEST] <chris_99> good point, afaik that's the only thing that was printed that i could see though, the main gist message.  When it happens again, i'll see if i can hook gdb to raspivid maybe
[13:43:32 CEST] <chris_99> thanks a lot for pointing me in the right direction
[13:43:56 CEST] <squ> I googled that thing and found it should show something like no memory or no space https://www.raspberrypi.org/forums/viewtopic.php?t=142280&p=940743
[13:44:05 CEST] <squ> before einval
[13:46:14 CEST] <chris_99> someones mentioned to me before about ensuring enough gpu ram, that was set to 256M which seems to be above what they recommend. i'll see if anyone else has this error with high gpu ram set
[13:48:54 CEST] <squ> don't forget to reply what the problem was
[13:49:17 CEST] <chris_99> mm will do
[15:07:40 CEST] <_julian> hi
[15:08:06 CEST] <_julian> if I confiure ffmpeg with --enable-mediacodec, will it automatically enable the mediacodec hwaccels?
[15:37:33 CEST] <DHE> they will become available. you may still need to explicitly select the codecs on your ffmpeg commandline. there's a wiki article with more info on hwaccels
[15:38:11 CEST] <DHE> oh that's the android API...
[15:46:34 CEST] <Th3On3> who can help me on a problem building ffmpeg under windows ? on #ffmpeg-devel there is no help... :(
[15:47:24 CEST] <Th3On3> hi there... i am trying to build ffmpeg under windows, using msys2 and after i installed the packages needed to build, i go to ffmpeg rootpath i execute a default command: "./configure --arch=x86 --target-os=mingw32 --cross-prefix=i686-w64-mingw32- --pkg-config=pkg-config" and i get a "Unknown option: --target-os=mingw32". What am i doing wrong ?????
[16:03:16 CEST] <BtbN> Do you even need all that cross compile stuff? You're compiling natively after all.
[16:03:36 CEST] <BtbN> Anyway, that commandline looks fine for a cross compile. Are you building latest master?
[16:14:41 CEST] <Th3On3> BtbN: hey ty
[16:15:01 CEST] <Th3On3> BtbN: i am buiding the version "inside" xbmc
[16:15:13 CEST] <BtbN> hm?
[16:15:50 CEST] <Th3On3> BtbN: the version builded and used by xbmc build scripts
[16:16:04 CEST] <BtbN> Well, they somehow messed up the configure script then. Use an official one
[16:16:12 CEST] <Th3On3> ok
[16:16:34 CEST] <BtbN> also, if you're actually using xbmc, it must be terribly outdated
[16:17:49 CEST] <Th3On3> BtbN: version 3.3.2
[16:19:19 CEST] <Th3On3> i think is the last stable
[16:19:28 CEST] <BtbN> it is. But it can't really be xbmc then
[16:20:08 CEST] <Th3On3> i think the problem is some package is not installed (msys2) or not working correctly...
[16:21:17 CEST] <Th3On3> yes... i have the same problem with ffmpeg-3.3.2 officila... then its other packege that is not installed
[16:21:25 CEST] <Th3On3> or not working
[16:24:51 CEST] <BtbN> It's the configure script complaining about an unknown option which is clearly should know. Something is very wrong with your environment if this happens with an official tarball or git
[16:28:02 CEST] <Th3On3> BtbN: yes... its my env... but i can not figure out
[16:28:21 CEST] <BtbN> paste the entire invocation and output
[16:28:26 CEST] <Th3On3> ok
[16:29:14 CEST] <Th3On3> i will try to buil official ffmpeg on my env
[16:29:20 CEST] <Th3On3> and paste the output
[16:30:35 CEST] <BtbN> your exact commandline works perfectly fine for me, so if you have an official ffmpeg source tree, it can only be your build env
[16:30:46 CEST] <BtbN> It looks more like a replaced/broken configure script to me though
[16:33:31 CEST] <Th3On3> BtbN: My env variables: https://pastebin.com/qAyc9ZCu
[16:33:48 CEST] <BtbN> No env variable can break configure in that way.
[16:33:54 CEST] <Th3On3> BtbN: my installed packages: https://pastebin.com/0k9pLn7j
[16:34:17 CEST] <Th3On3> BtbN: output: https://pastebin.com/aMvr8G1j
[16:45:45 CEST] <The_8472> is it save to feed image2 muxer with packets populated from multiple png encoders? to do the encoding on different threads.
[16:45:49 CEST] <The_8472> *safe
[17:03:34 CEST] <chris_99> squ, i'm 80% certain i know what the problem is, i can get the same errors in vcdbg, by disconnecting the router from the Internet
[17:04:16 CEST] <chris_99> (vcdbg is what prints the raspberry pi's videocore messages, which i showed before with the einval messages)
[17:10:13 CEST] <ThugAim> Hey guys. Been doing XDCAM EX 35 conversions of some recordings for edit, is there a way to enable smart rendering for Adobe Premier Pro?
[17:10:37 CEST] <ThugAim> or at least to find out the exact settings of the XDCAM preset adobe uses in MXF?
[17:37:35 CEST] <spencer> Hi, I am trying to encode streaming video to jpegs. I was able to do this with ffmpeg cli via the -r '30000/1001' flag. I want to do this with libav* now. I have tried setting the mjpeg codec ctx time base to 30000/1001 but my output is always the same framerate.
[17:38:59 CEST] <spencer> I'm having trouble forcing the output framerate. How does libav* handle the -r switch internally?
[17:39:28 CEST] <kepstin> spencer: the ffmpeg command line tool implements -r by using libavfilter and adding an "fps" filter
[17:39:35 CEST] <kepstin> as an output option
[17:39:46 CEST] <kepstin> if you're talking aabout -r as an input option, um...
[17:40:20 CEST] <kepstin> I think the ffmpeg cli tools just "manually" sets the timebase and pts on each frame, in that case?
[17:40:30 CEST] <spencer> This is for output option
[17:40:48 CEST] <spencer> I think you may have pointed me in the right direction - I will look at libavfilter source code!
[17:41:12 CEST] <zalaare> jkqxz: PR looks to solve my issue for sure.  too bad my testing showed VP9 still isn't worth .02
[18:23:04 CEST] <thebombzen> atomnuker: I just read this in the manpages: "This encoder is the default AAC encoder, natively implemented into FFmpeg. Its quality is on par or better than libfdk_aac at the default bitrate of 128kbps."
[18:23:17 CEST] <thebombzen> Does this make avcodec's aac encoder the best aac encoder around now?
[18:23:19 CEST] <furq> well he would say that wouldn't he
[18:24:37 CEST] <thebombzen> also do we know how it stacks up against libopus?
[18:25:06 CEST] <furq> we don't know any of these things until someone does a listening test
[18:25:07 CEST] <atomnuker> everything is worse than libopus
[18:25:18 CEST] <atomnuker> there, saved you a whole listening test
[18:25:59 CEST] <furq> how do you know that you're not secretly, a genious,
[18:38:18 CEST] <thebombzen> thanks, good to know lol
[18:38:31 CEST] <thebombzen> although I'll change my scripts to use aac over fdk_aac
[18:40:29 CEST] <atomnuker> nah, don't, make listening tests
[18:40:38 CEST] <atomnuker> either encoder has a chance to screw up
[18:40:55 CEST] <atomnuker> its just that one is an underdog so when it screws up its automatically the worst
[18:42:16 CEST] <furq> atomnuker: does the builtin encoder do vbr
[18:44:00 CEST] <atomnuker> yes
[18:44:28 CEST] <furq> is it any good
[18:44:34 CEST] <furq> and also what's the range for -q
[18:45:59 CEST] <IRC-Source_90991> Hi.. i am using ffmpeg to transcode a hls stream and playing out from a blackmagic card.i found when there is a drop in the source ffmpeg does not produce any output. Is there any that ican out a color bar or a pattern when the source get droped
[18:46:35 CEST] <atomnuker> furq: its alright, experiment but start with low values, e.g. 0.2
[18:47:10 CEST] <atomnuker> there is no range, the value gets multiplied by some constant and mapped to a constant rate control factor
[18:47:29 CEST] <furq> fun
[20:26:07 CEST] <Hfuy> Hello.
[20:27:17 CEST] <Hfuy> I'm attempting to convert a file from an uncompressed V210 AVI to ProRes, thus: https://pastebin.com/73rGyam4
[20:27:32 CEST] <Hfuy> Problem: Blacks become grey in the output. Looks like a studio-vs-full swing level issue.
[20:27:45 CEST] <Hfuy> Is there a commandline argument I can use to control the luma handling behaviour?
[20:29:58 CEST] <kerio> something something -vf colorspace
[20:30:21 CEST] <Hfuy> I've found -color_range but I'm not sure what the values mean. It calls one value "MPEG" and one value "JPEG" which doesn't seem to make much sense to me.
[20:30:23 CEST] <c_14> try adding -color_range pc before -i
[20:30:34 CEST] <c_14> jpeg is full range, mpeg is limited range
[20:30:35 CEST] <Hfuy> Oh, OK, I'll try that.
[20:30:53 CEST] <Hfuy> Yes I got the impression that JPEG meant full swing and MPEG meant studio swing but that's a very very odd naming convention.
[20:31:11 CEST] <ChocolateArmpits> I would suggest to run a waveform monitor on the video to really check it
[20:31:20 CEST] <Hfuy> Oh, I can see it quite clearly.
[20:31:52 CEST] <Hfuy> I can understand calling full range "PC"
[20:32:11 CEST] <ChocolateArmpits> the player you are using may also be treating both files differently
[20:32:22 CEST] <Hfuy> Yes it's a difficult problem.
[20:32:38 CEST] <ChocolateArmpits> not to mention graphics card settings also impact how color are rendered
[20:33:01 CEST] <Hfuy> I'm going with what Quicktime shows me, as it's a ProRes file and that's what the other guy will be using.
[20:34:54 CEST] <The_8472> \o/ finally got image2+png to use all cores. I was indeed holding it wrong
[20:35:13 CEST] <c_14> The_8472: I've heard sacrificing goats helps
[20:35:47 CEST] <nicolas17> The_8472: how did you do that?
[20:35:51 CEST] <Hfuy> Grr. VLC is the mostest wrongest video player.
[20:36:49 CEST] <The_8472> I was calling flush too often, writing avpacket in lockstep with each encoded frame instead of only writing the packets when the encoder indicated it did not need flushing
[20:37:31 CEST] <nicolas17> oh are you encoding to png?
[20:37:35 CEST] <The_8472> yeah
[20:38:35 CEST] <The_8472> 2 minutes instead of 5. not bad. need to assign some more cores to the VM.
[20:38:43 CEST] <ChocolateArmpits> Hfuy, try using mpv
[20:39:32 CEST] <Hfuy> MPV? I'll look it up.
[20:39:58 CEST] <Hfuy> In the meantime, I'm faced with a stark choice. Either get bigger disks, or stop using -qscale 9 and -profile 4 on 4K ProRes
[20:42:06 CEST] <nicolas17> Hfuy: I'm copying my raw material to an external hard disk so I can give it to a friend for him to upload to the cloud from the office, because from my home connection it will take like 15 days
[20:42:36 CEST] <nicolas17> is this what they call big data? :v
[20:43:01 CEST] <The_8472> sneakernet
[20:45:45 CEST] <Hfuy> yeah, sneakernet.
[20:46:04 CEST] <Hfuy> I just uploaded 1.2Gb in basically the time it took since my last comment.
[20:46:06 CEST] <Hfuy> So five minutes.
[20:46:11 CEST] <Hfuy> GB, I guess.
[20:46:16 CEST] <nicolas17> I have 260GB of JPEGs
[20:46:23 CEST] <nicolas17> and 1.5Mbps upstream
[20:47:44 CEST] <Hfuy> Oh, dear.
[20:47:51 CEST] <Hfuy> Where do you live, the Tri-Podunk Area?
[20:48:26 CEST] <nicolas17> Buenos Aires
[20:48:35 CEST] <nicolas17> 12Mbps down, 1.5Mbps up
[20:48:50 CEST] <Hfuy> Let's see what I get hgere
[20:49:20 CEST] <nicolas17> there's 25/3 and 50/6 plans now, I should check the prices...
[20:49:28 CEST] <Hfuy> 45 down, about 17 up
[20:49:34 CEST] <Hfuy> and that's not good for here
[20:49:48 CEST] <Hfuy> This is FTTC
[20:57:48 CEST] <Hfuy> do I want a -color_range PC on the output side, too
[20:58:20 CEST] <Hfuy> Sadly it complains [NULL @ 000000000036bf40] [Eval @ 000000000022e860] Undefined constant or missing '(' in 'PC'
[20:59:44 CEST] <Hfuy> It's happy with -color_range 2, though
[21:01:48 CEST] <Hfuy> Still got grey blacks in h.264 material, thus: https://pastebin.com/BUi513k4
[21:08:14 CEST] <The_8472> have you compared the embedded color metadata? mediainfo should be able to output them. ffinfo can show them too with some option, but imo mediainfo output is more readable
[21:09:20 CEST] <Hfuy> The problem I have is that there's approximately a lot of ways to alter this behaviour, right up to graphics card settings.
[21:10:01 CEST] <The_8472> well yeah, but the player should (hopefully) behave identically for your input and your output if the metadata is the same
[21:10:22 CEST] <Hfuy> I'm not sure that all formats even have that metadata, or that all players read it.
[21:10:38 CEST] <Hfuy> It's been a bugbear in computer video engineering for ages, and ffmpeg hasn't historically handled it that well
[21:11:41 CEST] <The_8472> well, i've seen it preserved in .mkv at least. not sure about .mp4
[21:13:30 CEST] <Hfuy> It varies.
[21:13:47 CEST] <nicolas17> what can't mkv do? :P
[21:14:11 CEST] <The_8472> play on toasters
[21:14:12 CEST] <Hfuy> As do people's browser and graphics card settings, monitor settings, player settings, shoe size and favourite food
[21:14:17 CEST] <Hfuy> all of which seems to affect things
[21:14:19 CEST] Action: Hfuy looks gloomy
[21:14:29 CEST] <nicolas17> video is hard
[21:15:28 CEST] <Hfuy> I'm a cameraman by trade. Tell me.
[21:16:10 CEST] <nicolas17> okay so
[21:16:14 CEST] <nicolas17> I'm checking formatCtx->streams[0]->codec->codec_type == AVMEDIA_TYPE_VIDEO
[21:16:17 CEST] <The_8472> on windows mpc-hc+madvr bypasses most gfx card shenanigans when it can. and it has a nice debug overlay that shows you the input (from codec) and output (to textures) modes
[21:16:28 CEST] <nicolas17> and I get a warning because 'codec' is deprecated; what should I use instead?
[21:19:12 CEST] <Hfuy> The_8472: I can play 'em back right. The problem is ensuring clients can, and ensuring that I can prove that what I'm doing is correct if their results are not.
[21:19:13 CEST] <Hfuy> It's a nightmare.
[21:22:14 CEST] <furq> Hfuy: your build has zimg, you might want to do the pixel format conversion with that
[21:22:31 CEST] <nicolas17> ok, I can replace stream->codec->codec_type with stream->codecpar->codec_type
[21:22:50 CEST] <nicolas17> but this tutorial is also using stream->codec for other purposes
[21:23:03 CEST] <Hfuy> what's a zimg and do they come in pink
[21:23:18 CEST] <furq> get rid of color_range and pix_fmt and try -vf zscale=rin=full:r=limited,format=yuv420p
[21:23:43 CEST] <furq> !filter zscale
[21:23:43 CEST] <nfobot> furq: http://ffmpeg.org/ffmpeg-filters.html#zscale
[21:25:13 CEST] <Hfuy> does this look like it has grey blacks to you guys : https://vimeo.com/223663605
[21:25:26 CEST] <Hfuy> You can tell as it's letterboxed.
[21:28:07 CEST] <furq> the letterbox is #000 in my browser
[21:28:37 CEST] <nicolas17> yeah, but in the video itself nothing ever gets that dark
[21:29:57 CEST] <nicolas17> ok I think I figured it out, instead of doing avcodec_copy_context from stream->codec (which is deprecated), I should do avcodec_parameters_to_context from stream->codecpar, right?
[21:31:05 CEST] <Hfuy> That's OK
[21:31:09 CEST] <Hfuy> It's graded quite soft contrast
[21:31:24 CEST] <nicolas17> Hfuy: I thought that was your problem
[21:31:43 CEST] <Hfuy> The issue is things that should be "technical black" ending up grey (and the overall contrast being therefore reduced)
[21:31:59 CEST] <Hfuy> I'm not expecting the "artistic" bit of it to have full tech black in it, much.
[21:32:18 CEST] <nicolas17> but is there anything in the video with pure black?
[21:32:23 CEST] <furq> the letterbox
[21:32:34 CEST] <DHE> nicolas17: if the ->codec field is deprecated but available, it should still work but give compiler and run-tmie warnings. but yes, codecpar is the right way to do things now and you should not touch AVStream->codec anymore
[21:32:53 CEST] <nicolas17> DHE: I'm looking at this ancient crap http://dranger.com/ffmpeg/tutorial01.html
[21:34:56 CEST] <DHE> nicolas17: now your'e expected to keep the AVCodecContext as an object you manage and use codecpar to pass the essential information the AVStream needs
[21:35:18 CEST] <nicolas17> atm I'm decoding
[21:38:07 CEST] <acresearch> people, i have 3000 .png images that i want to fuse into a video (problem is how can i make them into a video that plays in iphone)?
[21:38:50 CEST] <The_8472> acresearch, https://trac.ffmpeg.org/wiki/Slideshow
[21:39:11 CEST] <The_8472> https://stackoverflow.com/questions/24961127/ffmpeg-create-video-from-images
[21:39:23 CEST] <acresearch> The_8472: i tried this method, but for some reason the .mp4 video that i get does not play in ios
[21:39:39 CEST] <nicolas17> what command did you use?
[21:40:26 CEST] <nicolas17> DHE: looks like I have a good AVCodec now
[21:40:33 CEST] <nicolas17> er AVCodecContext
[21:42:39 CEST] <acresearch> The_8472: the second URL's commands do not work,    nicolas17: i used this command: ffmpeg -r 25 -f image2 -i video%4d.png -qscale:v 1 video.mp4
[21:43:48 CEST] <nicolas17> yeah who knows what codec that's even using :P
[21:44:12 CEST] <acresearch> nicolas17: oh
[21:44:20 CEST] <acresearch> ios need MPEG-4 right?
[21:44:44 CEST] <The_8472> and probably 4:2:0. it might be encoding as 4:4:4
[21:45:18 CEST] <nicolas17> it needs MPEG-4 part 10 (aka H.264, aka AVC), if you just say "video.mp4" it might use MPEG-4 part 2 video codec
[21:45:42 CEST] <acresearch> nicolas17: so what command should i add?
[21:45:57 CEST] <nicolas17> -codec:v libx264
[21:46:03 CEST] <nicolas17> let me check what profiles ios supports
[21:46:15 CEST] <acresearch> ok
[21:48:00 CEST] <user890104> acresearch: https://trac.ffmpeg.org/wiki/Encode/H.264#iOS
[21:48:15 CEST] <nicolas17> there you go
[21:48:45 CEST] <nicolas17> after avcodec_alloc_context3 and avcodec_open2 do I only need to avcodec_free_context?
[21:48:53 CEST] <acresearch> nicolas17: so this is the final command? (ffmpeg -r 25 -f image2 -i video%4d.png -codec:v libx264  -profile:v baseline -level 3.0  -qscale:v 1 video.mp4)
[21:49:17 CEST] <nicolas17> acresearch: yes, but try it, it might need quality tweaking
[21:49:50 CEST] <acresearch> nicolas17: i get an error from ffmpeg: http://paste.ubuntu.com/24983702/
[21:50:10 CEST] <nicolas17> huh
[21:50:18 CEST] <nicolas17> so you need to explicitly pass -pix_fmt yuv420p too
[21:52:05 CEST] <acresearch> nicolas17: http://paste.ubuntu.com/24983715/
[21:54:01 CEST] <acresearch> nicolas17: i did the reccomended change from the error, but i got this now: http://paste.ubuntu.com/24983727/
[21:55:15 CEST] <nicolas17> "height not divisible by 2" seems self-explanatory
[21:55:27 CEST] <acresearch> nicolas17: what hight should i use?
[21:55:44 CEST] <nicolas17> an even number that fits your needs
[21:55:46 CEST] <acresearch> nicolas17: and which part of the command does it control the height?
[21:56:03 CEST] <nicolas17> -s 1060x768 should work, dunno if it will look good, that depends on your video
[21:56:37 CEST] <acresearch> nicolas17: Unable to find a suitable output format for '1060x768'
[22:03:08 CEST] <alexpigment> acresearch: that looks like there's an error in your command line somewhere
[22:03:13 CEST] <alexpigment> what's your current command line?
[22:03:38 CEST] <acresearch> alexpigment: ffmpeg -r 25 -f image2 -i video%4d.png -codec:v libx264 -s 1060x768 -profile:v baseline -level 3.0 -pix_fmt yuv420p -crf:v 1 video.mp4
[22:04:37 CEST] <alexpigment> interesting
[22:04:55 CEST] <alexpigment> if you put -f mp4 after your png file, does it work
[22:05:37 CEST] <acresearch> alexpigment: ffmpeg -r 25 -f mp4 -i video%4d.png -codec:v libx264 -s 1060x768 -profile:v baseline -level 3.0 -pix_fmt yuv420p -crf:v 1 video.mp4
[22:05:51 CEST] <alexpigment> no, after the png
[22:06:06 CEST] <alexpigment> -i video%4d.png -f mp4
[22:06:13 CEST] <acresearch> alexpigment: i think i got it working with this command: ffmpeg -f image2 -i video%4d.png -r 30 -vcodec libx264 -pix_fmt yuv420p -acodec libvo_aacenc -ab 128k -s 1060x768 video.mp4
[22:06:33 CEST] <nicolas17> why are you setting acodec if you don't have an audio input stream?
[22:07:09 CEST] <alexpigment> nicolas can re-take-over this thing; I just figured I'd help in his absence
[22:07:18 CEST] <nicolas17> ok looks like all the avpicture_* functions are deprecated
[22:07:22 CEST] <acresearch> nicolas17: i don't know i found this command in a forum, added your -s 1060x768 and it worked
[22:07:28 CEST] <nicolas17> so this tutorial is increasingly useless
[22:08:20 CEST] <acresearch> nicolas17: which one? the one you sent?
[22:08:55 CEST] <nicolas17> acresearch: I'm fighting with my own problem with the ffmpeg API :P
[22:09:15 CEST] <nicolas17> acresearch: ffmpeg -r 25 -f image2 -i video%4d.png -f mp4 -codec:v libx264 -s 1060x768 -profile:v baseline -level 3.0 -pix_fmt yuv420p -crf:v 1 video.mp4
[22:09:25 CEST] <acresearch> nicolas17: ffmpeg and the whole video codec business is SO complicated i try to avoid it as much as possible,
[22:09:59 CEST] <alexpigment> generally speaking, the output format should be assumed based on the file extension (.mp4 in your case). not sure why it complained about not being able to find an output format
[22:10:00 CEST] <acresearch> i save these complicated commands for future use so i don't get a headache when i repeat my work
[22:10:16 CEST] <acresearch> alexpigment: i thought so too
[22:10:17 CEST] <alexpigment> unless it's breaking the command after the resolution rather than at the output file name
[22:10:22 CEST] <nicolas17> that should work, but the video will probably be very large, you should try a crf of 20 or so (lower is better quality but larger file), then tweak it according to the file size and quality you get
[22:10:41 CEST] <alexpigment> oh wow. crf 1 ;)
[22:11:10 CEST] <nicolas17> 0 is lossless video :P
[22:11:25 CEST] <alexpigment> 1 is basically lossless
[22:11:36 CEST] <alexpigment> for that matter, 10 is basically lossless
[22:13:57 CEST] <kerio> why's 480p 16:9 852 pixels wide instead of 853 or 854
[22:14:49 CEST] <nicolas17> probably because 852 is divisible by 4, which is a requirement for some codecs
[22:14:59 CEST] <kerio> oic
[22:15:13 CEST] <kerio> hold on why can't those codecs just encode an extra column of black pixels or whatever
[22:15:31 CEST] <nicolas17> feel free to pad your video with an extra column of black pixels before feeding it to the encoder ;)
[22:32:22 CEST] <shincode> ok
[22:32:25 CEST] <shincode> in between this
[22:32:40 CEST] <shincode> if i spam { 				int error = av_read_frame(formatContext, &packet); 				if (error == AVERROR_EOF)
[22:32:43 CEST] <shincode> all day in a loop
[22:32:48 CEST] <shincode> do i really need to sleep or wait
[22:33:01 CEST] <shincode> is not av_Read_Frame basically waiting on nic
[22:33:07 CEST] <shincode> and my other threads can do shit
[22:33:38 CEST] <shincode> i dont want to burn processing in this loop but if av_read_frame allows for not murdering the cpu then im ok
[22:36:09 CEST] <kepstin> shincode: av_read_frame will be blocking if you're reading from a slow input device, yeah. the only reason you'd have to sleep or wait in there is if you're reading from e.g. a local file and want to output in realtime for streaming or something like that.
[22:41:50 CEST] <shincode> im reading rtsp
[22:42:03 CEST] <shincode> and it feels like i get more likely chance to corrupt frames if i sleep inbetween for 15ms
[22:42:11 CEST] <shincode> i have a 1920x1080 stream of 30 fps
[22:42:22 CEST] <shincode> and set buffer size option to 6500000
[22:42:37 CEST] <shincode> which is roughly size of one frame in rgb space. 24 bpp
[22:53:57 CEST] <shincode> thanks.
[22:54:02 CEST] <shincode> more study msut be done
[00:00:00 CEST] --- Fri Jun 30 2017

More information about the Ffmpeg-devel-irc mailing list