home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.os.vms      DEC's VAX* line of computers & VMS.      264,096 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 262,378 of 264,096   
   =?UTF-8?Q?Arne_Vajh=C3=B8j?= to Simon Clubley   
   Re: Local Versus Global Command Options   
   14 Feb 25 11:33:32   
   
   From: arne@vajhoej.dk   
      
   On 2/14/2025 8:38 AM, Simon Clubley wrote:   
   > On 2025-02-13, Lawrence D'Oliveiro  wrote:   
   >> What would DCL-style syntax for ffmpeg look like? I suppose one   
   >> obvious equivalence would be   
   >>   
   >>      ffmpeg -   
   >>          «infile-1»/«local-input-options-1»,«infile-2»/   
   «local-input-options-2»,... -   
   >>          «outfile-1»/«local-output-options-1»,«outfile-2   
   »/«local-output-options-2»,... -   
   >>   
   >> (being very careful about where the commas go), but what about the   
   >> syntax for filtergraphs? Would it be something like   
   >>   
   >>      /vf=(«filter-name-1»=«filter-params-1»,«filter-name   
   2»=«filter-params-2»...)   
   >>   
   >> Does DCL have provision for this sort of complexity?   
   >   
   > Not in any meaningful way. There's no way to validate the syntax or   
   > parameters of a filter or other ffmpeg syntax with DCL. For a simple   
   > example, when merging two files, one with an audio stream and one with   
   > a video stream, into a MP4 output container then specifying the input and   
   > output video stream numbers would be a parameter along the lines of "0:v:0".   
   >   
   > How would you even specify in DCL the first and last fields are numbers   
   > and the middle field is a letter from a list of valid values ?   
   >   
   > You can use DCL syntax in the way you specify, but the vast majority   
   > of the parsing would still have to be done in ffmpeg as it is at the   
   > moment. DCL syntax doesn't really give you anything extra.   
      
   You can define a bit in CLD. Including specifying that   
   something is a number and something else is from an   
   enumeration list.   
      
   $ type fun3.cld   
   define verb fun3   
        image "sys$disk:[]fun3"   
        parameter p1, value(type=$file, list, required)   
   qualifier q, value(type=threeitems, list, required), placement=local   
   define type threeitems   
        keyword a, value(type=$number, required)   
        keyword b, value(type=$quoted_string, required)   
        keyword c, value(type=myenum, required)   
   define type myenum   
        keyword x   
        keyword y   
        keyword z   
   $ type fun3.pas   
   [inherit('sys$library:pascal$cli_routines')]   
   program fun3(input,output);   
      
   type   
       pstr = varying [255] of char;   
      
   var   
       fnm, a, b, c : pstr;   
      
   begin   
       while odd(cli$get_value('P1', fnm.body, fnm.length)) do begin   
          write(fnm);   
          if odd(cli$present('Q')) then begin   
             cli$get_value('Q.A', a.body, a.length);   
             write(' A=', a);   
             cli$get_value('Q.B', b.body, b.length);   
             write(' B=', b);   
             cli$get_value('Q.C', c.body, c.length);   
             write(' C=', c);   
          end;   
          writeln;   
       end;   
   end.   
   $ pas fun3   
   $ lin fun3   
   $ set comm fun3   
   $ fun3 x.dat/q=(a:1,b:"This is x",c:x), y.dat/q=(a:2,b:"This is y",c:y),   
   z.dat/q=(a:3,b:"This is z",c:z)   
   x.dat A=1 B="This is x" C=X   
   y.dat A=2 B="This is y" C=Y   
   z.dat A=3 B="This is z" C=Z   
   $ on error then continue   
   $ fun3 x.dat/q=(a:x,b:"This is x",c:x), y.dat/q=(a:2,b:"This is y",c:y),   
   z.dat/q=(a:3,b:"This is z",c:z)   
   %DCL-W-NUMBER, invalid numeric value - supply an integer   
     \X\   
   $ fun3 x.dat/q=(a:1,b:"This is x",c:xdat), y.dat/q=(a:2,b:"This is   
   y",c:y), z.dat/q=(a:3,b:"This is z",c:z)   
   %DCL-W-IVKEYW, unrecognized keyword - check validity and spelling   
     \XDAT\   
      
   Arne   
      
   --- SoupGate-DOS v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca