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

burek burek021 at gmail.com
Tue May 15 03:05:02 EEST 2018


[00:01:07 CEST] <kerio> also, 8-bit yuv-rgb conversions are lossy
[01:32:39 CEST] <kepstin> kerio: almost all yuv content started out as rgb and was converted to yuv
[01:33:05 CEST] <kepstin> well, i suppose it depends on cameras, and some generated video or effects might be done in yuv
[01:33:50 CEST] <kepstin> so all the loss was done in the rgb to yuv conversion - assuming you have a matching conversion back, there's no more loss
[06:03:59 CEST] <fa0> Hello all
[06:04:19 CEST] <fa0> -vcodec copy is the same as -c:v ?
[06:05:27 CEST] <fa0> or actually '-c:v copy'
[06:09:29 CEST] <fa0> '-c:v copy' seems to be working... :P
[06:14:55 CEST] <fa0> I see now how -vcodec & -c:v are, as they work alone encoding...
[09:45:19 CEST] <Hfuy> Hello.
[09:45:48 CEST] <Hfuy> I have a video that's at 25fps that I'd like to frame double to 50fps, so that the output duration isn't changed and there are duplicate frames.
[09:46:02 CEST] <Hfuy> I'm slightly confused by the function of the frame rate flags; can anyone advise?
[10:13:21 CEST] <durandal_1707> Hfuy: use fps filter
[10:46:32 CEST] <quanta-> hi guys
[10:47:02 CEST] <quanta-> I need some help with some deprecated functions, I want update them
[10:47:06 CEST] <quanta-> here is my code https://pastebin.com/gDhe0Zm5
[10:47:30 CEST] <quanta-> they are just four deprecated references
[10:48:59 CEST] <quanta-> am sorry they are only two functions
[10:49:21 CEST] <quanta->  avcodec_default_release_buffer(c, pic);
[10:49:36 CEST] <quanta-> and
[10:49:37 CEST] <quanta-> avcodec_default_get_buffer(c, pic);
[10:49:58 CEST] <quanta-> what is the equivalent to that on the new api ?
[10:57:56 CEST] <BtbN> http://git.videolan.org/?p=ffmpeg.git;a=blob;f=doc/APIchanges;hb=HEAD
[12:37:49 CEST] <quanta-> Please check my repo, i'm trying to update a plugin to use the latest ffmpeg, compilation is fine but now the code won't run https://github.com/kenkit/ogre-ffmpeg-videoplayer/commit/bc986567f9d25d489396463bff59d6fc1affd251
[12:41:53 CEST] <quanta-> :(
[12:42:00 CEST] <durandal_1707> quanta-: what does not work?
[12:42:04 CEST] <JEEB> I would check if I wasn't at work :P
[12:42:21 CEST] <quanta-> ooh, hi JEEB
[12:42:33 CEST] <quanta-> it's doesn't need alot of work
[12:42:49 CEST] <quanta-> I'm translating the plugin to use the latest ffmpeg
[12:43:12 CEST] <quanta-> but it's crushing, maybe because of those deprecated buffer functions ?
[12:44:28 CEST] <quanta-> this is the error I get "[AVBSFContext @ 06FC3A00] A non-NULL packet sent after an EOF."
[12:45:34 CEST] <durandal_1707> avpicture is deprecated, you should use avframe directly
[12:46:20 CEST] <quanta-> it breaks in  https://github.com/kenkit/ogre-ffmpeg-videoplayer/blob/master/src/audiodecoder.cpp#L162
[12:46:57 CEST] <th3_v0ice> Hi guys, can anyone explain why av_interleaved_write_frame() would not write all packets to the output file? I called it with NULL instead of the packet so I could be sure that its flushed and I have set max_interleaved_delta to 0 but the last packet is simply not written to the file. Thanks!
[12:49:26 CEST] <quanta-> :durandal_1707 how do I do that, sorry but I'm completely new to ffmpeg. Any example ?
[12:50:50 CEST] <JEEB> this is the current decoding API, introduced a few years ago https://www.ffmpeg.org/doxygen/trunk/group__lavc__encdec.html
[12:50:57 CEST] <JEEB> then you get AVFrames from it
[12:51:06 CEST] <JEEB> and you can put them into encoders or filters or whatever
[12:51:22 CEST] <JEEB> (without further context)
[12:51:44 CEST] <durandal_1707> quanta-: it appears you are still sending something after EOF, sending null packet, or packet without data
[12:52:11 CEST] <quanta-> :JEEP you mean something like this https://github.com/kenkit/player-cpp-ffmpeg-sdl/blob/master/Player.cpp#L284 ?
[12:53:14 CEST] <durandal_1707> that is new decoding api
[12:53:38 CEST] <JEEB> can you really call it new any more :D
[12:54:25 CEST] <quanta-> durandal_1707: after EOF, this code used to work with the older ffmpeg so is it that the buffers are not being filled or something ?
[12:55:06 CEST] <th3_v0ice> Hi guys, can anyone explain why av_interleaved_write_frame() would not write all packets to the output file? I called it with NULL instead of the packet so I could be sure that its flushed and I have set max_interleaved_delta to 0 but the last packet is simply not written to the file. Thanks! I am sorry if this message already appeared.
[12:55:56 CEST] <durandal_1707> quanta-: it looks something sends packets after null packet
[12:57:31 CEST] <durandal_1707> and that usage of new api, receive_frame should loop, look at doc/examples/decode_video.c
[12:58:36 CEST] <quanta-> I only got rid of avcodec_default_get_buffer() and avcodec_default_release_buffer(); I thought this were already implemented in the new api
[12:58:56 CEST] <quanta-> durandal_1707: let me have a look into it
[13:00:47 CEST] <quanta-> don't forget to help out th3_v0ice if you can, thanks for your help
[13:03:44 CEST] <durandal_1707> th3_v0ice: what muxer end what codec?
[13:05:18 CEST] <th3_v0ice> durandal_1707: Codec is x264 and output file is mp4, so default muxer for mp4.
[13:05:32 CEST] <th3_v0ice> quanta-: Thanks!
[13:06:28 CEST] <th3_v0ice> durandal_1707: If I change the output file to h264, first packet is written twice and last packet is written also.
[13:09:52 CEST] <durandal_1707> th3_v0ice: do you call av_interleaved_write_frame() with NULL packet until you receive zero got_frame ?
[13:12:24 CEST] <th3_v0ice> durandal_1707: I only call it once like this av_interleaved_write_frame(ofmt_ctx, NULL) to flush it. I am not sure what exactly do You mean by got_frame?
[13:12:53 CEST] <th3_v0ice> durandal_1707: I am always getting 0 as the return value.
[13:14:43 CEST] <durandal_1707> th3_v0ice: you need to send NULL packets as long as encoder give you non-zero got_frame
[13:17:50 CEST] <durandal_1707> do you use send_frame/receive_packet ?
[13:17:58 CEST] <th3_v0ice> durandal_1707: I have also flushed the encoder. To make sure that this error is not involving the encoder I have decoded and saved as pgm files all packets that I have received from encoder. All the pictures are there, but there is one missing from the output file.
[13:18:18 CEST] <th3_v0ice> durandal_1707: Yes, I am using the new API.
[13:20:08 CEST] <durandal_1707> th3_v0ice: the missing one is last one?
[13:21:58 CEST] <th3_v0ice> durandal_1707: For the mp4 output, yes. For the h264 output, first packet is duplicated, and the last one is written.
[13:22:42 CEST] <durandal_1707> th3_v0ice: do you keep calling receive_packet until you get EAGAIN or EOF error code?
[13:23:03 CEST] <th3_v0ice> durandal_1707: Yes
[13:25:02 CEST] <durandal_1707> and you also call send_frame before with NULL AVFrame for flushing?
[13:25:16 CEST] <th3_v0ice> durandal_1707: The packet is received because I decoded and saved it as a picture.
[13:26:15 CEST] <th3_v0ice> durandal_1707: Yes, I also call send_frame with NULL to flush it.
[13:26:51 CEST] <durandal_1707> but do you call send_frame with NULL frame at end for flushing?
[13:28:10 CEST] <th3_v0ice> durandal_1707: Yep
[13:29:21 CEST] <durandal_1707> th3_v0ice: can source code be viewed?
[13:31:30 CEST] <th3_v0ice> durandal_1707: I can paste part of the code on pastebin, but will share the link privatelly with You, is that ok?
[13:34:18 CEST] <durandal_1707> th3_v0ice: ok
[14:00:57 CEST] <durandal_1707> th3_v0ice: strange bug, does it still happens if you do not touch delta?
[14:01:35 CEST] <th3_v0ice> durandal_1707: Yes, it does. No matter what delta is, its always the same behaviour.
[14:05:54 CEST] <durandal_1707> it doesnt happen with ffmpeg?
[14:11:19 CEST] <th3_v0ice> durandal_1707: Let me test
[14:12:09 CEST] <th3_v0ice> durandal_1707: On a seconds thought, I am not exactly sure how to do a valid comparison.
[17:05:42 CEST] <tokam> https://paste.ubuntu.com/p/YDHQfZx9Rd/
[17:05:43 CEST] <tokam> hi
[17:05:48 CEST] <tokam> what is wrong with this command?
[17:06:02 CEST] <tokam> ffmpeg -i record.avi -vf "select=gt(scene\,0.003),setpts=N/(25*TB)" output.mp4
[17:06:13 CEST] <tokam> Past duration 0.999992 too large
[17:07:24 CEST] <tokam> sorry
[17:07:27 CEST] <tokam> I used the wrong input file
[17:07:28 CEST] <tokam> all fine
[17:27:00 CEST] <fooman2011> Hello. Does anyone can help me to understand what does the line 322 in libavformat/avio.c please ?  Before this "if" my cookie is present in "options" and after this "if" my cookie is lost. So the hls can be read correctly.
[17:34:22 CEST] <plexigras> maybe you guys can help me i'm using streamlink and i want to save the stream in small chunks and i'm not sure how i can do this
[17:34:53 CEST] <plexigras> it seams to work with ffmpeg when i do this `streamlink -a="" -p="ffmpeg -i - af.flv" https://www.twitch.tv/rpglimitbreak worst`
[18:03:55 CEST] <Freneticks> hello how do you read rtp stream inside udp
[18:05:29 CEST] <Freneticks> If i play ffplay -f rtp udp://ip
[18:05:32 CEST] <Freneticks> it's working
[18:06:01 CEST] <Freneticks> but if ffmpeg -i udp://ip -c copy test.ts not working
[18:06:09 CEST] <Freneticks> is there a way to force input for rtp ?
[18:20:25 CEST] <Freneticks> hello ?
[18:28:35 CEST] <furq> Freneticks: -f rtp before -i
[18:29:11 CEST] <Freneticks> yes furq but he say : could not find codec parameters
[18:29:15 CEST] <Freneticks> i tried
[18:33:17 CEST] <Freneticks> any idea furq ?
[18:38:08 CEST] <tuna> BtbN: So I pulled the most recent code friday, and I am going to try out the hw_frame alloc/init type of approach...i set the frame context params, call init, then I need to copy data into the hw_frame...how do I get a cuda device ptr from the hw_frame_ctx??
[18:38:51 CEST] <BtbN> you get a full frame from it
[18:39:01 CEST] <BtbN> the devptr(s) are in the data pointers
[18:40:26 CEST] <fooman2011> any developper here who are familiar with HLS ? ffmeg fails to dec an hls stream because a cookie is needed to retrieve the key that is use to encryt segments. The cookie is correctly set but the key is not retrieved. I really need help
[18:51:32 CEST] <tuna> The data pointer of the AVHWFramesContext struct?
[18:54:35 CEST] <tuna> BtbN: Or do you mean it is in the AvFrame data pointer after adding the hwframecontext to the avframe and calling av_frame_get_buffer on it?
[18:54:45 CEST] <BtbN> of the frame
[18:55:12 CEST] <tuna> av_frame_get_buffer is where the cuda alloc actually happens then, I assume?
[18:55:14 CEST] <BtbN> A CUDA frame is virtually identical to a software frame of the underlying sw format, except that it's CUDA pointers
[18:55:27 CEST] <BtbN> it's a bit more involved internally, but for all you need to care, yes
[18:55:35 CEST] <tuna> Ok
[18:56:47 CEST] <tuna> Linesize is automagically filled out aswell?
[18:59:46 CEST] <BtbN> it is allocated with proper alignment
[19:00:14 CEST] <BtbN> you need to follow linesize when filling the frame, or results will be unexpected
[19:01:50 CEST] <tuna> Yea, so I am asking will the AvFrame's linesize[0] (rgb input) be correct after allocating the buffer?
[19:02:27 CEST] <tuna> Such that I can cuMemcpy2D with a correct line size from my GL texture into this hw_frame_ctx created buffer
[19:25:30 CEST] <tuna> BtbN: Seems to still be a bug with the av_hwframe_ctx_init...i still get pixel format not supported, I have verified that I built off of the master branch, and that my VSC++ environment is pointing to the right .libs/headers
[19:26:05 CEST] <BtbN> 0BGR32 and 0RGB32 are supported by the cuda hwframes ctx in master
[19:26:22 CEST] <BtbN> which matches exactly with what nvenc wants
[19:26:46 CEST] <tuna> One curious thing though, when It fails for AV_PIX_FMT_0RGB32 it says Pixel format 'bgr0' is not supported....and when it fails for AV_PIX_FMT_0BGR32 it says Pixel format 'rgb0' is not supported
[19:27:07 CEST] <Freneticks> any help for could not find codec parameters ?
[19:35:17 CEST] <tuna> BtbN: Seems like when I assign "frameCtxPtr->sw_format = AV_PIX_FMT_0BGR32" I get an actual output of "AV_PIX_FMT_RGB0 (121)" at runtime in the sw_format position
[19:35:41 CEST] <BtbN> 0BGR32 is a platform specific alias for the matching underlying format
[19:35:48 CEST] <BtbN> in your case that's RGB0
[19:36:25 CEST] <tuna> but that doesnt match the "supported_formats" enum in hwcontext_cuda.c, so it fails the check
[19:36:34 CEST] <BtbN> it does
[19:36:40 CEST] <BtbN> like I just said, it's an alias...
[19:37:35 CEST] <tuna> Ok, but it is failing...and I have the source pulled up on my pc that I built from, and it matches your fix commit...so what could be the issue?
[19:38:05 CEST] <BtbN> I'd guess you are using the wrong library, or that's not the cause of your error.
[19:38:29 CEST] <tuna> my linker setting are pointed at my build...
[19:38:36 CEST] <tuna> of this source...
[22:00:02 CEST] <faLUCE> I don't know how to solve that. In myvideo.flv, at 00:10:03 , video track freezes for one second and from then, audio and video go out of sync. How can I correct the sync problem?
[22:20:35 CEST] <tuna> BtbN: I worked past the issue with the library, it was using a bad DLL...but now av_frame_get_buffer returns invalid argument. My AvFrame I pass is has a hw_frame_context, width, height, format...the frame context has width, height, sw_format (AV_PIX_FMT_0BGR32), format (cuda), a device ref and device ctx ptr and has bein "init"-ed....
[22:21:19 CEST] <tuna> av_frame format is cuda as well
[22:21:21 CEST] <BtbN> it gives you a frame, you don't need to init anything
[22:21:29 CEST] <BtbN> that's the whole point of it
[22:21:59 CEST] <tuna> av_hwframe_ctx_init creates the buffer I thought?
[22:22:21 CEST] <BtbN> it creates the hw frames ctx
[22:22:31 CEST] <BtbN> which gives you fully useable frames
[22:23:01 CEST] <tuna> So I dont need a av_frame_get_buffer?
[22:23:46 CEST] <BtbN> there is a hwframe specific get buffer
[22:24:22 CEST] <BtbN> av_hwframe_get_buffer
[22:24:29 CEST] <BtbN> http://git.videolan.org/?p=ffmpeg.git;a=blob;f=libavutil/hwcontext.h;h=f5a4b623877477c0d778bea1ab051be074fe09d5;hb=HEAD#l352
[22:26:06 CEST] <tuna> " @param frame an empty (freshly allocated or unreffed) frame to be filled with  *              newly allocated buffers."
[22:26:21 CEST] <tuna> so I should not be setting anything in my AvFrame I pass to this function?
[22:31:19 CEST] <tuna> Seems like it doesnt need anything filled in.....so the AvFrame->data should be a CUdeviceptr? I am not getting errors with my cuMemcpy2D call saying invalid value, and I suspect its the avframe->data because thats all that had changed
[22:31:30 CEST] <tuna> not == now
[22:32:23 CEST] <tuna> feels so close...
[22:35:58 CEST] <faLUCE> I don't know how to solve that. In myvideo.flv, at 00:10:03 , video track freezes for one second and from then, audio and video go out of sync. How can I correct the sync problem?
[22:41:14 CEST] <BtbN> That's the entire point of a hwframesctx
[22:42:44 CEST] <BtbN> it gives you ready to use frames
[22:46:51 CEST] <tuna> Gotcha
[22:49:01 CEST] <tuna> So I have something working....I can receive h264 encoded stream back to my client...my demo program just rotates a texture in a circle...the output i see is half the shape rotating in the opposite direction...im thinking maybe I have a bad copy from cuda or soemthing
[22:50:36 CEST] <BtbN> define half the shape
[23:03:40 CEST] <SpeakerToMeat> Is there any way to vconvert to 5.1 to stereo without downmixing? to get only L and R from the 5.1 to L and R out?
[23:03:55 CEST] <JEEB> yes, if you really want to
[23:04:06 CEST] <JEEB> you need to basically do a manual remap
[23:04:48 CEST] <tuna> BtbN: Was an issue with my cuMemCpy2D...must want me to say width is *4 not just width...seems to all work now...Thanks for all the help on this, i really appreciate it
[23:04:59 CEST] <JEEB> https://trac.ffmpeg.org/wiki/AudioChannelManipulation
[23:05:22 CEST] <SpeakerToMeat> ugh string...
[23:12:17 CEST] <SpeakerToMeat> JEEB: -map_channel 1.0.0 -map_channel 1.0.1 ??
[23:12:50 CEST] <JEEB> not sure about that, I think you're better off figuring one of those filter chains where different channels from inputs are being re-mapped
[23:13:26 CEST] <SpeakerToMeat> or maybe pan....
[23:13:47 CEST] <SpeakerToMeat> pan=stereo|c0=c0|c1=c1
[00:00:00 CEST] --- Tue May 15 2018


More information about the Ffmpeg-devel-irc mailing list