예제 #1
0
     if ($mb_concept == "2" || $mb_concept == "3")
     {
     	$mb_name_age_caption	= $mb_baby_name." (".$mb_baby_age.")";
     	$cap_image2_2			= caption_image2_white($mb_name_age_caption, $mb_serial,"2",$caption_image2_name_w,$caption_image2_name_h);
     }
     */
 }
 $img_name5arr = explode(".", stripslashes($img_name5));
 $img_name5arr_num = count($img_name5arr) - 1;
 if ($img_name5arr[$img_name5arr_num] == "jpeg") {
     $img_name5arr[$img_name5arr_num] = "jpg";
 }
 $img_name5 = $mb_serial . "_5." . strtolower($img_name5arr[$img_name5arr_num]);
 $new_image5 = merge_image($img_name5, $mb_serial, "5", $mb_concept);
 $f_img_name5 = $mb_serial . "_5.jpg";
 $new_image5_1 = merge_image2($f_img_name5, $mb_serial, "5", $mb_concept);
 //$cap_image5			= caption_image($mb_caption5, $mb_serial,"5");
 sleep(3);
 $output = "ffmpeg \\";
 $output .= "-loop 1 -t 2 -i ./MOBILE/scene/concept_" . $mb_concept . "_1.jpg \\";
 $output .= "-loop 1 -t 1.5 -i ./files/" . $mb_serial . "/medium/final_" . $mb_serial . "_1.jpg \\";
 $output .= "-loop 1 -t 1.5 -i ./files/" . $mb_serial . "/medium/final_" . $mb_serial . "_2.jpg \\";
 $output .= "-loop 1 -t 2 -i ./files/" . $mb_serial . "/medium/final_" . $mb_serial . "_5.jpg \\";
 $output .= "-filter_complex \\";
 $output .= '"[1:v][0:v]blend=all_expr=';
 $output .= "'A*(if(gte(T,0.5),1,T/0.5))+B*(1-(if(gte(T,0.5),1,T/0.5)))'[b1v]; \\";
 $output .= " [2:v][1:v]blend=all_expr='A*(if(gte(T,0.5),1,T/0.5))+B*(1-(if(gte(T,0.5),1,T/0.5)))'[b2v]; \\";
 $output .= " [3:v][2:v]blend=all_expr='A*(if(gte(T,0.5),1,T/0.5))+B*(1-(if(gte(T,0.5),1,T/0.5)))'[b3v]; \\";
 $output .= ' [0:v][b1v][1:v][b2v][2:v][b3v][3:v]concat=n=7:v=1:a=0,format=yuv420p[v]" -pix_fmt yuv420p -map "[v]" ./files/' . $mb_serial . '/output.mp4';
 system(stripslashes($output));
 $output2 = "ffmpeg -i ./files/" . $mb_serial . "/output.mp4 -i ./MOBILE/scene/sound/" . $mb_concept . "-3_sound.mp4 -c:v copy -c:a copy ./files/" . $mb_serial . "/growmovie.mp4";
예제 #2
0
                 $caption_image2_h = "440;";
                 $caption_image2_name_w = "40;";
                 $caption_image2_name_h = "393;";
             }
         }
     }
 }
 $img_name1arr = explode(".", stripslashes($img_name1));
 $img_name1arr_num = count($img_name1arr) - 1;
 if ($img_name1arr[$img_name1arr_num] == "jpeg") {
     $img_name1arr[$img_name1arr_num] = "jpg";
 }
 $img_name1 = $mb_serial . "_1." . strtolower($img_name1arr[$img_name1arr_num]);
 $new_image1 = merge_image($img_name1, $mb_serial, "1", $mb_concept);
 $f_img_name1 = $mb_serial . "_1.jpg";
 $new_image1_1 = merge_image2($f_img_name1, $mb_serial, "1", $mb_concept);
 if ($mb_concept == "2") {
     $cap_image1 = caption_image_white($mb_caption1, $mb_serial, "1", $caption_image1_w, $caption_image1_h);
     $mb_name_age_caption = $mb_baby_name . " (" . $mb_baby_age . ")";
     $cap_image1_2 = caption_image2_white($mb_name_age_caption, $mb_serial, "1", $caption_image1_name_w, $caption_image1_name_h);
 } else {
     if ($mb_concept == "3") {
         $rs_caption_w3 = txt_position($mb_caption1, $mb_concept);
         $cap_image1 = caption_image_yellow($mb_caption1, $mb_serial, "1", $rs_caption_w3, $caption_image1_h);
     } else {
         if ($mb_concept == "4") {
             $cap_image1 = caption_image_white4($mb_caption1, $mb_serial, "1", $caption_image1_w, $caption_image1_h);
         } else {
             //$mb_caption1	= "어느덧 쑥쑥 자라서 너무 고마워";
             $rs_caption_w1 = txt_position($mb_caption1, $mb_concept);
             $cap_image1 = caption_image($mb_caption1, $mb_serial, "1", $rs_caption_w1, $caption_image1_h);