大家论坛

 找回密码
 注册
查看: 3066|回复: 3

[讨论] Multiple PNG sequences as overlays at different time points with FFMPEG

[复制链接]

1295

主题

1308

帖子

1310

金币

大家网研究生四年级

Rank: 25Rank: 25Rank: 25Rank: 25Rank: 25

积分
5457
发表于 2018-8-5 15:39 | 显示全部楼层 |阅读模式
'm trying to overlay three different PNG sequences at different time points in a video. The first sequence is working as intended. It animates between 0 and 4 sec. From 4 to 8 sec. I see only the last frame of the second sequence and from 8 to 12 sec. there is only the last frame of the third sequence. All three sequences are 100 frames.

Any ideas?

This is what I have been trying:

"C:\ffmpeg\bin\ffmpeg.exe" -i %1 ^
-start_number 0 -i "C:\Users\ojan\Documents\2017 Lukker\Vandmaerke_Start\Vandmaerke_Start_%%03d.png" ^
-start_number 0 -i "C:\Users\ojan\Documents\2017 Lukker\Vandmaerke_Midt\Vandmaerke_Midt_%%03d.png" ^
-start_number 0 -i "C:\Users\ojan\Documents\2017 Lukker\Vandmaerke_End\Vandmaerke_End_%%03d.png" ^
-filter_complex ^
"[0:v][1:v]overlay=enable='between(t,0,4)' [temp0]; ^
[temp0][2:v]overlay=enable='between(t,4,8)' [temp1]; ^
[temp1][3:v]overlay=enable='between(t,8,12)' [out]" -map [out] -map 0:a -c:a copy "C:\Users\ojan\Documents\2017 Lukker\output.mp4"

本人工科计算机专业程序媛一枚,感谢大家论坛并奉献本人收集的计算机资料,若本贴不能下载请回复,其他事由请点击这里
回复

使用道具 举报

1295

主题

1308

帖子

1310

金币

大家网研究生四年级

Rank: 25Rank: 25Rank: 25Rank: 25Rank: 25

积分
5457
 楼主| 发表于 2018-8-5 15:39 | 显示全部楼层

1
down vote
accepted
Use

ffmpeg -i %1 ^
-start_number 0 -i "C:\Users\ojan\Documents\2017 Lukker\Vandmaerke_Start\Vandmaerke_Start_%%03d.png" ^
-start_number 0 -itsoffset 4 -i "C:\Users\ojan\Documents\2017 Lukker\Vandmaerke_Midt\Vandmaerke_Midt_%%03d.png" ^
-start_number 0 -itsoffset 8 -i "C:\Users\ojan\Documents\2017 Lukker\Vandmaerke_End\Vandmaerke_End_%%03d.png" ^
-filter_complex ^
"[0:v][1:v]overlay=enable='between(t,0,4)' [temp0]; ^
[temp0][2:v]overlay=enable='between(t,4,8)' [temp1]; ^
[temp1][3:v]overlay=enable='between(t,8,12)' [out]" -map [out] -map 0:a -c:a copy "C:\Users\ojan\Documents\2017 Lukker\output.mp4"
FFmpeg is built to work with files containing timed samples. overlay filter uses frame pairs (BG/FG) as per corresponding timestamps. -itsoffset X offsets the timestamps contained in video or generated by ffmpeg (like for image sequences) by X seconds.
本人工科计算机专业程序媛一枚,感谢大家论坛并奉献本人收集的计算机资料,若本贴不能下载请回复,其他事由请点击这里
回复 支持 反对

使用道具 举报

5

主题

2504

帖子

55

金币

大家网研究生二年级

Rank: 19Rank: 19Rank: 19

积分
5204
发表于 2018-11-29 06:45 | 显示全部楼层
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则



诚聘英才|移动端|Archiver|版权声明|大家论坛 ( 京ICP备06071611号,京公网安备11010802018363号 )

GMT+8, 2020-8-14 08:37 , Processed in 0.087676 second(s), 13 queries , Redis On.

Powered by Discuz!

© Comsenz Inc.

快速回复 返回顶部 返回列表