From: "softworkz ." <softworkz-at-hotmail.com@ffmpeg.org> To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Subject: Re: [FFmpeg-devel] [PATCH 2/2] ffprobe: show seekability details in format section Date: Mon, 14 Apr 2025 07:27:48 +0000 Message-ID: <DM8P223MB03652E81FA1353423133989FBAB32@DM8P223MB0365.NAMP223.PROD.OUTLOOK.COM> (raw) In-Reply-To: <4a2589b9-3952-437b-ae2a-c840f8fb591f@gyani.pro> > -----Original Message----- > From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of Gyan > Doshi > Sent: Montag, 14. April 2025 08:54 > To: ffmpeg-devel@ffmpeg.org > Subject: Re: [FFmpeg-devel] [PATCH 2/2] ffprobe: show seekability > details in format section > > > > On 2025-04-14 10:22 am, softworkz . wrote: > >>> Hi Gyan, > >>> > >>> the problem that I see here is that it's not machine-readable and > >> would require non-trivial parsing to translate back to the actual > >> information behind it. > >>> I think that either a separate sub-section or at least three > separate > >> values would be better. > >> > >> I can add a delimiter like | > >> > >> e.g. > >> > >> yes|time(pts),frame-index|demuxer,packet-scan|fast > >> > >> All of the phrases for an attribute are unique, and for that, they > just > >> need to grep, not parse the string. > >> Most CLI users will only care about two things: yes/no and forward- > only. > > When processing data using formats like XML or JSON by software, > there is no "grep". > > Machine-readable means (not only but including) that no additional > parsing needs to be done. The XML schema must indicate the possible > values and I don't believe that a pipe-delimited multi-string value > can be described with an XML schema. > > That would require one field for each bit i.e. > > seekable_normal=yes > seekable_protocol=no > seekable_via_demuxer=yes > ... > > That seems like too much bloat for CLI usage. > Any workflow that needs to *take action* based on the seek features, > as > opposed to data archival, should have access to string parsing tools. Start thinking from the other side: You want to define a class (be it Python, C#, Java, TypeScript or whatever) which corresponds to the FFprobe format output in a way that you can work with it efficiently in that application and then you serialize that class - that's how the output should be. For the representation of bitfields in the output, there are multiple ways. One way is like it's done for disposition: JSON: "disposition": { "default": 0, "dub": 0, "original": 0, "comment": 0, "lyrics": 0, "karaoke": 0, "forced": 0, "hearing_impaired": 0, "visual_impaired": 0, "clean_effects": 0, "attached_pic": 0, "timed_thumbnails": 0, "non_diegetic": 0, "captions": 0, "descriptions": 0, "metadata": 0, "dependent": 0, "still_image": 0, "multilayer": 0 }, another way would be a list of predefined (enum) values: which would look as follows in JSON: "disposition": ["original", "dub"], In an xml schema, the latter can be defined like this: <xs:element name="Flags"> <xs:complexType> <xs:sequence maxOccurs="unbounded"> <xs:element name="disposition"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:enumeration value="original"/> <xs:enumeration value="dub"/> <xs:enumeration value="lyrics"/> <!-- ... --> </xs:restriction> </xs:simpleType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> Then the XML would look like this: <MyElement> <disposition> <dispositionvalue>original</dispositionvalue> <dispositionvalue>dub</dispositionvalue> </disposition> </MyElement> > That seems like too much bloat for CLI usage. Whether it's "bloat" or not only depends on the output format. In the default or flat format this might probably condense to a disposition: original,dub output (not 100% sure, but it will be short in any case). sw _______________________________________________ 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:[~2025-04-14 7:28 UTC|newest] Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top 2025-04-13 11:15 [FFmpeg-devel] [PATCH 1/2] avformat: add avformat_query_seekable Gyan Doshi 2025-04-13 11:15 ` [FFmpeg-devel] [PATCH 2/2] ffprobe: show seekability details in format section Gyan Doshi 2025-04-13 16:18 ` softworkz . 2025-04-14 4:39 ` Gyan Doshi 2025-04-14 4:52 ` softworkz . 2025-04-14 4:57 ` softworkz . 2025-04-14 6:53 ` Gyan Doshi 2025-04-14 7:27 ` softworkz . [this message] 2025-04-14 10:36 ` Gyan Doshi 2025-04-14 8:34 ` Nicolas George 2025-04-13 16:09 ` [FFmpeg-devel] [PATCH 1/2] avformat: add avformat_query_seekable softworkz . 2025-04-14 4:23 ` Gyan Doshi 2025-04-14 4:40 ` softworkz . 2025-04-13 16:42 ` Zhao Zhili 2025-04-14 4:10 ` Gyan Doshi
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=DM8P223MB03652E81FA1353423133989FBAB32@DM8P223MB0365.NAMP223.PROD.OUTLOOK.COM \ --to=softworkz-at-hotmail.com@ffmpeg.org \ --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