Changes between Version 38 and Version 39 of FilteringGuide


Ignore:
Timestamp:
Jan 9, 2015, 7:47:30 AM (4 years ago)
Author:
c-14
Comment:

Put command in array, not arguments.

Legend:

Unmodified
Added
Removed
Modified
  • FilteringGuide

    v38 v39  
    106106cd $path
    107107
    108 filter=(-vf "yadif=0:-1:0, scale=400:226, drawtext=fontfile=/usr/share/fonts/truetype/DroidSans.ttf: \
    109 text='tod- %X':x=(w-text_w)/2:y=H-60 :fontcolor=white :box=1:boxcolor=0x00000000@1")
    110 codec=(-vcodec libx264  -pix_fmt yuv420p -b:v 700k -r 25 -maxrate 700k -bufsize 5097k)
     108filter="yadif=0:-1:0, scale=400:226, drawtext=fontfile=/usr/share/fonts/truetype/DroidSans.ttf: \
     109text='tod- %X':x=(w-text_w)/2:y=H-60 :fontcolor=white :box=1:boxcolor=0x00000000@1"
     110codec="-vcodec libx264  -pix_fmt yuv420p -b:v 700k -r 25 -maxrate 700k -bufsize 5097k"
    111111
    112 command_line="ffmpeg -i $in_file \"${filter[@]}\" \"${codec[@]}\" -an $out_file"
     112command_line=(ffmpeg -i $in_file -vf "$filter" "$codec" -an $out_file")
    113113
    114 echo $command_line
    115 $command_line
     114echo "${command_line[@]}"
     115"${command_line[@]}"
    116116exit
    117117}}}