bash: syntax error near unexpected token `(' u

2019-07-18 08:30发布

问题:

Im using ffmpeg to segment video. and use the following cammand

ffmpeg -i "data/raw_data/000000005.avi" -vf fps=X -f segment -segment_time 0.0333333333333333 -force_key_frames expr:gte(t,n_forced*0.0333333333333333) -reset_timestamps 1 -segment_time_delta 1.0 -c:a copy "test_break_up/audios/%d.wav"

The command above works on windows but when i run that command on ubuntu its throwing bash: syntax error near unexpected token('`

Can anyone give me guidance on what to do. Thanks

回答1:

I solve the my error by enclosing qoutes to expr:gte(t,n_forced*0.0333333333333333)

The updated command now works both on windows and ubuntu

ffmpeg -i "data/raw_data/000000005.avi" -vf fps=X -f segment -segment_time 0.0333333333333333 -force_key_frames "expr:gte(t,n_forced*0.0333333333333333)" -reset_timestamps 1 -segment_time_delta 1.0 -c:a copy "test_break_up/audios/%d.wav"


标签: ffmpeg