我填充 MP4 文件,然后将其转换为 GIF,但为什么 FFmpeg 将 gif 修剪为较短的视频?
ffmpeg -i Media1.mp4 -f lavfi -i anullsrc -c:v copy -af apad -t 5.83 Media1extended.mp4
ffmpeg -i Media1extended.mp4 -vf "split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" -loop 0 Media1extended.gif
怎样才能让它不被修剪呢?例如命令-autotrim 0
编辑:这是我的命令,它不起作用
ffmpeg -i Media1.mp4 -vf tpad=stop_mode=clone:stop_duration=5.83 Media1extended.mp4
ffmpeg -i Media1extended.mp4 -vf "split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse;tpad=stop_mode=clone:stop_duration=5.83" -loop 0 Media1extended.gif
Simple filtergraph 'split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse;tpad=stop_mode=clone:stop_duration=5.83' was expected to have exactly 1 input and 1 output. However, it had >1 input(s) and >1 output(s). Please adjust, or use a complex filtergraph (-filter_complex) instead.
Error reinitializing filters!
Failed to inject frame into filter network: Invalid argument
Error while processing the decoded data for stream #0:0
编辑:这有效
ffmpeg -i Media1.mp4 -vf tpad=stop_mode=clone:stop_duration=5.83 Media1extended.mp4
ffmpeg -i Media1extended.mp4 -vf "split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" -t 5.83 -loop 0 Media1extended.gif