2 Replies - 242 Views - Last Post: 07 June 2020 - 10:04 AM Rate Topic: -----

#1 chrisjchrisj   User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 141
  • Joined: 04-February 19

Help with two lines of code - syntax issue?

Posted 05 June 2020 - 02:18 PM

(Not sure which programming category this fits into).
Can you help me, with possible syntax error(s), or missing something in each of these ffmpeg lines:


$ffmpegCommand =''.$ffmpeg_b' $gif_video_time -y -i' $video_file_full_path .$full_dir . $gif_video;


and this one:


$ffmpeg_b $gif_video_time -y -i $video_file_full_path -vcodec libx264 -preset {$pt->config->convert_speed} -filter:v scale=3840:-2 -crf 26 ".$full_dir . $gif_video." 2>&1;




thanks for any help

Is This A Good Question/Topic? 0
  • +

Replies To: Help with two lines of code - syntax issue?

#2 no2pencil   User is offline

  • Professor Snuggly Pants
  • member icon

Reputation: 6876
  • View blog
  • Posts: 31,666
  • Joined: 10-May 07

Re: Help with two lines of code - syntax issue?

Posted 05 June 2020 - 02:24 PM

On the first line of code, you used the dot separator at the beginning of the variable, but not at the end. Not sure why you have double single quotes with nothing in them. Why not just start with the variable?

$ffmpegCommand =$ffmpeg_b.' '.$gif_video_time.' -y -i'.$video_file_full_path.$full_dir.$gif_video;



Or just use double quotes.

$ffmpegCommand ="$ffmpeg_b $gif_video_time -y -i $video_file_full_path $full_dir $gif_video";


Was This Post Helpful? 0
  • +
  • -

#3 Dormilich   User is offline

  • 痛覚残留
  • member icon

Reputation: 4278
  • View blog
  • Posts: 13,563
  • Joined: 08-June 10

Re: Help with two lines of code - syntax issue?

Posted 07 June 2020 - 10:04 AM

View Postno2pencil, on 05 June 2020 - 11:24 PM, said:

Or just use double quotes.

Given that the variables were properly treated according to the context change (=> escapeshellarg()).
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1