ffmpeg - 如何修复输出流 0:1 中的非单调 DTS;使用 ffmpeg 时
问题描述
当我使用ffmpeg
to convert m3u8
to 时mp4
,我收到一些警告,
ffmpeg -i xx.m3u8 -c copy demo.mp4
警告是
Non-monotonous DTS in output stream 0:1; previous: 3277744, current: 3276712; changing to 3277745. This may result in incorrect timestamps in the output file.
Non-monotonous DTS in output stream 0:1; previous: 3277745, current: 3277736; changing to 3277746. This may result in incorrect timestamps in the output file.
我应该怎么做才能解决它?
解决方案
你可以试试这个:
ffmpeg -i xx.m3u8 -c copy -bsf:a aac_adtstoasc demo.mp4
根据此论坛帖子,您还可以尝试:
似乎解码时间戳被破坏了。您可以尝试“-fflags +igndts”根据PTS重新生成DTS:
或者直接指向.ts
文件,忽略DTS:
ffmpeg -fflags +igndts -i xx.ts -map 0:0 -map 0:2 -c:v copy -c:a copy demo.mp4
推荐阅读
- python - 如何在终止事件循环之前等待所有任务完成?
- asp.net-mvc - 如何在 MVC 5 的单个视图中使用多个模型在多个表中发布数据?
- javascript - 在 Framer Motion 中错开兄弟姐妹以执行共享按钮动画?
- linux - Yocto 引导分区 vs 引导 rootfs 目录
- c - 为什么我的程序在 scanf 后停止工作?
- postgresql - 尝试在表中插入多行时,由于用作表达式的子查询返回多行而出现错误
- flutter - 克隆旧的颤振项目,它不工作,任何想法如何解决这个问题
- azure - 如何解决 FluxCD 中的“未找到 GitRepository”错误?
- swiftui - 使用 TextField 为 SwiftUI 创建 OTP 页面
- python - Python isnull() - 连续使用 Lambda