From: Stefano Sabatini <stefasab@gmail.com> To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Subject: Re: [FFmpeg-devel] sendcmd filter now can send metadata Date: Sun, 14 May 2023 11:31:30 +0200 Message-ID: <20230514093130.GJ4348@mariano> (raw) In-Reply-To: <CAMN8xvm1U9E7Z1dXQ5kjMTYL4xTTe1YRmRcJ23Q9sf9TJF+kJQ@mail.gmail.com> On date Tuesday 2023-05-02 23:30:41 +0300, Сергей Солтанов wrote: > Hi! > I googled tonnes of information about how to forward data from one filter > to another, but nothing possible. The only way is to send some current > frame data as a command with sendcmd filter, but most of it accessible by > filters themselves. > Most of interesting data prepared by some analysing filters like > cropdetect, signalstats etc. and saved in frame metadata. > It could be a good idea to send it somehow to next filters in filtergraph. > > So I added a small code to sendcmd filter, so it can evaluate function > meta(key) in its commands when [expr] flag is used, e.g.: > ------------------- > ffmpeg ... -vf cropdetect=reset=1,\ > sendcmd=c='0 [expr] crop x 10+meta(lavfi.cropdetect.x),\ > [expr] crop y meta(lavfi.cropdetect.y)+meta(lavfi.cropdetect.h)/2,\ > [expr] crop w meta(lavfi.cropdetect.w)-10\ > [expr] crop h 0.5*meta(lavfi.cropdetect.h)'\ > ,crop > ------------------- > > I don't know how to use git here, so just cloned last version (v5.1) and > edited f_sendcmd.c. > If my contribution is interesting, I'll try to upload it into repository, > but I need some help, or maybe someone will do it? > > Please, find updated file in attachment. It's easier to review this if you send a patch: https://ffmpeg.org/git-howto.html#Basics-Usage This is the process: git clone https://git.ffmpeg.org/ffmpeg.git cd ffmpeg # edit edit edit test edit git diff git commit -a git format-patch HEAD~1 Then you send the generated patch as an attachment to your reply. We also need documentation changes (in doc/filters.texi) to provide context and examples for the feature. Thanks. _______________________________________________ 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".
prev parent reply other threads:[~2023-05-14 9:31 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-05-02 20:30 Сергей Солтанов 2023-05-14 9:31 ` Stefano Sabatini [this message]
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=20230514093130.GJ4348@mariano \ --to=stefasab@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