Téléverser les fichiers vers "/"
This commit is contained in:
commit
1361684b0d
2 changed files with 27 additions and 0 deletions
22
conversion.c
Normal file
22
conversion.c
Normal file
|
@ -0,0 +1,22 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int main() {
|
||||
char input[256];
|
||||
char output[256];
|
||||
printf("Input file:\n");
|
||||
scanf("%s", input);
|
||||
printf("Output file:\n");
|
||||
scanf("%s", output);
|
||||
|
||||
char commande[256];
|
||||
snprintf(commande, sizeof(commande), "ffmpeg -i %s %s", input, output);
|
||||
|
||||
int result = system(commande);
|
||||
|
||||
if (result != 0) {
|
||||
printf("Erreur de conversion\n");
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
5
dockerfile
Normal file
5
dockerfile
Normal file
|
@ -0,0 +1,5 @@
|
|||
FROM gcc:latest
|
||||
WORKDIR /conversion
|
||||
COPY conversion.c .
|
||||
RUN gcc -o conversion conversion.c
|
||||
CMD [ "./conversion" ]
|
Loading…
Add table
Reference in a new issue