Skip to content

Instantly share code, notes, and snippets.

@zsrinivas
Created June 3, 2014 10:50
Show Gist options
  • Select an option

  • Save zsrinivas/2814bdf733fa54c207ff to your computer and use it in GitHub Desktop.

Select an option

Save zsrinivas/2814bdf733fa54c207ff to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(int argc, char const *argv[])
{
FILE *fp;
int i=0;
char *p,string[1000],c,longcmd[1100]="ffmpeg -i """;
system("ls *.3gp > /tmp/convehjrtthevid19fjvfdo3.txt");
fp=fopen("/tmp/convehjrtthevid19fjvfdo3.txt", "r");
while(feof(fp) != EOF)
{
i=0;
while((c=fgetc(fp))!='\n')string[i++]=c;
strcat(longcmd,string);
strcat(longcmd, """ """);
string[i-1]='3';
string[i-2]='p';
string[i-3]='m';
strcat(longcmd, string);
strcat(longcmd, """");
system(longcmd);
}
fclose(fp);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment