C   23

mkvdjob

Guest on 11th June 2022 05:28:20 PM

  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <string.h>
  4. #include <time.h>
  5.  
  6.  
  7. main(int argc, char *argv[]){
  8.     int i,j,t0,t1;
  9.         char OEXT[4]=".avi";
  10.         char buf[80],IN[30][100];
  11.         FILE *in,*out;
  12.         time_t timer=time(NULL);
  13.         t0=localtime(&timer)->tm_mon+1;
  14.         t1=localtime(&timer)->tm_mday;
  15.  
  16.         in=fopen("C:\\WORK\\AUTOVD.job","r");
  17.         i=1;
  18.         while(fgets(buf,80,in)){
  19.         sscanf(buf,"%s\n",IN[i]);
  20.                 i++;
  21.         }
  22.         i--;
  23.         fclose(in);
  24.     out=fopen("VirtualDub.jobs","w");
  25.         fprintf(out,"// VirtualDub job list (Sylia script format)\n");
  26.         fprintf(out,"// This is a program generated file -- edit at your own risk.\n");
  27.         fprintf(out,"//\n");
  28.         fprintf(out,"// $numjobs %d\n",i);
  29.         fprintf(out,"//\n\n");
  30.        
  31.         for(j=1;j<=i;j++){
  32.             fprintf(out,"// $job \"Job %d\"\n",j);
  33.         fprintf(out,"// $input \"C:\\WORK\\%s\\%s.avs\"\n",IN[j],IN[j]);
  34.         fprintf(out,"// $output \"C:\\WORK\\%s\\%s_%d%d.avi\"\n",IN[j],IN[j],t0,t1);
  35.         fprintf(out,"// $state 0\n");
  36.         fprintf(out,"// $start_time 0 0\n");
  37.         fprintf(out,"// $end_time 0 0\n");
  38.         fprintf(out,"// $script\n\n");
  39.         fprintf(out,"VirtualDub.Open(\"C:\\\\WORK\\\\%s\\\\%s.avs\",0,0);\n",IN[j],IN[j]);
  40.         fprintf(out,"VirtualDub.audio.SetSource(1);\n");
  41.         fprintf(out,"VirtualDub.audio.SetMode(1);\n");
  42.         fprintf(out,"VirtualDub.audio.SetInterleave(1,500,1,0,0);\n");
  43.         fprintf(out,"VirtualDub.audio.SetClipMode(1,1);\n");
  44.         fprintf(out,"VirtualDub.audio.SetConversion(48000,2,2,0,0);\n");
  45.         fprintf(out,"VirtualDub.audio.SetVolume(512);\n");
  46.         fprintf(out,"VirtualDub.audio.SetCompression(85,24000,2,0,6000,1,12,\"AQACAAAAkAABAHEF\");\n");
  47.         fprintf(out,"VirtualDub.video.SetDepth(24,24);\n");
  48.         fprintf(out,"VirtualDub.video.SetMode(3);\n");
  49.         fprintf(out,"VirtualDub.video.SetFrameRate(0,1);\n");
  50.         fprintf(out,"VirtualDub.video.SetIVTC(0,0,-1,0);\n");
  51.         fprintf(out,"VirtualDub.video.SetRange(0,0);\n");
  52.         fprintf(out,"VirtualDub.video.SetCompression(0x78766964,0,10000,0);\n");
  53.         fprintf(out,"VirtualDub.video.SetCompData(360,\"NAEAAAAAAAABAAAA4OYLAAAAsEABAAAAAAAAAAAAAAAAAAAALAEAADIAAADABHcAAAAwAAAAJAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAQAAAAAAAACamZmZmZnJP5qZmZmZmck/AgAAAAAAAAAAAAAAgAIAAOABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4D8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABkAAAAAAAAAAEAAAABAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAACAAAA/////wEAAAAAAAAAAQAAAAIAAABjOlxkaXZ4LmxvZwBjOlx0ZXN0LmRpdngAYzpcbXZpbmZvLmJpbgBjOlxuZXdyYy50eHQA\");\n");
  54.         fprintf(out,"VirtualDub.video.filters.Clear();\n");
  55.         fprintf(out,"VirtualDub.video.filters.Add(\"deinterlace\");\n");
  56.         fprintf(out,"VirtualDub.video.filters.instance[0].Config(0);\n");
  57.         fprintf(out,"VirtualDub.video.filters.Add(\"temporal smoother\");\n");
  58.         fprintf(out,"VirtualDub.video.filters.instance[1].Config(7);\n");
  59.         fprintf(out,"VirtualDub.video.filters.Add(\"resize\");\n");
  60.         fprintf(out,"VirtualDub.video.filters.instance[2].Config(640,480,1);\n");
  61.         fprintf(out,"VirtualDub.subset.Delete();\n");
  62.         fprintf(out,"VirtualDub.SaveAVI(\"C:\\\\WORK\\\\%s\\\\%s_%d%d.avi\");\n",IN[j],IN[j],t0,t1);
  63.         fprintf(out,"VirtualDub.Close();\n\n");
  64.         fprintf(out,"// $endjob\n");
  65.         fprintf(out,"//\n");
  66.         fprintf(out,"//--------------------------------------------------\n");
  67.     }
  68.         fprintf(out,"// $done\n\n");
  69.         fclose(out);
  70. }

Raw Paste


Login or Register to edit or fork this paste. It's free.