I am trying to create a simple C program that uses HandBrake (video converter). The only way to run this program is to have one of the (in my opinion) crappy GUIs or to type out all of the arguments in the command line. My program is simpler than the GUIs, and I don't need to type all of the arguments. I have everything ready except for one flaw. My program takes input that you want to be the file name after it is done converting. It saves the input in a variable named "filename". I then use system to run HandBrake and all of it's arguments. The code looks like this:
system("HandBrakeCLI -i /dev/hdc -o /root/??? -b 1024 -B 128 -R 48 -E faac -f mp4 -w 368 -l 208 -m");
Of course, the question marks aren't supposed to be there. That's where I'm stuck. I would like to have the input from the "filename" variable to be placed where the question marks are. I cannot use "$filename" because it shows an error while compiling. It might be something small that I missed, or I might just be doing it wrong. Any help is appreciated!