ChinaFFmpeg

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 7904|回复: 2

[Linux] ffmpeg 多输入文件seek操作

[复制链接]
发表于 2019-9-9 10:23:24 | 显示全部楼层 |阅读模式
截取指定时间区间内 视频片段和背景音乐片段,如何一个命令搞定, ffmpeg 好像不能每一个输入文件执行seek 操作

ffmpeg -i QZmONF09A8RvzNxNZqL.mp4 -ss 10 -to 40 -i xinyang.mp3  -ss 60 -to 100  -filter_complex "subtitles=xinyang.lrc[v]" -map "[v]" -map 1:a -s 640x360 -c:a aac -shortest -copyts output2.mp4
回复

使用道具 举报

发表于 2019-9-9 15:46:26 | 显示全部楼层
支持的
ffmpeg -ss 10 -to 40  -i QZmONF09A8RvzNxNZqL.mp4 -ss 60 -to 100  -i xinyang.mp3    -filter_complex "subtitles=xinyang.lrc[v]" -map "[v]" -map 1:a -s 640x360 -c:a aac -shortest -copyts output2.mp4

这样试试看
回复 支持 反对

使用道具 举报

 楼主| 发表于 2019-9-11 12:01:46 | 显示全部楼层
本帖最后由 lexico 于 2019-9-11 17:10 编辑
孙悟空 发表于 2019-9-9 15:46
支持的
ffmpeg -ss 10 -to 40  -i QZmONF09A8RvzNxNZqL.mp4 -ss 60 -to 100  -i xinyang.mp3    -filter_co ...

谢谢大师兄,硬编码字幕时候遇到个问题 ,命令行如下 导致字幕压不进去 中文字幕乱码,是什么原因
./ffmpeg -loglevel info -report -hide_banner -y -ss 5 -t 40 -i QZmONF09A8RvzNxNZqL-zpYs-IO9K33kKbSqiQ___32.mp4 -ss 40 -t 80 -i xinyang.mp3 -filter_complex "[0:v]subtitles=/data/transcode/2019-09-11/1592198/xinyang.lrc[v];[0:a][1:a]amix=inputs=2[a]:weights=1 2[a]" -map "[v]" -map "[a]" -c:v libx264 -profile:v high -crf 23 -c:a libfdk_aac -shortest test.mp4

错误信息  fontconfig 配置文件及环境变量都已配置
Fontconfig error: Cannot load default config file

[Parsed_subtitles_0 @ 0x3fb28c0] Glyph 0x5F20 not found, selecting one more font for (Arial, 400, 0)
[Parsed_subtitles_0 @ 0x3fb28c0] Glyph 0x4FE1 not found, selecting one more font for (Arial, 400, 0)
[Parsed_subtitles_0 @ 0x3fb28c0] Glyph 0x54F2 not found, selecting one more font for (Arial, 400, 0)
[Parsed_subtitles_0 @ 0x3fb28c0] Glyph 0x6F14 not found, selecting one more font for (Arial, 400, 0)
[Parsed_subtitles_0 @ 0x3fb28c0] Glyph 0x5531 not found, selecting one more font for (Arial, 400, 0)
[Parsed_subtitles_0 @ 0x3fb28c0] Glyph 0x5F20 not found, selecting one more font for (Arial, 400, 0)
[Parsed_subtitles_0 @ 0x3fb28c0] Glyph 0x4FE1 not found, selecting one more font for (Arial, 400, 0)
[Parsed_subtitles_0 @ 0x3fb28c0] Glyph 0x54F2 not found, selecting one more font for (Arial, 400, 0)
[Parsed_subtitles_0 @ 0x3fb28c0] Glyph 0x6F14 not found, selecting one more font for (Arial, 400, 0)
[Parsed_subtitles_0 @ 0x3fb28c0] Glyph 0x5531 not found, selecting one more font for (Arial, 400, 0)

回复 支持 反对

使用道具 举报

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

本版积分规则

手机版|Archiver|ChinaFFmpeg

GMT+8, 2024-4-26 09:29 , Processed in 0.049238 second(s), 14 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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