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

burek burek021 at gmail.com
Thu May 10 03:05:02 EEST 2018


[00:00:11 CEST] <bencc1> I don't have a binary for ubuntu
[00:00:20 CEST] <bencc1> I'm usually using the official release
[00:01:45 CEST] <tuna_> BtbN: Do any of my configs look in correct?? https://pastebin.com/wP306TvJ
[00:02:03 CEST] <BtbN> bencc1, there are plenty of static binaries to get easily
[00:04:20 CEST] <BtbN> sw_pix_fmt is missing.
[00:04:49 CEST] <BtbN> With how you're using this, copying from your array, you might as well just actually use a hw_frames_ctx to allocate the frames for you
[00:06:30 CEST] <tuna_> Line 37 in the pastebin:     c->sw_pix_fmt = AV_PIX_FMT_0BGR32;
[00:06:58 CEST] <tuna_> allocate the input frame?
[00:07:12 CEST] <tuna_> My input is an existing OGL texture
[00:07:16 CEST] <BtbN> That's not on the frame...
[00:07:28 CEST] <BtbN> But you are copying data into the frame from it
[00:07:49 CEST] <BtbN> so might as well save you some work and use what a hw_frames_ctx is intended for, allocating frames
[00:08:24 CEST] <tuna_> Ok, what are the requirements for that to work?
[00:08:42 CEST] <tuna_> "Thats not on the frame..." ??
[00:08:47 CEST] <tuna_> The sw_pix_fmt?
[02:10:26 CEST] <User____> Hello! Could anybody please help to investigate, what's going on? I have 52 minutes video, and try to insert intro. After that video becomes 130 hours long, which is wrong, but the size is same (video + intro). Any ideas where to start with?
[05:58:24 CEST] <AppleTor> ffmpeg can work with proxy, i wonder if there any paramater to make it work with vpn
[05:59:10 CEST] <AppleTor> so what i want is only ffmpeg use vpn, not the whole system
[09:26:01 CEST] <wfbarksdale> wfbarksdale
[12:42:09 CEST] <dimi_> Hi! Can somebody explain what bzlib and zlib used for in ffmpeg?
[12:47:29 CEST] <BtbN> Well, given that compressing and decompressing is all they do: compressing and decompressing stuff
[12:58:03 CEST] <dimi_> BtbN, sure, but what formats/codecs are relying on those libs?
[12:58:46 CEST] <BtbN> grep zlib */*.c
[12:59:23 CEST] <BtbN> or even just grep zlib configure
[13:08:50 CEST] <furq> zlib is just used for png afaik
[13:09:19 CEST] <BtbN> a whole bunch of filters and formats include it
[13:09:38 CEST] <BtbN> *codecs and formats
[13:09:44 CEST] <BtbN> not a single filter in fact
[13:09:45 CEST] <furq> oh so they do
[13:10:04 CEST] <BtbN> for http it's pretty obvious what it's used for
[13:10:19 CEST] <furq> apparently nothing depends on bzlib but it's "suggested" for the matroska demuxer
[13:10:27 CEST] <furq> i'm not entirely sure what for
[13:10:45 CEST] <BtbN> matroska includes bzlib.h at least
[13:11:10 CEST] <furq> zlib is suggested for a bunch of stuff but it's a hard dependency for some obscure codecs
[13:11:17 CEST] <furq> and png obviously
[13:17:12 CEST] <dimi_> thanks. i am considering building without zlib and bzlib for audio applications, so perhaps those obscure codecs aren't relevant for me
[13:18:05 CEST] <durandal_1707> png is not obsure codec
[13:19:01 CEST] <dimi_> haha sure, sorry for that
[13:55:51 CEST] <mort> Is the only way to change the bitrate of an encoder just closing the encoder and opening a new one with a different bitrate setting?
[13:56:45 CEST] <mort> (using the C api, not the CLI)
[14:07:59 CEST] <BtbN> mort, a lot of encoders support changing some parameters on the fly
[14:08:06 CEST] <BtbN> bitrate, dar, and some other things
[14:13:28 CEST] <mort> BtbN: how would I do that? I'm having a hard time finding it in the docs or through google
[14:13:42 CEST] <mort> I assume it's not as simple as just changing the AVCodecContext.bit_rate variable?
[14:13:48 CEST] <BtbN> it should be
[14:13:54 CEST] <mort> oh, neat
[14:13:58 CEST] <BtbN> if the encoder cares is up to the encoder though
[14:14:12 CEST] <BtbN> I only know libx264 and since recently nvenc look at it
[14:14:27 CEST] <mort> is there a way to check? I'm using the v4l2m2m encoder
[14:14:32 CEST] <BtbN> read its code
[15:18:06 CEST] <th3_v0ice> mort: I dont think you could just do that without reconfiguring the encoder there is a method in libx264 that does just that. At least as far as I tried I needed to reconfigure encoder every time I changed the bitrate. Even after that, bitrate was not changing rapidly, instead it was more progressing to the given value. Have in mind that I was trying to do this last year, so maybe some things
[15:18:06 CEST] <th3_v0ice> have changed :)
[16:07:17 CEST] <tuna> BtbN: Are you around?...I think I found the source of my invalid value
[16:07:31 CEST] <tuna> Line 67 of imgutils
[16:07:37 CEST] <tuna> imgutils.c
[16:08:56 CEST] <tuna> Well, maybe not.....
[16:19:50 CEST] <tuna> BtbN: You said to use hwframe_context since I am copying from texture to cuda buffer...but it says "Pixel format 'rgb0' is not supported when I add in an init call for my hwframe ctx
[16:51:33 CEST] <SirCmpwn> I'm having a weird issue with the ffmpeg command
[16:51:44 CEST] <SirCmpwn> I'm calling it from another process (not a shell) and sending it SIGINT when I want it to stop
[16:51:49 CEST] <SirCmpwn> but it doesn't clean up after itself when I do
[16:51:56 CEST] <SirCmpwn> it just dies and leaves the video incomplete
[16:52:40 CEST] <kepstin> well, it should exit and close the incomplete video file (writing indexes, etc. if needed)
[16:52:49 CEST] <kepstin> but yes, leaving an incomplete file is the expected behaviour there
[16:53:03 CEST] <SirCmpwn> this is an mp4 file and it doesn't end up with a moov atom
[16:53:23 CEST] <SirCmpwn> if I run ffmpeg at my shell instead of from my program, it cleans up properly when I ^c it
[16:53:59 CEST] <kepstin> that is a bit unexpected, yeah. are you able to see ffmpeg's output when running it from your program?
[16:54:15 CEST] <kepstin> (console output)
[16:54:15 CEST] <SirCmpwn> yeah, but none of the "we're cleaning up now" output I would expect shows up
[16:54:22 CEST] <SirCmpwn> would you like to see the output?
[16:54:30 CEST] <kepstin> yes, please. and what's the return code of the process?
[16:54:34 CEST] <SirCmpwn> hold please
[16:58:48 CEST] <SirCmpwn> https://sr.ht/HsAK.txt
[16:58:50 CEST] <SirCmpwn> kepstin: ^
[17:03:43 CEST] <kepstin> right, on a normal exit by signal, ffmpeg should be printing "Exiting normally, received signal 2.", and the return code should be 255
[17:03:56 CEST] <SirCmpwn> I have verified via strace that it actually gets SIGINT
[17:04:31 CEST] <SpeakerToMeat> If whoever(s) worked on the ffmpeg frame rate conversion/blending algorithms are here, you people are gods and I owe you a beer
[17:06:02 CEST] <kepstin> SirCmpwn: with libx264, ffmpeg can take a while to finish flushing the encoder and exiting, are you sure there's not something else happening to it first?
[17:06:06 CEST] <durandal_1707> SpeakerToMeat: what are you talking about?
[17:06:16 CEST] <SirCmpwn> kepstin: I wait on it after I signal, so
[17:06:33 CEST] <kepstin> SirCmpwn: like, if your program is reading from ffmpeg stdout, make sure you continue to do so until the process exits.
[17:06:39 CEST] <SirCmpwn> aye
[17:06:51 CEST] <SirCmpwn> I don't actually read from stdout, I dup2 it onto my stdout
[17:06:58 CEST] <kepstin> SirCmpwn: other than that, I'm at a loss, you might have to poke around with a debugger :/
[17:07:02 CEST] <SirCmpwn> algith
[17:07:03 CEST] <SirCmpwn> alright*
[17:07:15 CEST] <kepstin> i dunno if anyone else has an idea.
[17:09:37 CEST] <SirCmpwn> wrote q to stdin instead of signalling
[17:09:39 CEST] <SirCmpwn> works
[17:09:41 CEST] <SirCmpwn> ¯\_(Ä)_/¯
[17:30:12 CEST] <zevarito> I am decoding opus and then encoding aac, before encoding I am using avresample_convert_frame to resample format, but I am not able to output the audio without a minimal distortion, Ive tried any idea that came to my mind, any cloud where I should dig next?
[18:10:11 CEST] <tuna> So to be able to debug my issue with using nvenc I want to build ffmpeg so I can step into the call that is erroring out...but I get an error when doing the ./configure
[18:10:42 CEST] <tuna> its the cl is unable to create an executable file...c compiler test failed error...I have tried all the "fixes" in the docs and nothing change
[18:11:02 CEST] <tuna> Using VS 2013
[18:27:10 CEST] <BtbN> I even told you what you were doing wrong yesterday.
[18:27:30 CEST] <BtbN> Hardware frames always have the pix_fmt of the hardware type they represent
[18:27:40 CEST] <tuna> Yes, and I fixed that
[18:27:56 CEST] <BtbN> And the sw_pix_fmt needs to be the actual underlying pix_fmt
[18:28:11 CEST] <tuna> It made my assertion error go away, but now I get a "invalid value" error
[18:28:15 CEST] <tuna> I also fixed that
[18:28:23 CEST] <tuna> (the sw_pix_fmt)
[18:28:56 CEST] <BtbN> And since OpenGL does not seem to give you something ffmpeg understands, you might as well use the hw_frames_ctx in its intended was, as you have to copy the data anyway
[18:30:43 CEST] <PureTryOut[m]> hey guys. I'm trying to use a file on a ssh share (so an sftp connection) as input, which from what I understand ffmpeg should support, but ffmpeg just segfaults. I don't see any useful error messages when running with `-v debug`
[18:31:03 CEST] <tuna> Yea, I would do that...but it gives me a "Pixel format 'rgb0' is not supported" when I call init on the hw frame
[18:31:20 CEST] <BtbN> oh yes, it indeed only supports YUV
[18:31:21 CEST] <tuna> frameCtxPtr->sw_format = AV_PIX_FMT_0BGR32; frameCtxPtr->format = AV_PIX_FMT_CUDA;
[18:31:37 CEST] <BtbN> RGB would be trivial to add though
[18:32:09 CEST] <tuna> And that  is the issue, OpenGL is RGB...and if I cannot use RBG input then I need to use cuda as input because Nvenc CAN handle rgb as input
[18:32:21 CEST] <BtbN> you can, nvenc support it just fine
[18:32:27 CEST] <tuna> exactly
[18:32:28 CEST] <BtbN> just cannot use a hwframes_ctx
[18:32:34 CEST] <tuna> exactly
[18:32:36 CEST] <BtbN> and need to do what you are already doing
[18:32:45 CEST] <tuna> yes
[18:33:22 CEST] <tuna> Since I am getting invalid value, and nothing jumped out as wrong yesterday to you...I gotta figure out how to see into ffmpeg
[18:33:38 CEST] <BtbN> invalid value on what call?
[18:36:38 CEST] <tuna> avcodec_Send_frame
[18:38:24 CEST] <tuna> (pastebin from yesterday for reference)https://pastebin.com/wP306TvJ
[18:57:17 CEST] <BtbN> you never check if avcodec_open succeeds
[18:59:25 CEST] <tuna> I do all the checks for all the calls, just didnt paste it
[18:59:38 CEST] <tuna> Everything up to that point passes the checks
[18:59:52 CEST] <tuna> that point being the erroneous call
[19:00:08 CEST] <BtbN> you'll have to find what line gives you the error then. But usually it always prints something if it returns an error
[19:02:06 CEST] <BtbN> the only EINVAL return that doesn't print something I find is if the cuda_ctx is not passed
[19:02:33 CEST] <BtbN> do you set the device_ctx on your frames_ctx?
[19:02:48 CEST] <BtbN> cause that's where it gets it from
[19:04:03 CEST] <BtbN> device_ref and device_ctx need to be populated
[19:05:12 CEST] <SirCmpwn> having an issue using the dash output
[19:05:52 CEST] <SirCmpwn> I can stream a local (mp4) file with -re and it works as expected, and the video/mp4 <Representation> tag has codec="avc1.42c028"
[19:06:13 CEST] <SirCmpwn> but when I stream from x11grab, I get codec="avc1.42c01f", which dash.js and/or chromium do not like
[19:08:40 CEST] <SirCmpwn> I'm using -vcodec libx264 -vprofile baseline -pix_fmt yuv420p
[19:10:48 CEST] <BtbN> a lot of decoders do not support baseline
[19:10:50 CEST] <BtbN> use main or high.
[19:11:14 CEST] <BtbN> also, vcodec/vprofile are deprecated, use codec:v/profile:v
[19:12:10 CEST] <SirCmpwn> I'm using the baseline profile for both scenarios
[19:12:16 CEST] <SirCmpwn> and it works when I'm streaming a file
[19:12:21 CEST] <SirCmpwn> browsers tend to only support baseline afaik
[19:12:35 CEST] <SirCmpwn> or at least baseline is the only consistently supported profile among browsers
[19:13:08 CEST] <klaxa> that may be true for mobile browsers and in 2010
[19:13:18 CEST] <SirCmpwn> well, I'll give main a shot
[19:13:54 CEST] <klaxa> also, i used your c bloom filter once, thank you very much :)
[19:13:58 CEST] <SirCmpwn> no problem :)
[19:14:45 CEST] <SirCmpwn> I still get the wrong codec with -profile:v main (01f)
[19:14:52 CEST] <SirCmpwn> but something else came up, I'll come back later to do more troubleshooting
[19:17:09 CEST] <tuna> BtbN: Docs for device_ctx say "Set by libavutil in av_hwframe_ctx_init()." and device_ref, although not set by me, is set to something at run time. When I do set it to the AVBufferRef for the device ctx it still returns same error
[19:18:40 CEST] <BtbN> device_ctx _and_ device_ref.
[19:18:49 CEST] <BtbN> You're not calling init, so you need to set it yourself
[19:19:12 CEST] <BtbN> the device_ctx is not the ref, but the actual ctx
[19:20:49 CEST] <jkqxz> SirCmpwn:  The three bytes there are profile_idc, the constraint flags, and level_idc respectively.  The difference between 42c028 and 42c01f is only the level - 4 vs. 3.1.
[19:20:56 CEST] <tuna> BtbN: This is true, but same error still with both populated
[19:21:08 CEST] <jkqxz> SirCmpwn:  Lower levels are strictly easier to decode, so the error must be somewhere else.
[19:21:10 CEST] <tuna> 		frameCtxPtr->device_ref = m_avBufferRefDevice; 		frameCtxPtr->device_ctx = (AVHWDeviceContext*)m_avBufferRefDevice->data;
[19:21:29 CEST] <BtbN> weird. You'll probably have to ask a Debugger
[19:23:44 CEST] <BtbN> debugging ffmpeg on msvc might be annoying though
[20:04:34 CEST] <tuxuser> Hi, there is a problem for me with AAC decoding, when samples are raw and have no ADTS header prepended on the input data - Basically it cannot estimate a single sample length from the looks of it, even if given the known encoding parameters.
[20:04:34 CEST] <tuxuser> Command: $ ffmpeg -loglevel debug -f aac -ac 2 -sample_fmt fltp -i no_adts_header_per_sample.aac out.mp3
[20:04:34 CEST] <tuxuser> log: https://pastebin.com/hwb8xVLy - Sample data: http://libxenon.org/input.audio.no_adts_header_per_sample.aac
[20:07:51 CEST] <SirCmpwn> jkqxz: is there a way to specify the level?
[20:09:52 CEST] <saml> is it better to encode to .mp4  then generate .ts chunks (hls)?   or encode to .ts chunks then concat those to a single .mp4?  in the end, I need both a single .mp4  and .ts chunks
[20:10:35 CEST] <ChocolateArmpits> saml, you can create multiple outputs https://trac.ffmpeg.org/wiki/Creating%20multiple%20outputs
[20:11:17 CEST] <ChocolateArmpits> the "tee pseudo muxer" specifically details a way to reuse same encoded content for different output formats
[20:11:23 CEST] <ChocolateArmpits> section*
[20:11:38 CEST] <saml> ah thank you
[20:13:24 CEST] <SirCmpwn> jkqxz: found it, confirmed level isn't the issue
[20:56:35 CEST] <SirCmpwn> I got it :D
[20:56:42 CEST] <SirCmpwn> old ffmpeg version on debian stretch
[20:59:07 CEST] <zerodefect> I'm overlaying a small image on an AVFrame which 720x576 using the C API (avfilter graph with overlay). When I overlay the image, the image is stretched to the full resolution of the main video. Initially, I suspected it was something to do with sample aspect ratio, but I can't see anything in the source code for overlay filter which takes aspect ratio into consideration.
[21:00:02 CEST] <durandal_1707> zerodefect: size of overlay is?
[21:00:41 CEST] <zerodefect> 253x253
[21:04:19 CEST] <durandal_1707> need source code to see
[21:07:17 CEST] <zerodefect> Ok. I think I'll write a sample app. Will be easier to share.
[21:28:32 CEST] <zerodefect> @durandal_1707, do you mind if I give you a shout once I've knocked some sample code together?
[21:28:56 CEST] <zerodefect> I'll upload it to github so it can be pulled down
[21:29:14 CEST] <durandal_1707> ok
[21:30:08 CEST] <zerodefect> Thanks.
[22:52:53 CEST] <Purebes> Hello, I'm able to play a WDM dshow filter as long as I use the correct settings in the dialog popped up by -show_video_device_dialog, but I need to be able to generate those settings on the fly without user interaction, is this possible?
[22:53:48 CEST] <exastiken> Hi, how do I transcode YUV with HEVC to *.265 file extension?
[22:56:41 CEST] <JEEB> build with libx265 and encode with it
[22:56:56 CEST] <JEEB> raw YCbCr input might need you to specify the input size
[23:11:02 CEST] <tuxuser> Follow-up info: When manually prepending the ADTS header to every sample, ffmpeg recognizes it fine: https://pastebin.com/nPdRekCZ
[23:11:32 CEST] <tuxuser> what can I do to make ffmpeg understand the headerless data tho? Is -flags +global_header needed?
[23:14:04 CEST] <tuxuser> without adts-header per sample: After avformat_find_stream_info() pos: 374 bytes read:65696 seeks:4 frames:1 --- with adts-header per sample: After avformat_find_stream_info() pos: 21290 bytes read:65696 seeks:4 frames:50
[23:17:05 CEST] <tuxuser> I actually do need the reverse of "bsf:a aac_adtstoasc" ?
[23:33:48 CEST] <Purebes> Can anyone help me figure out the correct syntax for playing both audio and video from a directshow WMD capture filter?  It has a video and audio pin, but it only plays the video and says it can't find the audio https://pastebin.com/sci7kuLT
[23:41:34 CEST] <tuxuser> try to change "-i video="Blackmagic WDM Capture":audio="Blackmagic WDM Capture"" to just "-i "Blackmagic WDM Capture""
[23:42:33 CEST] <tuxuser> nvm, whats the output of: "ffmpeg -list_devices true -f dshow -i dummy" ?
[23:43:56 CEST] <Purebes> https://pastebin.com/JPgHywPg
[23:45:50 CEST] <Purebes> There are the "Decklink Video Capture" and "Decklink Audio Capture" which used to work, but apparently have become deprecated and I haven't been able to get them to work (according to the support team of the input card, I should be using the WDM one)
[23:45:51 CEST] <tuxuser> ok, what happens if you just pass -i video="Blackmagic WDM Capture"
[23:46:00 CEST] <tuna> Any way I could get debug files to run with visual studio for FFMPEG so I can debug a call....me trying to build ffmpeg is not working out well
[23:46:25 CEST] <Purebes> Video plays but without any sound
[23:48:37 CEST] <Purebes> I assume I should be using `audio_pin_name` for this somehow but none of my attempts seem to be correct
[23:49:24 CEST] <Mista_D> trying to pass ">>logfile 2>&1" as variable and I get this in bash >>> ./ffmpeg -i .... '>>logfile' '2>&1' failing to recognize, Any advise please?
[23:54:50 CEST] <tuxuser> Purebes: https://www.ffmpeg.org/ffmpeg-devices.html#decklink-1 this looks like the prefered way
[23:58:08 CEST] <Purebes> tuxuser: Appreciate the link, however I've never been able to get any of those commands to work
[23:58:39 CEST] <Purebes> I think they may require a special build of ffmpeg
[23:58:46 CEST] <tuxuser> Mista_D: can you post the full command, no additional parentheses ?
[23:58:53 CEST] <tuxuser> Purebes: indeed, yea
[23:59:25 CEST] <Purebes> yeah, unfortunately that's complicated for me, because I'm building a plugin for a nwjs application that routes thru libmpv
[23:59:37 CEST] <Purebes> which I think includes some version of ffmpeg
[00:00:00 CEST] --- Thu May 10 2018


More information about the Ffmpeg-devel-irc mailing list