u2takey / ffmpeg-go

golang binding for ffmpeg
Apache License 2.0
1.66k stars 167 forks source link

force_key_frames error #104

Closed butoften closed 10 months ago

butoften commented 10 months ago

golang code is:

err = ffmpeg.Input("input.mp4").Output("input.m3u8", ffmpeg.KwArgs{"force_key_frames": "'expr:gte(t,n_forced*5)'", "c:v": "libx264", "c:a": "aac", "f": "hls", "hls_time": "5"}).Run()

when use this ,it show Error: exit status 1

ffmpeg it print is ffmpeg -i input.mp4 -c:a aac -c:v libx264 -f hls -force_key_frames 'expr:gte(t,n_forced*5)' -hls_time 5 index.m3u8 and when i run what it print in terminal, it is ok and work

please help me thank you

butoften commented 10 months ago

it's not the problem of ffmpeg-go,the source of error is golang cmd.run()