English 中文(简体)
• 如何使用mp子,为aco子提供支持
原标题:how to use ffmpeg with gpu support on macos

当我用我的加拿大邮联进行指挥时,它需要很长的时间才能做这项工作,我怎么能够强迫我这个总会做?

我有一张MacOS,有AMD Radeon R9 M370X 2048 MB。 我必须安装什么,必须用什么指挥来开展这项工作?

我在手稿操作时使用这一指挥系统:

$source_decoder = "ffmpeg -i $film_aval_source -vf drawtext="text_shaping=1:fontfile=$font_source:
    text= $esme_film : fontcolor=black: fontsize=$font_size: box=1: boxcolor=black@0:
    boxborderw=0: x=(w-text_w)/2: y=(h-text_h)/2 :enable= between(t,5,10) "  -c:a copy -force_key_frames 0:05:00,0:6:00 $film_aval_dest";

$source_decoder = "ffmpeg -i $film_aval_source -i ".$path."/Data.jpg -filter_complex  [0:v][1:v]overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2:enable=between(t,5,10)  -codec:a copy $film_aval_dest";

$convert1 = "ffmpeg -i $film_aval_dest -map 0 -flags:v +global_header -c:v libx264 -bsf:v dump_extra ".$path."output1.ts";

$convert_logo = "ffmpeg -i $path_tmp -i ".$main_path."/data/logo.png -filter_complex  overlay=4:4  -codec:a copy $path_tmp2";

$convert2 = "ffmpeg -i $path_tmp2 -map 0 -flags:v +global_header -c:v libx264 -bsf:v dump_extra ".$path."output2.ts";
$merge = "ffmpeg -i  concat:".$path."output1.ts|".$path."output2.ts  -map 0 -flags:v +global_header -c:v libx264 -bsf:v dump_extra ".$path."output_new.ts";
$convert3 = "ffmpeg -i  ".$path."output_new.ts -acodec aac -vcodec copy ".$path."video_out2.mp4";

感谢

最佳回答

用于硬件的加速视频编码,用于MacOS的使用:

Format Encoder
H.264 -c:v h264_videotoolbox
HEVC/H.265 -c:v hevc_videotoolbox

例:

ffmpeg -i input.mov -c:v h264_videotoolbox output.mp4
  • For options specific to these encoders see ffmpeg -h encoder=h264_videotoolbox and ffmpeg -h encoder=hevc_videotoolbox.
  • These encoders do not support -crf so you must use -b:v to set the bitrate, such as -b:v 6000k.
问题回答

暂无回答




相关问题
Non-linear video editing tool/API?

Can anyone recommend a good library that would enable me to write an application that can blend multiple input videos into one output video (for example into a split screen). I don t care about the ...

WPF playing a video, shopping up, can I preload?

Im showing a video int my application, but its being chopped up, its locally on disc so I dont understand why this is so... any way i can start to preload it before playing it - so the content would ...

FLVs on timeline are glitching out

I have a Movieclip with about five FLV movies embedded on its timeline, one after another. I am loading multiple instances (about 5-10) of this movieclip onto the stage. Once added to the stage, they ...

Get the dimensions of a H.264 MP4

Does anybody know a ready-made, reliable way to tell the dimensions (width x height) of a MP4 encoded using the H.264 codec without ffmpeg or similar extensions, in pure PHP? Thanks for all the ...

热门标签