[FFmpeg-user] help with quotes in bash script
Elliott Balsley
elliottbalsley at gmail.com
Wed May 21 03:01:59 CEST 2014
I have a bash script for running ffmpeg, which broke when I added more
than one video filter (which required adding quotes). Basically I
have several commands which append options to a long string called
$ffopts, then I call ffmpeg like this:
ffmpeg $ffpreopts -i "$f" -acodec libfdk_aac -b:a 128k $ffopts
"$output_dir/$base.mp4"
But it gives the below error.
[NULL @ 0x7f8473809200] Unable to find a suitable output format for
'format=pix_fmts=rgb24,'
format=pix_fmts=rgb24,: Invalid argument
I think this is something to do with my use of quotes, but I can't
figure it out. If I add a line in the script to echo $ffopts right
before running ffmpeg, it shows like this:
-vf "scale=hd720, format=pix_fmts=rgb24,
lut3d=file=/Users/elliott/scripts/BMD_LogC_709.dat,
format=pix_fmts=yuv420p" -vcodec libx264 -preset veryfast -tune film
-crf 20 -level 31 -profile:v high -g 8 -maxrate 4M -bufsize 10M
I can run ffmpeg successfully on the command line with that exact
string, but it won't run in the bash script.
Just in case my description isn't thorough, you can see the full
script here: http://pastebin.com/ddmVqSXj
More information about the ffmpeg-user
mailing list