Closed butoften closed 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
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
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
please help me thank you
it's not the problem of ffmpeg-go,the source of error is golang cmd.run()
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 workplease help me thank you