From: Paul B Mahol <onemda@gmail.com> To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Subject: Re: [FFmpeg-devel] [PATCH] avfillter/buffersrc: activate and EOF fix Date: Thu, 2 Nov 2023 10:56:00 +0100 Message-ID: <CAPYw7P4dJL8WxQBduoRH73dn2do=AzbMhZOBeBVno8YH1fh1kQ@mail.gmail.com> (raw) In-Reply-To: <ZUJdBAbFTnL0c1+J@phare.normalesup.org> On Wed, Nov 1, 2023 at 3:13 PM Nicolas George <george@nsup.org> wrote: > Paul B Mahol (12023-11-01): > > It fixes it for me, ffmpeg no longer keeps sending frames to EOF > > filtergraph. > > And no more memory is allocated and never freed. > > And that is just LUCK because you changed unrelated things. You have to > provide a PROOF, starting with what was wrong in the original code. > > > I ask you, kindly, once more time, to provide way how to trigger memory > > boom (OOM) with those patches applied. > > I just ran the test case you gave in my usual testing environment. There > is nothing I can tell you more, I can just copy-paste the result. > > Anyway, in the process of analyzing the bug and writing the proof for > your fix, you should be able to find out why it is still happening ins > subtly different circumstances. > > > ffmpeg version N-112636-g53f9d14063 Copyright (c) 2000-2023 the FFmpeg > developers > built with gcc 13 (Debian 13.2.0-5) > configuration: --enable-shared --disable-static --enable-gpl > --enable-libx264 --enable-libopus --enable-libass --enable-libfreetype > --enable-opengl --assert-level=2 > libavutil 58. 31.100 / 58. 31.100 > libavcodec 60. 32.102 / 60. 32.102 > libavformat 60. 17.100 / 60. 17.100 > libavdevice 60. 4.100 / 60. 4.100 > libavfilter 9. 13.100 / 9. 13.100 > libswscale 7. 6.100 / 7. 6.100 > libswresample 4. 13.100 / 4. 13.100 > libpostproc 57. 4.100 / 57. 4.100 > [Parsed_scale_2 @ 0x557c9a7e6fc0] w:720 h:-2 flags:'' interl:0 > [Parsed_hqdn3d_4 @ 0x557c9a7f4640] ls:4.000000 cs:3.000000 lt:6.000000 > ct:4.500000 > [h264 @ 0x557c9a7e7e40] Reinit context to 640x480, pix_fmt: yuv420p > Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '../test_clip.mp4': > Metadata: > major_brand : isom > minor_version : 512 > compatible_brands: isomiso2avc1mp41 > encoder : Lavf60.17.100 > Duration: 00:07:50.00, start: 0.000000, bitrate: 1594 kb/s > Stream #0:0[0x1](und): Video: h264 (High), 1 reference frame (avc1 / > 0x31637661), yuv420p(progressive, left), 640x480 [SAR 1:1 DAR 4:3], 1592 > kb/s, 25 fps, 25 tbr, 12800 tbn (default) > Metadata: > handler_name : VideoHandler > vendor_id : [0][0][0][0] > encoder : Lavc60.32.102 libx264 > [out#0/mp4 @ 0x557c9b07e000] Adding streams from explicit maps... > [vost#0:0/copy @ 0x557c9b07f080] Created video stream from input stream 0:0 > Output #0, mp4, to '../test_clip.mp4_copy.mp4': > Metadata: > major_brand : isom > minor_version : 512 > compatible_brands: isomiso2avc1mp41 > encoder : Lavf60.17.100 > Stream #0:0(und): Video: h264 (High), 1 reference frame (avc1 / > 0x31637661), yuv420p(progressive, left), 640x480 (0x0) [SAR 1:1 DAR 4:3], > q=2-31, 1592 kb/s, 25 fps, 25 tbr, 12800 tbn (default) > Metadata: > handler_name : VideoHandler > vendor_id : [0][0][0][0] > encoder : Lavc60.32.102 libx264 > [out#1/image2 @ 0x557c9b0c1640] Adding streams from explicit maps... > [out#1/image2 @ 0x557c9b0c1640] Creating output stream from an explicitly > mapped complex filtergraph 0, output [thumb_out] > [vost#1:0/mjpeg @ 0x557c9b0c44c0] Created video stream from complex > filtergraph 0:[unsharp:default] > [vost#1:0/mjpeg @ 0x557c9b0c44c0] > Stream mapping: > Stream #0:0 (h264) -> split:default > Stream #0:0 -> #0:0 (copy) > unsharp:default -> Stream #1:0 (mjpeg) > Press [q] to stop, [?] for help > [h264 @ 0x557c9a8099c0] Reinit context to 640x480, pix_fmt: yuv420p > [Parsed_scale_2 @ 0x557c9a80fa80] w:720 h:-2 flags:'' interl:0 > [Parsed_hqdn3d_4 @ 0x557c9a7e4180] ls:4.000000 cs:3.000000 lt:6.000000 > ct:4.500000 > [graph 0 input from stream 0:0 @ 0x557c9b0d9dc0] w:640 h:480 > pixfmt:yuv420p tb:1/12800 fr:25/1 sar:1/1 > [swscaler @ 0x557c9b0ddb00] deprecated pixel format used, make sure you > did set range correctly > [Parsed_scale_2 @ 0x557c9a80fa80] w:640 h:480 fmt:yuv420p sar:1/1 -> w:720 > h:540 fmt:yuvj420p sar:1/1 flags:0x00000004 > [Parsed_setsar_3 @ 0x557c9a80dcc0] w:720 h:540 sar:1/1 dar:4/3 -> sar:1/1 > dar:4/3 > [Parsed_unsharp_5 @ 0x557c9a80fdc0] effect:sharpen type:luma msize_x:5 > msize_y:5 amount:1.00 > [Parsed_unsharp_5 @ 0x557c9a80fdc0] effect:none type:chroma msize_x:5 > msize_y:5 amount:0.00 > [vost#1:0/mjpeg @ 0x557c9b0c44c0] *** 10500 dup! > [vost#1:0/mjpeg @ 0x557c9b0c44c0] More than 1000 frames duplicated > Output #1, image2, to 'test_clip.mp4_img2.jpg': > Metadata: > major_brand : isom > minor_version : 512 > compatible_brands: isomiso2avc1mp41 > encoder : Lavf60.17.100 > Stream #1:0: Video: mjpeg, 1 reference frame, yuvj420p(pc, progressive, > left), 720x540 (0x0) [SAR 1:1 DAR 4:3], q=2-31, 200 kb/s, 25 fps, 25 tbn > Metadata: > encoder : Lavc60.32.102 mjpeg > Side data: > cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: N/A > Error while filtering: Resource temporarily unavailable > [vist#0:0/h264 @ 0x557c9a833f00] Decoder thread received EOF packet > [vist#0:0/h264 @ 0x557c9a833f00] Decoder returned EOF, finishing > [vist#0:0/h264 @ 0x557c9a833f00] Terminating decoder thread > [out#0/mp4 @ 0x557c9b07e000] All streams finished > [out#0/mp4 @ 0x557c9b07e000] Terminating muxer thread > [AVIOContext @ 0x557c9b0c0000] Statistics: 83790919 bytes written, 2 > seeks, 323 writeouts > [out#0/mp4 @ 0x557c9b07e000] Output file #0 (../test_clip.mp4_copy.mp4): > [out#0/mp4 @ 0x557c9b07e000] Output stream #0:0 (video): 10511 packets > muxed (83686326 bytes); > [out#0/mp4 @ 0x557c9b07e000] Total: 10511 packets (83686326 bytes) muxed > [out#0/mp4 @ 0x557c9b07e000] video:81725kB audio:0kB subtitle:0kB other > streams:0kB global headers:0kB muxing overhead: 0.124977% > [out#1/image2 @ 0x557c9b0c1640] Nothing was written into output file, > because at least one of its streams received no packets. > frame= 0 fps=0.0 q=0.0 Lsize= 81827kB time=00:07:00.32 > bitrate=1594.8kbits/s dup=10500 drop=0 speed= 142x > [in#0/mov,mp4,m4a,3gp,3g2,mj2 @ 0x557c9a7e72c0] Terminating demuxer thread > [in#0/mov,mp4,m4a,3gp,3g2,mj2 @ 0x557c9a7e72c0] Input file #0 > (../test_clip.mp4): > [in#0/mov,mp4,m4a,3gp,3g2,mj2 @ 0x557c9a7e72c0] Input stream #0:0 > (video): 10513 packets read (83701450 bytes); 10511 frames decoded; 0 > decode errors; > [in#0/mov,mp4,m4a,3gp,3g2,mj2 @ 0x557c9a7e72c0] Total: 10513 packets > (83701450 bytes) demuxed > [AVIOContext @ 0x557c9a7e5d40] Statistics: 83871773 bytes read, 2 seeks > Conversion failed! > You applied both patches? At correct order? I probably should merge patches into single one. > > -- > Nicolas George > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". > _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
next prev parent reply other threads:[~2023-11-02 9:48 UTC|newest] Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-10-27 12:38 Paul B Mahol 2023-10-27 12:53 ` Nicolas George 2023-10-27 13:07 ` Paul B Mahol 2023-10-27 13:02 ` Nicolas George 2023-10-27 13:18 ` Paul B Mahol 2023-10-27 17:51 ` Paul B Mahol 2023-10-27 17:54 ` Nicolas George 2023-10-27 22:48 ` Paul B Mahol 2023-10-29 9:38 ` Nicolas George 2023-10-29 21:46 ` Paul B Mahol 2023-10-31 10:55 ` Nicolas George 2023-10-31 20:13 ` Paul B Mahol 2023-10-31 20:14 ` Paul B Mahol 2023-11-01 13:58 ` Nicolas George 2023-11-01 14:15 ` Paul B Mahol 2023-11-01 14:13 ` Nicolas George 2023-11-02 9:56 ` Paul B Mahol [this message] 2023-11-02 9:50 ` Nicolas George 2023-11-02 10:00 ` Paul B Mahol 2023-11-02 10:03 ` Nicolas George 2023-11-02 10:18 ` Paul B Mahol 2023-11-02 10:15 ` Nicolas George 2023-11-02 20:05 ` Tristan Matthews 2023-11-03 19:04 ` Nicolas George 2023-11-03 20:47 ` Paul B Mahol 2023-11-04 19:05 ` Nicolas George 2023-11-01 13:48 ` Jan Ekström 2023-11-01 13:56 ` Nicolas George 2023-11-01 14:23 ` James Almer 2023-11-01 14:28 ` Nicolas George
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to='CAPYw7P4dJL8WxQBduoRH73dn2do=AzbMhZOBeBVno8YH1fh1kQ@mail.gmail.com' \ --to=onemda@gmail.com \ --cc=ffmpeg-devel@ffmpeg.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git