ffmpeg stream offset command (-itsoffset) not working

限于喜欢 提交于 2019-11-29 04:09:41

Here is what I did and it work for me

The first input setting -i and the second input is come from the same one video file.

Delay 1 second in first input video and the second input audio just make a copy

ffmpeg -y -itsoffset 00:00:01.000 -i "d:\Video1.mp4" -i "d:\Video1.mp4"
 -map 0:v -map 1:a -vcodec copy -acodec copy
 -f mp4 -threads 2 -v warning "Video2.mp4"

Delay 1 second in second input audio and the first input video just make a copy

ffmpeg -y -i "d:\Video1.mp4" -itsoffset 00:00:01.000 -i "d:\Video1.mp4"
 -map 0:v -map 1:a -vcodec copy -acodec copy
 -f mp4 -threads 2 -v warning "Video2.mp4"

The problem is located on -vcodec copy -acodec copy because the shifting will only work on keyframes. I have had the same problem.

Just don't copy (audio/)video, try the thing with -itsoffset, but use

-vcodec libxvid -vtag XVID -b:v 1300K -g 240 -trellis 2 -mbd rd -flags +mv4+aic -acodec ac3 -ac 2 -ar 48000 -b:a 128k

for re-encoding. It should work.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!